-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP - Feature - grouping delegate This PR adds an optional delegate field to a grouping extension. The delegate is authorised to mint new assets into the group. The main use case for this change is a program controlling either a mint (candy machine) or a conversion from another asset type. * Added delegate field to grouping extension * Updated group processor to check grouping delegate if present * Updated create instruction to accept an optional grouping_delegate signer Todo: Build changes into interface program - this isn't rebuilt when running programs:build Also perhaps worth considering not reinitialising the data when the max_size is written as there are likely cases where this may need to be updated post creation. * * Updated logic in group processor to ensure the authority can still authorise changes to the collection is there is a delegate present. * Replicated logic in ungroup processor to ensure delegate can also ungroup assets * fix lint
- Loading branch information
Showing
18 changed files
with
472 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
import { PublicKey, defaultPublicKey } from '@metaplex-foundation/umi'; | ||
import { TypedExtension } from '.'; | ||
import { ExtensionType, Grouping } from '../generated'; | ||
|
||
export const grouping = ( | ||
maxSize: Grouping['size'] | number = 0n | ||
maxSize: Grouping['size'] | number = 0n, | ||
delegate: Grouping['delegate'] | PublicKey = defaultPublicKey() | ||
): TypedExtension => ({ | ||
type: ExtensionType.Grouping, | ||
size: BigInt(0), | ||
maxSize: BigInt(maxSize), | ||
delegate, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.