Run get method of smart contract
cURL
curl --request POST \ --url https://toncenter.com/api/v2/runGetMethod \ --header 'Content-Type: application/json' \ --data ' { "address": "<string>", "method": "<string>", "stack": [ [ "<string>" ] ], "seqno": 123 } '
200
Example
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())
2
OK
true
Show child attributes