PreçosGitHubPainel

TON

runGetMethod34 créditos

Runs a get-method of a smart contract and returns the stack it leaves.

Rede: ton

Parâmetros

NomeTipoDescrição
addressstringAddress of the smart contract.
methodstring | numberName of the get-method (for example "seqno") or its numeric id.
stackArray<[type, value]>Arguments, a list of pairs: ["num", "0x2a"], ["cell", "<base64 BOC>"], ["slice", "<base64 BOC>"]. An empty list when the method takes none.
seqnonumberMasterchain block seqno to read the state at. The latest state when omitted. (opcional)

Retorno

Tipo

Object

gas_used, exit_code (0 is success), stack (the result, as the same [type, value] pairs) and last_transaction_id.

Exemplos de código

curl https://holy-burned-sky-ton-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "runGetMethod",
  "params": {
    "address": "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N",
    "method": "seqno",
    "stack": []
  }
}'