Read Contract
POST /networks/read-contract
Calls a read-only function on a smart contract. In Solidity, these use the view
keyword. Note: Currently only works on EVM compatible chains.
Request headers required. See Request Headers for more information.
Authentication required. See Authentication Headers for more information.
Required Permissions
No permissions are required as this only exposes public blockchain data.
Request body
Request body fields | Required/Optional | Description | Type |
---|---|---|---|
| Required | Specify " | Enum String |
| Required | Network used for the wallet (See Supported Networks for possible values) | Enum String |
| Required | Address of the contract to call | String |
| Required | Encoded hex string indicating which function in the smart contract to call with which parameters. For more information, see the encodeFunctionData ethersJS documentation. | String |
Sample request body
Response
Response example
Note the data
field in the response is hex encoded.
EthersJS / Dfns SDK Example
You can use the following code with the Dfns Typescript SDK to execute this call:
Last updated