-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: final audit GN-1628 changes (#13)
- Loading branch information
1 parent
768648e
commit a7e6152
Showing
22 changed files
with
73 additions
and
138 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 |
---|---|---|
|
@@ -11,6 +11,9 @@ coverage | |
# cache | ||
.eslintcache | ||
|
||
# local deployments | ||
deployments/localhost | ||
|
||
# hardhat | ||
artifacts | ||
cache | ||
|
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
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
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
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
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
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
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,28 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.1; | ||
|
||
import {GELATO_RELAY, GELATO_RELAY_ERC2771} from "../constants/GelatoRelay.sol"; | ||
import {GELATO_RELAY} from "../constants/GelatoRelay.sol"; | ||
|
||
abstract contract GelatoRelayBase { | ||
modifier onlyGelatoRelay() { | ||
require(_isGelatoRelay(msg.sender), "onlyGelatoRelay"); | ||
_; | ||
} | ||
|
||
modifier onlyGelatoRelayERC2771() { | ||
require(_isGelatoRelayERC2771(msg.sender), "onlyGelatoRelayERC2771"); | ||
_; | ||
} | ||
|
||
function _isGelatoRelay(address _forwarder) internal pure returns (bool) { | ||
return _forwarder == GELATO_RELAY; | ||
} | ||
|
||
function _isGelatoRelayERC2771(address _forwarder) | ||
internal | ||
pure | ||
returns (bool) | ||
{ | ||
return _forwarder == GELATO_RELAY_ERC2771; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.1; | ||
|
||
import {GELATO_RELAY_ERC2771} from "../constants/GelatoRelay.sol"; | ||
|
||
abstract contract GelatoRelayERC2771Base { | ||
modifier onlyGelatoRelayERC2771() { | ||
require(_isGelatoRelayERC2771(msg.sender), "onlyGelatoRelayERC2771"); | ||
_; | ||
} | ||
|
||
function _isGelatoRelayERC2771(address _forwarder) | ||
internal | ||
pure | ||
returns (bool) | ||
{ | ||
return _forwarder == GELATO_RELAY_ERC2771; | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
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
Oops, something went wrong.