POST
/
call
Make a Network-Specific Procedure Call
curl --request POST \
  --url https://example.com/call \
  --header 'Content-Type: application/json' \
  --data '{
  "network_identifier": {
    "blockchain": "bitcoin",
    "network": "mainnet",
    "sub_network_identifier": {
      "network": "shard 1",
      "metadata": {
        "producer": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
      }
    }
  },
  "method": "eth_call",
  "parameters": {
    "block_number": 23,
    "address": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
  }
}'
{
  "result": {
    "count": 1000
  },
  "idempotent": true
}

Body

application/json

CallRequest is the input to the /call endpoint.

network_identifier
object
required

The network_identifier specifies which network a particular object is associated with.

method
string
required

Method is some network-specific procedure call. This method could map to a network-specific RPC endpoint, a method in an SDK generated from a smart contract, or some hybrid of the two. The implementation must define all available methods in the Allow object. However, it is up to the caller to determine which parameters to provide when invoking /call.

Example:

"eth_call"

parameters
object
required

Parameters is some network-specific argument for a method. It is up to the caller to determine which parameters to provide when invoking /call.

Example:
{
"block_number": 23,
"address": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
}

Response

Expected response to a valid request

CallResponse contains the result of a /call invocation.

result
object
required

Result contains the result of the /call invocation. This result will not be inspected or interpreted by Rosetta tooling and is left to the caller to decode.

Example:
{ "count": 1000 }
idempotent
boolean
required

Idempotent indicates that if /call is invoked with the same CallRequest again, at any point in time, it will return the same CallResponse. Integrators may cache the CallResponse if this is set to true to avoid making unnecessary calls to the Rosetta implementation. For this reason, implementers should be very conservative about returning true here or they could cause issues for the caller.