Skip to main content
POST
/
api
/
v2
/
runGetMethod
Run Get Method
curl --request POST \
  --url https://toncenter.com/api/v2/runGetMethod \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": "<string>",
  "method": "<string>",
  "stack": [
    [
      "<string>"
    ]
  ],
  "seqno": 123
}
'
{ "ok": true, "result": { "@type": "smc.runResult", "gas_used": 123, "stack": [ [ "<string>" ] ], "exit_code": 123, "block_id": { "@type": "ton.blockIdExt", "workchain": 123, "shard": "<string>", "seqno": 123, "root_hash": "<string>", "file_hash": "<string>" }, "last_transaction_id": { "@type": "internal.transactionId", "lt": "<string>", "hash": "<string>" } } }

SDK Usage

import asyncio

from toncenter.rest import ToncenterRestClient
from toncenter.types import Network

ADDRESS = "EQC3dNlesgVD8YbAazcauIrXBPfiVhMMr5YYk2in0Mtsz0Bz"
METHOD = "dnsresolve"
STACK = [
    ["tvm.Slice", "te6ccgEBAQEABwAACm5lc3MA"],
    ["num", "0x19f02441ee588fdb26ee24b2568dd035c3c9206e11ab979be62e55558a1d17ff"],
]


async def main() -> None:
    async with ToncenterRestClient(network=Network.MAINNET) as client:
        result = await client.v2.runmethod.run_get_method(
            ADDRESS,
            METHOD,
            STACK,
        )
        print(result.model_dump_json(indent=4))


if __name__ == "__main__":
    asyncio.run(main())

Body

application/json
address
string
required
method
required
stack
string · integer<int64> · object · object · object[][]
required
Required array length: 2 elements
seqno
integer<int32>

Response

OK

ok
boolean
required
Example:

true

result
RunGetMethodResult · object
required