Skip to content
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-client: Use Signers instead of Signer for confidential transfer functions #5663

Merged
merged 8 commits into from
Oct 26, 2023

Conversation

joncinque
Copy link
Contributor

Problem

A lot of the confidential transfer functions in the token client parametrize on Signer and accept multiple keypairs for the required signatures (account authority, context state accounts, etc). This does not work with the token CLI, which uses a huge bulk_signers everywhere.

Solution

Change all of the functions to take in Signers instead! This works very nicely for the most part, but the split-proofs-in-parallel functions get a little tricky since you need to craft the correct Signers arrays for each transaction.

Let me know how it looks! You should be able to track each commit pretty easily, since each one actually works on its own.

samkim-crypto
samkim-crypto previously approved these changes Oct 26, 2023
Copy link
Contributor

@samkim-crypto samkim-crypto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

token/program-2022-test/tests/confidential_transfer.rs Outdated Show resolved Hide resolved
token/program-2022-test/tests/confidential_transfer.rs Outdated Show resolved Hide resolved
@mergify mergify bot dismissed samkim-crypto’s stale review October 26, 2023 22:03

Pull request has been modified.

@joncinque joncinque merged commit 3ecdfc8 into solana-labs:master Oct 26, 2023
31 checks passed
@joncinque joncinque deleted the tkcsign branch October 26, 2023 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants