Skip to main content

parse_nonzero_address

Function parse_nonzero_address 

Source
pub fn parse_nonzero_address(value: &str, label: &str) -> Result<Address>
Expand description

Parse a contract address and reject the zero address. Address::ZERO parses cleanly but is never a real deployment — it would surface only as an opaque on-chain revert at call time, so reject it here with a clear, labelled error.

Use this for every contract address parsed from a flag/config: the CLI’s resolve / fetch / channel / setup sites (#1153/#1213), the daemon’s runtime bring-up sites (#1219), and the swap-venue addresses in decdn-incentive (#1213). Account/EOA addresses (--provider-address, operator) deliberately stay on parse_address — the “never a real deployment” rationale is contract-specific.