forked from rmourey26/CMTAT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MetaTxModule.sol
44 lines (38 loc) · 1.13 KB
/
MetaTxModule.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//SPDX-License-Identifier: MPL-2.0
pragma solidity ^0.8.17;
import "../../../../openzeppelin-contracts-upgradeable/contracts/metatx/ERC2771ContextUpgradeable.sol";
import "../../../../openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";
/**
* @dev Meta transaction (gasless) module.
*
* Useful for to provide UX where the user does not pay gas for token exchange
* To follow OpenZeppelin, this contract does not implement the functions init & init_unchained.
* ()
*/
abstract contract MetaTxModule is ERC2771ContextUpgradeable {
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(
address trustedForwarder
) ERC2771ContextUpgradeable(trustedForwarder) {
// Nothing to do
}
function _msgSender()
internal
view
virtual
override
returns (address sender)
{
return ERC2771ContextUpgradeable._msgSender();
}
function _msgData()
internal
view
virtual
override
returns (bytes calldata)
{
return ERC2771ContextUpgradeable._msgData();
}
uint256[50] private __gap;
}