Skip to main content

Overview

Squads has introduced a program update with the MultisigCreate v2 instruction. This update introduces rent collection for account data for transactions initiated through the Squads program. multisigCreate is deprecated in favour of multisigCreateV2, and the current program source rejects multisigCreate with a MultisigCreateDeprecated error.

What Changed

The main difference in v2 is the addition of:
  • Program Config PDA: A new account that holds program configuration
  • Treasury Account: Used for rent collection purposes
  • Rent Collector: Optional parameter for specifying rent collection

TypeScript Implementation

Key Changes from v1

  1. Fetch Program Config: You now need to fetch the program config PDA
  2. Get Treasury: Extract the treasury address from the program config
  3. Pass Treasury: Include the treasury in the multisigCreateV2 call
  4. Rent Collector: Optionally specify a rent collector address

Rust Implementation

Key Rust Changes

  1. Program Config PDA: Fetch using get_program_config_pda()
  2. Deserialize Config: Use ProgramConfig::try_deserialize() to get treasury
  3. New Account Structure: Use MultisigCreateV2Accounts instead of v1
  4. New Args Structure: Use MultisigCreateArgsV2 with additional fields

Troubleshooting

See Also