-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from oasisprotocol/CedarMist/opl/use-require
contracts: remove custom reverts and ERC2771Context
- Loading branch information
Showing
2 changed files
with
12 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,14 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.0; | ||
|
||
import {ERC2771Context} from "@openzeppelin/contracts/metatx/ERC2771Context.sol"; | ||
import {Context} from "@openzeppelin/contracts/utils/Context.sol"; | ||
|
||
import {Endpoint} from "./Endpoint.sol"; | ||
|
||
/** | ||
* @title OPL Enclave | ||
* @dev The Sapphire-side of an OPL dapp. | ||
*/ | ||
contract Enclave is Endpoint, ERC2771Context { | ||
contract Enclave is Endpoint { | ||
constructor(address _host, bytes32 _hostChain) | ||
Endpoint(_host, _hostChain) | ||
ERC2771Context(block.chainid == 0x5aff ? address(0) : address(0)) // TODO: insert gsn deployment | ||
{} // solhint-disable-line no-empty-blocks | ||
|
||
// The following functions are overrides required by Solidity. | ||
function _msgData() | ||
internal | ||
view | ||
override(Context, ERC2771Context) | ||
returns (bytes calldata) | ||
{ | ||
return ERC2771Context._msgData(); | ||
} | ||
|
||
function _msgSender() | ||
internal | ||
view | ||
override(Context, ERC2771Context) | ||
returns (address) | ||
{ | ||
return ERC2771Context._msgSender(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters