-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* BNB Chain Support (#925) ethereum-contracts, js-sdk, sdk-core, subgraph Co-authored-by: didi <git@d10r.net> * bump subgraph version Co-authored-by: didi <git@d10r.net>
- Loading branch information
1 parent
62b954f
commit 79de119
Showing
20 changed files
with
252 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Deploy to Mainnets | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
description: 'Protocol release version (test/master/v1/etc.)' | ||
required: true | ||
default: 'v1' | ||
only_network: | ||
description: 'Only a specific network is to be deployed' | ||
required: false | ||
environments: | ||
description: 'Additional env vars, separated by semicolons' | ||
required: false | ||
|
||
jobs: | ||
|
||
deploy-to-mainnets: | ||
name: Deploy to mainnets | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.release_version }} | ||
DEFAULT_MNEMONIC: ${{ secrets.BUILD_AGENT_MNEMONIC }} | ||
# network web3 providers | ||
XDAI_MAINNET_PROVIDER_URL: ${{ secrets.XDAI_MAINNET_PROVIDER_URL }} | ||
POLYGON_MAINNET_PROVIDER_URL: ${{ secrets.POLYGON_MAINNET_PROVIDER_URL }} | ||
OPTIMISM_MAINNET_PROVIDER_URL: ${{ secrets.OPTIMISM_MAINNET_PROVIDER_URL }} | ||
ARBITRUM_ONE_PROVIDER_URL: ${{ secrets.ARBITRUM_ONE_PROVIDER_URL }} | ||
AVALANCHE_C_PROVIDER_URL: ${{ secrets.AVALANCHE_C_PROVIDER_URL }} | ||
BSC_MAINNET_PROVIDER_URL: ${{ secrets.BSC_MAINNET_PROVIDER_URL }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
network: [xdai-mainnet, polygon-mainnet, optimism-mainnet, arbitrum-one, avalanche-c, bsc-mainnet] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# if only_network is set, skip all steps until the value matches one of the entries in matrix.network | ||
- name: Check only_network | ||
if: ${{ github.event.inputs.only_network != '' && github.event.inputs.only_network != matrix.network }} | ||
run: echo "DO_SKIP=1" >> $GITHUB_ENV | ||
|
||
- name: Use Node.js 16.x | ||
if: env.DO_SKIP != 1 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Build | ||
if: env.DO_SKIP != 1 | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn build-for-contracts-dev | ||
- name: Build and deploy to ${{ matrix.network }} | ||
if: env.DO_SKIP != 1 | ||
run: | | ||
cd packages/ethereum-contracts | ||
echo "${{ github.event.inputs.environments }}" | sed 's/;/\n/' > .env | ||
npx truffle exec --network ${{ matrix.network }} scripts/deploy-framework.js | ||
env: | ||
GOVERNANCE_ADMIN_TYPE: MULTISIG | ||
|
||
- name: Etherscan verification of ${{ matrix.network }} deployment | ||
if: env.DO_SKIP != 1 | ||
run: | | ||
cd packages/ethereum-contracts | ||
npx truffle exec --network ${{ matrix.network }} scripts/info-print-contract-addresses.js : addresses.vars | ||
tasks/etherscan-verify-framework.sh ${{ matrix.network }} addresses.vars | ||
env: | ||
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} | ||
SNOWTRACE_API_KEY: ${{ secrets.SNOWTRACE_API_KEY }} | ||
OPTIMISTIC_API_KEY: ${{ secrets.OPTIMISTIC_API_KEY }} | ||
ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }} | ||
BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Verify on Etherscan | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
description: 'Protocol release version (test/master/v1/etc.)' | ||
required: true | ||
default: 'test' | ||
only_network: | ||
description: 'Only a specific network is to be verified' | ||
required: false | ||
|
||
jobs: | ||
|
||
verify-on-etherscan: | ||
name: Verify on Etherscan | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.release_version }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
network: [eth-goerli, eth-rinkeby, eth-ropsten, eth-kovan, polygon-mumbai, optimism-kovan, arbitrum-rinkeby, avalanche-fuji, polygon-mainnet, optimism-mainnet, arbitrum-one, avalanche-c, bsc-mainnet] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Check only_network | ||
if: ${{ github.event.inputs.only_network != '' && github.event.inputs.only_network != matrix.network }} | ||
run: echo "DO_SKIP=1" >> $GITHUB_ENV | ||
|
||
- name: Use Node.js 16.x | ||
if: env.DO_SKIP != 1 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Build | ||
if: env.DO_SKIP != 1 | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn build-for-contracts-dev | ||
- name: Etherscan verification of ${{ matrix.network }} deployment | ||
if: env.DO_SKIP != 1 | ||
run: | | ||
cd packages/ethereum-contracts | ||
npx truffle exec --network ${{ matrix.network }} scripts/info-print-contract-addresses.js : addresses.vars | ||
tasks/etherscan-verify-framework.sh ${{ matrix.network }} addresses.vars | ||
env: | ||
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} | ||
SNOWTRACE_API_KEY: ${{ secrets.SNOWTRACE_API_KEY }} | ||
OPTIMISTIC_API_KEY: ${{ secrets.OPTIMISTIC_API_KEY }} | ||
ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }} | ||
BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.