-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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] Add confidential transfer deposit, withdraw, apply pending balance, and confidential transfer #5630
Conversation
ae36bf6
to
e8d72bf
Compare
371613d
to
085f495
Compare
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.
This is looking really good! I got too excited and gave an early review, so I hope that's ok 😅
.await | ||
.unwrap(); // configure destination account for confidential transfers first | ||
|
||
// NOTE: the test fails due to transaction size limit |
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.
The next step is to add support for split proofs for this to pass, right?
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.
Yep that would be the next step. Since this PR is quite long already, should we land this PR once the existing issues are addressed and then add the split proofs in a follow-up?
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's fine, it'll require #5663 anyway!
|
||
// withdraw confidential tokens | ||
// | ||
// NOTE: the test fails due to transaction size limit :( |
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.
We'll just need another helper on the token client to generate the proof here, right?
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, it should suffice to build a token-client function that (1) creates a withdraw proof context, and then (2) follow through with the withdraw instruction.
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, we're so close!
Problem
The token-cli does not yet support confidential transfer instructions to deposit and withdraw confidential transfer tokens, apply pending balance to available balance, and make a confidential transfer.
Summary of changes
Add the four commands for the four instructions listed above. For confidential transfers, the functionality is added into the existing
transfer
command instead of creating a dedicated command for confidential transfers.