You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: zero-address guard not applied to contract addresses parsed outside the resolve* family (fetch/channel/setup) #1213
Spun out of the #1209 review (which fixed #1153). Pre-existing gap noted while the guard is fresh.
Observation
#1153 added a shared parse_nonzero_address guard and applied it to the four contract addresses resolved by resolve / resolve_appeal / resolve_publish in crates/cli/src/commands/chain_ctx.rs. But several other contract addresses in the CLI are still parsed via the plain chain_ctx::parse_address (which accepts 0x0000…0000), so the same "a zero address parses cleanly but is never a real deployment — it surfaces only as an opaque on-chain revert" rationale that motivated #1153 still applies to them:
crates/cli/src/commands/fetch.rs:212 — capacity_bond_address. Note the inconsistency: the same logical address IS zero-guarded when it comes through resolve(), but not on the fetch path.
(Account/EOA addresses like --provider-address and operator are deliberately excluded — the "never a real deployment" rationale is contract-specific.)
Suggested fix
Route these contract-address parse sites through chain_ctx::parse_nonzero_address instead of parse_address, mirroring #1153. This is a small behavior change (new hard error on 0x0 for these addresses), so it wants its own PR + a CHANGELOG line — hence this issue rather than bundling it into #1209.
Once done, the parse_nonzero_address doc comment and the CHANGELOG "tracked separately" note (added in #1209) can be updated to reflect the broader coverage.
Activity
fix(cli,incentive): reject zero address for all parsed contract addre…
fix(node,common,cli,incentive): guard daemon contract addresses again…