Skip to content
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

Remove creator limit to be owned by System Program #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,13 @@ Cargo.lock
*.pdb
.next
.vercel
node_module
node_module

#ignore .anchor folder
.anchor/*

#adding dev keypair in gitignore
dev.json

#adding test ledger folder to gitignore
test-ledger/*
3 changes: 0 additions & 3 deletions programs/shadow-nft-standard/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ pub enum ErrorCode {
#[msg("Attempted to create a group which exceeds the maximum number of members")]
ExceedsMaxGroupSize,

#[msg("A creator must be a system account")]
CreatorMustBeSystemAccount,

#[msg("A creator was not present for a multisig operation")]
CreatorNotPresentForMultisig,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ use crate::{
/// before initializing the `CreatorGroup` value. This should be done regardless
/// of `multisig`.
pub fn handle_create_group(ctx: Context<CreateGroup>, args: CreateGroupArgs) -> Result<()> {
// Check that remaining accounts are all system accounts
for account in ctx.remaining_accounts {
if *account.owner != System::id() {
verbose_msg!("A non-SystemAccount was passed in as a creator");
return Err(ErrorCode::CreatorMustBeSystemAccount.into());
}
}

// Gather signing creator
let mut creators = Vec::with_capacity(1 + ctx.remaining_accounts.len());
creators.push(ctx.accounts.creator.key());
Expand Down