@@ -6,6 +6,8 @@ import { SimpleAddressBook } from '../../lib/address-book'
6
6
export const configureL1Bridge : GraphNetworkAction < {
7
7
l2GRTAddress : string
8
8
l2GRTGatewayAddress : string
9
+ l2GNSAddress : string
10
+ l2StakingAddress : string
9
11
arbAddressBookPath : string
10
12
chainId : number
11
13
} > = async (
@@ -14,23 +16,27 @@ export const configureL1Bridge: GraphNetworkAction<{
14
16
args : {
15
17
l2GRTAddress : string
16
18
l2GRTGatewayAddress : string
19
+ l2GNSAddress : string
20
+ l2StakingAddress : string
17
21
arbAddressBookPath : string
18
22
chainId : number
19
23
} ,
20
24
) : Promise < void > => {
21
- const { l2GRTAddress, l2GRTGatewayAddress, arbAddressBookPath, chainId } = args
25
+ const { l2GRTAddress, l2GRTGatewayAddress, l2GNSAddress , l2StakingAddress , arbAddressBookPath, chainId } = args
22
26
console . info ( `>>> Setting L1 Bridge Configuration <<<\n` )
23
27
24
28
const arbAddressBook = new SimpleAddressBook ( arbAddressBookPath , chainId )
25
29
26
30
const gateway = contracts . L1GraphTokenGateway !
27
31
32
+ // Gateway
28
33
console . info ( 'L2 GRT address: ' + l2GRTAddress )
29
34
await gateway . connect ( signer ) . setL2TokenAddress ( l2GRTAddress )
30
35
31
36
console . info ( 'L2 Gateway address: ' + l2GRTGatewayAddress )
32
37
await gateway . connect ( signer ) . setL2CounterpartAddress ( l2GRTGatewayAddress )
33
38
39
+ // Escrow
34
40
const bridgeEscrow = contracts . BridgeEscrow !
35
41
console . info ( 'Escrow address: ' + bridgeEscrow . address )
36
42
await gateway . connect ( signer ) . setEscrowAddress ( bridgeEscrow . address )
@@ -42,11 +48,27 @@ export const configureL1Bridge: GraphNetworkAction<{
42
48
'L1 Inbox address: ' + l1Inbox . address + ' and L1 Router address: ' + l1Router . address ,
43
49
)
44
50
await gateway . connect ( signer ) . setArbitrumAddresses ( l1Inbox . address , l1Router . address )
51
+
52
+ // GNS
53
+ const gns = contracts . L1GNS !
54
+ console . info ( 'GNS address: ' + gns . address )
55
+ console . info ( 'L2 GNS address: ' + l2GNSAddress )
56
+ await gns . connect ( signer ) . setCounterpartGNSAddress ( l2GNSAddress )
57
+ await gateway . connect ( signer ) . addToCallhookAllowlist ( gns . address )
58
+
59
+ // Staking
60
+ const staking = contracts . L1Staking !
61
+ console . info ( 'Staking address: ' + staking . address )
62
+ console . info ( 'L2 Staking address: ' + l2StakingAddress )
63
+ await staking . connect ( signer ) . setCounterpartStakingAddress ( l2StakingAddress )
64
+ await gateway . connect ( signer ) . addToCallhookAllowlist ( staking . address )
45
65
}
46
66
47
67
export const configureL2Bridge : GraphNetworkAction < {
48
68
l1GRTAddress : string
49
69
l1GRTGatewayAddress : string
70
+ l1GNSAddress : string
71
+ l1StakingAddress : string
50
72
arbAddressBookPath : string
51
73
chainId : number
52
74
} > = async (
@@ -55,18 +77,21 @@ export const configureL2Bridge: GraphNetworkAction<{
55
77
args : {
56
78
l1GRTAddress : string
57
79
l1GRTGatewayAddress : string
80
+ l1GNSAddress : string
81
+ l1StakingAddress : string
58
82
arbAddressBookPath : string
59
83
chainId : number
60
84
} ,
61
85
) : Promise < void > => {
62
- const { l1GRTAddress, l1GRTGatewayAddress, arbAddressBookPath, chainId } = args
86
+ const { l1GRTAddress, l1GRTGatewayAddress, l1GNSAddress , l1StakingAddress , arbAddressBookPath, chainId } = args
63
87
console . info ( `>>> Setting L2 Bridge Configuration <<<\n` )
64
88
65
89
const arbAddressBook = new SimpleAddressBook ( arbAddressBookPath , chainId )
66
90
67
91
const gateway = contracts . L2GraphTokenGateway !
68
92
const token = contracts . L2GraphToken !
69
93
94
+ // Gateway
70
95
console . info ( 'L1 GRT address: ' + l1GRTAddress )
71
96
await gateway . connect ( signer ) . setL1TokenAddress ( l1GRTAddress )
72
97
await token . connect ( signer ) . setL1Address ( l1GRTAddress )
@@ -80,4 +105,16 @@ export const configureL2Bridge: GraphNetworkAction<{
80
105
81
106
console . info ( 'L2 Gateway address: ' + gateway . address )
82
107
await token . connect ( signer ) . setGateway ( gateway . address )
108
+
109
+ // GNS
110
+ const gns = contracts . L2GNS !
111
+ console . info ( 'GNS address: ' + gns . address )
112
+ console . info ( 'L1 GNS address: ' + l1GNSAddress )
113
+ await gns . connect ( signer ) . setCounterpartGNSAddress ( l1GNSAddress )
114
+
115
+ // Staking
116
+ const staking = contracts . L2Staking !
117
+ console . info ( 'Staking address: ' + staking . address )
118
+ console . info ( 'L1 Staking address: ' + l1StakingAddress )
119
+ await staking . connect ( signer ) . setCounterpartStakingAddress ( l1StakingAddress )
83
120
}
0 commit comments