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

Commit 8536f6f

Browse files
authored
token-2022: [L-04] Comment that TransferCheckedWithFee works for all mints (#6860)
* token-2022: Comment that TransferCheckedWithFee works for all mints * cargo fmt
1 parent e747b9b commit 8536f6f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

token/program-2022/src/extension/transfer_fee/instruction.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,17 @@ pub enum TransferFeeInstruction {
5050
},
5151
/// Transfer, providing expected mint information and fees
5252
///
53+
/// This instruction succeeds if the mint has no configured transfer fee
54+
/// and the provided fee is 0. This allows applications to use
55+
/// `TransferCheckedWithFee` with any mint.
56+
///
5357
/// Accounts expected by this instruction:
5458
///
5559
/// * Single owner/delegate
56-
/// 0. `[writable]` The source account. Must include the
60+
/// 0. `[writable]` The source account. May include the
5761
/// `TransferFeeAmount` extension.
58-
/// 1. `[]` The token mint. Must include the `TransferFeeConfig`
59-
/// extension.
60-
/// 2. `[writable]` The destination account. Must include the
62+
/// 1. `[]` The token mint. May include the `TransferFeeConfig` extension.
63+
/// 2. `[writable]` The destination account. May include the
6164
/// `TransferFeeAmount` extension.
6265
/// 3. `[signer]` The source account's owner/delegate.
6366
///
@@ -73,8 +76,8 @@ pub enum TransferFeeInstruction {
7376
/// Expected number of base 10 digits to the right of the decimal place.
7477
decimals: u8,
7578
/// Expected fee assessed on this transfer, calculated off-chain based
76-
/// on the transfer_fee_basis_points and maximum_fee of the
77-
/// mint.
79+
/// on the transfer_fee_basis_points and maximum_fee of the mint. May
80+
/// be 0 for a mint without a configured transfer fee.
7881
fee: u64,
7982
},
8083
/// Transfer all withheld tokens in the mint to an account. Signed by the

0 commit comments

Comments
 (0)