File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ export const migrate = async (
7373 if ( ! sure ) return
7474
7575 if ( chainId == 1337 ) {
76- await ( cli . wallet . provider as providers . JsonRpcProvider ) . send ( 'evm_setAutomine' , [ true ] )
7776 allContracts = [ 'EthereumDIDRegistry' , ...allContracts ]
77+ await setAutoMine ( cli . wallet . provider as providers . JsonRpcProvider , true )
7878 } else if ( chainIdIsL2 ( chainId ) ) {
7979 allContracts = l2Contracts
8080 }
@@ -169,7 +169,15 @@ export const migrate = async (
169169 logger . info ( `Sent ${ nTx } transaction${ nTx === 1 ? '' : 's' } & spent ${ EtherSymbol } ${ spent } ` )
170170
171171 if ( chainId == 1337 ) {
172- await ( cli . wallet . provider as providers . JsonRpcProvider ) . send ( 'evm_setAutomine' , [ autoMine ] )
172+ await setAutoMine ( cli . wallet . provider as providers . JsonRpcProvider , autoMine )
173+ }
174+ }
175+
176+ const setAutoMine = async ( provider : providers . JsonRpcProvider , automine : boolean ) => {
177+ try {
178+ await provider . send ( 'evm_setAutomine' , [ automine ] )
179+ } catch ( error ) {
180+ logger . warn ( 'The method evm_setAutomine does not exist/is not available!' )
173181 }
174182}
175183
Original file line number Diff line number Diff line change 1- import { addCustomNetwork } from '@arbitrum/sdk'
21import { Contract , Wallet , providers } from 'ethers'
32
43import { loadArtifact } from './artifacts'
@@ -7,6 +6,7 @@ export const l1ToL2ChainIdMap = {
76 '1' : '42161' ,
87 '4' : '421611' ,
98 '5' : '421613' ,
9+ '1337' : '412346' ,
1010}
1111
1212export const l2ChainIds = Object . values ( l1ToL2ChainIdMap ) . map ( Number )
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ contracts:
125125 subgraphAvailabilityOracle : *availabilityOracle
126126 AllocationExchange :
127127 init :
128- graphToken : " ${{GraphToken .address}}"
128+ graphToken : " ${{L2GraphToken .address}}"
129129 staking : " ${{Staking.address}}"
130130 governor : *allocationExchangeOwner
131131 authority : *authority
Original file line number Diff line number Diff line change @@ -152,6 +152,14 @@ const config: HardhatUserConfig = {
152152 accounts :
153153 process . env . FORK === 'true' ? getAccountsKeys ( ) : { mnemonic : DEFAULT_TEST_MNEMONIC } ,
154154 } ,
155+ localnitrol1 : {
156+ url : 'http://localhost:8545' ,
157+ accounts : { mnemonic : DEFAULT_TEST_MNEMONIC } ,
158+ } ,
159+ localnitrol2 : {
160+ url : 'http://localhost:8547' ,
161+ accounts : { mnemonic : DEFAULT_TEST_MNEMONIC } ,
162+ } ,
155163 } ,
156164 graph : {
157165 addressBook : process . env . ADDRESS_BOOK ?? 'addresses.json' ,
You can’t perform that action at this time.
0 commit comments