The types
Every field and its exact type is in the field reference (logs,
transactions, blocks), and
GET /v1/schema returns it as JSON.
Amounts are big-endian integers
value, gas prices, fees and other amounts are unsigned big-endian integers: 16 bytes
(128-bit) for amounts that fit, 32 bytes (256-bit) for the Arbitrum retryable amounts that can
be as large as 2²⁵⁶ − 1. They’re binary rather than UInt64 because wei amounts overflow 64
bits (1 ETH is 10¹⁸ wei; UInt64 tops out near 18.4 ETH).
Addresses in topics
Indexedaddress arguments of an event are stored in a 32-byte topic, left-padded with zeros.
The address is the last 20 bytes:
"0x000000000000000000000000" + address[2:].
Unsigned integers in JavaScript
apache-arrow returnsUInt64 columns as bigint (19426000n). Convert with Number(x) when
you know the value fits (block numbers and timestamps do), and keep bigint for gas totals you
add up.
Nulls
Every nullable field can benull in a row. There are three different reasons:
- The value doesn’t apply:
toon a contract creation,baseFeePerGasbefore London,topic3on an event with fewer indexed arguments,contractAddresson a normal call. - The chain didn’t report it:
statuson pre-Byzantium transactions. - The chain never has the field: listed in
unavailable_fields. See Fields a chain doesn’t have.
Nested fields
withdrawals, accessList and authorizationList are lists of structs; uncles and
blobVersionedHashes are lists of hashes. They are not flattened.
validator_index, storage_keys).
Booleans
status, timeboosted and isSystemTx are UInt8: 1 is true, 0 is false, null is
unknown or not applicable.