Skip to content

Commit

Permalink
fix: improve onlyL2Counterpart error message
Browse files Browse the repository at this point in the history
Signed-off-by: Tomás Migone <[email protected]>
  • Loading branch information
tmigone committed Sep 7, 2022
1 parent b9e7235 commit ae18852
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/gateway/L1GraphTokenGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ contract L1GraphTokenGateway is GraphTokenGateway, L1ArbitrumMessenger {
* can tell us who the sender from L2 is.
*/
modifier onlyL2Counterpart() {
require(inbox != address(0), "INBOX_NOT_SET");

// a message coming from the counterpart gateway was executed by the bridge
IBridge bridge = IInbox(inbox).bridge();
require(msg.sender == address(bridge), "NOT_FROM_BRIDGE");
Expand Down

0 comments on commit ae18852

Please sign in to comment.