Skip to content

Commit

Permalink
update token-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
samkim-crypto committed Nov 12, 2024
1 parent 08e0e62 commit 99bd97b
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions token/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ use {
transfer_hook::TransferHook,
BaseStateWithExtensions, ExtensionType, StateWithExtensionsOwned,
},
solana_zk_sdk::encryption::{
auth_encryption::AeKey,
elgamal::{self, ElGamalKeypair},
pod::elgamal::PodElGamalPubkey,
solana_zk_sdk::{
encryption::{
auth_encryption::AeKey,
elgamal::{self, ElGamalKeypair},
pod::elgamal::PodElGamalPubkey,
},
zk_elgamal_proof_program::proof_data::ZkProofData,
},
state::{Account, AccountState, Mint},
},
Expand Down Expand Up @@ -1623,6 +1626,17 @@ async fn command_transfer(
)
.unwrap();

let transfer_amount_auditor_ciphertext_lo = ciphertext_validity_proof_data
.context_data()
.grouped_ciphertext_lo
.try_extract_ciphertext(2)
.unwrap();
let transfer_amount_auditor_ciphertext_hi = ciphertext_validity_proof_data
.context_data()
.grouped_ciphertext_hi
.try_extract_ciphertext(2)
.unwrap();

// setup proofs
let create_range_proof_context_signer = &[&range_proof_context_state_account];
let create_equality_proof_context_signer = &[&equality_proof_context_state_account];
Expand Down Expand Up @@ -1670,6 +1684,8 @@ async fn command_transfer(
Some(&ciphertext_validity_proof_context_proof_account),
Some(&range_proof_context_proof_account),
transfer_balance,
Some(&transfer_amount_auditor_ciphertext_lo),
Some(&transfer_amount_auditor_ciphertext_hi),
Some(transfer_account_info),
&args.sender_elgamal_keypair,
&args.sender_aes_key,
Expand Down

0 comments on commit 99bd97b

Please sign in to comment.