Thirdweb Engine: Read Contract
Read data from a smart contract via your Thirdweb Engine instance. Calls a read-only function and returns the result. Ideal for: checking balances, reading state, fetching on-chain data for workflow conditions.
Catalog action Integrations thirdweb-engine
Read data from a smart contract via your Thirdweb Engine instance. Calls a read-only function and returns the result. Ideal for: checking balances, reading state, fetching on-chain data for workflow conditions.
At a Glance
| Field | Value |
|---|---|
| Action ID | thirdweb-engine-read-contract |
| Category | Integrations |
| Connector | thirdweb-engine |
| Requires gas | No |
| Funds movement | None declared |
| Tags | smart-contract, integration, contract, read, onchain |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Chain ID (e.g. '8453' for Base, '1' for Ethereum) |
contractAddress | string | Yes | Contract address to read from |
functionName | string | Yes | Solidity function name or full signature (e.g. "balanceOf" or "function balanceOf(address) returns (uint256)") |
args | array | No | Function arguments as strings |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
result | string | number | boolean | object | array | null | Yes | Return value from the contract read call |
Examples
json{ "type": "thirdweb-engine-read-contract", "payload": { "chain": "example-chain", "contractAddress": "0x0000000000000000000000000000000000000000", "functionName": "example-functionName" }, "children": [], "connector": { "type": "thirdweb-engine", "id": "conn_thirdweb_engine" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/thirdweb-engine-read-contract/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "chain": "example-chain", "contractAddress": "0x0000000000000000000000000000000000000000", "functionName": "example-functionName" }}'
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.
