Thirdweb Engine: Read Contract logo

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

FieldValue
Action IDthirdweb-engine-read-contract
CategoryIntegrations
Connectorthirdweb-engine
Requires gasNo
Funds movementNone declared
Tagssmart-contract, integration, contract, read, onchain

Payload Schema

FieldTypeRequiredDescription
chainstringYesChain ID (e.g. '8453' for Base, '1' for Ethereum)
contractAddressstringYesContract address to read from
functionNamestringYesSolidity function name or full signature (e.g. "balanceOf" or "function balanceOf(address) returns (uint256)")
argsarrayNoFunction arguments as strings

Result Schema

FieldTypeRequiredDescription
resultstring | number | boolean | object | array | nullYesReturn 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" }}

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.

Ask a question... ⌘I