state_call

Perform a call to a builtin on the chain.

Example Request and Result for state_call method

In this section, we provide an illustrative example of a request made to retrieve details contents using the state_call method. Additionally, we present the resulting response containing information about performing a call to a builtin on the chain.

Parameters

FieldsTypeDescription

method*

string

The name of the built-in function you want to call

bytes*

string

The input data to be passed to the built-in function as bytes

blockhash

string

The hash of a specific block in the chain

The example in this section uses a non-existing project id.

Make sure you replace it with your Vara Mainnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Perform a call to a builtin on the chain.

POST https://vara-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription

method*

string

payout_stakers

bytes*

string

3

blocknumber

string

0x1e586e53feb5c0592c47b696c9a3bf75576f3f59e832d4a377c93d8908f2c638

Curl Request example

curl --location 'https://vara-mainnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "state_call",
    "params": {
        "method": "payout_stakers",
        "bytes": "3",
        "blockhash": "0x1e586e53feb5c0592c47b696c9a3bf75576f3f59e832d4a377c93d8908f2c638",
        "name":""
    }
}'

Last updated