Call Read Function

POST /blockchains/{network}/call-read-function

Calls a read-only function on a smart contract. In Solidity, these use the view keyword.

Required Permissions

NameConditions

Blockchains:CallRead

Always Required

Parameters

Path parameters

Path parameterDescription

network

Enumerated type representing the Blockchain network from the list found here. Currently EVM chains are supported: ETH, MATIC, BNB, AVAX-C, sFUEL, FTM, OP, ARB, AMB

Request body

Request body fieldsRequired/OptionalDescriptionType

data

Required

Encoded hex string indicating which function in the smart contract to call with which parameters. For more information, see the encodeFunctionCall web3.js documentation.

String

contract

Required

Address of the contract to call

String

Sample request body

{
  "data": "0x6d4ce63caa65600744ac797760560da39ebd16e8240936b51f53368ef9e0e01f",
  "contract": "0x77f5aDB925c14768a0f7e338eB721e181F85b1f6"
}

Response

Response example

Note the data field in the response is hex encoded.

{
    "data": "0x000000000000000000000000000000000000000000000000000000000000000f"
}

Last updated