evm_abi_word

Encodes a supported scalar as exactly one 32-byte Solidity ABI word. Addresses and unsigned integers are left-padded; signed integers are sign-extended.

Example

Local

1
-- Compute a Uniswap v4 PoolId from PoolKey fields
2
SELECT keccak256(
3
evm_abi_word('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'::ADDRESS) ||
4
evm_abi_word('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'::ADDRESS) ||
5
evm_abi_word(200::UINT24) ||
6
evm_abi_word(4::INT24) ||
7
evm_abi_word('0x0000000000000000000000000000000000000000'::ADDRESS)
8
) AS pool_id;
Notebook ready in readonly mode.

API reference

Exact signatures with descriptions, requirements, inputs, returns, and examples.

evm_abi_word(ADDRESS) #

Left-pads a 20-byte ADDRESS with 12 zero bytes.

Note: The scalar type must be registered.

Inputs

Name Type Use
value ADDRESS

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Guidance

Choose the correct word encoding

Use evm_abi_word when a protocol explicitly hashes or concatenates individual standard ABI words. Use encode_function_data for contract calldata and abi_encode_packed for packed layouts.

  • ADDRESS values are left-padded to 32 bytes.
  • BYTES32 values are copied unchanged.
  • Unsigned integers are encoded as big-endian 32-byte values.
  • Signed integers are sign-extended using two's-complement representation.
  • Use encode_function_data for selector-prefixed contract calldata; use evm_abi_word for explicit word-level composition.

Local SQL

1
SELECT
2
hex(evm_abi_word('0x0000000000000000000000000000000000000001'::ADDRESS)) AS address_word,
3
hex(evm_abi_word(-1::INT24)) AS signed_word;
Notebook ready in readonly mode.

PoolKey hashing

Uniswap v4 PoolIds are computed from ABI words for the PoolKey fields. Keep token order, fee, tick spacing, and hooks exactly as the PoolKey defines them before hashing.

  • Cast fee to UINT24 and tick spacing to INT24.
  • Cast token and hook addresses to ADDRESS.
  • Concatenate words with ||, then hash the result with keccak256.

Local SQL

1
SELECT keccak256(
2
evm_abi_word('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'::ADDRESS) ||
3
evm_abi_word('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'::ADDRESS) ||
4
evm_abi_word(200::UINT24) ||
5
evm_abi_word(4::INT24) ||
6
evm_abi_word('0x0000000000000000000000000000000000000000'::ADDRESS)
7
) AS pool_id;
Notebook ready in readonly mode.

Choose the right ABI primitive

Choose by byte framing and direction: selector construction, standard arguments, calldata, packed bytes, raw words, calldata decoding, and return-data decoding are distinct operations.

  • function_selector hashes already-canonical signature text exactly; function_selector_json builds a canonical signature from one JSON ABI fragment first.
  • encode_function_args emits selector-free standard ABI arguments; encode_function_data prefixes those same bytes with the 4-byte selector.
  • abi_encode_packed concatenates compact scalar encodings without standard ABI offsets, lengths, or 32-byte padding; evm_abi_word always emits exactly one padded 32-byte word.
  • decode_function_data consumes and validates selector-prefixed calldata inputs; call_decode consumes selector-free function return bytes.

Local SQL

1
SELECT
2
function_selector('transfer(address,uint256)') AS selector,
3
encode_function_data(
4
'[{"type":"function","name":"transfer","inputs":[{"type":"address"},{"type":"uint256"}]}]'::JSON,
5
'transfer(address,uint256)',
6
'0x000000000000000000000000000000000000dEaD'::ADDRESS,
7
1::UINT256
8
) AS calldata;
Notebook ready in readonly mode.

Additional overloads

evm_abi_word(BYTES32) #

Returns the supplied BYTES32 value unchanged.

Note: The scalar type must be registered.

Inputs

Name Type Use
value BYTES32

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'::BYTES32)) AS word;
evm_abi_word(BOOLEAN) #

Encodes false as zero and true as one in a 32-byte word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value BOOLEAN

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(true::BOOLEAN)) AS word;
evm_abi_word(UTINYINT) #

Left-pads a UTINYINT value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UTINYINT

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UTINYINT)) AS word;
evm_abi_word(USMALLINT) #

Left-pads a USMALLINT value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value USMALLINT

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::USMALLINT)) AS word;
evm_abi_word(UINTEGER) #

Left-pads a UINTEGER value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINTEGER

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINTEGER)) AS word;
evm_abi_word(UBIGINT) #

Left-pads a UBIGINT value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UBIGINT

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UBIGINT)) AS word;
evm_abi_word(UHUGEINT) #

Left-pads a UHUGEINT value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UHUGEINT

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UHUGEINT)) AS word;
Show 61 more overloads
evm_abi_word(TINYINT) #

Sign-extends a TINYINT value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value TINYINT

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::TINYINT)) AS word;
evm_abi_word(SMALLINT) #

Sign-extends a SMALLINT value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value SMALLINT

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::SMALLINT)) AS word;
evm_abi_word(INTEGER) #

Sign-extends a INTEGER value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INTEGER

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INTEGER)) AS word;
evm_abi_word(BIGINT) #

Sign-extends a BIGINT value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value BIGINT

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::BIGINT)) AS word;
evm_abi_word(HUGEINT) #

Sign-extends a HUGEINT value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value HUGEINT

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::HUGEINT)) AS word;
evm_abi_word(UINT160) #

Left-pads a UINT160 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT160

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT160)) AS word;
evm_abi_word(UINT256) #

Left-pads a UINT256 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT256

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT256)) AS word;
evm_abi_word(INT256) #

Sign-extends a INT256 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT256

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT256)) AS word;
evm_abi_word(INT160) #

Sign-extends a INT160 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT160

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT160)) AS word;
evm_abi_word(UINT24) #

Left-pads a UINT24 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT24

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT24)) AS word;
evm_abi_word(UINT32) #

Left-pads a UINT32 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT32

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT32)) AS word;
evm_abi_word(UINT40) #

Left-pads a UINT40 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT40

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT40)) AS word;
evm_abi_word(UINT48) #

Left-pads a UINT48 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT48

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT48)) AS word;
evm_abi_word(UINT56) #

Left-pads a UINT56 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT56

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT56)) AS word;
evm_abi_word(UINT64) #

Left-pads a UINT64 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT64

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT64)) AS word;
evm_abi_word(UINT72) #

Left-pads a UINT72 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT72

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT72)) AS word;
evm_abi_word(UINT80) #

Left-pads a UINT80 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT80

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT80)) AS word;
evm_abi_word(UINT88) #

Left-pads a UINT88 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT88

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT88)) AS word;
evm_abi_word(UINT96) #

Left-pads a UINT96 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT96

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT96)) AS word;
evm_abi_word(UINT104) #

Left-pads a UINT104 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT104

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT104)) AS word;
evm_abi_word(UINT112) #

Left-pads a UINT112 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT112

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT112)) AS word;
evm_abi_word(UINT120) #

Left-pads a UINT120 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT120

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT120)) AS word;
evm_abi_word(UINT136) #

Left-pads a UINT136 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT136

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT136)) AS word;
evm_abi_word(UINT144) #

Left-pads a UINT144 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT144

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT144)) AS word;
evm_abi_word(UINT152) #

Left-pads a UINT152 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT152

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT152)) AS word;
evm_abi_word(UINT168) #

Left-pads a UINT168 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT168

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT168)) AS word;
evm_abi_word(UINT176) #

Left-pads a UINT176 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT176

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT176)) AS word;
evm_abi_word(UINT184) #

Left-pads a UINT184 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT184

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT184)) AS word;
evm_abi_word(UINT192) #

Left-pads a UINT192 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT192

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT192)) AS word;
evm_abi_word(UINT200) #

Left-pads a UINT200 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT200

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT200)) AS word;
evm_abi_word(UINT208) #

Left-pads a UINT208 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT208

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT208)) AS word;
evm_abi_word(UINT216) #

Left-pads a UINT216 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT216

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT216)) AS word;
evm_abi_word(UINT224) #

Left-pads a UINT224 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT224

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT224)) AS word;
evm_abi_word(UINT232) #

Left-pads a UINT232 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT232

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT232)) AS word;
evm_abi_word(UINT240) #

Left-pads a UINT240 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT240

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT240)) AS word;
evm_abi_word(UINT248) #

Left-pads a UINT248 value to a 32-byte big-endian word.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT248

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(1::UINT248)) AS word;
evm_abi_word(INT24) #

Sign-extends a INT24 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT24

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT24)) AS word;
evm_abi_word(INT40) #

Sign-extends a INT40 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT40

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT40)) AS word;
evm_abi_word(INT48) #

Sign-extends a INT48 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT48

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT48)) AS word;
evm_abi_word(INT56) #

Sign-extends a INT56 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT56

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT56)) AS word;
evm_abi_word(INT72) #

Sign-extends a INT72 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT72

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT72)) AS word;
evm_abi_word(INT80) #

Sign-extends a INT80 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT80

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT80)) AS word;
evm_abi_word(INT88) #

Sign-extends a INT88 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT88

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT88)) AS word;
evm_abi_word(INT96) #

Sign-extends a INT96 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT96

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT96)) AS word;
evm_abi_word(INT104) #

Sign-extends a INT104 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT104

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT104)) AS word;
evm_abi_word(INT112) #

Sign-extends a INT112 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT112

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT112)) AS word;
evm_abi_word(INT120) #

Sign-extends a INT120 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT120

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT120)) AS word;
evm_abi_word(INT136) #

Sign-extends a INT136 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT136

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT136)) AS word;
evm_abi_word(INT144) #

Sign-extends a INT144 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT144

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT144)) AS word;
evm_abi_word(INT152) #

Sign-extends a INT152 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT152

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT152)) AS word;
evm_abi_word(INT168) #

Sign-extends a INT168 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT168

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT168)) AS word;
evm_abi_word(INT176) #

Sign-extends a INT176 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT176

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT176)) AS word;
evm_abi_word(INT184) #

Sign-extends a INT184 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT184

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT184)) AS word;
evm_abi_word(INT192) #

Sign-extends a INT192 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT192

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT192)) AS word;
evm_abi_word(INT200) #

Sign-extends a INT200 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT200

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT200)) AS word;
evm_abi_word(INT208) #

Sign-extends a INT208 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT208

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT208)) AS word;
evm_abi_word(INT216) #

Sign-extends a INT216 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT216

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT216)) AS word;
evm_abi_word(INT224) #

Sign-extends a INT224 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT224

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT224)) AS word;
evm_abi_word(INT232) #

Sign-extends a INT232 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT232

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT232)) AS word;
evm_abi_word(INT240) #

Sign-extends a INT240 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT240

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT240)) AS word;
evm_abi_word(INT248) #

Sign-extends a INT248 value to its 32-byte two's-complement representation.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT248

Supported ADDRESS, BYTES32, BOOLEAN, native integer, or fixed-width EVM integer value.

required positional

Returns

Name Type
word BYTES32

32-byte ABI word. Returns BYTES32 containing exactly one Solidity ABI word. Use hex(word) to inspect the encoded bytes.

Overload examples

Local SQL

1
SELECT hex(evm_abi_word(-1::INT248)) AS word;

Examples

Local SQL

1
SELECT hex(evm_abi_word('0x0000000000000000000000000000000000000001'::ADDRESS)) AS word;
Notebook ready in readonly mode.

Related functions

Category and tags

Tag
ABI
Tag
Offline