Add sUSDX to cUSDCv3 on Arbitrum #226
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Prepare Migration | ||
|
Check failure on line 1 in .github/workflows/prepare-migration.yaml
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| network: | ||
| type: choice | ||
| description: Network | ||
| options: | ||
| - fuji | ||
| - mainnet | ||
| - sepolia | ||
| - polygon | ||
| - arbitrum | ||
| - base | ||
| - optimism | ||
| - mantle | ||
| - ronin | ||
| - unichain | ||
| - linea | ||
| - scroll | ||
| deployment: | ||
| description: Deployment Name (e.g. "usdc") | ||
| required: true | ||
| migration: | ||
| description: Migration Name | ||
| required: true | ||
| simulate: | ||
| type: boolean | ||
| description: Simulate | ||
| eth_pk: | ||
| description: Ignore if you plan to use WalletConnect, otherwise, you can paste in a Ethereum private key | ||
| jobs: | ||
| prepare-migration: | ||
| name: Prepare Migration | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }} | ||
| SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }} | ||
| INFURA_KEY: ${{ secrets.INFURA_KEY }} | ||
| ANKR_KEY: ${{ secrets.ANKR_KEY }} | ||
| _TENDERLY_KEY_RONIN: ${{ secrets._TENDERLY_KEY_RONIN }} | ||
| POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }} | ||
| BASESCAN_KEY: ${{ secrets.BASESCAN_KEY }} | ||
| OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }} | ||
| MANTLESCAN_KEY: ${{ secrets.MANTLESCAN_KEY }} | ||
| SCROLLSCAN_KEY: ${{ secrets.SCROLLSCAN_KEY }} | ||
| UNICHAIN_QUICKNODE_KEY: ${{ secrets.UNICHAIN_QUICKNODE_KEY }} | ||
| GOV_NETWORK: ${{ vars.GOV_NETWORK }} | ||
| steps: | ||
| - name: Get governance network | ||
| run: | | ||
| case ${{ github.event.inputs.network }} in | ||
| polygon | arbitrum | base | optimism | mantle | scroll | linea | ronin | unichain) | ||
| echo "GOV_NETWORK=mainnet" >> $GITHUB_ENV ;; | ||
| sepolia) | ||
| echo "GOV_NETWORK=sepolia" >> $GITHUB_ENV ;; | ||
| *) | ||
| echo "No governance network for selected network" ;; | ||
| esac | ||
| - name: Seacrest | ||
| uses: hayesgm/seacrest@af229b0a00b73cb6fa9940a836a62fa3b918fd77 | ||
| with: | ||
| wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }} | ||
| requested_network: "${{ inputs.network }}" | ||
| ethereum_url: "${{ fromJSON('{\"linea\":\"https://rpc.ankr.com/linea/${ANKR_KEY}\",\"ronin\":\"https://ronin.gateway.tenderly.co/$_TENDERLY_KEY_RONIN\",\"unichain\":\"https://multi-boldest-patina.unichain-mainnet.quiknode.pro/${UNICHAIN_QUICKNODE_KEY}\",\"mantle\":\"https://rpc.ankr.com/mantle/$ANKR_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://rpc.ankr.com/eth/$ANKR_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://rpc.ankr.com/arbitrum/$ANKR_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}" | ||
| port: 8585 | ||
| if: github.event.inputs.eth_pk == '' | ||
| - name: Seacrest (governance network) | ||
| uses: hayesgm/seacrest@af229b0a00b73cb6fa9940a836a62fa3b918fd77 | ||
| with: | ||
| wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }} | ||
| requested_network: "${{ vars.GOV_NETWORK }}" | ||
| ethereum_url: "${{ fromJSON('{\"mainnet\":\"https://rpc.ankr.com/eth/$ANKR_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\"}')[vars.GOV_NETWORK] }}" | ||
| port: 8685 | ||
| if: github.event.inputs.eth_pk == '' && vars.GOV_NETWORK != '' && github.event.inputs.network != vars.GOV_NETWORK | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
| - name: Install packages | ||
| run: yarn install --non-interactive --frozen-lockfile | ||
| - name: Compile | ||
| run: yarn hardhat compile | ||
| - name: Check types | ||
| run: yarn tsc | ||
| - name: Run Prepare Migration | ||
| run: | | ||
| yarn hardhat migrate --network ${{ github.event.inputs.network }} --deployment ${{ github.event.inputs.deployment }} --prepare --overwrite ${{ fromJSON('["", "--simulate"]')[github.event.inputs.simulate == 'true'] }} ${{ github.event.inputs.migration }} | ||
| env: | ||
| DEBUG: true | ||
| ETH_PK: "${{ inputs.eth_pk }}" | ||
| NETWORK_PROVIDER: ${{ fromJSON('["", "http://localhost:8585"]')[github.event.inputs.eth_pk == ''] }} | ||
| GOV_NETWORK_PROVIDER: ${{ github.event.inputs.network != vars.GOV_NETWORK && github.event.inputs.eth_pk == '' && vars.GOV_NETWORK != '' && 'http://localhost:8685' || '' }} | ||
| GOV_NETWORK: ${{ github.event.inputs.network != vars.GOV_NETWORK && vars.GOV_NETWORK || '' }} | ||
| REMOTE_ACCOUNTS: ${{ fromJSON('["", "true"]')[github.event.inputs.eth_pk == ''] }} | ||
| GOV_NETWORK_PROVIDER: ${{ github.event.inputs.network != vars.GOV_NETWORK && github.event.inputs.eth_pk == '' && vars.GOV_NETWORK != '' && 'http://localhost:8685' || '' }} | ||
| GOV_NETWORK: ${{ github.event.inputs.network != vars.GOV_NETWORK && vars.GOV_NETWORK || '' }} | ||
| - uses: actions/upload-artifact@v4 # upload test results | ||
| if: success() || failure() # run this step even if previous step failed | ||
| with: | ||
| name: ${{ github.event.inputs.network }}-${{ github.event.inputs.deployment }}-${{ github.event.inputs.migration }} | ||
| path: deployments/${{ github.event.inputs.network }}/${{ github.event.inputs.deployment }}/artifacts/${{ github.event.inputs.migration }}.json | ||