diff --git a/.github/workflows/deploy_and_release.yml b/.github/workflows/deploy_and_release.yml index 4534615..9d7343a 100644 --- a/.github/workflows/deploy_and_release.yml +++ b/.github/workflows/deploy_and_release.yml @@ -41,6 +41,10 @@ jobs: OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} + FLARE_TESTNET_EXPLORER_API_KEY: ${{ secrets.FLARE_TESTNET_EXPLORER_API_KEY }} + FLARE_MAINNET_EXPLORER_API_KEY: ${{ secrets.FLARE_MAINNET_EXPLORER_API_KEY }} + SONGBIRD_TESTNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_TESTNET_EXPLORER_API_KEY }} + SONGBIRD_MAINNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_MAINNET_EXPLORER_API_KEY }} get-network: runs-on: ubuntu-latest needs: [lint-and-test] @@ -98,6 +102,10 @@ jobs: OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} + FLARE_TESTNET_EXPLORER_API_KEY: ${{ secrets.FLARE_TESTNET_EXPLORER_API_KEY }} + FLARE_MAINNET_EXPLORER_API_KEY: ${{ secrets.FLARE_MAINNET_EXPLORER_API_KEY }} + SONGBIRD_TESTNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_TESTNET_EXPLORER_API_KEY }} + SONGBIRD_MAINNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_MAINNET_EXPLORER_API_KEY }} - name: Update release notes uses: actions/github-script@v6 with: @@ -129,7 +137,7 @@ jobs: deploy-to-prod: runs-on: ubuntu-latest needs: [lint-and-test, get-network] - if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' ) || (needs.get-network.outputs.network == 'coredao' ) || (needs.get-network.outputs.network == 'oas' ) }} + if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' ) || (needs.get-network.outputs.network == 'coredao' ) || (needs.get-network.outputs.network == 'oas' ) || (needs.get-network.outputs.network == 'flr' ) || (needs.get-network.outputs.network == 'sgb' ) }} environment: mainnet steps: - uses: actions/checkout@v2 @@ -166,6 +174,10 @@ jobs: OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} + FLARE_TESTNET_EXPLORER_API_KEY: ${{ secrets.FLARE_TESTNET_EXPLORER_API_KEY }} + FLARE_MAINNET_EXPLORER_API_KEY: ${{ secrets.FLARE_MAINNET_EXPLORER_API_KEY }} + SONGBIRD_TESTNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_TESTNET_EXPLORER_API_KEY }} + SONGBIRD_MAINNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_MAINNET_EXPLORER_API_KEY }} - name: Update release notes uses: actions/github-script@v6 with: diff --git a/.github/workflows/deploy_batcher_contract.yml b/.github/workflows/deploy_batcher_contract.yml index 1e23d9e..e5039aa 100644 --- a/.github/workflows/deploy_batcher_contract.yml +++ b/.github/workflows/deploy_batcher_contract.yml @@ -41,6 +41,10 @@ jobs: OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} + FLARE_TESTNET_EXPLORER_API_KEY: ${{ secrets.FLARE_TESTNET_EXPLORER_API_KEY }} + FLARE_MAINNET_EXPLORER_API_KEY: ${{ secrets.FLARE_MAINNET_EXPLORER_API_KEY }} + SONGBIRD_TESTNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_TESTNET_EXPLORER_API_KEY }} + SONGBIRD_MAINNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_MAINNET_EXPLORER_API_KEY }} get-network: runs-on: ubuntu-latest needs: [lint-and-test] @@ -99,6 +103,10 @@ jobs: OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} + FLARE_TESTNET_EXPLORER_API_KEY: ${{ secrets.FLARE_TESTNET_EXPLORER_API_KEY }} + FLARE_MAINNET_EXPLORER_API_KEY: ${{ secrets.FLARE_MAINNET_EXPLORER_API_KEY }} + SONGBIRD_TESTNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_TESTNET_EXPLORER_API_KEY }} + SONGBIRD_MAINNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_MAINNET_EXPLORER_API_KEY }} - name: Update release notes uses: actions/github-script@v7 with: @@ -144,6 +152,10 @@ jobs: OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} + FLARE_TESTNET_EXPLORER_API_KEY: ${{ secrets.FLARE_TESTNET_EXPLORER_API_KEY }} + FLARE_MAINNET_EXPLORER_API_KEY: ${{ secrets.FLARE_MAINNET_EXPLORER_API_KEY }} + SONGBIRD_TESTNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_TESTNET_EXPLORER_API_KEY }} + SONGBIRD_MAINNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_MAINNET_EXPLORER_API_KEY }} - name: Update release notes uses: actions/github-script@v7 with: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0aa3875..5fedb7e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -49,4 +49,8 @@ jobs: OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} + FLARE_TESTNET_EXPLORER_API_KEY: ${{ secrets.FLARE_TESTNET_EXPLORER_API_KEY }} + FLARE_MAINNET_EXPLORER_API_KEY: ${{ secrets.FLARE_MAINNET_EXPLORER_API_KEY }} + SONGBIRD_TESTNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_TESTNET_EXPLORER_API_KEY }} + SONGBIRD_MAINNET_EXPLORER_API_KEY: ${{ secrets.SONGBIRD_MAINNET_EXPLORER_API_KEY }} - run: npm run lint diff --git a/hardhat.config.ts b/hardhat.config.ts index 763262a..0eed751 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -33,7 +33,11 @@ const { BARTIO_BERA_EXPLORER_API_KEY, OAS_EXPLORER_API_KEY, CORE_DAO_TESTNET_EXPLORER_API_KEY, - CORE_DAO_MAINNET_EXPLORER_API_KEY + CORE_DAO_MAINNET_EXPLORER_API_KEY, + FLARE_TESTNET_EXPLORER_API_KEY, + FLARE__MAINNET_EXPLORER_API_KEY, + SONGBIRD_TESTNET_EXPLORER_API_KEY, + SONGBIRD_MAINNET_EXPLORER_API_KEY } = process.env; const config: HardhatUserConfig = { @@ -169,6 +173,38 @@ const config: HardhatUserConfig = { `${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}` ] }, + tflare: { + url: `https://coston2-api.flare.network/ext/C/rpc`, + accounts: [ + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}` + ] + }, + tsongbird: { + url: `https://coston-api.flare.network/ext/C/rpc`, + accounts: [ + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}` + ] + }, + flare: { + url: `https://flare-api.flare.network/ext/C/rpc`, + accounts: [ + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}` + ] + }, + songbird: { + url: `https://songbird-api.flare.network/ext/C/rpc`, + accounts: [ + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}` + ] + }, tavaxc: { url: 'https://api.avax-test.network/ext/C/rpc', accounts: [`${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`] @@ -213,6 +249,12 @@ const config: HardhatUserConfig = { //Core Dao coredaoTestnet: `${CORE_DAO_TESTNET_EXPLORER_API_KEY}`, coredaoMainnet: `${CORE_DAO_MAINNET_EXPLORER_API_KEY}`, + //Flare + flareTestnet: `${FLARE_TESTNET_EXPLORER_API_KEY}`, + flareMainnet: `${FLARE__MAINNET_EXPLORER_API_KEY}`, + //Songbird + songbirdTestnet: `${SONGBIRD_TESTNET_EXPLORER_API_KEY}`, + songbirdMainnet: `${SONGBIRD_MAINNET_EXPLORER_API_KEY}`, //avaxc // there is free api key for avaxc, so make use of 2 req/sec avaxc: 'sampleapikey', @@ -341,7 +383,40 @@ const config: HardhatUserConfig = { 'https://api.routescan.io/v2/network/testnet/evm/43113/etherscan/api', browserURL: 'https://testnet.snowtrace.io/' } - } + }, + { + network: 'flareTestnet', + chainId: 114, + urls: { + apiURL: 'https://coston2-explorer.flare.network/api', + browserURL: 'https://coston2-explorer.flare.network' + } + }, + { + network: 'flareMainnet', + chainId: 14, + urls: { + apiURL: 'https://flare-explorer.flare.network/api', + browserURL: 'https://flare-explorer.flare.network' + } + }, + { + network: 'songbirdTestnet', + chainId: 16, + urls: { + + apiURL: 'https://coston-explorer.flare.network/api', + browserURL: 'https://coston-explorer.flare.network' + } + }, + { + network: 'songbirdMainnet', + chainId: 19, + urls: { + apiURL: 'https://songbird-explorer.flare.network/api ', + browserURL: 'https://songbird.flarescan.com' + } + }, ] }, mocha: { diff --git a/scripts/deploy.ts b/scripts/deploy.ts index f9738dd..582dd40 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -110,6 +110,12 @@ async function main() { forwarderFactoryContractName = 'ForwarderFactory'; contractPath = `contracts/${walletImplementationContractName}.sol:${walletImplementationContractName}`; break; + //Flare + case 14: + case 114: + //Songbird + case 19: + case 16: // bera case 80084: // coredao