starknet_addDeclareTransaction RPC Method
Parameters
declare_transaction
object
REQUIRED
Loading...
BROADCASTED_DECLARE_TXN_V1
object
Loading...
type
string
REQUIRED
Loading...
sender_address
string
REQUIRED
Loading...
max_fee
string
REQUIRED
Loading...
version
string
REQUIRED
Loading...
signature
string
REQUIRED
Loading...
nonce
string
REQUIRED
Loading...
contract_class
object
REQUIRED
Loading...
sierra_program
array
REQUIRED
Loading...
contract_class_version
string
REQUIRED
Loading...
entry_points_by_type
object
REQUIRED
Loading...
CONSTRUCTOR
array
REQUIRED
Loading...
selector
string
REQUIRED
Loading...
function_idx
integer
REQUIRED
Loading...
EXTERNAL
array
REQUIRED
Loading...
selector
string
REQUIRED
Loading...
function_idx
integer
REQUIRED
Loading...
L1_HANDLER
array
REQUIRED
Loading...
selector
string
REQUIRED
Loading...
function_idx
integer
REQUIRED
Loading...
abi
string
Loading...
BROADCASTED_DECLARE_TXN_V2
object
Loading...
type
string
REQUIRED
Loading...
sender_address
string
REQUIRED
Loading...
compiled_class_hash
string
REQUIRED
Loading...
max_fee
string
REQUIRED
Loading...
version
string
REQUIRED
Loading...
signature
string
REQUIRED
Loading...
nonce
string
REQUIRED
Loading...
contract_class
object
REQUIRED
Loading...
sierra_program
array
REQUIRED
Loading...
contract_class_version
string
REQUIRED
Loading...
entry_points_by_type
object
REQUIRED
Loading...
CONSTRUCTOR
array
REQUIRED
Loading...
selector
string
REQUIRED
Loading...
function_idx
integer
REQUIRED
Loading...
EXTERNAL
array
REQUIRED
Loading...
selector
string
REQUIRED
Loading...
function_idx
integer
REQUIRED
Loading...
L1_HANDLER
array
REQUIRED
Loading...
selector
string
REQUIRED
Loading...
function_idx
integer
REQUIRED
Loading...
abi
string
Loading...
BROADCASTED_DECLARE_TXN_V3
object
Loading...
type
string
REQUIRED
Loading...
sender_address
string
REQUIRED
Loading...
compiled_class_hash
string
REQUIRED
Loading...
max_fee
string
REQUIRED
Loading...
version
string
REQUIRED
Loading...
signature
string
REQUIRED
Loading...
nonce
string
REQUIRED
Loading...
contract_class
object
REQUIRED
Loading...
sierra_program
array
REQUIRED
Loading...
contract_class_version
string
REQUIRED
Loading...
entry_points_by_type
object
REQUIRED
Loading...
CONSTRUCTOR
array
REQUIRED
Loading...
selector
string
REQUIRED
Loading...
function_idx
integer
REQUIRED
Loading...
EXTERNAL
array
REQUIRED
Loading...
selector
string
REQUIRED
Loading...
function_idx
integer
REQUIRED
Loading...
L1_HANDLER
array
REQUIRED
Loading...
selector
string
REQUIRED
Loading...
function_idx
integer
REQUIRED
Loading...
abi
string
Loading...
resource_bounds
object
REQUIRED
Loading...
l1_gas
string
REQUIRED
Loading...
l2_gas
string
REQUIRED
Loading...
tip
string
REQUIRED
Loading...
paymaster_data
array
REQUIRED
Loading...
account_deployment_data
array
REQUIRED
Loading...
nonce_data_availability_mode
string
REQUIRED
Loading...
fee_data_availability_mode
string
REQUIRED
Loading...
Returns
result
object
Loading...
transaction_hash
string
Loading...
class_hash
string
Loading...
Request
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8' \4--header 'accept: application/json' \5--header 'content-type: application/json' \6--data '7{8"id": 1,9"jsonrpc": "2.0",10"method": "starknet_addDeclareTransaction",11"params": [12{13"max_fee": "MAX_FEE",14"version": "VERSION",15"signature": [16"SIGNATURE"17],18"nonce": "NONCE_VALUE",19"type": "DECLARE",20"contract_class": {21"sierraProgram": [22"SIERRA_PROGRAM"23],24"contractClassVersion": "CONTRACT_CLASS_VERSION",25"entryPointsByType": {26"CONSTRUCTOR": [27{28"selector": "SELECTOR",29"functionIdx": 030}31],32"EXTERNAL": [33{34"selector": "SELECTOR",35"functionIdx": 036}37],38"L1_HANDLER": [39{40"selector": "SELECTOR",41"functionIdx": 042}43]44},45"abi": "ABI"46},47"sender_address": "SENDER_ADDRESS",48"compiled_class_hash": "COMPILED_CLASS_HASH"49}50]51}52'
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8' \4--header 'accept: application/json' \5--header 'content-type: application/json' \6--data '7{8"id": 1,9"jsonrpc": "2.0",10"method": "starknet_addDeclareTransaction",11"params": [12{13"max_fee": "MAX_FEE",14"version": "VERSION",15"signature": [16"SIGNATURE"17],18"nonce": "NONCE_VALUE",19"type": "DECLARE",20"contract_class": {21"sierraProgram": [22"SIERRA_PROGRAM"23],24"contractClassVersion": "CONTRACT_CLASS_VERSION",25"entryPointsByType": {26"CONSTRUCTOR": [27{28"selector": "SELECTOR",29"functionIdx": 030}31],32"EXTERNAL": [33{34"selector": "SELECTOR",35"functionIdx": 036}37],38"L1_HANDLER": [39{40"selector": "SELECTOR",41"functionIdx": 042}43]44},45"abi": "ABI"46},47"sender_address": "SENDER_ADDRESS",48"compiled_class_hash": "COMPILED_CLASS_HASH"49}50]51}52'
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free