Skip to content

SIP-336 Deploy Synthetix V3 Core on Base #183

SIP-336 Deploy Synthetix V3 Core on Base

SIP-336 Deploy Synthetix V3 Core on Base #183

name: Simulate Release
on:
pull_request: {}
push:
branches:
- "main"
jobs:
test:
runs-on: ubuntu-latest
env:
CANNON_SETTINGS: ${{ secrets.CANNON_SETTINGS }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
strategy:
fail-fast: false
matrix:
network: [mainnet, optimism-mainnet, goerli, optimism-goerli, base-goerli, base-mainnet]
include:
- network: mainnet
chainId: 1
- network: optimism-mainnet
chainId: 10
- network: goerli
chainId: 5
- network: optimism-goerli
chainId: 420
- network: base-goerli
chainId: 84531
providerUrl: "https://base-goerli.public.blastapi.io"
- network: base-mainnet
chainId: 8453
providerUrl: "https://base-mainnet.public.blastapi.io"
steps:
- name: Install Foundry (Cannon)
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- run: anvil -V
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm i -g @usecannon/cli
- run: npx @usecannon/cli plugin add cannon-plugin-router
- run: |
if [ -z "${{ matrix.providerUrl }}" ]; then
export CANNON_PROVIDER_URL="https://${{ matrix.network }}.infura.io/v3/$INFURA_API_KEY"
else
export CANNON_PROVIDER_URL="${{ matrix.providerUrl }}"
fi
npx @usecannon/cli build \
omnibus-${{ matrix.network }}.toml \
--upgrade-from synthetix-omnibus:latest \
--provider-url https://${{ matrix.network }}.infura.io/v3/$INFURA_API_KEY \
--chain-id ${{ matrix.chainId }} \
--dry-run | tee deployment.log
grep 'Successfully built package synthetix-omnibus' deployment.log
if [ $(grep -c 'exec: contract.InitialCoreProxy' deployment.log) -gt 0 ]; then
echo "Proxy InitialCoreProxy was modified"
exit 1
fi
if [ $(grep -c 'exec: contract.InitialProxy' deployment.log) -gt 0 ]; then
echo "Proxy InitialProxy was modified"
exit 1
fi