Expand description
The --to-block block-identifier port .
Mirrors cli/pool.py::_resolve_to_block and its cli/aave.py twin exactly:
- a concrete integer is used as-is;
- a pure tag (
latest,safe, …) with no offset resolves toNone— the Rust core fetches the chain tip viaeth_blockNumberitself; - a tag with an offset (
latest:-64,safe:128) or a concrete integer resolves to a concrete block number (the tag’s block + the offset).
Parsing is split from resolution so the semantics are unit-testable offline:
parse_to_block is pure, resolve_to_block performs the one RPC read a
tag+offset needs.
Enums§
- Block
Tag - A block tag accepted by
--to-block. - ToBlock
Spec - A parsed
--to-blockvalue, before the tag’s block number is read.
Constants§
- DEFAULT_
CHUNK_ SIZE - The
--chunkdefault (10_000), ported fromcli/pool.py. - DEFAULT_
TO_ BLOCK - The
--to-blockdefault (latest:-64), ported fromcli/pool.py. - DEFAULT_
VERIFY_ ALL_ INTERVAL - The
--verify-all-intervaldefault (1_000_000), ported fromcli/pool.py.
Functions§
- checksum
- EIP-55-checksum an address for a DB key / RPC target.
- parse_
to_ block - Parse a
--to-blockstring into aToBlockSpec. - resolve_
chain_ selector - Parse a chain selector (
base,ethereum,arbitrum, or a numeric id). - resolve_
to_ block - Resolve a parsed spec to an optional concrete block number.