TON
runGetMethod34 créditos
Runs a get-method of a smart contract and returns the stack it leaves.
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| address | string | Address of the smart contract. |
| method | string | number | Name of the get-method (for example "seqno") or its numeric id. |
| stack | Array<[type, value]> | Arguments, a list of pairs: ["num", "0x2a"], ["cell", "<base64 BOC>"], ["slice", "<base64 BOC>"]. An empty list when the method takes none. |
| seqno | number | Masterchain block seqno to read the state at. The latest state when omitted. (opcional) |
Valor devuelto
Tipo
Object
gas_used, exit_code (0 is success), stack (the result, as the same [type, value] pairs) and last_transaction_id.
Ejemplos 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": []
}
}'