Skip to content

Deploy Market

Deploy Market #130

Workflow file for this run

name: Deploy Market
on:
workflow_dispatch:
inputs:
network:
type: choice
description: Network
options:
- fuji
- mainnet
- goerli
- sepolia
- mumbai
- polygon
- arbitrum
- arbitrum-goerli
- base
- base-goerli
- linea-goerli
deployment:
description: Deployment Name (e.g. "usdc")
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:
deploy-market:
name: Deploy Market
runs-on: ubuntu-latest
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
QUICKNODE_KEY: ${{ secrets.QUICKNODE_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
BASESCAN_KEY: ${{ secrets.BASESCAN_KEY }}
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
steps:
- name: Seacrest
uses: hayesgm/seacrest@5748b3a066f517973ca2ca03d0af39bbf2b82d10
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://clean-spring-wind.base-mainnet.discover.quiknode.pro/$QUICKNODE_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install packages
run: yarn install --non-interactive --frozen-lockfile
- name: Compile
run: yarn hardhat compile
- name: Check types
run: yarn tsc
- name: Run Deploy
run: |
yarn hardhat deploy --network ${{ github.event.inputs.network }} --deployment ${{ github.event.inputs.deployment }} ${{ fromJSON('["", "--simulate"]')[github.event.inputs.simulate == 'true'] }}
env:
DEBUG: true
ETH_PK: "${{ inputs.eth_pk }}"
NETWORK_PROVIDER: ${{ fromJSON('["", "http://localhost:8585"]')[github.event.inputs.eth_pk == ''] }}
REMOTE_ACCOUNTS: ${{ fromJSON('["", "true"]')[github.event.inputs.eth_pk == ''] }}
- uses: actions/upload-artifact@v2 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: ${{ github.event.inputs.network }}-${{ github.event.inputs.deployment }}-verify-args
path: deployments/${{ github.event.inputs.network }}/${{ github.event.inputs.deployment }}/verify/args.json
- name: Commit changes
if: ${{ github.event.inputs.simulate == 'false' }}
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add deployments/\*/roots.json
git commit -m "Modified deployment roots from GitHub Actions"
git push origin