Smart Contract Read
Read any data from a smart contract without spending gas. Provide the contract ABI and function name to call view/pure functions on any EVM chain.
Catalog action EVM Onchain
Read any data from a smart contract without spending gas. Provide the contract ABI and function name to call view/pure functions on any EVM chain.
At a Glance
| Field | Value |
|---|---|
| Action ID | evm-read |
| Category | EVM Onchain |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | blockchain, evm, read, view, contract, query, custom, abi |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
contractProjectId | string | No | Select a deployed contract project or choose 'Custom' to enter address and ABI manually. |
chainId | number | Yes | Chain ID (1=Ethereum, 137=Polygon, 56=BSC, 8453=Base, etc.) |
contractAddress | string | No | The contract address to read from |
abi | string | No | The ABI of the contract function(s) as a JSON string array. Can be full contract ABI or just the function signature needed. |
functionName | string | Yes | The name of the view/pure function to call |
args | object | No | Arguments for the function call as a JSON string array (e.g., '["0x123...", "1000"]') or a native array. Optional if function has no arguments. |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | - |
result | string | Yes | The result of the contract call as a JSON string |
blockNumber | number | No | The block number at which the read was performed |
decodedResult | string | No | Human-readable decoded result when possible |
Examples
json{ "type": "evm-read", "payload": { "functionName": "example-functionName", "chainId": 8453 }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/evm-read/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "functionName": "example-functionName", "chainId": 8453 }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
