diff --git a/programs/token-2022/src/instructions/extensions/mod.rs b/programs/token-2022/src/instructions/extensions/mod.rs new file mode 100644 index 00000000..78c29960 --- /dev/null +++ b/programs/token-2022/src/instructions/extensions/mod.rs @@ -0,0 +1,38 @@ +pub mod cpi_guard; +pub mod default_account_state; +pub mod group_member_pointer; +pub mod group_pointer; +pub mod interest_bearing_mint; +pub mod memo_transfer; +pub mod metadata_pointer; +pub mod pausable; +pub mod permanent_delegate; +pub mod scaled_ui_amount; +pub mod token_group; +pub mod transfer_hook; + +#[repr(u8)] +pub(crate) enum ExtensionDiscriminator { + /// Default Account State extension + DefaultAccountState = 28, + /// Memo Transfer extension + MemoTransfer = 30, + /// Interest-Bearing Mint extension + InterestBearingMint = 33, + /// CPI Guard extension + CpiGuard = 34, + /// Permanent Delegate extension + PermanentDelegate = 35, + /// Transfer Hook extension + TransferHook = 36, + /// Metadata Pointer extension + MetadataPointer = 39, + /// Group Pointer extension + GroupPointer = 40, + /// Group Member Pointer extension + GroupMemberPointer = 41, + /// Scaled UI Amount extension + ScaledUiAmount = 43, + /// Pausable extension + Pausable = 44, +} diff --git a/programs/token-2022/src/instructions/mod.rs b/programs/token-2022/src/instructions/mod.rs index dd2e0d1f..d7bb9e35 100644 --- a/programs/token-2022/src/instructions/mod.rs +++ b/programs/token-2022/src/instructions/mod.rs @@ -3,6 +3,7 @@ mod approve_checked; mod burn; mod burn_checked; mod close_account; +mod extensions; mod freeze_account; mod initialize_account; mod initialize_account_2; @@ -25,6 +26,7 @@ pub use approve_checked::*; pub use burn::*; pub use burn_checked::*; pub use close_account::*; +pub use extensions::*; pub use freeze_account::*; pub use initialize_account::*; pub use initialize_account_2::*;