Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: merge conflicts
  • Loading branch information
stranzhay committed Jul 17, 2025
commit abdbb5312d6a634037a87c5373d678683c54f47d
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,10 @@ export function writeGroupExternalPluginAdapterDataV1(
resolvedAccounts
).sort((a, b) => a.index - b.index);

// Use the `omitted` strategy so that optional accounts like `buffer` are
// not replaced by a dummy Program ID when undefined. This prevents sending
// a placeholder account that would otherwise be interpreted on-chain as an
// actual data buffer and cause the "TwoDataSources" error.
// Keys and Signers.
const [keys, signers] = getAccountMetasAndSigners(
orderedAccounts,
'omitted',
'programId',
programId
);

Expand Down
1 change: 1 addition & 0 deletions clients/js/src/generated/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export * from './externalPluginAdapterType';
export * from './externalRegistryRecord';
export * from './externalValidationResult';
export * from './freezeDelegate';
export * from './freezeExecute';
export * from './groups';
export * from './hashablePluginSchema';
export * from './hashedAssetSchema';
Expand Down
19 changes: 17 additions & 2 deletions clients/js/src/generated/types/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import {
EditionArgs,
FreezeDelegate,
FreezeDelegateArgs,
FreezeExecute,
FreezeExecuteArgs,
Groups,
GroupsArgs,
ImmutableMetadata,
Expand All @@ -58,6 +60,7 @@ import {
getBurnDelegateSerializer,
getEditionSerializer,
getFreezeDelegateSerializer,
getFreezeExecuteSerializer,
getGroupsSerializer,
getImmutableMetadataSerializer,
getPermanentBurnDelegateSerializer,
Expand Down Expand Up @@ -85,7 +88,8 @@ export type Plugin =
| { __kind: 'VerifiedCreators'; fields: [VerifiedCreators] }
| { __kind: 'Autograph'; fields: [Autograph] }
| { __kind: 'BubblegumV2'; fields: [BubblegumV2] }
| { __kind: 'Groups'; fields: [Groups] };
| { __kind: 'Groups'; fields: [Groups] }
| { __kind: 'FreezeExecute'; fields: [FreezeExecute] };

export type PluginArgs =
| { __kind: 'Royalties'; fields: [BaseRoyaltiesArgs] }
Expand All @@ -107,7 +111,8 @@ export type PluginArgs =
| { __kind: 'VerifiedCreators'; fields: [VerifiedCreatorsArgs] }
| { __kind: 'Autograph'; fields: [AutographArgs] }
| { __kind: 'BubblegumV2'; fields: [BubblegumV2Args] }
| { __kind: 'Groups'; fields: [GroupsArgs] };
| { __kind: 'Groups'; fields: [GroupsArgs] }
| { __kind: 'FreezeExecute'; fields: [FreezeExecuteArgs] };

export function getPluginSerializer(): Serializer<PluginArgs, Plugin> {
return dataEnum<Plugin>(
Expand Down Expand Up @@ -214,6 +219,12 @@ export function getPluginSerializer(): Serializer<PluginArgs, Plugin> {
['fields', tuple([getGroupsSerializer()])],
]),
],
[
'FreezeExecute',
struct<GetDataEnumKindContent<Plugin, 'FreezeExecute'>>([
['fields', tuple([getFreezeExecuteSerializer()])],
]),
],
],
{ description: 'Plugin' }
) as Serializer<PluginArgs, Plugin>;
Expand Down Expand Up @@ -291,6 +302,10 @@ export function plugin(
kind: 'Groups',
data: GetDataEnumKindContent<PluginArgs, 'Groups'>['fields']
): GetDataEnumKind<PluginArgs, 'Groups'>;
export function plugin(
kind: 'FreezeExecute',
data: GetDataEnumKindContent<PluginArgs, 'FreezeExecute'>['fields']
): GetDataEnumKind<PluginArgs, 'FreezeExecute'>;
export function plugin<K extends PluginArgs['__kind']>(
kind: K,
data?: any
Expand Down
1 change: 1 addition & 0 deletions clients/js/src/generated/types/pluginType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export enum PluginType {
Autograph,
BubblegumV2,
Groups,
FreezeExecute,
}

export type PluginTypeArgs = PluginType;
Expand Down
2 changes: 2 additions & 0 deletions clients/js/src/plugins/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
EditionArgs,
FreezeDelegate,
FreezeDelegateArgs,
FreezeExecute,
FreezeExecuteArgs,
ImmutableMetadata,
PermanentBurnDelegate,
PermanentFreezeDelegate,
Expand Down
2 changes: 2 additions & 0 deletions clients/rust/src/generated/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub(crate) mod r#external_registry_record;
pub(crate) mod r#external_validation_result;
pub(crate) mod r#extra_account;
pub(crate) mod r#freeze_delegate;
pub(crate) mod r#freeze_execute;
pub(crate) mod r#groups;
pub(crate) mod r#hashable_plugin_schema;
pub(crate) mod r#hashed_asset_schema;
Expand Down Expand Up @@ -104,6 +105,7 @@ pub use self::r#external_registry_record::*;
pub use self::r#external_validation_result::*;
pub use self::r#extra_account::*;
pub use self::r#freeze_delegate::*;
pub use self::r#freeze_execute::*;
pub use self::r#groups::*;
pub use self::r#hashable_plugin_schema::*;
pub use self::r#hashed_asset_schema::*;
Expand Down
2 changes: 2 additions & 0 deletions clients/rust/src/generated/types/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use crate::generated::types::BubblegumV2;
use crate::generated::types::BurnDelegate;
use crate::generated::types::Edition;
use crate::generated::types::FreezeDelegate;
use crate::generated::types::FreezeExecute;
use crate::generated::types::Groups;
use crate::generated::types::ImmutableMetadata;
use crate::generated::types::MasterEdition;
Expand Down Expand Up @@ -49,4 +50,5 @@ pub enum Plugin {
Autograph(Autograph),
BubblegumV2(BubblegumV2),
Groups(Groups),
FreezeExecute(FreezeExecute),
}
1 change: 1 addition & 0 deletions clients/rust/src/generated/types/plugin_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ pub enum PluginType {
Autograph,
BubblegumV2,
Groups,
FreezeExecute,
}
1 change: 1 addition & 0 deletions clients/rust/src/hooked/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ impl From<&Plugin> for PluginType {
Plugin::Autograph(_) => PluginType::Autograph,
Plugin::BubblegumV2(_) => PluginType::BubblegumV2,
Plugin::Groups(_) => PluginType::Groups,
Plugin::FreezeExecute(_) => PluginType::FreezeExecute,
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions clients/rust/src/hooked/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ pub(crate) fn registry_records_to_plugin_list(
acc.bubblegum_v2 = Some(BubblegumV2Plugin { base, bubblegum_v2 })
}
Plugin::Groups(_) => {}
Plugin::FreezeExecute(freeze_execute) => {
acc.freeze_execute = Some(FreezeExecutePlugin {
base,
freeze_execute,
})
}
}
}
Ok(acc)
Expand Down
11 changes: 11 additions & 0 deletions idls/mpl_core.json
Original file line number Diff line number Diff line change
Expand Up @@ -5337,6 +5337,14 @@
"defined": "Groups"
}
]
},
{
"name": "FreezeExecute",
"fields": [
{
"defined": "FreezeExecute"
}
]
}
]
}
Expand Down Expand Up @@ -5396,6 +5404,9 @@
},
{
"name": "Groups"
},
{
"name": "FreezeExecute"
}
]
}
Expand Down
57 changes: 29 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
{
"private": true,
"scripts": {
"programs:build": "./configs/scripts/program/build.sh",
"programs:test": "RUST_LOG=error ./configs/scripts/program/test.sh",
"programs:debug": "./configs/scripts/program/test.sh",
"programs:clean": "./configs/scripts/program/clean.sh",
"clients:rust:test": "./configs/scripts/client/test-rust.sh",
"clients:js:test": "./configs/scripts/client/test-js.sh",
"generate": "pnpm generate:idls && pnpm generate:clients",
"generate:idls": "node ./configs/shank.cjs",
"generate:clients": "node ./configs/kinobi.cjs",
"validator": "CI=1 amman start --config ./configs/validator.cjs",
"validator:debug": "amman start --config ./configs/validator.cjs",
"validator:logs": "CI=1 amman logs",
"validator:stop": "amman stop",
"lint:fix": "./configs/scripts/client/format-js.sh && ./configs/scripts/program/format.sh",
"format:fix": "pnpm lint:fix",
"lint": "./configs/scripts/client/lint-js.sh && ./configs/scripts/program/lint.sh",
"prepare": "husky"
},
"devDependencies": {
"@metaplex-foundation/amman": "^0.12.1",
"@metaplex-foundation/kinobi": "0.18.8-alpha.0",
"@metaplex-foundation/shank-js": "^0.1.7",
"husky": "^9.0.11",
"typescript": "^4.9.4"
},
"packageManager": "[email protected]"
"private": true,
"scripts": {
"programs:build": "./configs/scripts/program/build.sh",
"programs:test": "RUST_LOG=error ./configs/scripts/program/test.sh",
"programs:debug": "./configs/scripts/program/test.sh",
"programs:clean": "./configs/scripts/program/clean.sh",
"clients:rust:test": "./configs/scripts/client/test-rust.sh",
"clients:js:test": "./configs/scripts/client/test-js.sh",
"generate": "pnpm generate:idls && pnpm generate:clients",
"generate:idls": "node ./configs/shank.cjs",
"generate:clients": "node ./configs/kinobi.cjs",
"validator": "CI=1 amman start --config ./configs/validator.cjs",
"validator:debug": "amman start --config ./configs/validator.cjs",
"validator:logs": "CI=1 amman logs",
"validator:stop": "amman stop",
"lint:fix": "./configs/scripts/client/format-js.sh && ./configs/scripts/program/format.sh",
"format:fix": "pnpm lint:fix",
"lint": "./configs/scripts/client/lint-js.sh && ./configs/scripts/program/lint.sh",
"prepare": "husky"
},
"devDependencies": {
"@metaplex-foundation/amman": "^0.12.1",
"@metaplex-foundation/kinobi": "0.18.8-alpha.0",
"@metaplex-foundation/shank-js": "^0.1.7",
"@types/node": "^24.0.3",
"husky": "^9.0.11",
"typescript": "^4.9.4"
},
"packageManager": "[email protected]"
}
10 changes: 10 additions & 0 deletions programs/mpl-core/src/plugins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ pub enum Plugin {
BubblegumV2(BubblegumV2),
/// Groups plugin stores parent group memberships of a collection for taxonomy purposes
Groups(Groups),
/// Freeze Execute plugin.
FreezeExecute(FreezeExecute),
}

impl Plugin {
Expand Down Expand Up @@ -109,6 +111,7 @@ impl Plugin {
Plugin::Autograph(inner) => inner,
Plugin::BubblegumV2(inner) => inner,
Plugin::Groups(inner) => inner,
Plugin::FreezeExecute(inner) => inner,
}
}
}
Expand Down Expand Up @@ -142,6 +145,7 @@ impl DataBlob for Plugin {
Plugin::Autograph(autograph) => autograph.len(),
Plugin::BubblegumV2(bubblegum_v2) => bubblegum_v2.len(),
Plugin::Groups(groups) => groups.len(),
Plugin::FreezeExecute(freeze_execute) => freeze_execute.len(),
}
}
}
Expand Down Expand Up @@ -198,6 +202,8 @@ pub enum PluginType {
BubblegumV2,
/// Groups plugin.
Groups,
/// Freeze Execute plugin.
FreezeExecute,
}

impl PluginType {
Expand Down Expand Up @@ -238,6 +244,7 @@ impl From<&Plugin> for PluginType {
Plugin::Autograph(_) => PluginType::Autograph,
Plugin::BubblegumV2(_) => PluginType::BubblegumV2,
Plugin::Groups(_) => PluginType::Groups,
Plugin::FreezeExecute(_) => PluginType::FreezeExecute,
}
}
}
Expand Down Expand Up @@ -265,6 +272,7 @@ impl PluginType {
address: mpl_bubblegum::ID,
},
PluginType::Groups => Authority::UpdateAuthority,
PluginType::FreezeExecute => Authority::Owner,
}
}
}
Expand Down Expand Up @@ -317,6 +325,7 @@ mod test {
Plugin::Autograph(Autograph { signatures: vec![] }),
Plugin::BubblegumV2(BubblegumV2 {}),
Plugin::Groups(Groups { groups: vec![] }),
Plugin::FreezeExecute(FreezeExecute { frozen: false }),
];

assert_eq!(
Expand Down Expand Up @@ -436,6 +445,7 @@ mod test {
vec![Plugin::Groups(Groups {
groups: vec![Pubkey::default()],
})],
vec![Plugin::FreezeExecute(FreezeExecute { frozen: true })],
];

assert_eq!(
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.