post https://api.infstones.com/starknet/mainnet/
Submit a new transaction to be added to the chain
Parameter
-
Version 1 Invoke Transaction
Invoke transaction version 0 is deprecated and will be removed in a future release of Starknet.
Key | Required | Type | Detail |
---|---|---|---|
sender_address | ✅ | String | Address the transaction is sent from |
call_data | ✅ | List<String> | The arguments that are passed to the validate and execute functions |
max_fee | ✅ | String | The maximum fee that the sender is willing to pay for the transaction |
nonce | ✅ | String | The transaction nonce |
version | ✅ | String | The transaction’s version. The value is 1 |
signature | ✅ | List<String> | Additional information given by the sender, used to validate the transaction |
"params": [
{
"sender_address": "0x050363a82213c7057c059df0e28fb2745f0e2805981e8a9aa7df71038606cdf4",
"type": "INVOKE",
"calldata": [
"0x3"
],
"signature": [
"0x4ec0d22aa57339908b45935b8e393fcc9a1a526fe082fe4696c6b7391727bd7",
"0x29d68e63466ac4acede99547486ff204da97ff2486930fac7273a6134a0940b"
],
"version": "1",
"max_fee": "0x1",
"nonce": "0"
}
]
Result
The hash of the invoke transaction
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '```postman_json
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_addInvokeTransaction",
"params": [
{
"sender_address": "0x050363a82213c7057c059df0e28fb2745f0e2805981e8a9aa7df71038606cdf4",
"type": "INVOKE",
"calldata": [
"0x3"
],
"signature": [
"0x4ec0d22aa57339908b45935b8e393fcc9a1a526fe082fe4696c6b7391727bd7",
"0x29d68e63466ac4acede99547486ff204da97ff2486930fac7273a6134a0940b"
],
"version": "1",
"max_fee": "0x1",
"nonce": "0"
}
]
}
'
Return
{
"jsonrpc": "2.0",
"result": {
"transaction_hash": "0x3cf80e627fc2c2512fbf84133af6e3542e739206efb26067f56bbffc1f76f23"
},
"id": 1
}