Closed 4meta5 closed 4 years ago
Note to self, add docs for how the string needs to be input for BatchIssueShares
, BatchBurnShares
, and RegisterWeightedOrg
This implementation is in client/clientsrc/utils
and it is used in client/cli/
which is used in the test-cli
#[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))
}
}
In hindsight, org registration through the CLI is not user friendly. I'll make an issue for using .json
to register organizations because it's just bad usability to require the user to type out the members in the above format...
TODO
pallet-utils/src/bank.rs
with bank2/src/bank.rs
more TODO
vote
functionality, already inheritedI'll finish these TODOs and then merge. The last few things are:
This will finish up everything necessary for the demo
I'm just going to add a CHANGELOG and then merge.
following sunshine-identity norms