Skip to content

Commit

Permalink
fix(meta): added string on create
Browse files Browse the repository at this point in the history
  • Loading branch information
ogmedia committed Dec 6, 2022
1 parent 5ae5594 commit 0b5ddd0
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
8 changes: 8 additions & 0 deletions idl/squads_mpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export type SquadsMpl = {
"type": {
"vec": "publicKey"
}
},
{
"name": "meta",
"type": "string"
}
]
},
Expand Down Expand Up @@ -753,6 +757,10 @@ export const IDL: SquadsMpl = {
"type": {
"vec": "publicKey"
}
},
{
"name": "meta",
"type": "string"
}
]
},
Expand Down
54 changes: 54 additions & 0 deletions idl/txmeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ export type Txmeta = {
"name": "member",
"isMut": true,
"isSigner": true
},
{
"name": "multisig",
"isMut": false,
"isSigner": false
},
{
"name": "transaction",
"isMut": false,
"isSigner": false
}
],
"args": [
Expand All @@ -18,6 +28,23 @@ export type Txmeta = {
}
]
}
],
"errors": [
{
"code": 6000,
"name": "Unauthorized",
"msg": "Signer is not a member of the specified multisig."
},
{
"code": 6001,
"name": "InvalidOwner",
"msg": "The owner of the account is not the expected program."
},
{
"code": 6002,
"name": "InvalidTransaction",
"msg": "The transaction is either not associated with the supplied multisig or it's creator is not the supplied signer"
}
]
};

Expand All @@ -32,6 +59,16 @@ export const IDL: Txmeta = {
"name": "member",
"isMut": true,
"isSigner": true
},
{
"name": "multisig",
"isMut": false,
"isSigner": false
},
{
"name": "transaction",
"isMut": false,
"isSigner": false
}
],
"args": [
Expand All @@ -41,5 +78,22 @@ export const IDL: Txmeta = {
}
]
}
],
"errors": [
{
"code": 6000,
"name": "Unauthorized",
"msg": "Signer is not a member of the specified multisig."
},
{
"code": 6001,
"name": "InvalidOwner",
"msg": "The owner of the account is not the expected program."
},
{
"code": 6002,
"name": "InvalidTransaction",
"msg": "The transaction is either not associated with the supplied multisig or it's creator is not the supplied signer"
}
]
};
4 changes: 2 additions & 2 deletions programs/squads-mpl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub mod squads_mpl {
use super::*;

// instruction to create a multisig
pub fn create(ctx: Context<Create>, threshold:u16, create_key: Pubkey, members: Vec<Pubkey>) -> Result<()> {
pub fn create(ctx: Context<Create>, threshold:u16, create_key: Pubkey, members: Vec<Pubkey>, _meta: String) -> Result<()> {
// sort the members and remove duplicates
let mut members = members;
members.sort();
Expand Down Expand Up @@ -510,7 +510,7 @@ pub mod squads_mpl {
}

#[derive(Accounts)]
#[instruction(threshold: u16, create_key: Pubkey, members: Vec<Pubkey>)]
#[instruction(threshold: u16, create_key: Pubkey, members: Vec<Pubkey>, meta: String)]
pub struct Create<'info> {
#[account(
init,
Expand Down

0 comments on commit 0b5ddd0

Please sign in to comment.