@@ -15,16 +15,20 @@ export const configureL1Bridge = async (cli: CLIEnvironment, cliArgs: CLIArgs):
15
15
const l2AddressBook = getAddressBook ( cliArgs . addressBook , l2ChainId )
16
16
const arbAddressBook = getAddressBook ( cliArgs . arbAddressBook , cli . chainId . toString ( ) )
17
17
18
+ // Gateway
18
19
const gateway = cli . contracts [ 'L1GraphTokenGateway' ]
19
20
20
21
const l2GRT = l2AddressBook . getEntry ( 'L2GraphToken' )
21
22
logger . info ( 'L2 GRT address: ' + l2GRT . address )
22
23
await sendTransaction ( cli . wallet , gateway , 'setL2TokenAddress' , [ l2GRT . address ] )
23
24
24
- const l2Counterpart = l2AddressBook . getEntry ( 'L2GraphTokenGateway' )
25
- logger . info ( 'L2 Gateway address: ' + l2Counterpart . address )
26
- await sendTransaction ( cli . wallet , gateway , 'setL2CounterpartAddress' , [ l2Counterpart . address ] )
25
+ const l2GatewayCounterpart = l2AddressBook . getEntry ( 'L2GraphTokenGateway' )
26
+ logger . info ( 'L2 Gateway address: ' + l2GatewayCounterpart . address )
27
+ await sendTransaction ( cli . wallet , gateway , 'setL2CounterpartAddress' , [
28
+ l2GatewayCounterpart . address ,
29
+ ] )
27
30
31
+ // Escrow
28
32
const bridgeEscrow = cli . contracts . BridgeEscrow
29
33
logger . info ( 'Escrow address: ' + bridgeEscrow . address )
30
34
await sendTransaction ( cli . wallet , gateway , 'setEscrowAddress' , [ bridgeEscrow . address ] )
@@ -39,6 +43,20 @@ export const configureL1Bridge = async (cli: CLIEnvironment, cliArgs: CLIArgs):
39
43
l1Inbox . address ,
40
44
l1Router . address ,
41
45
] )
46
+
47
+ // GNS
48
+ const gns = cli . contracts . L1GNS
49
+ const l2GNSCounterpart = l2AddressBook . getEntry ( 'L2GNS' )
50
+ logger . info ( 'L2 GNS address: ' + l2GNSCounterpart . address )
51
+ await sendTransaction ( cli . wallet , gns , 'setCounterpartGNSAddress' , [ l2GNSCounterpart . address ] )
52
+
53
+ // Staking
54
+ const staking = cli . contracts . L1Staking
55
+ const l2StakingCounterpart = l2AddressBook . getEntry ( 'L2Staking' )
56
+ logger . info ( 'L2 Staking address: ' + l2StakingCounterpart . address )
57
+ await sendTransaction ( cli . wallet , staking , 'setCounterpartStakingAddress' , [
58
+ l2StakingCounterpart . address ,
59
+ ] )
42
60
}
43
61
44
62
export const configureL2Bridge = async ( cli : CLIEnvironment , cliArgs : CLIArgs ) : Promise < void > => {
@@ -52,6 +70,7 @@ export const configureL2Bridge = async (cli: CLIEnvironment, cliArgs: CLIArgs):
52
70
const l1AddressBook = getAddressBook ( cliArgs . addressBook , l1ChainId )
53
71
const arbAddressBook = getAddressBook ( cliArgs . arbAddressBook , cli . chainId . toString ( ) )
54
72
73
+ // Gateway
55
74
const gateway = cli . contracts [ 'L2GraphTokenGateway' ]
56
75
const token = cli . contracts [ 'L2GraphToken' ]
57
76
@@ -70,6 +89,20 @@ export const configureL2Bridge = async (cli: CLIEnvironment, cliArgs: CLIArgs):
70
89
71
90
logger . info ( 'L2 Gateway address: ' + gateway . address )
72
91
await sendTransaction ( cli . wallet , token , 'setGateway' , [ gateway . address ] )
92
+
93
+ // GNS
94
+ const gns = cli . contracts . L2GNS
95
+ const l1GNSCounterpart = l1AddressBook . getEntry ( 'L1GNS' )
96
+ logger . info ( 'L1 GNS address: ' + l1GNSCounterpart . address )
97
+ await sendTransaction ( cli . wallet , gns , 'setCounterpartGNSAddress' , [ l1GNSCounterpart . address ] )
98
+
99
+ // Staking
100
+ const staking = cli . contracts . L2Staking
101
+ const l1StakingCounterpart = l1AddressBook . getEntry ( 'L1Staking' )
102
+ logger . info ( 'L1 Staking address: ' + l1StakingCounterpart . address )
103
+ await sendTransaction ( cli . wallet , staking , 'setCounterpartStakingAddress' , [
104
+ l1StakingCounterpart . address ,
105
+ ] )
73
106
}
74
107
75
108
export const configureL1BridgeCommand = {
0 commit comments