diff --git a/contracts/optimistic-ethereum/OVM/bridge/OVM_BaseCrossDomainMessenger.sol b/contracts/optimistic-ethereum/OVM/bridge/OVM_BaseCrossDomainMessenger.sol index 372fde6e2..5a0e99d62 100644 --- a/contracts/optimistic-ethereum/OVM/bridge/OVM_BaseCrossDomainMessenger.sol +++ b/contracts/optimistic-ethereum/OVM/bridge/OVM_BaseCrossDomainMessenger.sol @@ -40,7 +40,7 @@ abstract contract OVM_BaseCrossDomainMessenger is iOVM_BaseCrossDomainMessenger, address _target, bytes memory _message, uint32 _gasLimit - ) nonReentrant + ) override public { diff --git a/contracts/optimistic-ethereum/OVM/bridge/OVM_L1CrossDomainMessenger.sol b/contracts/optimistic-ethereum/OVM/bridge/OVM_L1CrossDomainMessenger.sol index b8988645b..e6912ef84 100644 --- a/contracts/optimistic-ethereum/OVM/bridge/OVM_L1CrossDomainMessenger.sol +++ b/contracts/optimistic-ethereum/OVM/bridge/OVM_L1CrossDomainMessenger.sol @@ -7,6 +7,7 @@ import { Lib_OVMCodec } from "../../libraries/codec/Lib_OVMCodec.sol"; import { Lib_AddressResolver } from "../../libraries/resolver/Lib_AddressResolver.sol"; import { Lib_AddressManager } from "../../libraries/resolver/Lib_AddressManager.sol"; import { Lib_SecureMerkleTrie } from "../../libraries/trie/Lib_SecureMerkleTrie.sol"; +import { Lib_ReentrancyGuard } from "../../libraries/utils/Lib_ReentrancyGuard.sol"; /* Interface Imports */ import { iOVM_L1CrossDomainMessenger } from "../../iOVM/bridge/iOVM_L1CrossDomainMessenger.sol"; @@ -18,6 +19,7 @@ import { OVM_BaseCrossDomainMessenger } from "./OVM_BaseCrossDomainMessenger.sol /** * @title OVM_L1CrossDomainMessenger + * @dev This contract lives on L1. It sends L1->L2 messages into L2, and relays L2->L1 messages from L2 to their target on L1. */ contract OVM_L1CrossDomainMessenger is iOVM_L1CrossDomainMessenger, OVM_BaseCrossDomainMessenger, Lib_AddressResolver { @@ -81,6 +83,7 @@ contract OVM_L1CrossDomainMessenger is iOVM_L1CrossDomainMessenger, OVM_BaseCros ) override public + nonReentrant onlyRelayer() { bytes memory xDomainCalldata = _getXDomainCalldata( diff --git a/contracts/optimistic-ethereum/OVM/bridge/OVM_L2CrossDomainMessenger.sol b/contracts/optimistic-ethereum/OVM/bridge/OVM_L2CrossDomainMessenger.sol index 39b1db236..3ce1dc112 100644 --- a/contracts/optimistic-ethereum/OVM/bridge/OVM_L2CrossDomainMessenger.sol +++ b/contracts/optimistic-ethereum/OVM/bridge/OVM_L2CrossDomainMessenger.sol @@ -5,6 +5,7 @@ pragma experimental ABIEncoderV2; /* Library Imports */ import { Lib_AddressResolver } from "../../libraries/resolver/Lib_AddressResolver.sol"; +import { Lib_ReentrancyGuard } from "../../libraries/utils/Lib_ReentrancyGuard.sol"; /* Interface Imports */ import { iOVM_L2CrossDomainMessenger } from "../../iOVM/bridge/iOVM_L2CrossDomainMessenger.sol"; @@ -17,6 +18,7 @@ import { OVM_BaseCrossDomainMessenger } from "./OVM_BaseCrossDomainMessenger.sol /** * @title OVM_L2CrossDomainMessenger * @dev L2 CONTRACT (COMPILED) + * This contract lives on L2. It sends messages to L1, and relays them from L1. */ contract OVM_L2CrossDomainMessenger is iOVM_L2CrossDomainMessenger, OVM_BaseCrossDomainMessenger, Lib_AddressResolver { @@ -50,6 +52,7 @@ contract OVM_L2CrossDomainMessenger is iOVM_L2CrossDomainMessenger, OVM_BaseCros uint256 _messageNonce ) override + nonReentrant public { require(