# BYTES

Dynamic-length raw byte array used for calldata, return data, revert data, and packed ABI payloads. 0x-prefixed VARCHAR casts parse exact hex bytes; VARCHAR/hex output is for inspection, not numeric math.

Canonical HTML: <https://determica.com/docs/types/bytes>

- Family: Blob-backed
- Physical type: BLOB

Dynamic-length raw byte array used for calldata, return data, revert data, and packed ABI payloads. 0x-prefixed VARCHAR casts parse exact hex bytes; VARCHAR/hex output is for inspection, not numeric math.

## Used by functions

### Input and output

- [bytes_concat_agg](/docs/functions/bytes_concat_agg.md) — Concatenates BYTES chunks in aggregate input order, preserving an aggregate ORDER BY clause when supplied.
- [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.
- [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.

### Accepted as input

- [assume_code](/docs/functions/assume_code.md) — Declares the exact EVM runtime bytecode supplied for one address in a PROGRAM's initial state.
- [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.
- [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.
- [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.
- [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_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.
- [execute_call](/docs/functions/execute_call.md) — Builds one raw EVM call step for ordered, non-atomic PROGRAM execution.
- [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.
- [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.

### Returned as output

- [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.
- [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.
- [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.
- [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.
- [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.
- [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_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.
- [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.
