MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / parse_address

Function parse_address

fendermint/app/options/src/parse.rs:52–59  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

50}
51
52pub fn parse_address(s: &str) -> Result<Address, String> {
53 match s.chars().next() {
54 Some('f') => set_current_network(Network::Mainnet),
55 Some('t') => set_current_network(Network::Testnet),
56 _ => (),
57 }
58 Address::from_str(s).map_err(|e| format!("error parsing address: {e}"))
59}
60
61pub fn parse_signer_addr(s: &str) -> Result<SignerAddr, String> {
62 Address::from_str(s)

Callers

nothing calls this directly

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected