generated from metaplex-foundation/solana-project-template
-
Notifications
You must be signed in to change notification settings - Fork 49
feat: more consise pass on mip 11 #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stranzhay
wants to merge
14
commits into
main
Choose a base branch
from
stranzhay/mip-11-3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
864eb1b
feat: more consise pass
stranzhay de6e925
feat: pr review 1
stranzhay 5c3a796
feat: pr review 2
stranzhay 7ad3267
feat: js client, rust client, tests
stranzhay abdbb53
chore: merge conflicts
stranzhay 3069576
chore: downgrade lock
stranzhay 336f0bd
feat: pr review changes
stranzhay 8740dbe
feat: adding more tests for groups
stranzhay 2c3a3da
chore: Release mpl-core version 0.10.1-alpha.1
pileks 7ddc21f
update mpl-core rust client to register groups plugin as known
pileks fc16262
revert changes to cargo.lock, enfore rust toolchain version instead
pileks d144946
chore: Release mpl-core version 0.10.1-alpha.2
pileks e9f7eda
Merge remote-tracking branch 'origin/main' into stranzhay/mip-11-3
pileks a1afb1f
update toolchain to proper version
pileks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
feat: more consise pass
- Loading branch information
commit 864eb1bcb8471c693ceb27e960b930deff9bab70
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
25 changes: 25 additions & 0 deletions
25
programs/mpl-core/src/plugins/internal/authority_managed/groups.rs
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| use crate::{plugins::PluginValidation, state::DataBlob}; | ||
| use borsh::{BorshDeserialize, BorshSerialize}; | ||
| use solana_program::pubkey::Pubkey; | ||
|
|
||
| /// Groups plugin for collections. Stores the immediate parent group accounts this collection | ||
| /// belongs to. Validation is deferred to specialized group instructions, so the plugin itself has | ||
| /// no special lifecycle behaviour beyond the default `PluginValidation` implementation. | ||
| #[repr(C)] | ||
| #[derive(Clone, BorshSerialize, BorshDeserialize, Debug, PartialEq, Eq, Default)] | ||
| pub struct Groups { | ||
| /// The list of parent group accounts for this collection. | ||
| pub groups: Vec<Pubkey>, // 4 + len * 32 | ||
| } | ||
|
|
||
| impl Groups { | ||
| const BASE_LEN: usize = 4; // length of the groups vector | ||
| } | ||
|
|
||
| impl DataBlob for Groups { | ||
| fn len(&self) -> usize { | ||
| Self::BASE_LEN + self.groups.len() * 32 | ||
| } | ||
stranzhay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| impl PluginValidation for Groups {} | ||
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.