Skip to main content

state_call

Calls a runtime API method on Asset Hub.

Use Cases#

  • Runtime computations - Execute runtime logic without transactions
  • Account queries - Use AccountNonceApi for native stablecoin transfers (USDC, USDT), DOT staking and governance, and cross-chain asset management via XCM
  • Fee estimation - Use TransactionPaymentApi

Parameters#

ParameterTypeRequiredDescription
methodStringYesRuntime API method name
dataStringYesSCALE-encoded call data
blockHashStringNoBlock hash for historical call

Request#

{
"jsonrpc": "2.0",
"method": "state_call",
"params": ["AccountNonceApi_account_nonce", "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"],
"id": 1
}

Code Examples#

curl https://api-asset-hub-polkadot.n.dwellir.com/<YOUR_API_KEY>/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "state_call",
"params": ["AccountNonceApi_account_nonce", "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"],
"id": 1
}'