ContextUpgradeable.sol 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
  3. pragma solidity ^0.8.0;
  4. import "../proxy/utils/Initializable.sol";
  5. /**
  6. * @dev Provides information about the current execution context, including the
  7. * sender of the transaction and its data. While these are generally available
  8. * via msg.sender and msg.data, they should not be accessed in such a direct
  9. * manner, since when dealing with meta-transactions the account sending and
  10. * paying for execution may not be the actual sender (as far as an application
  11. * is concerned).
  12. *
  13. * This contract is only required for intermediate, library-like contracts.
  14. */
  15. abstract contract ContextUpgradeable is Initializable {
  16. function __Context_init() internal onlyInitializing {
  17. }
  18. function __Context_init_unchained() internal onlyInitializing {
  19. }
  20. function _msgSender() internal view virtual returns (address) {
  21. return msg.sender;
  22. }
  23. function _msgData() internal view virtual returns (bytes calldata) {
  24. return msg.data;
  25. }
  26. /**
  27. * This empty reserved space is put in place to allow future versions to add new
  28. * variables without shifting down storage in the inheritance chain.
  29. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
  30. */
  31. uint256[50] private __gap;
  32. }