ERC2771ContextMockUpgradeable.sol 1.3 KB

123456789101112131415161718192021222324252627282930
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.9;
  3. import "./ContextMockUpgradeable.sol";
  4. import "../metatx/ERC2771ContextUpgradeable.sol";
  5. import "../proxy/utils/Initializable.sol";
  6. // By inheriting from ERC2771Context, Context's internal functions are overridden automatically
  7. contract ERC2771ContextMockUpgradeable is Initializable, ContextMockUpgradeable, ERC2771ContextUpgradeable {
  8. /// @custom:oz-upgrades-unsafe-allow constructor
  9. constructor(address trustedForwarder) ERC2771ContextUpgradeable(trustedForwarder) {
  10. emit Sender(_msgSender()); // _msgSender() should be accessible during construction
  11. }
  12. function _msgSender() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (address) {
  13. return ERC2771ContextUpgradeable._msgSender();
  14. }
  15. function _msgData() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (bytes calldata) {
  16. return ERC2771ContextUpgradeable._msgData();
  17. }
  18. /**
  19. * This empty reserved space is put in place to allow future versions to add new
  20. * variables without shifting down storage in the inheritance chain.
  21. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
  22. */
  23. uint256[50] private __gap;
  24. }