From d032ea199cfc8ca8caaa67559469cce9f6ea84f2 Mon Sep 17 00:00:00 2001 From: Akash Gianchandani Date: Wed, 4 Oct 2023 20:57:16 +0530 Subject: [PATCH] chore: add updated private key constants WIN-666 --- .github/workflows/deploy_and_release.yml | 18 ++++++++++++------ .github/workflows/push.yml | 7 +++++-- hardhat.config.ts | 15 ++++++++------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy_and_release.yml b/.github/workflows/deploy_and_release.yml index 9a54230..1c4b4e9 100644 --- a/.github/workflows/deploy_and_release.yml +++ b/.github/workflows/deploy_and_release.yml @@ -16,8 +16,10 @@ jobs: - run: npm run lint - run: npm run test env: - PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - ALCHEMY_ETHER_API_KEY: ${{ secrets.ALCHEMY_ETHER_API_KEY }} + MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT: ${{ secrets.MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT }} + TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT: ${{ secrets.TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT }} + QUICKNODE_ETH_MAINNET_API_KEY: ${{ secrets.QUICKNODE_ETH_MAINNET_API_KEY }} + QUICKNODE_ETH_HOLESKY_API_KEY: ${{ secrets.QUICKNODE_ETH_HOLESKY_API_KEY }} ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} @@ -54,8 +56,10 @@ jobs: - run: npm install - run: npm run deploy-test --network ${{ needs.get-network.outputs.network }} env: - PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - ALCHEMY_ETHER_API_KEY: ${{ secrets.ALCHEMY_ETHER_API_KEY }} + MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT: ${{ secrets.MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT }} + TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT: ${{ secrets.TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT }} + QUICKNODE_ETH_MAINNET_API_KEY: ${{ secrets.QUICKNODE_ETH_MAINNET_API_KEY }} + QUICKNODE_ETH_HOLESKY_API_KEY: ${{ secrets.QUICKNODE_ETH_HOLESKY_API_KEY }} ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} @@ -103,8 +107,10 @@ jobs: - run: npm install - run: npm run deploy-prod --network ${{ needs.get-network.outputs.network }} env: - PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - ALCHEMY_ETHER_API_KEY: ${{ secrets.ALCHEMY_ETHER_API_KEY }} + MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT: ${{ secrets.MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT }} + TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT: ${{ secrets.TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT }} + QUICKNODE_ETH_MAINNET_API_KEY: ${{ secrets.QUICKNODE_ETH_MAINNET_API_KEY }} + QUICKNODE_ETH_HOLESKY_API_KEY: ${{ secrets.QUICKNODE_ETH_HOLESKY_API_KEY }} ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 743eab4..556a00f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -24,9 +24,12 @@ jobs: - run: npm install - run: npm run test env: - PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - ALCHEMY_ETHER_API_KEY: ${{ secrets.ALCHEMY_ETHER_API_KEY }} + MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT: ${{ secrets.MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT }} + TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT: ${{ secrets.TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT }} + QUICKNODE_ETH_MAINNET_API_KEY: ${{ secrets.QUICKNODE_ETH_MAINNET_API_KEY }} + QUICKNODE_ETH_HOLESKY_API_KEY: ${{ secrets.QUICKNODE_ETH_HOLESKY_API_KEY }} ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} + BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }} - run: npm run lint diff --git a/hardhat.config.ts b/hardhat.config.ts index bbd49d2..ad75ef8 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -10,7 +10,8 @@ import 'hardhat-gas-reporter'; import 'solidity-coverage'; const { - PRIVATE_KEY, + MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT, + TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT, QUICKNODE_ETH_MAINNET_API_KEY, QUICKNODE_ETH_HOLESKY_API_KEY, ETHERSCAN_API_KEY, @@ -43,28 +44,28 @@ const config: HardhatUserConfig = { }, eth: { url: `https://ultra-empty-sanctuary.quiknode.pro/${QUICKNODE_ETH_MAINNET_API_KEY}`, - accounts: [`${PRIVATE_KEY}`] + accounts: [`${MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`] }, hteth: { url: `https://boldest-cosmological-mountain.ethereum-holesky.quiknode.pro/${QUICKNODE_ETH_HOLESKY_API_KEY}`, - accounts: [`${PRIVATE_KEY}`] + accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`] }, matic: { url: `https://polygon-mainnet.g.alchemyapi.io/v2/${ALCHEMY_POLYGON_API_KEY}`, - accounts: [`${PRIVATE_KEY}`] + accounts: [`${MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`] }, tmatic: { //https://polygon-mumbai.g.alchemy.com/ url: `https://polygon-mumbai.g.alchemyapi.io/v2/${ALCHEMY_POLYGON_API_KEY}`, - accounts: [`${PRIVATE_KEY}`] + accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`] }, bsc: { url: `https://bsc-dataseed1.binance.org/`, - accounts: [`${PRIVATE_KEY}`] + accounts: [`${MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`] }, tbsc: { url: `https://data-seed-prebsc-1-s1.binance.org:8545/`, - accounts: [`${PRIVATE_KEY}`] + accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`] } }, gasReporter: {