#EVM
Functions marked with EVM, grouped from the generated Determica catalog for fast scanning across related workflows.
- create_access_list(CLIENT, ADDRESS, BYTES, BIGINT) Builds an EIP-2930 access list for a transaction request. Each result row identifies an accessed account or storage slot and includes request status.Table · Chain reads
- divmul(UINT256, UINT256, UINT256) Computes floor(x * d / y), not an algebraic inverse of muldiv, with the product formed in 512 bits. Errors when y is zero or when the quotient does not fit UINT256. NULL input propagates to NULL.Scalar · EVM utilities
- evm_addmod(UINT256, UINT256, UINT256) Implements EVM ADDMOD: computes (a + b) mod n using the full mathematical sum, without UINT256 wraparound, and returns zero when n is zero. NULL input propagates to NULL.Scalar · EVM utilities
- evm_bit_count(UINT256) Counts set bits in the complete 256-bit unsigned EVM word. Returns 0 for zero and 256 for UINT256_MAX. NULL input propagates to NULL.Scalar · EVM utilities
- evm_byte(BIGINT, UINT256) Implements the EVM BYTE opcode over a UINT256 word. BYTE index 0 selects the most significant byte and index 31 selects the least significant byte. Negative indices and indices above 31 return zero. NULL input propagates to NULL.Scalar · EVM utilities
- evm_ceil_div(UINT256, UINT256) Ceiling division: (x + y - 1) / y. Rounds up to ensure no remainder. If y is 0, the function errors with: Division by zero in evm_ceil_div.Scalar · EVM utilities
- evm_clamp(UINT256, UINT256, UINT256) Constrains x to the inclusive range [lo, hi] when lo <= hi. For compatibility, reversed bounds lo > hi return lo; reversed bounds do not describe a valid interval. NULL input propagates to NULL.Scalar · EVM utilities
- evm_clz(UINT256) Counts zero bits from bit 255, the most significant bit, toward bit 0 in a 256-bit unsigned EVM word. Returns 256 for zero. NULL input propagates to NULL.Scalar · EVM utilities
- evm_ctz(UINT256) Counts zero bits from bit 0, the least significant bit, toward bit 255 in a 256-bit unsigned EVM word. Returns 256 for zero. NULL input propagates to NULL.Scalar · EVM utilities
- evm_disassemble(BYTES) Decodes bytecode with evmone advanced static analysis fixed to the Osaka revision. It exposes 27 instruction, PUSH, block, stack, gas, storage, and call-hint columns without executing the code.Table · Development and bytecode
- evm_iszero(UINT256) Implements the EVM ISZERO opcode: returns BIGINT 1 when the complete UINT256 word is zero and 0 otherwise. NULL input propagates to NULL.Scalar · EVM utilities
- evm_max(UINT256, UINT256) Returns the maximum of two UINT256 values.Scalar · EVM utilities
- evm_min(UINT256, UINT256) Returns the minimum of two UINT256 values.Scalar · EVM utilities
- evm_modexp(UINT256, UINT256, UINT256) Computes base^exp mod modulus over three fixed-width UINT256 values. Returns 0 when modulus is 0 or 1; for other moduli, exponent 0 returns 1. This is not the EVM MODEXP precompile byte interface: it does not accept length-prefixed byte sequences, produce variable-width output, or model gas. NULL input propagates to NULL.Scalar · EVM utilities
- evm_mulmod(UINT256, UINT256, UINT256) Implements EVM MULMOD: computes (a * b) mod n from the full 512-bit product, without UINT256 wraparound, and returns zero when n is zero. NULL input propagates to NULL.Scalar · EVM utilities
- evm_pack_uint_be(UINT256, INTEGER) Packs a UINT256 value into an exact-width big-endian BYTES value for ABI-adjacent byte construction.Scalar · EVM utilities
- evm_sar(BIGINT, INT256) Implements EVM SAR over a two's-complement INT256 word: right shifts with sign-bit fill. Counts at least 256 return -1 for negative x and 0 otherwise. Negative SQL BIGINT counts throw Invalid Input Error: Shift amount must be non-negative. NULL input propagates to NULL.Scalar · EVM utilities
- evm_set_bits(UINT256) Positions of one bits in a 256-bit unsigned EVM word, ascending from bit 0. Zero gives []; UINT256_MAX gives 0 through 255. NULL propagates. A list comprehension turns a bitmap word into its members, e.g. initialized ticks of a tick bitmap word.Scalar · EVM utilities
- evm_shl(BIGINT, UINT256) Implements EVM SHL: shifts a UINT256 word left, discards bits above bit 255, and returns zero for counts at least 256. Negative SQL BIGINT counts throw Invalid Input Error: Shift amount must be non-negative. NULL input propagates to NULL.Scalar · EVM utilities
- evm_shr(BIGINT, UINT256) Implements EVM SHR: logically shifts a UINT256 word right, fills high bits with zero, and returns zero for counts at least 256. Negative SQL BIGINT counts throw Invalid Input Error: Shift amount must be non-negative. NULL input propagates to NULL.Scalar · EVM utilities
- evm_sign(INT256) Returns -1 for a negative two's-complement INT256 value, 0 for zero, and 1 for a positive value. NULL input propagates to NULL.Scalar · EVM utilities
- evm_signextend(BIGINT, UINT256) Implements EVM SIGNEXTEND. Byte k is indexed from the least significant byte; bit 8*k+7 is copied through all higher bits. SQL BIGINT k values below 0 or at least 31 return the unchanged UINT256 word. NULL input propagates to NULL.Scalar · EVM utilities
- evm_sqrt(UINT256) Returns the floor integer square root of a UINT256 value using overflow-safe Newton iteration. Defined for the full UINT256 range. NULL input propagates to NULL.Scalar · EVM utilities
- format_ether(UINT256) Human-readable helper for wei balances. Equivalent to format_units(amount, 18). Returns VARCHAR without introducing floating point conversion.Scalar · EVM utilities
- format_units(UINT256) Scales raw EVM integer balances by 10^decimals and returns a VARCHAR string representation. No floating point conversion is introduced. The default decimal scale is 18. INT256 inputs preserve signed values, and trailing fractional zeros are trimmed from the formatted string.Scalar · EVM utilities
- hex(ADDRESS) Formats a BLOB-backed EVM byte value as uppercase hexadecimal text without a 0x prefix. hex and to_hex are compatibility aliases with identical behavior.Scalar · EVM utilities
- muldiv(UINT256, UINT256, UINT256) x * y / z with a 512-bit product: no overflow before division. UINT256 rounds down, INT256 truncates toward zero, unless a rounding mode is given. Errors when z is zero or result does not fit its type. NULL propagates. Native integer arguments fit both forms: cast them to UINT256 or INT256.Scalar · EVM utilities
- parse_ether(VARCHAR) Shorthand for parse_units(value, 18). Converts ETH/WETH amounts to wei. Prefer VARCHAR inputs for capital-moving amounts. Negative values and excess fractional precision are rejected; overflow currently follows parse_units compatibility behavior and wraps modulo 2^256.Scalar · EVM utilities
- parse_gwei(VARCHAR) Shorthand for parse_units(value, 9). Converts gwei to wei. Prefer VARCHAR inputs for capital-moving amounts. Negative values and excess fractional precision are rejected; overflow currently follows parse_units compatibility behavior and wraps modulo 2^256.Scalar · EVM utilities
- parse_units(VARCHAR) Converts human-readable token amounts to UINT256 raw values by multiplying by 10^decimals. Prefer VARCHAR inputs for capital-moving amounts. Negative values are rejected, fractional digits beyond decimals are rejected, and decimals must be between 0 and 77. String inputs trim surrounding whitespace, allow an optional leading plus sign, right-pad fractional digits with zeros, accept trailing fractional zeros, and reject scientific notation. Values that exceed UINT256 currently wrap modulo 2^256; treat that as compatibility behavior and validate untrusted amounts before parsing.Scalar · EVM utilities
- read_contract_multicall(TABLE) Executes a table of encoded contract reads through Multicall3 and returns one diagnostic row per input call. Results separately report batch execution and target-call success.Table · Chain reads
- sort_key(INT256) Converts INT256/INT512/UINT256/UINT512 to a sortable BLOB for use in ORDER BY. Necessary because Determica's default BLOB ordering doesn't handle signed integers correctly. Use sort_key only inside ORDER BY or comparison-key workflows; it is not a human-readable number conversion, hash, or portable serialization.Scalar · EVM utilities
- to_hex(ADDRESS) Formats a BLOB-backed EVM byte value as uppercase hexadecimal text without a 0x prefix. hex and to_hex are compatibility aliases with identical behavior.Scalar · EVM utilities
- to_timestamp(UINT256) Converts UINT256 seconds since the Unix epoch to a timezone-naive TIMESTAMP. Interpret the result as UTC when the source value is an EVM block timestamp.Scalar · EVM utilities
- try_add(UINT256, UINT256) Adds two UINT256 values. Arithmetic overflow produces NULL; independently, ordinary scalar NULL propagation produces NULL when either input is NULL.Scalar · EVM utilities
- try_mul(UINT256, UINT256) Multiplies two UINT256 values using a 512-bit intermediate. Arithmetic overflow produces NULL; independently, ordinary scalar NULL propagation produces NULL when either input is NULL.Scalar · EVM utilities
- try_sub(UINT256, UINT256) Subtracts two UINT256 values. Arithmetic underflow produces NULL; independently, ordinary scalar NULL propagation produces NULL when either input is NULL.Scalar · EVM utilities