Types

Use exact logical types to keep EVM values precise and make workflow boundaries explicit.

Type basics

Start with exact values

Cast literals to their EVM shape before they enter a calculation. These casts are deterministic and run without a transport or live chain connection.

SELECT
  '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'::ADDRESS AS wallet,
  '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'::BYTES32 AS topic0,
  '1000000000000000000'::UINT256 AS one_token_raw;

Browse by type family

Explore all 77 published types across 6 groups.

Type family

EVM bytes and addresses

5

Fixed and dynamic byte values for addresses, calldata, selectors, hashes, topics, and EVM words.

Type family

Unsigned EVM integers

28

Exact non-negative integers for balances, token amounts, gas values, and ABI-compatible arithmetic.

Type family

Signed EVM integers

28

Exact signed integers for deltas, oracle answers, and ABI values that may fall below zero.

Type family

Chain metadata

6

Named values for block positions, transaction and log indexes, gas, wei, and EVM versions.

Type family

Workflow values

9

Structured values that carry transports, clients, programs, assumptions, reads, and observations between steps.

Type family

Other logical types

1

Additional public logical types that are not yet assigned to a primary reference family.

Essential rules

Keep the representation honest

Prefer exact string amounts

Pass decimal strings to exact parsers and casts when a value must remain precise to the wei.

Retain raw integers until display

Compare, aggregate, and score raw integer values; format them only at the presentation boundary.

Distinguish BYTES from BYTES32

Use BYTES for variable-length calldata or bytecode and BYTES32 for topics, hashes, slots, and salts.

Indexed addresses occupy ABI words

An address is 20 bytes, but an indexed address topic is encoded in a 32-byte ABI word.