From cf394714c38beedb250343f12197f4d49d9f3ff0 Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 18 Jul 2023 23:55:42 -0700 Subject: [PATCH] Remove unused Alchemy keys & censored Infura links --- .env.example | 8 +------- .github/workflows/nodejs.yml | 7 +------ nuxt.config.js | 9 ++------- scripts/helpers/download.js | 4 ---- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/.env.example b/.env.example index 434d682..2929fb9 100644 --- a/.env.example +++ b/.env.example @@ -1,13 +1,7 @@ PINATA_API_KEY= PINATA_SECRET_API_KEY= -INFURA_KEY= - -ALCHEMY_MAINNET_KEY= -ALCHEMY_POLYGON_KEY= -ALCHEMY_OPTIMISM_KEY= -ALCHEMY_ARBITRUM_KEY= -ALCHEMY_GOERLI_KEY= +CHAINNODES_KEY= WC_BRIDGE= diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 8b02d5d..1f4422a 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -32,12 +32,7 @@ jobs: - name: Build run: yarn generate env: - INFURA_KEY: ${{ secrets.INFURA_KEY }} - ALCHEMY_MAINNET_KEY: ${{ secrets.ALCHEMY_MAINNET_KEY }} - ALCHEMY_POLYGON_KEY: ${{ secrets.ALCHEMY_POLYGON_KEY }} - ALCHEMY_OPTIMISM_KEY: ${{ secrets.ALCHEMY_OPTIMISM_KEY }} - ALCHEMY_ARBITRUM_KEY: ${{ secrets.ALCHEMY_ARBITRUM_KEY }} - ALCHEMY_GOERLI_KEY: ${{ secrets.ALCHEMY_GOERLI_KEY }} + CHAINNODES_KEY: ${{ secrets.CHAINNODES_KEY }} WC_BRIDGE: ${{ secrets.WC_BRIDGE }} OLD_STORE_NAME: ${{ secrets.OLD_STORE_NAME }} STORE_NAME: ${{ secrets.STORE_NAME }} diff --git a/nuxt.config.js b/nuxt.config.js index b38c036..54c2a9b 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -187,12 +187,7 @@ export default { new webpack.IgnorePlugin(/worker_threads/), new webpack.DefinePlugin({ 'process.env': JSON.stringify({ - INFURA_KEY: process.env.INFURA_KEY, - ALCHEMY_MAINNET_KEY: process.env.ALCHEMY_MAINNET_KEY, - ALCHEMY_POLYGON_KEY: process.env.ALCHEMY_POLYGON_KEY, - ALCHEMY_OPTIMISM_KEY: process.env.ALCHEMY_OPTIMISM_KEY, - ALCHEMY_ARBITRUM_KEY: process.env.ALCHEMY_ARBITRUM_KEY, - ALCHEMY_GOERLI_KEY: process.env.ALCHEMY_GOERLI_KEY, + CHAINNODES_KEY: process.env.CHAINNODES_KEY, WC_BRIDGE: process.env.WC_BRIDGE, OLD_STORE_NAME: process.env.OLD_STORE_NAME, STORE_NAME: process.env.STORE_NAME, @@ -230,7 +225,7 @@ export default { }, provider: { - rpcUrl: `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}` + rpcUrl: `https://mainnet.chainnodes.org/${process.env.CHAINNODES_KEY}` }, // todo make custom loading page diff --git a/scripts/helpers/download.js b/scripts/helpers/download.js index c7064d8..2f616cc 100644 --- a/scripts/helpers/download.js +++ b/scripts/helpers/download.js @@ -39,10 +39,6 @@ export async function getPastEvents({ type, fromBlock, netId, events, contractAt let [{ url: rpcUrl }] = Object.values(networkConfig[`netId${netId}`].rpcUrls) - if (netId === '5') { - rpcUrl = 'https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161' - } - const provider = new Web3.providers.HttpProvider(rpcUrl) const web3 = new Web3(provider) const contract = new web3.eth.Contract(...contractAttrs)