@@ -201,28 +201,6 @@ pub enum ConfidentialTransferInstruction {
201
201
///
202
202
Transfer ,
203
203
204
- /// Transfer tokens confidentially with fee.
205
- ///
206
- /// * Single owner/delegate
207
- /// 1. `[writable]` The source SPL Token account.
208
- /// 2. `[writable]` The destination SPL Token account.
209
- /// 3. `[]` The token mint.
210
- /// 4. `[]` Instructions sysvar.
211
- /// 5. `[signer]` The single source account owner.
212
- ///
213
- /// * Multisignature owner/delegate
214
- /// 1. `[writable]` The source SPL Token account.
215
- /// 2. `[writable]` The destination SPL Token account.
216
- /// 3. `[]` The token mint.
217
- /// 4. `[]` Instructions sysvar.
218
- /// 5. `[]` The multisig source account owner.
219
- /// 6.. `[signer]` Required M signer accounts for the SPL Token Multisig account.
220
- ///
221
- /// Data expected by this instruction:
222
- /// `TransferInstructionData`
223
- ///
224
- TransferWithFee ,
225
-
226
204
/// Applies the pending balance to the available balance, based on the history of `Deposit`
227
205
/// and/or `Transfer` instructions.
228
206
///
@@ -418,8 +396,7 @@ pub struct WithdrawInstructionData {
418
396
pub proof_instruction_offset : i8 ,
419
397
}
420
398
421
- /// Data expected by `ConfidentialTransferInstruction::Transfer` and
422
- /// `ConfidentialTransferInstruction::TransferWithFee`
399
+ /// Data expected by `ConfidentialTransferInstruction::Transfer`
423
400
#[ derive( Clone , Copy , Pod , Zeroable ) ]
424
401
#[ repr( C ) ]
425
402
pub struct TransferInstructionData {
@@ -758,7 +735,7 @@ pub fn inner_transfer(
758
735
) )
759
736
}
760
737
761
- /// Create a `Transfer` instruction
738
+ /// Create a `Transfer` instruction with regular (no-fee) proof
762
739
#[ allow( clippy:: too_many_arguments) ]
763
740
#[ cfg( not( target_os = "solana" ) ) ]
764
741
pub fn transfer (
@@ -786,46 +763,7 @@ pub fn transfer(
786
763
] )
787
764
}
788
765
789
- /// Create a inner `TransferWithFee` instruction
790
- ///
791
- /// This instruction is suitable for use with a cross-program `invoke`
792
- #[ allow( clippy:: too_many_arguments) ]
793
- pub fn inner_transfer_with_fee (
794
- token_program_id : & Pubkey ,
795
- source_token_account : & Pubkey ,
796
- destination_token_account : & Pubkey ,
797
- mint : & Pubkey ,
798
- new_source_decryptable_available_balance : DecryptableBalance ,
799
- authority : & Pubkey ,
800
- multisig_signers : & [ & Pubkey ] ,
801
- proof_instruction_offset : i8 ,
802
- ) -> Result < Instruction , ProgramError > {
803
- check_program_account ( token_program_id) ?;
804
- let mut accounts = vec ! [
805
- AccountMeta :: new( * source_token_account, false ) ,
806
- AccountMeta :: new( * destination_token_account, false ) ,
807
- AccountMeta :: new_readonly( * mint, false ) ,
808
- AccountMeta :: new_readonly( sysvar:: instructions:: id( ) , false ) ,
809
- AccountMeta :: new_readonly( * authority, multisig_signers. is_empty( ) ) ,
810
- ] ;
811
-
812
- for multisig_signer in multisig_signers. iter ( ) {
813
- accounts. push ( AccountMeta :: new_readonly ( * * multisig_signer, true ) ) ;
814
- }
815
-
816
- Ok ( encode_instruction (
817
- token_program_id,
818
- accounts,
819
- TokenInstruction :: ConfidentialTransferExtension ,
820
- ConfidentialTransferInstruction :: TransferWithFee ,
821
- & TransferInstructionData {
822
- new_source_decryptable_available_balance,
823
- proof_instruction_offset,
824
- } ,
825
- ) )
826
- }
827
-
828
- /// Create a `Transfer` instruction
766
+ /// Create a `Transfer` instruction with fee proof
829
767
#[ allow( clippy:: too_many_arguments) ]
830
768
#[ cfg( not( target_os = "solana" ) ) ]
831
769
pub fn transfer_with_fee (
@@ -839,7 +777,7 @@ pub fn transfer_with_fee(
839
777
proof_data : & TransferWithFeeData ,
840
778
) -> Result < Vec < Instruction > , ProgramError > {
841
779
Ok ( vec ! [
842
- inner_transfer_with_fee (
780
+ inner_transfer (
843
781
token_program_id,
844
782
source_token_account,
845
783
destination_token_account,
0 commit comments