I wrote the code here quickly to make it work but there's lots of places it can be improved.
A few event structs in client/src/srml/bounty.rs have the same fields but have different names because they correspond to different events (but a single struct would suffice with adequately general naming)
client/cli has a bunch of duplicate logic for converting String to CidBytes like for the_string: String
let content = self.the_string.as_bytes();
let hash = Blake2b256::digest(&content[..]);
let cid = Cid::new_v1(Codec::Raw, hash);
CidBytes::from(&cid)
and this should maybe merged into the bounty_client::Account type which was previously an enum Identifier type
To get the clap subcommand to work, I repeated the BankOpenCommand twice in an enum. That might not be necessary and it definitely isn't necessary once I add the other bank runtime methods to the CLI.
The bounty CLI functionality doesn't (yet) express posting or applying for grants as an org although the module supports this functionality.
I wrote the code here quickly to make it work but there's lots of places it can be improved.
A few event structs in
client/src/srml/bounty.rs
have the same fields but have different names because they correspond to different events (but a single struct would suffice with adequately general naming)client/cli
has a bunch of duplicate logic for convertingString
toCidBytes
like forthe_string: String
and this should maybe merged into the
bounty_client::Account
type which was previously an enumIdentifier
typeTo get the clap subcommand to work, I repeated the
BankOpenCommand
twice in an enum. That might not be necessary and it definitely isn't necessary once I add the other bank runtime methods to the CLI.The bounty CLI functionality doesn't (yet) express posting or applying for grants as an org although the module supports this functionality.