Skip to content

Commit

Permalink
Adding TODOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
blockiosaurus committed Feb 17, 2024
1 parent 51c620b commit 36418c4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
14 changes: 14 additions & 0 deletions programs/mpl-asset/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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")]
Expand All @@ -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")]
Expand All @@ -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")]
Expand All @@ -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")]
Expand All @@ -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")]
Expand All @@ -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")]
Expand All @@ -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 {
Expand Down
7 changes: 5 additions & 2 deletions programs/mpl-asset/src/plugins/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -16,8 +21,6 @@ use crate::state::Authority;
#[derive(Clone, Debug, BorshSerialize, BorshDeserialize, Eq, PartialEq)]
pub enum Plugin {
Reserved,
Asset,
HashedAsset,
Royalties,
MasterEdition,
PrintEdition,
Expand Down
16 changes: 16 additions & 0 deletions programs/mpl-asset/src/plugins/utils.rs
Original file line number Diff line number Diff line change
@@ -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<u8> {
// Create plugin header and registry if it doesn't exist
}

0 comments on commit 36418c4

Please sign in to comment.