File tree Expand file tree Collapse file tree 5 files changed +26
-20
lines changed
Expand file tree Collapse file tree 5 files changed +26
-20
lines changed Original file line number Diff line number Diff line change 1- L1_RPC_URL="http://127.0.0.1:8545"
21L1_PRIV_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
32CONFIG_NETWORK_NAME="custom"
43DEPLOYED_CONTRACTS_DIR="./scripts/files/"
54DISABLE_VERIFICATION=true
5+
6+ # to use the 'custom' hardhat network, set the following variables
7+ CUSTOM_RPC_URL="http://127.0.0.1:8545"
8+ CUSTOM_ETHERSCAN_API_KEY=
9+ CUSTOM_CHAINID=1337
10+ CUSTOM_ETHERSCAN_API_URL=
11+ CUSTOM_ETHERSCAN_BROWSER_URL=
Original file line number Diff line number Diff line change @@ -203,6 +203,9 @@ module.exports = {
203203 ? [ process . env [ 'DEVNET_PRIVKEY' ] ]
204204 : [ ] ,
205205 } ,
206+ custom : {
207+ url : process . env [ 'CUSTOM_RPC_URL' ] || 'N/A'
208+ } ,
206209 geth : {
207210 url : 'http://localhost:8545' ,
208211 } ,
@@ -217,6 +220,7 @@ module.exports = {
217220 arbSepolia : process . env [ 'ARBISCAN_API_KEY' ] ,
218221 base : process . env [ 'BASESCAN_API_KEY' ] ,
219222 baseSepolia : process . env [ 'BASESCAN_API_KEY' ] ,
223+ custom : process . env [ 'CUSTOM_ETHERSCAN_API_KEY' ] ,
220224 } ,
221225 customChains : [
222226 {
@@ -235,6 +239,14 @@ module.exports = {
235239 browserURL : 'https://sepolia.arbiscan.io/' ,
236240 } ,
237241 } ,
242+ {
243+ network : 'custom' ,
244+ chainId : process . env [ 'CUSTOM_CHAINID' ] ,
245+ urls : {
246+ apiURL : process . env [ 'CUSTOM_ETHERSCAN_API_URL' ] ,
247+ browserURL : process . env [ 'CUSTOM_ETHERSCAN_BROWSER_URL' ] ,
248+ }
249+ }
238250 ] ,
239251 } ,
240252 mocha : {
Original file line number Diff line number Diff line change @@ -815,13 +815,7 @@ async function getAllowedInboxesOutboxesFromBridge(bridge: Bridge) {
815815}
816816
817817async function main ( ) {
818- const l1RpcVal = process . env . L1_RPC_URL
819- if ( ! l1RpcVal ) {
820- throw new Error ( 'L1_RPC_URL env variable not set' )
821- }
822- const l1Rpc = new ethers . providers . JsonRpcProvider (
823- l1RpcVal
824- ) as JsonRpcProvider
818+ const l1Rpc = ethers . provider
825819
826820 const configNetworkName = process . env . CONFIG_NETWORK_NAME
827821 if ( ! configNetworkName ) {
Original file line number Diff line number Diff line change 1- import { ethers , Wallet } from 'ethers'
1+ import { ethers } from 'hardhat'
2+ import { Wallet } from 'ethers'
23import { DeployedContracts , getConfig , getJsonFile } from './boldUpgradeCommon'
34import { populateLookup } from './boldUpgradeFunctions'
45import dotenv from 'dotenv'
@@ -7,11 +8,7 @@ import path from 'path'
78dotenv . config ( )
89
910async function main ( ) {
10- const l1RpcVal = process . env . L1_RPC_URL
11- if ( ! l1RpcVal ) {
12- throw new Error ( 'L1_RPC_URL env variable not set' )
13- }
14- const l1Rpc = new ethers . providers . JsonRpcProvider ( l1RpcVal )
11+ const l1Rpc = ethers . provider
1512
1613 const l1PrivKey = process . env . L1_PRIV_KEY
1714 if ( ! l1PrivKey ) {
Original file line number Diff line number Diff line change 1- import { ethers , Wallet } from 'ethers'
1+ import { ethers } from 'hardhat'
2+ import { Wallet } from 'ethers'
23import fs from 'fs'
34import { DeployedContracts , getConfig , getJsonFile } from './boldUpgradeCommon'
45import { deployBoldUpgrade } from './boldUpgradeFunctions'
@@ -8,11 +9,7 @@ import path from 'path'
89dotenv . config ( )
910
1011async function main ( ) {
11- const l1RpcVal = process . env . L1_RPC_URL
12- if ( ! l1RpcVal ) {
13- throw new Error ( 'L1_RPC_URL env variable not set' )
14- }
15- const l1Rpc = new ethers . providers . JsonRpcProvider ( l1RpcVal )
12+ const l1Rpc = ethers . provider
1613
1714 const l1PrivKey = process . env . L1_PRIV_KEY
1815 if ( ! l1PrivKey ) {
You can’t perform that action at this time.
0 commit comments