Skip to main content

Module verify

Module verify 

Source
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Β§

BytecodeCheck
CheckRow
ContractKind
DecodedUpgrade
ExpectedInit
Expected reinitializer call and the major version it brings the proxy to.
OuterCalldatas
Reconstructed outer calldata for schedule and execute phases.
PhaseHashes
Safe-tx hashes for schedule and execute phases.
ReportHeader
SafeBatch
SafeContractMethod
SafeMeta
SafeTx
SolcVersion
TimelockBatches
A classified timelock proposal pair. Produced by classify_batches; input to decode_proposal.
VerifyProposalArgs
VerifyReport

EnumsΒ§

ContractKindArg
MatchClass
OwnerAccessor
Phase
Phase of a single-transaction batch, identified from contractMethod.name or the 4-byte ABI selector.
TimelockKind

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 TimelockBatches into a DecodedUpgrade.
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.json and execute.json from a proposal directory.
network_chain_id πŸ”’
Map a network name to its canonical chain id.
network_chain_id_row πŸ”’
Emit toml:network row (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