Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
add onlyFirstCall modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
maurelian committed Jan 10, 2021
1 parent 5886e76 commit 9758ca1
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ contract OVM_L2CrossDomainMessenger is iOVM_L2CrossDomainMessenger, OVM_BaseCros
Lib_AddressResolver(_libAddressManager)
{}

modifier onlyFirstCall() {
require(
msg.sender == address(0),
"Only callable during the first call of transaction"
);
_;
}

/********************
* Public Functions *
Expand All @@ -53,6 +60,7 @@ contract OVM_L2CrossDomainMessenger is iOVM_L2CrossDomainMessenger, OVM_BaseCros
)
override
nonReentrant
onlyFirstCall
public
{
require(
Expand Down

0 comments on commit 9758ca1

Please sign in to comment.