@@ -486,7 +486,9 @@ pub enum ConfidentialTransferInstruction {
486
486
///
487
487
/// If the token account is not large enough to include the new
488
488
/// cconfidential transfer extension, then optionally reallocate the
489
- /// account to increase the data size.
489
+ /// account to increase the data size. To reallocate, a payer account to
490
+ /// fund the reallocation and the system account should be included in the
491
+ /// instruction.
490
492
///
491
493
/// Accounts expected by this instruction:
492
494
///
@@ -499,7 +501,7 @@ pub enum ConfidentialTransferInstruction {
499
501
/// 4. `[]` (Optional) System program for reallocation funding
500
502
///
501
503
/// Data expected by this instruction:
502
- /// `ConfigureAccountWithRegistryInstructionData`
504
+ /// None
503
505
ConfigureAccountWithRegistry ,
504
506
}
505
507
@@ -676,17 +678,6 @@ pub struct TransferWithFeeInstructionData {
676
678
pub range_proof_instruction_offset : i8 ,
677
679
}
678
680
679
- /// Data expected by
680
- /// `ConfidentialTransferInstruction::ConfigureAccountWithRegistry`
681
- #[ cfg_attr( feature = "serde-traits" , derive( Serialize , Deserialize ) ) ]
682
- #[ derive( Clone , Copy , Debug , PartialEq , Pod , Zeroable ) ]
683
- #[ repr( C ) ]
684
- pub struct ConfigureAccountWithRegistryInstructionData {
685
- /// Reallocate token account if it is not large enough for the
686
- /// `ConfidentialTransfer` extension.
687
- pub reallocate_account : PodBool ,
688
- }
689
-
690
681
/// Create a `InitializeMint` instruction
691
682
pub fn initialize_mint (
692
683
token_program_id : & Pubkey ,
@@ -1756,21 +1747,16 @@ pub fn configure_account_with_registry(
1756
1747
AccountMeta :: new_readonly( * mint, false ) ,
1757
1748
AccountMeta :: new_readonly( * elgamal_registry_account, false ) ,
1758
1749
] ;
1759
- let reallocate_account = if let Some ( payer) = payer {
1750
+ if let Some ( payer) = payer {
1760
1751
accounts. push ( AccountMeta :: new ( * payer, true ) ) ;
1761
1752
accounts. push ( AccountMeta :: new_readonly ( system_program:: id ( ) , false ) ) ;
1762
- true
1763
- } else {
1764
- false
1765
- } ;
1753
+ }
1766
1754
1767
1755
Ok ( encode_instruction (
1768
1756
token_program_id,
1769
1757
accounts,
1770
1758
TokenInstruction :: ConfidentialTransferExtension ,
1771
1759
ConfidentialTransferInstruction :: ConfigureAccountWithRegistry ,
1772
- & ConfigureAccountWithRegistryInstructionData {
1773
- reallocate_account : reallocate_account. into ( ) ,
1774
- } ,
1760
+ & ( ) ,
1775
1761
) )
1776
1762
}
0 commit comments