@@ -23,14 +23,11 @@ use {
2323} ;
2424#[ cfg( not( target_os = "solana" ) ) ]
2525use {
26- solana_zk_sdk:: {
27- encryption:: elgamal:: ElGamalPubkey ,
28- zk_elgamal_proof_program:: {
29- instruction:: ProofInstruction ,
30- proof_data:: {
31- BatchedGroupedCiphertext3HandlesValidityProofData , BatchedRangeProofU128Data ,
32- CiphertextCiphertextEqualityProofData , CiphertextCommitmentEqualityProofData ,
33- } ,
26+ solana_zk_sdk:: zk_elgamal_proof_program:: {
27+ instruction:: ProofInstruction ,
28+ proof_data:: {
29+ BatchedGroupedCiphertext3HandlesValidityProofData , BatchedRangeProofU128Data ,
30+ CiphertextCiphertextEqualityProofData , CiphertextCommitmentEqualityProofData ,
3431 } ,
3532 } ,
3633 spl_token_confidential_transfer_proof_extraction:: instruction:: {
@@ -112,8 +109,7 @@ pub enum ConfidentialMintBurnInstruction {
112109 ///
113110 /// * Single authority
114111 /// 0. `[writable]` The SPL Token account.
115- /// 1. `[]` The SPL Token mint. `[writable]` if the mint has a non-zero
116- /// supply elgamal-pubkey
112+ /// 1. `[writable]` The SPL Token mint.
117113 /// 2. `[]` (Optional) Instructions sysvar if at least one of the
118114 /// `zk_elgamal_proof` instructions are included in the same
119115 /// transaction.
@@ -152,8 +148,7 @@ pub enum ConfidentialMintBurnInstruction {
152148 ///
153149 /// * Single authority
154150 /// 0. `[writable]` The SPL Token account.
155- /// 1. `[]` The SPL Token mint. `[writable]` if the mint has a non-zero
156- /// supply elgamal-pubkey
151+ /// 1. `[writable]` The SPL Token mint.
157152 /// 2. `[]` (Optional) Instructions sysvar if at least one of the
158153 /// `zk_elgamal_proof` instructions are included in the same
159154 /// transaction.
@@ -421,7 +416,6 @@ pub fn confidential_mint_with_split_proofs(
421416 token_program_id : & Pubkey ,
422417 token_account : & Pubkey ,
423418 mint : & Pubkey ,
424- supply_elgamal_pubkey : Option < ElGamalPubkey > ,
425419 mint_amount_auditor_ciphertext_lo : & PodElGamalCiphertext ,
426420 mint_amount_auditor_ciphertext_hi : & PodElGamalCiphertext ,
427421 authority : & Pubkey ,
@@ -434,14 +428,10 @@ pub fn confidential_mint_with_split_proofs(
434428 new_decryptable_supply : & DecryptableBalance ,
435429) -> Result < Vec < Instruction > , ProgramError > {
436430 check_program_account ( token_program_id) ?;
437- let mut accounts = vec ! [ AccountMeta :: new( * token_account, false ) ] ;
438- // we only need write lock to adjust confidential suppy on
439- // mint if a value for supply_elgamal_pubkey has been set
440- if supply_elgamal_pubkey. is_some ( ) {
441- accounts. push ( AccountMeta :: new ( * mint, false ) ) ;
442- } else {
443- accounts. push ( AccountMeta :: new_readonly ( * mint, false ) ) ;
444- }
431+ let mut accounts = vec ! [
432+ AccountMeta :: new( * token_account, false ) ,
433+ AccountMeta :: new( * mint, false ) ,
434+ ] ;
445435
446436 let mut expected_instruction_offset = 1 ;
447437 let mut proof_instructions = vec ! [ ] ;
@@ -508,7 +498,6 @@ pub fn confidential_burn_with_split_proofs(
508498 token_program_id : & Pubkey ,
509499 token_account : & Pubkey ,
510500 mint : & Pubkey ,
511- supply_elgamal_pubkey : Option < ElGamalPubkey > ,
512501 new_decryptable_available_balance : & DecryptableBalance ,
513502 burn_amount_auditor_ciphertext_lo : & PodElGamalCiphertext ,
514503 burn_amount_auditor_ciphertext_hi : & PodElGamalCiphertext ,
@@ -521,12 +510,10 @@ pub fn confidential_burn_with_split_proofs(
521510 range_proof_location : ProofLocation < BatchedRangeProofU128Data > ,
522511) -> Result < Vec < Instruction > , ProgramError > {
523512 check_program_account ( token_program_id) ?;
524- let mut accounts = vec ! [ AccountMeta :: new( * token_account, false ) ] ;
525- if supply_elgamal_pubkey. is_some ( ) {
526- accounts. push ( AccountMeta :: new ( * mint, false ) ) ;
527- } else {
528- accounts. push ( AccountMeta :: new_readonly ( * mint, false ) ) ;
529- }
513+ let mut accounts = vec ! [
514+ AccountMeta :: new( * token_account, false ) ,
515+ AccountMeta :: new( * mint, false ) ,
516+ ] ;
530517
531518 let mut expected_instruction_offset = 1 ;
532519 let mut proof_instructions = vec ! [ ] ;
0 commit comments