Accounts
Multisig
Multisig PDA Derivation
A Multisig account gets derived the following way. The program for the derivation is the Squads program ID.
[createKey]
The createKey is a unique Public Key, made specifically to derive the Multisig PDA.
Multisig Account Content
#[account]
pub struct Multisig {
/// Key that is used to seed the multisig PDA.
pub create_key: Pubkey,
/// The authority that can change the multisig config.
/// This is a very important parameter as this authority can change the members and threshold.
///
/// The convention is to set this to `Pubkey::default()`.
/// In this case, the multisig becomes autonomous, so every config change goes through
/// the normal process of voting by the members.
///
/// However, if this parameter is set to any other key, all the config changes for this multisig
/// will need to be signed by the `config_authority`. We call such a multisig a "controlled multisig".
pub config_authority: Pubkey,
/// Threshold for signatures.
pub threshold: u16,
/// How many seconds must pass between transaction voting settlement and execution.
pub time_lock: u32,
/// Last transaction index. 0 means no transactions have been created.
pub transaction_index: u64,
/// Last stale transaction index. All transactions up until this index are stale.
/// This index is updated when multisig config (members/threshold/time_lock) changes.
pub stale_transaction_index: u64,
/// Reserved for future use.
pub _reserved: u8,
/// Bump for the multisig PDA seed.
pub bump: u8,
/// Members of the multisig.
pub members: Vec<Member>,
}Proposal
Proposal PDA Derivation
A Proposal account gets derived the following way. The program for the derivation is the Squads program ID.
[Multisig Public Key Buffer, Transaction Index]
The transaction index is a number auto incrementing based on your Multisigs total transactions.
Proposal Account Content
Transaction accounts
Transaction PDA Derivation
A Proposal account gets derived the following way. The program for the derivation is the Squads program ID.
[Multisig Public Key Buffer, Transaction Index]
The transaction index is a number auto incrementing based on your Multisigs total transactions.