View this page as Markdown

evm_abi_word

Encodes an ADDRESS, BYTES32, BOOLEAN, or integer as one 32-byte Solidity ABI word. ADDRESS and unsigned integer values are left-padded with zeros. Signed integers are sign-extended in two's-complement form; BOOLEAN uses 0 or 1. BYTES32 values are copied unchanged.

Example

Local

-- Compute a Uniswap v4 PoolId from PoolKey fields
SELECT keccak256(
  evm_abi_word('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'::ADDRESS) ||
  evm_abi_word('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'::ADDRESS) ||
  evm_abi_word(200::UINT24) ||
  evm_abi_word(4::INT24) ||
  evm_abi_word('0x0000000000000000000000000000000000000000'::ADDRESS)
) AS pool_id;

API reference

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

evm_abi_word(ADDRESS) #

Writes the 20 address bytes after 12 leading zero bytes.

Note: The scalar type must be registered.

Inputs

Name Type Use
value ADDRESS

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Guidance

Choose the encoding function

Use evm_abi_word for layouts that require one standard 32-byte word per scalar.

  • Use encode_function_args to ABI-encode a complete argument list without a selector.
  • Use encode_function_data to prepend the function selector to encoded arguments.
  • Use abi_encode_packed for packed layouts that omit standard 32-byte padding.
  • Cast literals to ADDRESS or the intended UINT/INT width before encoding.

Local SQL

SELECT
  hex(evm_abi_word('0x0000000000000000000000000000000000000001'::ADDRESS)) AS address_word,
  hex(evm_abi_word(-1::INT24)) AS signed_word;

PoolKey hashing

A Uniswap v4 PoolId hashes the ABI encoding of the PoolKey fields in field order. Manual concatenation works here because each field occupies one static ABI word.

  • Encode currency0, currency1, and hooks as ADDRESS.
  • Encode fee as UINT24 and tickSpacing as INT24.
  • Concatenate the five words in PoolKey order and pass the result to keccak256.

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

SELECT
  function_selector('transfer(address,uint256)') AS selector,
  encode_function_data(
    '[{"type":"function","name":"transfer","inputs":[{"type":"address"},{"type":"uint256"}]}]'::JSON,
    'transfer(address,uint256)',
    '0x000000000000000000000000000000000000dEaD'::ADDRESS,
    1::UINT256
  ) AS calldata;

Additional overloads

evm_abi_word(BYTES32) #

Copies all 32 input bytes without padding or conversion.

Note: The scalar type must be registered.

Inputs

Name Type Use
value BYTES32

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Writes false as 32 zero bytes and true as 31 zero bytes followed by 0x01.

Note: The scalar type must be registered.

Inputs

Name Type Use
value BOOLEAN

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UTINYINT value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UTINYINT

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a USMALLINT value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value USMALLINT

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINTEGER value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINTEGER

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UBIGINT value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UBIGINT

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UHUGEINT value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UHUGEINT

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a TINYINT value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value TINYINT

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a SMALLINT value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value SMALLINT

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INTEGER value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INTEGER

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a BIGINT value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value BIGINT

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a HUGEINT value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value HUGEINT

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT160 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT160

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT256 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT256

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT256 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT256

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT160 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT160

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT24 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT24

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT32 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT32

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT40 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT40

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT48 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT48

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT56 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT56

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT64 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT64

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT72 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT72

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT80 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT80

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT88 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT88

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT96 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT96

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT104 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT104

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT112 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT112

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT120 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT120

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT136 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT136

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT144 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT144

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT152 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT152

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT168 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT168

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT176 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT176

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT184 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT184

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT192 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT192

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT200 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT200

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT208 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT208

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT216 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT216

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT224 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT224

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT232 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT232

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT240 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT240

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a UINT248 value as a big-endian 32-byte word, adding leading zero bytes as needed.

Note: The scalar type must be registered.

Inputs

Name Type Use
value UINT248

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT24 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT24

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT40 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT40

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT48 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT48

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT56 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT56

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT72 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT72

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT80 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT80

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT88 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT88

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT96 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT96

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT104 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT104

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT112 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT112

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT120 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT120

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT136 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT136

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT144 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT144

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT152 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT152

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT168 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT168

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT176 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT176

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT184 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT184

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT192 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT192

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT200 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT200

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT208 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT208

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT216 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT216

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT224 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT224

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT232 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT232

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT240 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT240

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Encodes a INT248 value as a big-endian 32-byte two's-complement word, sign-extending values narrower than 256 bits.

Note: The scalar type must be registered.

Inputs

Name Type Use
value INT248

ADDRESS, BYTES32, BOOLEAN, native integer, or registered Solidity UINT/INT value.

required positional

Returns

Name Type
word BYTES32

Encoded ABI word. Returns the encoded word as BYTES32.

Overload examples

Local SQL

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

Examples

Local SQL

SELECT hex(evm_abi_word('0x0000000000000000000000000000000000000001'::ADDRESS)) AS word;

Related functions

Category and tags

Tag
ABI
Tag
Offline