The CLI input format for BatchIssueShares, BatchBurnShares, and RegisterWeightedOrg is not convenient.
#[derive(Clone, Debug)]
pub struct AccountShare(pub String, pub u64);
impl FromStr for AccountShare {
type Err = Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let coords: Vec<&str> = s.trim_matches(|p| p == '(' || p == ')' )
.split(',')
.collect();
let acc_str = coords[0];
let share_fromstr = coords[1].parse::<u64>().map_err(|_| Error::ParseIntError)?;
Ok(AccountShare(acc_str.to_string(), share_fromstr))
}
}
I'd prefer to use a .json file to register organizations because it's just poor usability to require the user to type out the members in the format above...
The CLI input format for
BatchIssueShares
,BatchBurnShares
, andRegisterWeightedOrg
is not convenient.I'd prefer to use a
.json
file to register organizations because it's just poor usability to require the user to type out the members in the format above...