Skip to main content

/runGetMethod REST API Endpoint

Run get method on smart contract.

Updated on
Oct 23, 2024

/runGetMethod REST API Endpoint

Body Parameters

address
string
REQUIRED
An identifier of target TON account in raw form
method
string
REQUIRED
The method name being called
stack
array
REQUIRED
The stack is an array of parameters passed to the method
seqno
integer
REQUIRED
The sequence number (seqno) represents the block sequence on the TON blockchain at which the method is being called

Returns

ok
boolean
Indicates that the request was successful
result
object
The result object which contains the following fields:
@type
string
The type of the returned result object, indicating that this is the result of a smart contract method execution
gas_used
integer
The amount of gas (computational resources) used to execute the method
stack
array
An array containing the result of the method execution
exit_code
integer
The exit code of the smart contract method execution
@extra
string
Extra data, used for debugging or tracking purposes
block_id
object
The block_id object which contains the following fields:
@type
string
The type indicating it's a block ID
workchain
integer
Represents the masterchain
shard
string
The shard identifier within the workchain
seqno
integer
The sequence number of the block
root_hash
string
The root hash of the block
file_hash
string
The file hash of the block
last_transaction_id
object
The last_transaction_id object which contains the following fields:
@type
string
The type indicating it's an internal transaction ID
lt
string
Logical time of the transaction
hash
string
The hash of the transaction
Request
1
curl --location 'https://docs-demo.ton-mainnet.quiknode.pro/runGetMethod' \
2
--header 'accept: application/json' \
3
--header 'Content-Type: application/json' \
4
--data '{
5
"address": "EQCg1gU0NGQ0fZTAf8v7H6tPkY0P7l17U09lKDU8NfRB8Dyq",
6
"method": "getConsensusBlock",
7
"stack": [
8
["num", "0x1"]
9
],
10
"seqno": 41146349
11
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free