Context.sol 1.1 KB

1234567891011121314151617181920212223242526
  1. pragma solidity ^0.6.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. function _msgSender() internal view virtual returns (address payable) {
  17. return msg.sender;
  18. }
  19. function _msgData() internal view virtual returns (bytes memory) {
  20. this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  21. return msg.data;
  22. }
  23. }