This is a GitOps repo for deployment of the Synthetix protocol.
- Run
yarn cannon setup
and ensure you have a reliable IPFS url for publishing.
- 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. The main version should match synthetix version, and if it a configuration change on the same version use a dash. Version: 3.3.5 Version with config changes: 3.3.5-1
Conduct the following process for each network:
-
Perform a dry-run and confirm that the actions that would be executed by Cannon are expected:
yarn cannon build omnibus-base-sepolia-andromeda.toml \ --dry-run \ --upgrade-from synthetix-omnibus:latest@andromeda \ --chain-id 84532 \ --provider-url https://base-sepolia.infura.io/v3/$INFURA_API_KEY
-
Remove the dry-run option to execute the upgrade:
yarn cannon build omnibus-base-sepolia-andromeda.toml \ --upgrade-from synthetix-omnibus:latest@andromeda \ --private-key $TESTNET_DEPLOYER_PRIVATE_KEY \ --provider-url https://base-sepolia.infura.io/v3/$INFURA_API_KEY
-
After this you can run the dry-run command again (without upgrade-from), and should see no changes
yarn cannon build omnibus-base-sepolia-andromeda.toml \ --dry-run \ --chain-id 84532 \ --provider-url https://base-sepolia.infura.io/v3/$INFURA_API_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:
yarn cannon verify synthetix-omnibus:6@andromeda --chain-id 84531 --api-key $ETHERSCAN_API_KEY
-
Publish your new packages on the Cannon registry:
yarn cannon publish synthetix-omnibus:6@andromeda \ --chain-id 84531 \ --private-key $MAINNET_DEPLOYER_PRIVATE_KEY \ --include-provisioned
If you use frame: (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.
Example based on omnibus-base-sepolia-andromeda.toml
IMPORTANT Restart Anvil node and apply upgrades after each full test suite execution because of the global system state change, which affects things like global collateral limits
-
Build locally with --dry-run
yarn cannon build omnibus-base-sepolia-andromeda.toml \ --dry-run \ --upgrade-from synthetix-omnibus:latest@andromeda \ --chain-id 84532 \ --provider-url https://sepolia.base.org \ | tee ./e2e/cannon-build.log
or
yarn build:andromeda
-
Fetch deployments and store as JSON files
yarn fetch-deployments
-
Run local Anvil node for the required network.
yarn cannon build omnibus-base-sepolia-andromeda.toml \ --port 8545 \ --keep-alive \ --dry-run \ --upgrade-from synthetix-omnibus:latest@andromeda \ --chain-id 84532 \ --provider-url https://sepolia.base.org
or
yarn start:andromeda
-
Execute tests
DEBUG='e2e:*' mocha e2e/tests/omnibus-base-sepolia-andromeda.toml/*.e2e.js
or
yarn test:base-sepolia