Skip to main content

Module tempo

Module tempo 

Source
Expand description

Tempo utilities: fee token parsing and named nonce lanes (2D nonces).

A “lane” is a friendly alias for a Tempo nonce_key (a [U256]). Lanes are defined in a shared TOML file (default tempo.lanes.toml at the project root) so a team can reserve independent sequential nonce streams for parallel scripts without coordinating on raw U256 selectors.

Example tempo.lanes.toml:

deploy   = 1
ops      = 2
payments = 3
cast erc20 transfer ... --tempo.lane payments

Structs§

ResolvedLane
Result of resolving a --tempo.lane <name> argument against a lanes file.

Constants§

DEFAULT_LANES_FILE
Default name of the lanes file at the project root.

Functions§

load_lanes
Loads a TOML lanes file from path.
maybe_print_resolved_lane
Prints lane: <name> (nonce_key=<key>, nonce=<n>) to stderr (so it doesn’t pollute stdout for commands like cast mktx whose stdout is meant to be piped), giving visibility into which 2D nonce lane was used.
parse_fee_token_address
Parses a fee token address.
parse_lanes 🔒
resolve_lane
Resolves opts.lane against a lanes file and writes the resulting nonce_key to opts.nonce_key. Returns the resolved lane (or None if no --tempo.lane was set).
token_id_to_address 🔒