Skip to content

Commit 048952c

Browse files
committed
fix: sync task check if l2 reservoir contracts exists before using it
Signed-off-by: Tomás Migone <[email protected]>
1 parent 8617ee2 commit 048952c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tasks/deployment/sync.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ task('migrate:sync', 'Sync controller contracts')
3636
if (isL2) {
3737
console.log('> Syncing cache on L2GraphTokenGateway')
3838
txs.push(await contracts['L2GraphTokenGateway'].connect(deployer).syncAllContracts())
39-
console.log('> Syncing cache on L2Reservoir')
40-
txs.push(await contracts['L2Reservoir'].connect(deployer).syncAllContracts())
39+
if (contracts['L2Reservoir']) {
40+
console.log('> Syncing cache on L2Reservoir')
41+
txs.push(await contracts['L2Reservoir'].connect(deployer).syncAllContracts())
42+
}
4143
} else {
4244
// L1 chains might not have these contracts deployed yet...
4345
if (contracts['L1GraphTokenGateway']) {

0 commit comments

Comments
 (0)