Context.sol 1.1 KB

123456789101112131415161718192021222324252627
  1. pragma solidity ^0.5.0;
  2. /*
  3. * @dev Provides information about the current execution context, including the
  4. * sender of the transaction and its data. While these are generally available
  5. * via msg.sender and msg.data, they should not be accessed in such a direct
  6. * manner, since when dealing with GSN meta-transactions the account sending and
  7. * paying for execution may not be the actual sender (as far as an application
  8. * is concerned).
  9. *
  10. * This contract is only required for intermediate, library-like contracts.
  11. */
  12. contract Context {
  13. // Empty internal constructor, to prevent people from mistakenly deploying
  14. // an instance of this contract, which should be used via inheritance.
  15. constructor () internal { }
  16. // solhint-disable-previous-line no-empty-blocks
  17. function _msgSender() internal view returns (address payable) {
  18. return msg.sender;
  19. }
  20. function _msgData() internal view returns (bytes memory) {
  21. this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  22. return msg.data;
  23. }
  24. }