-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[token-cli] Enable configuring confidential transfer account #5540
[token-cli] Enable configuring confidential transfer account #5540
Conversation
…-transfers` commands
…ntial account configure commands
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.
Looks great! Just a few little comments, but this should be ready to go soon
token/cli/src/main.rs
Outdated
.arg( | ||
Arg::with_name("account") | ||
.validator(is_valid_pubkey) | ||
.value_name("TOKEN_ACCOUNT_ADDRESS") | ||
.takes_value(true) | ||
.index(1) | ||
.required(true) | ||
.help("The address of the token account to configure confidential transfers for") | ||
) |
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.
For all of these, similar to create-account
, how about taking in a "mint"
and using the owner's ATA for that mint if "account"
isn't specified?
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, that is a good idea. It turned out it is slightly clunky since account
and token
can all be optional. Please take a look. I think this suggestion also applies for all other commands that take in account
as a required argument.
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.
Sorry, one last bit to make these flags consistent with other commands
Co-authored-by: Jon Cinque <[email protected]>
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.
I noticed a few of the help texts got changed, so just changing those back. After that, this is good to go!
Co-authored-by: Jon Cinque <[email protected]>
Pull request has been modified.
Oh man sorry for all the mess and hassle this PR and thanks for your patience. |
Problem
The token-cli does not yet support initializing confidential transfer account
Summary of changes
Added configuring cli commands for confidential transfer accounts. I think each commits should be pretty straightforward and independent with the following note:
configure-confidential-transfer-account
, I made it so that the elgamal and aes keys are derived from the signer by default. This can be updated so that users have the option to initialize the account with custom keys once we upgrade to clap-v3-utils.