diff --git a/programs/mpl-asset/src/instruction.rs b/programs/mpl-asset/src/instruction.rs index 73dc1719..ef4ece8b 100644 --- a/programs/mpl-asset/src/instruction.rs +++ b/programs/mpl-asset/src/instruction.rs @@ -17,6 +17,7 @@ pub enum MplAssetInstruction { #[account(6, optional, name="log_wrapper", desc = "The SPL Noop Program")] Create(CreateArgs), + //TODO: Implement this instruction /// Migrate an mpl-token-metadata asset to an mpl-asset. #[account(0, writable, signer, name="asset_address", desc = "The address of the new asset")] #[account(1, optional, signer, name="owner", desc = "The authority of the new asset")] @@ -36,6 +37,7 @@ pub enum MplAssetInstruction { #[account(14, optional, name="authorization_rules", desc="Token Authorization Rules account")] Migrate(MigrateArgs), + //TODO: Implement this instruction /// Delegate an mpl-asset. #[account(0, writable, name="asset_address", desc = "The address of the asset")] #[account(1, optional, name="collection", desc = "The collection to which the asset belongs")] @@ -45,6 +47,7 @@ pub enum MplAssetInstruction { #[account(5, optional, name="log_wrapper", desc = "The SPL Noop Program")] Delegate(DelegateArgs), + //TODO: Implement this instruction /// Burn an mpl-asset. #[account(0, writable, name="asset_address", desc = "The address of the asset")] #[account(1, optional, writable, name="collection", desc = "The collection to which the asset belongs")] @@ -53,6 +56,7 @@ pub enum MplAssetInstruction { #[account(4, optional, name="log_wrapper", desc = "The SPL Noop Program")] Burn(BurnArgs), + //TODO: Implement this instruction /// Transfer an mpl-asset. #[account(0, writable, name="asset_address", desc = "The address of the asset")] #[account(1, optional, name="collection", desc = "The collection to which the asset belongs")] @@ -62,6 +66,7 @@ pub enum MplAssetInstruction { #[account(5, optional, name="log_wrapper", desc = "The SPL Noop Program")] Transfer(TransferArgs), + //TODO: Implement this instruction /// Update an mpl-asset. #[account(0, writable, name="asset_address", desc = "The address of the asset")] #[account(1, signer, name="authority", desc = "The update authority or update authority delegate of the asset")] @@ -71,18 +76,21 @@ pub enum MplAssetInstruction { #[account(5, optional, name="log_wrapper", desc = "The SPL Noop Program")] Update(UpdateArgs), + //TODO: Implement this instruction /// Freeze an mpl-asset. #[account(0, writable, name="asset_address", desc = "The address of the asset")] #[account(1, signer, name="delegate", desc = "The delegate of the asset")] #[account(2, optional, name="log_wrapper", desc = "The SPL Noop Program")] Freeze(FreezeArgs), + //TODO: Implement this instruction /// Thaw an mpl-asset. #[account(0, writable, name="asset_address", desc = "The address of the asset")] #[account(1, signer, name="delegate", desc = "The delegate of the asset")] #[account(2, optional, name="log_wrapper", desc = "The SPL Noop Program")] Thaw(ThawArgs), + //TODO: Implement this instruction /// Create a new mpl-asset. /// This function creates the initial mpl-asset #[account(0, writable, name="asset_address", desc = "The address of the asset")] @@ -92,6 +100,7 @@ pub enum MplAssetInstruction { #[account(4, optional, name="log_wrapper", desc = "The SPL Noop Program")] Compress(CompressArgs), + //TODO: Implement this instruction /// Create a new mpl-asset. /// This function creates the initial mpl-asset #[account(0, writable, name="asset_address", desc = "The address of the asset")] @@ -102,6 +111,11 @@ pub enum MplAssetInstruction { Decompress(DecompressArgs), } +//TODO: Implement this struct +#[repr(C)] +#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] +pub struct CompressionProof {} + #[repr(C)] #[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] pub struct CreateArgs { diff --git a/programs/mpl-asset/src/plugins/mod.rs b/programs/mpl-asset/src/plugins/mod.rs index 3ca36b7a..c7b7a58d 100644 --- a/programs/mpl-asset/src/plugins/mod.rs +++ b/programs/mpl-asset/src/plugins/mod.rs @@ -1,5 +1,10 @@ +mod collection; mod royalties; +mod utils; + +pub use collection::*; pub use royalties::*; +pub use utils::*; use borsh::{BorshDeserialize, BorshSerialize}; use std::collections::HashMap; @@ -16,8 +21,6 @@ use crate::state::Authority; #[derive(Clone, Debug, BorshSerialize, BorshDeserialize, Eq, PartialEq)] pub enum Plugin { Reserved, - Asset, - HashedAsset, Royalties, MasterEdition, PrintEdition, diff --git a/programs/mpl-asset/src/plugins/utils.rs b/programs/mpl-asset/src/plugins/utils.rs new file mode 100644 index 00000000..0ad36d63 --- /dev/null +++ b/programs/mpl-asset/src/plugins/utils.rs @@ -0,0 +1,16 @@ +use super::Plugin; + +//TODO: Implement this function +pub fn create_idempotent() { + // Create plugin header and registry if it doesn't exist +} + +//TODO: Implement this function +pub fn fetch_plugin(plugin: u8) -> Plugin { + // Create plugin header and registry if it doesn't exist +} + +//TODO: Implement this function +pub fn list_plugins() -> Vec { + // Create plugin header and registry if it doesn't exist +}