Skip to main content

starknet_addInvokeTransaction RPC Method

Submit a new transaction to be added to the chain.

Updated on
Mar 18, 2024

starknet_addInvokeTransaction RPC Method

Parameters

invoke_transaction
object
REQUIRED
The information needed to invoke the function (or account, for version 1 transactions). It can be one of the following:
INVOKE_TXN_V0
object
The invoke transaction V0 object which contains the following field:
type
string
REQUIRED
The type of declare. It can take only one value - 'INVOKE'
max_fee
string
REQUIRED
The maximal fee that can be charged for including the transaction
version
string
REQUIRED
The version of the transaction scheme
signature
string
REQUIRED
The signature associated with the transaction
contract_address
string
REQUIRED
The address of the contract
entry_point_selector
string
REQUIRED
The entry point selector
calldata
array
REQUIRED
The parameters passed to the constructor
INVOKE_TXN_V1
object
The invoke transaction V1 object which contains the following field:
type
string
REQUIRED
The type of declare. It can take only one value - 'INVOKE'
sender_address
string
REQUIRED
The sender address
calldata
array
REQUIRED
The parameters passed to the constructor
max_fee
string
REQUIRED
The maximal fee that can be charged for including the transaction
version
string
REQUIRED
The version of the transaction scheme
signature
string
REQUIRED
The signature associated with the transaction
nonce
string
REQUIRED
The nonce value
INVOKE_TXN_V3
object
The invoke transaction V3 object which contains the following field:
type
string
REQUIRED
The type of declare. It can take only one value - 'INVOKE'
sender_address
string
REQUIRED
The sender address
calldata
array
REQUIRED
The parameters passed to the constructor
version
string
REQUIRED
The version of the transaction scheme
signature
string
REQUIRED
The signature associated with the transaction
nonce
string
REQUIRED
The nonce value
resource_bounds
object
REQUIRED
The resource bounds for the transaction execution
l1_gas
string
REQUIRED
The max amount and max price per unit of L1 gas used in this tx
l2_gas
string
REQUIRED
The max amount and max price per unit of L2 gas used in this tx
tip
string
REQUIRED
The tip for the transaction
paymaster_data
array
REQUIRED
The data needed to allow the paymaster to pay for the transaction in native tokens
account_deployment_data
array
REQUIRED
The data needed to deploy the account contract from which this tx will be initiated
nonce_data_availability_mode
string
REQUIRED
The storage domain of the account's nonce (an account has a nonce per DA mode). It can be one of 'L1' or 'L2'
fee_data_availability_mode
string
REQUIRED
The storage domain of the account's balance from which fee will be charged. It can be one of 'L1' or 'L2'

Returns

result
object
The result of the transaction submission
transaction_hash
string
The hash of the invoke transaction
Request
1
curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/' \
2
--header 'accept: application/json' \
3
--header 'content-type: application/json' \
4
--data '{
5
"id": 1,
6
"jsonrpc": "2.0",
7
"method": "starknet_addInvokeTransaction",
8
"params": [
9
{
10
"sender_address": "SENDER_ADDRESS",
11
"type": "INVOKE",
12
"calldata": [
13
"CALLDATA"
14
],
15
"signature": [
16
"SIGNATURE"
17
],
18
"version": "VERSION",
19
"max_fee": "MAX_FEE",
20
"nonce": "NONCE_VALUE"
21
}
22
]
23
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free