runGetMethod
TON / https://triport.io/rpc/ton
Minimum tier: Pro
Last updated:
runGetMethod executes a read-only getter against a TON smart contract. The
facade accepts a raw or user-friendly address, a method name or numeric method
ID, and the legacy TON Center v2 stack representation.
The facade serializes the stack into the BoC form required by
liteServer.runSmcMethod, then returns the VM exit code and output stack. The
schema can also include the evaluated block, gas used, and last transaction ID.
Use this compatibility-oriented method for ordinary contract getters. Use
runSmcMethod when the caller must explicitly control the liteserver response
mode. Neither method submits a message or mutates contract state.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| address | TonAddress | Yes | |
| method | object | Yes | |
| stack | LegacyStack | Yes | |
| seqno | Seqno | No |
Returns
| Field | Type |
|---|---|
| result | RunMethodResult |
Examples
curl https://triport.io/rpc/ton \
-X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{"jsonrpc":"2.0","id":1,"method":"runGetMethod","params":["<address>","<method>","<stack>","<seqno>"]}'const res = await fetch("https://triport.io/rpc/ton", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "runGetMethod",
"params": [
"<address>",
"<method>",
"<stack>",
"<seqno>"
]
}),
});
const data = await res.json();import requests
resp = requests.post(
"https://triport.io/rpc/ton",
headers={"Authorization": "Bearer <api-key>"},
json={"jsonrpc":"2.0","id":1,"method":"runGetMethod","params":["<address>","<method>","<stack>","<seqno>"]},
)
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Chain: TON.
- Clusters: mainnet.
- Credit cost: 5 per call.
FAQ
- What does runGetMethod do?
- Executes a read-only smart-contract getter using TON Center v2 JSON conventions.
- How many credits does runGetMethod cost?
- runGetMethod costs 5 credit(s) per call on Triport by default.
- Is runGetMethod available over WebSocket?
- runGetMethod is an HTTP JSON-RPC method.