Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 0b910c7

Browse files
committed
update token-cli for the updated syntax
1 parent ffbaacc commit 0b910c7

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

token/cli/src/command.rs

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,27 +1604,32 @@ async fn command_transfer(
16041604
.unwrap();
16051605

16061606
// setup proofs
1607+
let create_range_proof_context_signer = &[&range_proof_context_state_account];
1608+
let create_equality_proof_context_signer = &[&equality_proof_context_state_account];
1609+
let create_ciphertext_validity_proof_context_signer =
1610+
&[&ciphertext_validity_proof_context_state_account];
1611+
16071612
let _ = try_join!(
16081613
token.confidential_transfer_create_context_state_account(
16091614
&range_proof_pubkey,
16101615
&context_state_authority_pubkey,
16111616
&range_proof_data,
16121617
true,
1613-
&range_proof_context_state_account,
1618+
create_range_proof_context_signer
16141619
),
16151620
token.confidential_transfer_create_context_state_account(
16161621
&equality_proof_pubkey,
16171622
&context_state_authority_pubkey,
16181623
&equality_proof_data,
16191624
false,
1620-
&equality_proof_context_state_account,
1625+
create_equality_proof_context_signer
16211626
),
16221627
token.confidential_transfer_create_context_state_account(
16231628
&ciphertext_validity_proof_pubkey,
16241629
&context_state_authority_pubkey,
16251630
&ciphertext_validity_proof_data,
16261631
false,
1627-
&ciphertext_validity_proof_context_state_account,
1632+
create_ciphertext_validity_proof_context_signer
16281633
)
16291634
)?;
16301635

@@ -1655,24 +1660,25 @@ async fn command_transfer(
16551660
.await?;
16561661

16571662
// close context state accounts
1663+
let close_context_state_signer = &[&context_state_authority];
16581664
let _ = try_join!(
16591665
token.confidential_transfer_close_context_state(
16601666
&equality_proof_pubkey,
16611667
&sender,
16621668
&context_state_authority_pubkey,
1663-
&context_state_authority,
1669+
close_context_state_signer
16641670
),
16651671
token.confidential_transfer_close_context_state(
16661672
&ciphertext_validity_proof_pubkey,
16671673
&sender,
16681674
&context_state_authority_pubkey,
1669-
&context_state_authority,
1675+
close_context_state_signer
16701676
),
16711677
token.confidential_transfer_close_context_state(
16721678
&range_proof_pubkey,
16731679
&sender,
16741680
&context_state_authority_pubkey,
1675-
&context_state_authority,
1681+
close_context_state_signer
16761682
),
16771683
)?;
16781684

@@ -3353,21 +3359,23 @@ async fn command_deposit_withdraw_confidential_tokens(
33533359

33543360
// set up context state accounts
33553361
let context_state_authority_pubkey = context_state_authority.pubkey();
3362+
let create_equality_proof_signer = &[&equality_proof_context_state_keypair];
3363+
let create_range_proof_signer = &[&range_proof_context_state_keypair];
33563364

33573365
let _ = try_join!(
33583366
token.confidential_transfer_create_context_state_account(
33593367
&equality_proof_context_state_pubkey,
33603368
&context_state_authority_pubkey,
33613369
&equality_proof_data,
33623370
false,
3363-
&equality_proof_context_state_keypair,
3371+
create_equality_proof_signer
33643372
),
33653373
token.confidential_transfer_create_context_state_account(
33663374
&range_proof_context_state_pubkey,
33673375
&context_state_authority_pubkey,
33683376
&range_proof_data,
33693377
true,
3370-
&range_proof_context_state_keypair,
3378+
create_range_proof_signer,
33713379
)
33723380
)?;
33733381

@@ -3392,18 +3400,19 @@ async fn command_deposit_withdraw_confidential_tokens(
33923400
.await?;
33933401

33943402
// close context state account
3403+
let close_context_state_signer = &[&context_state_authority];
33953404
let _ = try_join!(
33963405
token.confidential_transfer_close_context_state(
33973406
&equality_proof_context_state_pubkey,
33983407
&token_account_address,
33993408
&context_state_authority_pubkey,
3400-
&context_state_authority,
3409+
close_context_state_signer
34013410
),
34023411
token.confidential_transfer_close_context_state(
34033412
&range_proof_context_state_pubkey,
34043413
&token_account_address,
34053414
&context_state_authority_pubkey,
3406-
&context_state_authority,
3415+
close_context_state_signer
34073416
)
34083417
)?;
34093418

0 commit comments

Comments
 (0)