Skip to content

Commit

Permalink
Moving plugin_header.
Browse files Browse the repository at this point in the history
  • Loading branch information
blockiosaurus committed Feb 21, 2024
1 parent afbed06 commit fc002b5
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 93 deletions.
23 changes: 0 additions & 23 deletions clients/js/src/generated/types/assetSigner.ts

This file was deleted.

1 change: 0 additions & 1 deletion clients/js/src/generated/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* @see https://github.com/metaplex-foundation/kinobi
*/

export * from './assetSigner';
export * from './authority';
export * from './collection';
export * from './compressionProof';
Expand Down
13 changes: 0 additions & 13 deletions clients/rust/src/generated/types/asset_signer.rs

This file was deleted.

2 changes: 0 additions & 2 deletions clients/rust/src/generated/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
//! [https://github.com/metaplex-foundation/kinobi]
//!
pub(crate) mod asset_signer;
pub(crate) mod authority;
pub(crate) mod collection;
pub(crate) mod compression_proof;
Expand All @@ -23,7 +22,6 @@ pub(crate) mod registry_record;
pub(crate) mod royalties;
pub(crate) mod rule_set;

pub use self::asset_signer::*;
pub use self::authority::*;
pub use self::collection::*;
pub use self::compression_proof::*;
Expand Down
43 changes: 18 additions & 25 deletions idls/mpl_asset_program.json
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,24 @@
}
],
"accounts": [
{
"name": "PluginHeader",
"type": {
"kind": "struct",
"fields": [
{
"name": "key",
"type": {
"defined": "Key"
}
},
{
"name": "pluginRegistryOffset",
"type": "u64"
}
]
}
},
{
"name": "PluginRegistry",
"type": {
Expand Down Expand Up @@ -749,34 +767,9 @@
}
]
}
},
{
"name": "PluginHeader",
"type": {
"kind": "struct",
"fields": [
{
"name": "key",
"type": {
"defined": "Key"
}
},
{
"name": "pluginRegistryOffset",
"type": "u64"
}
]
}
}
],
"types": [
{
"name": "AssetSigner",
"type": {
"kind": "struct",
"fields": []
}
},
{
"name": "Collection",
"type": {
Expand Down
17 changes: 0 additions & 17 deletions programs/mpl-asset/src/plugins/asset_signer.rs

This file was deleted.

4 changes: 2 additions & 2 deletions programs/mpl-asset/src/plugins/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
mod asset_signer;
mod collection;
mod delegate;
// mod lifecycle;
mod plugin_header;
mod plugin_registry;
mod royalties;
mod utils;

pub use asset_signer::*;
pub use collection::*;
pub use delegate::*;
pub use plugin_header::*;
// pub use lifecycle::*;
pub use plugin_registry::*;
pub use royalties::*;
Expand Down
4 changes: 2 additions & 2 deletions programs/mpl-asset/src/plugins/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ use solana_program::{

use crate::{
error::MplAssetError,
state::{Asset, Authority, DataBlob, Key, PluginHeader, SolanaAccount},
state::{Asset, Authority, DataBlob, Key, SolanaAccount},
utils::{assert_authority, resolve_authority_to_default},
};

use super::{Plugin, PluginRegistry, PluginType, RegistryData, RegistryRecord};
use super::{Plugin, PluginHeader, PluginRegistry, PluginType, RegistryData, RegistryRecord};

/// Create plugin header and registry if it doesn't exist
pub fn create_meta_idempotent<'a>(
Expand Down
8 changes: 2 additions & 6 deletions programs/mpl-asset/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ pub use asset::*;
mod hashed_asset;
pub use hashed_asset::*;

mod plugin_header;
use num_derive::{FromPrimitive, ToPrimitive};
pub use plugin_header::*;

mod traits;
pub use traits::*;

use crate::plugins::Plugin;
use borsh::{BorshDeserialize, BorshSerialize};
use num_derive::{FromPrimitive, ToPrimitive};
use solana_program::pubkey::Pubkey;

use crate::plugins::Plugin;

#[repr(C)]
#[derive(Clone, BorshSerialize, BorshDeserialize, Debug, Eq, PartialEq)]
pub enum DataState {
Expand Down
4 changes: 2 additions & 2 deletions programs/mpl-asset/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use solana_program::{

use crate::{
error::MplAssetError,
plugins::PluginRegistry,
state::{Asset, Authority, DataBlob, Key, PluginHeader, SolanaAccount},
plugins::{PluginHeader, PluginRegistry},
state::{Asset, Authority, DataBlob, Key, SolanaAccount},
};

pub fn load_key(account: &AccountInfo, offset: usize) -> Result<Key, ProgramError> {
Expand Down

0 comments on commit fc002b5

Please sign in to comment.