From 4435d7352d18e1c40f25f111ebf2d70c6e0479d2 Mon Sep 17 00:00:00 2001 From: scolear Date: Mon, 13 May 2024 16:54:49 +0200 Subject: [PATCH] chore: fix ghwf --- .github/workflows/hardhat-test.yaml | 6 +++--- hardhat.config.js | 23 +++++++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/hardhat-test.yaml b/.github/workflows/hardhat-test.yaml index 2ba9fa5..a47ad30 100644 --- a/.github/workflows/hardhat-test.yaml +++ b/.github/workflows/hardhat-test.yaml @@ -11,9 +11,9 @@ on: - synchronize env: - KEY: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - KEY2: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d - KEY3: 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a + KEY: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' + KEY2: '0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d' + KEY3: '0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a' jobs: test: diff --git a/hardhat.config.js b/hardhat.config.js index 0bf8941..76c011f 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -6,7 +6,13 @@ require('@nomiclabs/hardhat-solhint'); require('solidity-coverage'); require('dotenv').config(); -if (!process.env.KEY_FOR_SAFE) process.env.KEY_FOR_SAFE = process.env.KEY; +const arbitrumURL = process.env.ARB_NODE_ADDR ?? 'https://arb1.arbitrum.io/rpc'; +const arbSepoliaURL = + process.env.ARB_SEPOLIA_NODE_ADDR ?? + 'https://sepolia-rollup.arbitrum.io/rpc'; + +const arbDeployerKey = process.env.ARB_DEPLOYER ?? process.env.KEY; +const keyForSafe = process.env.KEY_FOR_SAFE ?? process.env.KEY; module.exports = { defaultNetwork: 'hardhat', @@ -32,30 +38,27 @@ module.exports = { process.env['KEY'], process.env['KEY2'], process.env['KEY3'], - process.env['KEY_FOR_SAFE'], + keyForSafe, ], }, arbsepolia: { - // url: 'https://sepolia-rollup.arbitrum.io/rpc', - url: process.env['ARB_SEPOLIA_NODE_ADDR'], + url: arbSepoliaURL, chainId: 421614, accounts: [ process.env['KEY'], process.env['KEY2'], process.env['KEY3'], - process.env['KEY_FOR_SAFE'], + keyForSafe, ], }, arbitrum: { - // url: 'https://arb1.arbitrum.io/rpc', - // url: `https://arbitrum-mainnet.infura.io/v3/ed8c014d7cdb486880718a5777ab0ff5`, - url: process.env['ARB_NODE_ADDR'], + url: arbitrumURL, chainId: 42161, accounts: [ - process.env['ARB_DEPLOYER'], + arbDeployerKey, process.env['KEY2'], process.env['KEY3'], - process.env['KEY_FOR_SAFE'], + keyForSafe, ], }, },