Expand description
Trust-minimizing verifier for Safe-tx-builder upgrade proposals.
Checks that the impl address in a proposal holds exactly the bytecode the deployer ships for the supplied contract kind, and that governance wiring (owner, timelock, delay, init call) is correct. No trust in Etherscan or the JSON description. Validates all fields against the committed proposal.toml.
StructsΒ§
- Bytecode
Check - Check
Row - Contract
Kind - Decoded
Upgrade - Expected
Init - Expected reinitializer call and the major version it brings the proxy to.
- Outer
Calldatas - Reconstructed outer calldata for schedule and execute phases.
- Phase
Hashes - Safe-tx hashes for schedule and execute phases.
- Report
Header - Safe
Batch - Safe
Contract Method - Safe
Meta - SafeTx
- Solc
Version - Timelock
Batches - A classified timelock proposal pair.
Produced by
classify_batches; input todecode_proposal. - Verify
Proposal Args - Verify
Report
EnumsΒ§
- Contract
Kind Arg - Match
Class - Owner
Accessor - Phase
- Phase of a single-transaction batch, identified from
contractMethod.nameor the 4-byte ABI selector. - Timelock
Kind
FunctionsΒ§
- batch_
phase π - Identify the phase of a single-transaction batch.
- build_
phase_ πhashes_ from_ toml - Build PhaseHashes directly from toml (used when decoding fails).
- check_
init_ πselector - Validate init calldata against the kindβs expected reinitializer.
- compare_
normalized - Compare normalized on-chain bytecode against the binding reference.
- compute_
and_ πvalidate_ phase_ hashes - Recompute Safe hashes from the JSONs and assert each equals the toml value.
- contract_
kind - decode_
inner_ upgrade - decode_
proposal - Decode a
TimelockBatchesinto aDecodedUpgrade. - delay_
row - deployment_
info_ πrows - Timelock and proxy address checks against embedded deployment-info.
- fail π
- fetch_
min_ πdelay - fetch_
proxy_ πmajor_ version - fetch_
proxy_ πowner - governance_
checks π - load_
proposal_ dir - Load
schedule.jsonandexecute.jsonfrom a proposal directory. - network_
chain_ πid - Map a network name to its canonical chain id.
- network_
chain_ πid_ row - Emit
toml:networkrow (static chain-id mapping, breaks circular check). - nonce_
drift_ πrows - Query on-chain nonces and emit WARN rows (not hard fails) when they differ from toml.
- owner_
timelock_ row - parse_
hex_ πbytes - pass π
- predecessor_
zero_ row - print_
hashes π - reconstruct_
timelock_ πcalldata - run_
verify - run_
verify_ standalone - Run verification without a wallet provider.
- safe_
address_ πrows - Validate toml Safe addresses against embedded deployment-info (hard fail on unavailable).
- solc_
str π - strip_
cbor_ metadata - Strip the trailing solc CBOR metadata tail.
- toml_
field_ πrow - Row asserting a decoded field equals the proposal.toml value.
- toml_
hash_ πrow - Row asserting a hash field equals the toml value (uses hex display).
- tx_
calldata - value_
zero_ row