WARNING: This code is a work in progress. Please do not use it as is.
A program for deploying and upgrading programs.
The Migrator:
- Performs program deploys and upgrades
- Decouples program deploys/upgrades into 3 roles: the proposer, the approver, and the deployer
- Leaves an on-chain audit trail of program upgrades and deploys
There are two forms of intended usage: "self-hosted" and the DeployDAO.
This may be used for development or if you want to maintain full control over your own smart contract deployment.
- Reserve a program ID. This allows for the program to be deployed at the same address across multiple chains.
- Create a new migrator, with the approver set to your own address, a multisig, or a DAO.
- Upload the bytecode of the program to a buffer via
solana program write-buffer
. Ideally this bytecode is generated in a verifiable manner. - Create a proposal to deploy the program.
- Approve your proposal.
- Anyone must supply the migrator account with enough SOL to cover the program deployment.
- Anyone may deploy the new migration, until the migration expires.
note: this is subject to change
The DeployDAO is a decentralized autonomous organization that elects multisig holders to approve program upgrades and deploys.
To deploy a program, one should:
- Reserve a program ID. This allows for the program to be deployed at the same address across multiple chains.
- Create a new migrator, with the approver set to the DeployDAO address.
- Upload the bytecode of the program to a buffer via
solana program write-buffer
. Ideally this bytecode is generated in a verifiable manner. - Create a proposal to deploy the program.
- Contact the DeployDAO requesting for your program to be approved for deployment.
- If the DeployDAO likes your code, they may approve the deployment.
- Anyone in the community must supply the migrator account with enough SOL to cover the program deployment.
- Anyone in the community may deploy the new migration, until the migration expires.
Upgrading is done very similarly.
The DeployDAO program and SDK is distributed under the GPL v3.0 license.