Skip to content

Commit cf6d53f

Browse files
committed
Add escrow-related commands
1 parent fb434e9 commit cf6d53f

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

cli/commands/protocol/configure-bridge.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export const configureL1Bridge = async (cli: CLIEnvironment, cliArgs: CLIArgs):
2525
logger.info('L2 Gateway address: ' + l2Counterpart.address)
2626
await sendTransaction(cli.wallet, gateway, 'setL2CounterpartAddress', [l2Counterpart.address])
2727

28+
const bridgeEscrow = cli.contracts.BridgeEscrow
29+
logger.info('Escrow address: ' + bridgeEscrow.address)
30+
await sendTransaction(cli.wallet, gateway, 'setEscrowAddress', [bridgeEscrow.address])
31+
await sendTransaction(cli.wallet, bridgeEscrow, 'approveAll', [gateway.address])
32+
2833
const l1Inbox = arbAddressBook.getEntry('IInbox')
2934
const l1Router = arbAddressBook.getEntry('L1GatewayRouter')
3035
logger.info(

cli/commands/protocol/get.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const gettersList = {
5353
'controller-get-pause-guardian': { contract: 'Controller', name: 'pauseGuardian' },
5454
'l1-gateway-l2-grt': { contract: 'L1GraphTokenGateway', name: 'l2GRT' },
5555
'l1-gateway-inbox': { contract: 'L1GraphTokenGateway', name: 'inbox' },
56+
'l1-gateway-escrow': { contract: 'L1GraphTokenGateway', name: 'escrow' },
5657
'l1-gateway-l1-router': { contract: 'L1GraphTokenGateway', name: 'l1Router' },
5758
'l1-gateway-l2-counterpart': { contract: 'L1GraphTokenGateway', name: 'l2Counterpart' },
5859
'l1-gateway-paused': { contract: 'L1GraphTokenGateway', name: 'paused' },

cli/commands/protocol/set.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ export const settersList = {
6868
contract: 'L1GraphTokenGateway',
6969
name: 'setL2CounterpartAddress',
7070
},
71+
'l1-gateway-set-escrow-address': {
72+
contract: 'L1GraphTokenGateway',
73+
name: 'setEscrowAddress',
74+
},
7175
'l1-gateway-set-paused': { contract: 'L1GraphTokenGateway', name: 'setPaused' },
76+
'bridge-escrow-approve-all': { contract: 'BridgeEscrow', name: 'approveAll' },
77+
'bridge-escrow-revoke-all': { contract: 'BridgeEscrow', name: 'revokeAll' },
7278
'l2-gateway-set-l1-grt': { contract: 'L2GraphTokenGateway', name: 'setL1TokenAddress' },
7379
'l2-gateway-set-l2-router': { contract: 'L2GraphTokenGateway', name: 'setL2Router' },
7480
'l2-gateway-set-l1-counterpart': {

cli/contracts.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { GraphGovernance } from '../build/types/GraphGovernance'
2121
import { L1GraphTokenGateway } from '../build/types/L1GraphTokenGateway'
2222
import { L2GraphToken } from '../build/types/L2GraphToken'
2323
import { L2GraphTokenGateway } from '../build/types/L2GraphTokenGateway'
24+
import { BridgeEscrow } from '../build/types/BridgeEscrow'
2425
import { chainIdIsL2 } from './utils'
2526

2627
export interface NetworkContracts {
@@ -39,6 +40,7 @@ export interface NetworkContracts {
3940
IEthereumDIDRegistry: IEthereumDIDRegistry
4041
GraphGovernance: GraphGovernance
4142
L1GraphTokenGateway: L1GraphTokenGateway
43+
BridgeEscrow: BridgeEscrow
4244
L2GraphToken: L2GraphToken
4345
L2GraphTokenGateway: L2GraphTokenGateway
4446
}

0 commit comments

Comments
 (0)