Execute Query
AI-generatedSummary
Executes a CEL expression against EVM smart-contract state on a selected chain, returning the query result (optionally unwrapped with execution metadata) for downstream workflow steps.
Inputs
- preset — Recipe selector.
custom(default) shows the Expression, Contracts, and Context Variables fields;erc20-balance,native-balance, andnft-ownerhide those fields and instead reveal the preset's address/token inputs, building the expression automatically. Not expression-capable. - chainId (required) — EVM chain to query. Required. Dynamically populated from the evmquery
/chainsendpoint, with a static fallback to Ethereum (evm_ethereum), Base (evm_base), and BNB Smart Chain (evm_bnb_mainnet). May be overridden with an expression yielding anevm_*chain id. Defaults toevm_ethereum. - expression (required) — CEL expression to evaluate. Required when Preset is Custom Expression. References named contracts directly (e.g.
Token.balanceOf(holder)) and context variables viavars.<name>. Hidden when a named preset is active. Multi-line input; see the evmquery docs for the full CEL surface. - contracts — Optional fixed collection of named contract references used by the expression. Hidden when a named preset is active. Each entry has a Name (must be a valid CEL identifier: letters, digits, underscores only, not starting with a digit) and Address (0x-prefixed, 20 bytes). Sent to the API as
schema.contracts={ <name>: { address } }. A JSON object supplied via an AI caller ($fromAI) is normalized to the same shape. - context — Optional fixed collection of typed context variables. Hidden when a named preset is active. Each entry has a Name (referenced as
vars.<name>in the expression), a Type (sol_int,sol_address,bool,string,bytes, or thelist<...>variants), and a Value. Types are sent asschema.context; non-empty runtime values are sent as the top-levelcontext. Scalars accept a literal; list types accept a JSON array literal or an expression evaluating to an array (e.g.{{ $json.holders }}). Boolean strings and JSON-array strings are coerced. - preset_erc20_balance_tokenAddress (required) — ERC-20 token contract address. Required when Preset = ERC-20 balance. Becomes the
Tokencontract in the generated expressionToken.balanceOf(holder). - preset_erc20_balance_holder (required) — Holder address whose ERC-20 balance to read. Required when Preset = ERC-20 balance. Bound as the
holdercontext variable (sol_address). - preset_native_balance_account (required) — Account address whose native (gas) balance to read. Required when Preset = Native balance. Used in the generated expression
account.balance(). - preset_nft_owner_collection (required) — ERC-721 collection contract address. Required when Preset = NFT owner. Becomes the
Collectioncontract in the generated expressionCollection.ownerOf(tokenId). - preset_nft_owner_tokenId (required) — ERC-721 token id whose owner to resolve. Required when Preset = NFT owner. Bound as the
tokenIdcontext variable (sol_int). Defaults to 0. - options — Optional advanced options collection. Output Format:
simple(default) unwrapsresult.value— object results are spread at the top level, scalars/arrays are wrapped undervalue— and attaches a$metaobject;rawreturns the full API response envelope verbatim. Timeout (Ms): server-side evaluation timeout in milliseconds; 0/empty uses the evmquery default. OnlyoutputFormatapplies to Execute;timeoutMsalso applies to Validate.
Output shape
simple | raw
One output item is produced per input item, linked via
pairedItem. With Output Format = Simple (default), the returned JSON is either{ ...objectResult, $meta }(object results spread at the top level) or{ value: <scalar-or-array>, $meta }.$metacontainstype(result type),blockNumber,credits(credits consumed),rounds(total evaluation rounds),onChainCalls(on-chain call count), andlatencyMs; side-car fields may be absent when the query performs no on-chain reads. With Output Format = Raw, the completePOST /queryAPI envelope is returned verbatim. IfcontinueOnFailis enabled and the request fails, the node emits{ error: <message> }for that item instead of throwing.