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

Function parse_token_amount

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

Source from the content-addressed store, hash-verified

30}
31
32pub fn parse_token_amount(s: &str) -> Result<TokenAmount, String> {
33 BigInt::from_str_radix(s, 10)
34 .map_err(|e| format!("not a token amount: {e}"))
35 .map(TokenAmount::from_atto)
36}
37
38pub fn parse_full_fil(s: &str) -> Result<TokenAmount, String> {
39 let f: Result<f64, _> = s.parse();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected