-
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.
chore: update GelatoRelayERC2771 addresses and add zkSync support (#16)
* chore: support other Relay addresses on zkSync * chore: update GelatoRelayERC2771 addresses * chore: update .gitignore * chore: remove dependency from Context.sol * v3.0.0
- Loading branch information
1 parent
2e5ade9
commit 5933227
Showing
8 changed files
with
34 additions
and
57 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 |
---|---|---|
|
@@ -37,3 +37,6 @@ yarn-error.log | |
# VS Code | ||
.vscode | ||
|
||
.idea | ||
|
||
.npmrc |
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,15 +1,18 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.1; | ||
|
||
import {GELATO_RELAY} from "../constants/GelatoRelay.sol"; | ||
import {GELATO_RELAY, GELATO_RELAY_ZKSYNC} from "../constants/GelatoRelay.sol"; | ||
|
||
abstract contract GelatoRelayBase { | ||
modifier onlyGelatoRelay() { | ||
require(_isGelatoRelay(msg.sender), "onlyGelatoRelay"); | ||
_; | ||
} | ||
|
||
function _isGelatoRelay(address _forwarder) internal pure returns (bool) { | ||
return _forwarder == GELATO_RELAY; | ||
function _isGelatoRelay(address _forwarder) internal view returns (bool) { | ||
return | ||
block.chainid == 324 || block.chainid == 280 | ||
? _forwarder == GELATO_RELAY_ZKSYNC | ||
: _forwarder == GELATO_RELAY; | ||
} | ||
} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1446,10 +1446,10 @@ | |
"@types/sinon-chai" "^3.2.3" | ||
"@types/web3" "1.0.19" | ||
|
||
"@openzeppelin/[email protected].0": | ||
version "4.8.0" | ||
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.0.tgz#6854c37df205dd2c056bdfa1b853f5d732109109" | ||
integrity sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw== | ||
"@openzeppelin/[email protected].3": | ||
version "4.8.3" | ||
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.3.tgz#cbef3146bfc570849405f59cba18235da95a252a" | ||
integrity sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg== | ||
|
||
"@resolver-engine/core@^0.3.3": | ||
version "0.3.3" | ||
|