-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vote for update(pool) command #68
Conversation
Pull Request Test Coverage Report for Build 2614749097
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! I appreciate tests for both cases (with/without ballot box)! Please check my comments.
@@ -93,6 +93,12 @@ enum Command { | |||
TransferOracleToken { | |||
oracle_token_address: String, | |||
}, | |||
VoteUpdatePool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add comments describing the parameters. It'd be awesome if they also are shown in cmdline --help
as option descriptions. I suspect there should be an attribute in clap for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks! Comments, huh? :) clap
has awesome UX!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah for sure!
ballot_box_min_storage_rent: u64, | ||
update_nft_token_id: TokenId, | ||
ballot_token_id: TokenId, | ||
ballot_token_owner_address: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ballot_token_owner_address
can be a Address
, i.e. parsed before the call. This will allow removing network_prefix
argument as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it's done.
amount: 1.try_into().unwrap(), | ||
}; | ||
let tokens = BoxTokens::from_vec(vec![ballot_token]).unwrap(); | ||
let in_ballot_box = ErgoBox::new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can call make_local_ballot_box_candidate
and then ErgoBox::from_candidate(...)
afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you!
@@ -93,6 +93,12 @@ enum Command { | |||
TransferOracleToken { | |||
oracle_token_address: String, | |||
}, | |||
VoteUpdatePool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks! Comments, huh? :) clap
has awesome UX!
Close #26