Pass exact amounts as strings
Pass decimal strings to parsers and casts when an amount must remain exact to the wei.
Use logical types for EVM values and for the clients, programs, reads, and observations passed between workflow steps.
Cast literals to an EVM type before calculating with them. These casts run locally and do not need an RPC transport.
SELECT
'0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'::ADDRESS AS wallet,
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'::BYTES32 AS topic0,
'1000000000000000000'::UINT256 AS one_token_raw; Fixed-width and variable-length byte types for addresses, calldata, selectors, hashes, topics, and EVM words.
Unsigned integers for balances, token amounts, gas, and ABI values.
Signed integers for deltas, oracle answers, and ABI values that may be negative.
Types for block numbers, transaction and log indexes, gas, wei, and EVM versions.
Types passed between workflow steps, including transports, clients, programs, assumptions, reads, and observations.
Public logical types outside the families above.
Pass decimal strings to parsers and casts when an amount must remain exact to the wei.
Compare, aggregate, and score raw integer values. Format them only for display.
Use BYTES for variable-length calldata or bytecode and BYTES32 for topics, hashes, slots, and salts.
An ADDRESS is 20 bytes. An indexed address occupies a 32-byte ABI topic.