# Functions

Find the function for a task. Each reference page lists its signatures, inputs, return values, and execution requirements.

Canonical HTML: <https://determica.com/docs/functions>

## Clients and state contexts

Create transports and CLIENT values. Pin a client to one block or restore retained execution state.

- [attach_transport](/docs/functions/attach_transport.md) — Attaches transport authority to a pinned or execution CLIENT so missing state can be fetched without changing the CLIENT's durable state identity.
- [client](/docs/functions/client.md) — Creates a live CLIENT from a TRANSPORT or restores retained execution state by execution ID. An optional expected chain ID rejects state from another chain.
- [client_context](/docs/functions/client_context.md) — Returns the state identity and hydration status carried by a CLIENT, including its kind, chain, block, chain profile, and identity hash.
- [http_transport](/docs/functions/http_transport.md) — Builds a TRANSPORT for an HTTP or HTTPS JSON-RPC endpoint. It records the endpoint, declared chain id, and request policy without contacting the provider.
- [pin](/docs/functions/pin.md) — Resolves a live CLIENT to one exact block and returns a pinned CLIENT for repeatable state reads. Pin by tag, number, hash, or a matching number/hash pair, with optional canonicality enforcement. Identical normalized requests using the same constructed live-CLIENT wrapper share one resolution within a SQL statement; separate client(transport) constructions resolve independently, and a later statement resolves the selector again.
- [rpc_call](/docs/functions/rpc_call.md) — Sends a low-level JSON-RPC request and returns the response's result value as JSON. Provider errors and transport failures are raised as SQL errors.
- [transport](/docs/functions/transport.md) — Builds a TRANSPORT containing type, url, and chain_id without contacting the endpoint. Unlike http_transport, it does not add a config object.

## Chain reads

Read balances, blocks, transactions, storage, logs, and other EVM state.

- [block_at](/docs/functions/block_at.md) — Resolves a timestamp to a block boundary through an attached live client. at_or_before selects the highest block number whose timestamp is no later than the target; at_or_after selects the lowest block number whose timestamp is no earlier; closest selects the nearer timestamp. After the current tip timestamp, at_or_before and closest return the tip and at_or_after returns the next block number, tip + 1, which is not mined yet.
- [block_range](/docs/functions/block_range.md) — Resolves a UTC day or a pair of instants to a half-open block window [from_block, to_block). Each end is resolved independently with at_or_after: from_block is the first block at or after the start, and to_block is the first block at or after the end, so to_block itself lies outside the window. A DATE supplies UTC midnight at the start of that day and UTC midnight at the start of the next day. An end after the current tip timestamp resolves to tip + 1, so a window that has not ended yet holds every block mined so far.
- [code_at](/docs/functions/code_at.md) — Reads an account's runtime bytecode from live RPC state, the exact state identified by a pinned CLIENT, or retained execution state. Without a CLIENT, it builds a reusable READ and does not access state.
- [create_access_list](/docs/functions/create_access_list.md) — Builds an EIP-2930 access list for a transaction request. Each result row identifies an accessed account or storage slot and includes request status.
- [get_block](/docs/functions/get_block.md) — Fetches a block by decimal height, supported block tag, or block hash. The block defaults to latest and include_transactions defaults to false.
- [get_gas_price](/docs/functions/get_gas_price.md) — Returns the RPC provider's current legacy gas-price estimate as an exact UINT256 value in Wei.
- [get_logs](/docs/functions/get_logs.md) — Reads logs matching emitter, inclusive block bounds, and topic filters. Live clients use eth_getLogs; retained execution clients read stored execution logs.
- [get_transaction](/docs/functions/get_transaction.md) — Fetches a transaction by hash, then makes a separate receipt request for receipt metadata.
- [get_transaction_logs](/docs/functions/get_transaction_logs.md) — Returns logs from a transaction receipt, optionally filtered by emitter or indexed topics. Supply an event signature or JSON ABI to append typed decoded fields.
- [latest_block](/docs/functions/latest_block.md) — Returns the latest block number reported by the RPC provider. Because the chain head moves, persist the result before using it as a reproducible boundary.
- [native_balance](/docs/functions/native_balance.md) — Returns an address's native-token balance as exact Wei in live, pinned, or retained execution state. Without a CLIENT, it builds a reusable READ and does not access state.
- [nonce](/docs/functions/nonce.md) — Returns an address's transaction count in live, pinned, or retained execution state. Without a CLIENT, it builds a reusable READ and does not access state.
- [raw_call](/docs/functions/raw_call.md) — Executes an isolated EVM call and returns the raw response bytes. Without a CLIENT, it builds a reusable READ and does not execute the call.
- [read_contract](/docs/functions/read_contract.md) — Calls a contract function against live, pinned, or retained execution state and returns a typed SQL value. Without a CLIENT, it builds a reusable READ and does not execute the call.
- [read_contract_at](/docs/functions/read_contract_at.md) — Calls a contract function at an explicit block number and returns ABI-decoded SQL values.
- [read_contract_multicall](/docs/functions/read_contract_multicall.md) — 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.
- [storage_at](/docs/functions/storage_at.md) — Returns one raw 32-byte storage word for a contract and BYTES32 slot in live, pinned, or retained execution state. Without a CLIENT, it builds a reusable READ and does not access state.
- [try_native_balance](/docs/functions/try_native_balance.md) — Returns an address's native-token balance as exact Wei at an explicit block, as native_balance does. A balance read cannot revert, so a failed read raises here too.
- [try_read_contract_at](/docs/functions/try_read_contract_at.md) — Calls a contract function at an explicit block number like read_contract_at; a revert, an address without code or an undecodable return gives NULL instead of an error. A transport, rate-limit or archive failure raises.

## Contracts and ABI

Encode and decode ABI values, inspect contracts, and call contract functions.

- [abi_encode_packed](/docs/functions/abi_encode_packed.md) — Encodes scalar values with Solidity's packed ABI rules. The result has no selector, offsets, lengths, or 32-byte padding.
- [call_decode](/docs/functions/call_decode.md) — Decodes selector-free function return data into typed SQL columns defined by the function's ABI outputs.
- [decode_function_data](/docs/functions/decode_function_data.md) — Validates and decodes selector-prefixed function calldata into typed SQL columns defined by the function's ABI inputs.
- [encode_function_args](/docs/functions/encode_function_args.md) — Encodes function arguments with standard ABI encoding and omits the 4-byte function selector.
- [encode_function_data](/docs/functions/encode_function_data.md) — Encodes function arguments as contract calldata: the function's 4-byte selector followed by standard ABI argument bytes.
- [error_decode_json](/docs/functions/error_decode_json.md) — Returns a status-rich JSON description of EVM revert bytes; supply an ABI to decode matching custom errors.
- [error_selector](/docs/functions/error_selector.md) — Returns a custom error's 4-byte selector by hashing already-canonical signature text exactly; use it to identify revert payloads.
- [error_selector_json](/docs/functions/error_selector_json.md) — Returns the 4-byte selector for a custom error described by JSON ABI; use it to identify revert payloads.
- [event_decode](/docs/functions/event_decode.md) — Returns one EVM log as ABI-derived typed columns; use it when a constant event ABI can define the SQL schema at bind time.
- [event_decode_json](/docs/functions/event_decode_json.md) — Returns decoded EVM event arguments as compact JSON; use it for already-materialized topics and data when malformed input should produce NULL.
- [event_signature](/docs/functions/event_signature.md) — Returns EVM topic0 by hashing already-canonical event signature text exactly; use it to filter non-anonymous logs.
- [event_signature_json](/docs/functions/event_signature_json.md) — Returns EVM topic0 for an event described by JSON ABI; use it to filter or validate non-anonymous logs.
- [evm_abi_word](/docs/functions/evm_abi_word.md) — 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.
- [evm_decode_log_for](/docs/functions/evm_decode_log_for.md) — Returns a log diagnostic using the ABI registered locally for a chain, emitter, and block; use it when ABI selection depends on contract context.
- [evm_decode_revert_for](/docs/functions/evm_decode_revert_for.md) — Returns a revert diagnostic using the ABI registered locally for a chain, contract, and block; use it when ABI selection depends on contract context.
- [evm_register_contract_abi](/docs/functions/evm_register_contract_abi.md) — Stores contract ABI metadata in the current database for block-aware log and revert decoding.
- [function_selector](/docs/functions/function_selector.md) — Returns the 4-byte Keccak-256 selector for an already-canonical function signature. The input bytes are hashed exactly and are not normalized.
- [function_selector_json](/docs/functions/function_selector_json.md) — Builds the canonical signature for a JSON ABI function fragment and returns its 4-byte Keccak-256 selector.
- [log_decode_json](/docs/functions/log_decode_json.md) — Returns a status-rich JSON description of one EVM log; use it when unknown, ambiguous, and malformed logs must remain distinguishable.
- [parse_abi_event](/docs/functions/parse_abi_event.md) — Returns a JSON ABI event fragment parsed from Solidity event syntax; use it with log filters and decoders.

## Simulation

Build and run EVM programs. Resolve results and inspect their execution evidence.

- [assume_code](/docs/functions/assume_code.md) — Declares the exact EVM runtime bytecode supplied for one address in a PROGRAM's initial state.
- [assume_native_balance](/docs/functions/assume_native_balance.md) — Declares the exact native balance, in Wei, supplied for one address in a PROGRAM's initial state.
- [assume_no_code](/docs/functions/assume_no_code.md) — Declares that one address has no EVM runtime bytecode in a PROGRAM's initial state.
- [assume_nonce](/docs/functions/assume_nonce.md) — Declares the exact account nonce supplied for one address in a PROGRAM's initial state.
- [assume_storage](/docs/functions/assume_storage.md) — Declares the exact 32-byte value supplied for one contract storage slot in a PROGRAM's initial state.
- [call_context](/docs/functions/call_context.md) — Builds the EVM transaction context attached to one PROGRAM call step.
- [execute_call](/docs/functions/execute_call.md) — Builds one raw EVM call step for ordered, non-atomic PROGRAM execution.
- [execute_contract](/docs/functions/execute_contract.md) — Selects an ABI function, encodes its arguments, and builds one step for ordered, non-atomic PROGRAM execution.
- [execution_evidence](/docs/functions/execution_evidence.md) — Reads stored execution tables and returns their schema-versioned evidence projection.
- [observation_fact](/docs/functions/observation_fact.md) — Declares a human-readable label for an address without scheduling a READ.
- [observe](/docs/functions/observe.md) — Schedules one keyed READ at both the pre and terminal execution checkpoints.
- [observe_after_step](/docs/functions/observe_after_step.md) — Schedules one keyed READ at the checkpoint after a zero-based PROGRAM step.
- [program](/docs/functions/program.md) — Builds an ordered, non-atomic EVM PROGRAM that stops execution after its first unsuccessful step.
- [run](/docs/functions/run.md) — Executes candidate EVM programs sequentially against exact CLIENT state, then atomically publishes compact receipts and auditable local evidence. It never submits transactions or mutates the connected chain.

## EVM utilities

Hash values, compute selectors, convert units, work with bytes, and cast EVM types.

- [bytes_concat_agg](/docs/functions/bytes_concat_agg.md) — Concatenates BYTES chunks in aggregate input order, preserving an aggregate ORDER BY clause when supplied.
- [divmul](/docs/functions/divmul.md) — 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.
- [evm_addmod](/docs/functions/evm_addmod.md) — 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.
- [evm_bit_count](/docs/functions/evm_bit_count.md) — 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.
- [evm_byte](/docs/functions/evm_byte.md) — 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.
- [evm_ceil_div](/docs/functions/evm_ceil_div.md) — 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.
- [evm_clamp](/docs/functions/evm_clamp.md) — 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.
- [evm_clz](/docs/functions/evm_clz.md) — 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.
- [evm_ctz](/docs/functions/evm_ctz.md) — 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.
- [evm_iszero](/docs/functions/evm_iszero.md) — Implements the EVM ISZERO opcode: returns BIGINT 1 when the complete UINT256 word is zero and 0 otherwise. NULL input propagates to NULL.
- [evm_max](/docs/functions/evm_max.md) — Returns the maximum of two UINT256 values.
- [evm_min](/docs/functions/evm_min.md) — Returns the minimum of two UINT256 values.
- [evm_modexp](/docs/functions/evm_modexp.md) — 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.
- [evm_mulmod](/docs/functions/evm_mulmod.md) — 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.
- [evm_pack_uint_be](/docs/functions/evm_pack_uint_be.md) — Packs a UINT256 value into an exact-width big-endian BYTES value for ABI-adjacent byte construction.
- [evm_sar](/docs/functions/evm_sar.md) — 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.
- [evm_set_bits](/docs/functions/evm_set_bits.md) — 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.
- [evm_shl](/docs/functions/evm_shl.md) — 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.
- [evm_shr](/docs/functions/evm_shr.md) — 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.
- [evm_sign](/docs/functions/evm_sign.md) — Returns -1 for a negative two's-complement INT256 value, 0 for zero, and 1 for a positive value. NULL input propagates to NULL.
- [evm_signextend](/docs/functions/evm_signextend.md) — 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.
- [evm_sqrt](/docs/functions/evm_sqrt.md) — 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.
- [format_ether](/docs/functions/format_ether.md) — Human-readable helper for wei balances. Equivalent to format_units(amount, 18). Returns VARCHAR without introducing floating point conversion.
- [format_units](/docs/functions/format_units.md) — 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.
- [hex](/docs/functions/hex.md) — 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.
- [keccak256](/docs/functions/keccak256.md) — Computes the Keccak-256 hash used by the EVM, returning a BYTES32 digest. Non-0x VARCHAR input is hashed as UTF-8, 0x-prefixed VARCHAR input is decoded to bytes first, and multi-argument overloads hash the exact unframed concatenation in argument order.
- [length](/docs/functions/length.md) — Returns the number of bytes in a BLOB or BLOB-backed EVM value such as ADDRESS, BYTES32, UINT256, or INT256.
- [muldiv](/docs/functions/muldiv.md) — 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.
- [parse_ether](/docs/functions/parse_ether.md) — 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.
- [parse_gwei](/docs/functions/parse_gwei.md) — 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.
- [parse_units](/docs/functions/parse_units.md) — 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.
- [sort_key](/docs/functions/sort_key.md) — 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.
- [to_hex](/docs/functions/to_hex.md) — 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.
- [to_timestamp](/docs/functions/to_timestamp.md) — 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.
- [try_add](/docs/functions/try_add.md) — Adds two UINT256 values. Arithmetic overflow produces NULL; independently, ordinary scalar NULL propagation produces NULL when either input is NULL.
- [try_mul](/docs/functions/try_mul.md) — 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.
- [try_sub](/docs/functions/try_sub.md) — Subtracts two UINT256 values. Arithmetic underflow produces NULL; independently, ordinary scalar NULL propagation produces NULL when either input is NULL.

## Fixed-point and AMM math

Calculate fixed-point values, liquidity, prices, and swap amounts with exact integer arithmetic.

- [clmm_amount0_delta_x96](/docs/functions/clmm_amount0_delta_x96.md) — Computes the Uniswap v4 SqrtPriceMath currency0 delta between two Q64.96 boundaries. Determica requires non-zero uint128 liquidity; arithmetic is deterministic and NULL propagates.
- [clmm_amount1_delta_x96](/docs/functions/clmm_amount1_delta_x96.md) — Computes the Uniswap v4 SqrtPriceMath currency1 delta between two Q64.96 boundaries. Determica requires non-zero uint128 liquidity; arithmetic is deterministic and NULL propagates.
- [clmm_amounts_for_liquidity_x96](/docs/functions/clmm_amounts_for_liquidity_x96.md) — Position token amounts at a price from liquidity and range, as Uniswap v3-periphery LiquidityAmounts.getAmountsForLiquidity. Integer math only; NULL propagates.
- [clmm_bitmap_next_initialized_tick](/docs/functions/clmm_bitmap_next_initialized_tick.md) — Scans exactly one Uniswap v4-style compressed tick bitmap word. Compression rounds negative non-multiples toward negative infinity. It is deterministic, propagates NULL, and does not fetch adjacent words.
- [clmm_liquidity_for_amounts_x96](/docs/functions/clmm_liquidity_for_amounts_x96.md) — Liquidity two token amounts buy in a price range, as Uniswap v3-periphery LiquidityAmounts.getLiquidityForAmounts. Integer math only; NULL propagates.
- [clmm_next_sqrt_price_from_input_x96](/docs/functions/clmm_next_sqrt_price_from_input_x96.md) — Computes the Uniswap v4 SqrtPriceMath next Q64.96 price for exact input. It is deterministic and propagates NULL.
- [clmm_next_sqrt_price_from_output_x96](/docs/functions/clmm_next_sqrt_price_from_output_x96.md) — Computes the Uniswap v4 SqrtPriceMath next Q64.96 price for exact output. It is deterministic and propagates NULL.
- [clmm_sqrt_price_x96_to_tick](/docs/functions/clmm_sqrt_price_x96_to_tick.md) — Inverts a Q64.96 sqrt(currency1/currency0) using Uniswap v4 TickMath floor semantics. It is deterministic and propagates NULL.
- [clmm_swap_step_x96](/docs/functions/clmm_swap_step_x96.md) — Computes one Uniswap v4 SwapMath-compatible price-range step. Negative amount_remaining means exact input; non-negative means exact output. Direction is inferred from current versus target. Hooks, dynamic fee resolution, tick-crossing liquidity changes, multi-word iteration, slippage, routing, and calldata are outside this deterministic helper. The five-argument overload uses Uniswap v4's 1,000,000 fee denominator.
- [clmm_swap_x96](/docs/functions/clmm_swap_x96.md) — Exact swap across initialized ticks, as the Uniswap v3 and v4 swap loop: each step ends at the next listed tick or the tick-bitmap word edge (256 x tick_spacing), whichever is first, with clmm_swap_step_x96 math; crossing adds liquidity_net moving up, subtracts it moving down. Stops at the amount, price limit or list end; never assumes liquidity past listed ticks. Offline: caller reads state and ticks. No hooks, dynamic fees or protocol fee split. List sorted once per call.
- [clmm_tick_to_sqrt_price_x96](/docs/functions/clmm_tick_to_sqrt_price_x96.md) — Converts a Uniswap-compatible tick to Q64.96 sqrt(currency1/currency0) with TickMath's bit-decomposed constants and final upward rounding. It is deterministic and propagates NULL.
- [fixed_div](/docs/functions/fixed_div.md) — Computes fixed-point division as x * scale / y with a full 512-bit intermediate product. The caller owns the units and scale: this function does not require decimal, WAD, or Q-format inputs. It is pure and deterministic. NULL input propagates to NULL. A zero y or a rounded quotient above UINT256 raises an error.
- [fixed_exp](/docs/functions/fixed_exp.md) — Computes e^(x / 1e18) * 1e18 for an 18-decimal fixed-point (WAD) exponent, with integer arithmetic only. NULL propagates; an exponent outside [-41e18, 130e18] errors. Results equal, digit for digit, those of the LogExpMath library that Balancer V2 and Pendle V2 contracts use, so a query recomputes an on-chain rate exactly. Accuracy: within 1e-17 relative for results of 1e17 or more; a few wei near 1e18 (exp(1e18) is 2718281828459045235); a tiny result keeps few digits (exp(-41e18) is 1, true 1.56).
- [fixed_ln](/docs/functions/fixed_ln.md) — Computes ln(x / 1e18) * 1e18 for a positive 18-decimal fixed-point (WAD) value, with integer arithmetic only; arguments in (0.9e18, 1.1e18) use a 36-decimal series. NULL propagates. Results equal, digit for digit, those of the LogExpMath library that Balancer V2 and Pendle V2 contracts use, so a query recomputes an on-chain rate exactly. Accuracy: within 2 wei of the true value, on either side.
- [fixed_mul](/docs/functions/fixed_mul.md) — Computes fixed-point multiplication as x * y / scale with a full 512-bit intermediate product. The caller owns the units and scale: this function does not require decimal, WAD, or Q-format inputs. It is pure and deterministic. NULL input propagates to NULL. A zero scale or a rounded quotient above UINT256 raises an error.
- [fixed_pow](/docs/functions/fixed_pow.md) — Raises an 18-decimal fixed-point (WAD) base to a WAD exponent as exp(y * ln(x)), with integer arithmetic only, for example to annualise a growth factor. NULL propagates. Results equal, digit for digit, those of the LogExpMath library that Balancer V2 and Pendle V2 contracts use, so a query recomputes an on-chain rate exactly. Accuracy: within 1e-16 relative for results of 1e17 or more (fixed_pow(2e18, 1e18) is 1999999999999999998).

## Development and bytecode

Compile, inspect, and disassemble bytecode. Derive deterministic contract addresses.

- [compile](/docs/functions/compile.md) — Compiles Solidity or Vyper source through the configured external service and normalizes one row per returned contract artifact. It performs network I/O and sends the supplied source to that service.
- [create2_mine](/docs/functions/create2_mine.md) — Scans a bounded local CPU salt range for EIP-1014 CREATE2 addresses. It performs no network I/O, deployment, chain-state lookup, collision check, or vanity-address safety proof.
- [create2_predict](/docs/functions/create2_predict.md) — Computes the EIP-1014 CREATE2 address from the executing deployer, exact salt, and complete init-code hash. This is deterministic local arithmetic and does not query or mutate chain state.
- [evm_disassemble](/docs/functions/evm_disassemble.md) — 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.
