This is a GitOps repo for deployment of the Synthetix protocol.
- Ensure you have the latest version of Cannon installed:
npm i -g @usecannon/cli
. - After installing for the first time:
- Run
cannon setup
to configure IPFS and a reliable RPC endpoint to communicate with the Cannon package registry. - Run
cannon plugin add cannon-plugin-router
to install the router generator plug-in.
- Run
- After publishing any new versions of the provisioned packages (
oracle-manager
,synthetix
andspot-market
), bump the versions throughout the cannonfiles to match. - Add new settings and invoke actions as necessary.
- Increment the version number and update the values in the network-specific omnibus cannonfiles as desired.
Conduct the following process for each network:
- Perform a dry-run and confirm that the actions that would be executed by Cannon are expected:
cannon build omnibus-<NETWORK_NAME>.toml --upgrade-from synthetix-omnibus:<CURRENT_VERSION> --provider-url <RPC_URL> --chain-id <CHAIN_ID> --private-key <DEPLOYER_PRIVATE_KEY> --dry-run
- Remove the dry-run option to execute the upgrade:
cannon build omnibus-<NETWORK_NAME>.toml --upgrade-from synthetix-omnibus:<CURRENT_VERSION> --provider-url <RPC_URL> --chain-id <CHAIN_ID> --private-key <DEPLOYER_PRIVATE_KEY>
The --provider-url and --private-key parameters are unnecessary if using Frame
- If you've updated the provisioned packages, verify your new contracts on Etherscan:
cannon verify synthetix-omnibus:<VERSION_NUMBER> --api-key <ETHERSCAN_API_KEY> --chain-id <CHAIN_ID>
. Make sure you set your preset if it's set in the toml files. - Publish your new packages on the Cannon registry:
cannon publish synthetix-omnibus:<VERSION_NUMBER> --private-key <KEY_THAT_HAS_ETH_ON_MAINNET> --tags latest,3 --chain-id <CHAIN_ID>
(The --private-key parameter is unnecessary if using Frame) - Commit and merge the change to this repository.
- Run the Export ABIs action in the
v3-abi-exporter
repository.