From bcb4802127f075b01187f92ff01f3695a9ea79d6 Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Fri, 21 Oct 2022 13:51:53 -0300 Subject: [PATCH] fix: ensure l2Counterpart is nonzero (C4 M-201) --- contracts/gateway/L1GraphTokenGateway.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/gateway/L1GraphTokenGateway.sol b/contracts/gateway/L1GraphTokenGateway.sol index fbcbcf724..3fcb08a94 100644 --- a/contracts/gateway/L1GraphTokenGateway.sol +++ b/contracts/gateway/L1GraphTokenGateway.sol @@ -72,6 +72,7 @@ contract L1GraphTokenGateway is GraphTokenGateway, L1ArbitrumMessenger { */ modifier onlyL2Counterpart() { require(inbox != address(0), "INBOX_NOT_SET"); + require(l2Counterpart != address(0), "L2_COUNTERPART_NOT_SET"); // a message coming from the counterpart gateway was executed by the bridge IBridge bridge = IInbox(inbox).bridge();