Skip to main content

Module transfer_fee

Module transfer_fee 

Source
Expand description

Reads the transfer fee of a Token-2022 mint from raw account data, for the math::amm quotes. Cache a TransferFeeConfig only while its transfer_fee_config_authority is None.

Structs§

TransferFee
Transfer fee information
TransferFeeConfig
Transfer fee extension data for mints.

Functions§

extension
Reads the mint extension V.
mint_extensions
Unpacks a mint and its extensions. Ok(None) for an SPL Token mint. Fails with ProgramError::IncorrectProgramId if no token program owns the mint.
mint_fee
mint_fee_at_epoch
The transfer fee of a mint at epoch. Ok(None) only when the mint has no TransferFeeConfig. A 0 bps config gives Some.