Programs
How to create, upgrade, and change the authority of programs within your Squad.
Last updated
How to create, upgrade, and change the authority of programs within your Squad.
Last updated
Squads offers a seamless experience for managing programs. Users can collectively manage program upgrades with their team via multisig. This eliminates single points of failure and reduces the risk of unauthorized changes to the program(s).
With Squads, users can:
Add programs to their Squad
Upgrade programs
Change the authority of programs
Users can delegate programs to manage and upgrade them directly from their Squad.
Create and deploy a program using your CLI.
Navigate to the "Programs" tab within your Squad's vault. Then click on "Add Program".
Enter the name and address of the program. Click "Next" and verify the transaction in the wallet pop-up.
Set the program’s upgrade authority to the address provided using one of the following options:
Copy the Squad address and transfer the authority from the current authority holder
Copy the code and run in your CLI tool that is an authority holder
Use SAT (Safe Authority Transfer) to transfer the upgrade authority
For users who would want to perform the authority transfer in a safer way there is an option to make a Safe Authority Transfer (SAT). SAT creates a transaction in the Squad, which needs to be signed by both Squad's Vault PDA and the current authority holder.
To perform a Safe Authority Transfer (SAT):
Add your CLI tool to the Squad. Check the Settings and Members page for more information on adding members.
Click on the "Create SAT" button.
Run a transaction inside your Squad.
Once the transaction meets the confirmation threshold, execute it with your CLI tool that you added to your Squad.
Once the transaction is executed, your program authority will be transferred.
NOTE: If the current authority is managed by a DAO or wallet you may need to set the authority by other means using the provided upgrade authority.
Once a program has been added to a Squad it can be upgraded straight from it with an easy-to-use interface.
To upgrade a program:
Deploy your upgrade to the buffer using the command below. (For Rust)
For more information about writing intermediary buffer accounts refer to the link: https://docs.solana.com/cli/deploy-a-program#using-an-intermediary-buffer-account
Click on the program from the list and then click on the "Add upgrade" button.
Insert the details of the upgrade: name, buffer, spill address, commit link and address for buffer refund, then click "Next" and approve the transaction in the wallet pop-up.
Set the authority of the buffer to the provided address by copying a code in your CLI. Then click “Verify authority”.
Click the "Upgrade" button. A transaction will be created, after it meets the confirmation threshold and gets executed, a program upgrade will be deployed.
A program authority delegated to a Squad can be changed to any other address if needed at any point.
To do this:
Click on the program from the programs list.
Click on the "Change authority" button.
Insert a new program authority address and initiate a transaction.
Program authority will be changed upon transaction execution.
With the Squads GitHub action, teams can automate program deployments directly from their Github CI/CD pipeline to a program upgrade proposal in their Squads multisig. It simplifies the process of building and deploying a program buffer account, as well as initializing an upgrade proposal.
After a program upgrade has been initialized, the members of the multisig can view the details about the upgrade in the Squads app. They can then verify that the on-chain buffer matches the program source code using Ellipsis Labs's verifiable build.
To set up the Squads GitHub action for your program upgrades, please refer to this guide: github.com/Squads-Protocol/squads-v4-program-upgrade.