GSNRecipientMock.sol 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. pragma solidity ^0.6.0;
  2. import "./ContextMock.sol";
  3. import "../GSN/GSNRecipient.sol";
  4. // By inheriting from GSNRecipient, Context's internal functions are overridden automatically
  5. contract GSNRecipientMock is ContextMock, GSNRecipient {
  6. function withdrawDeposits(uint256 amount, address payable payee) public {
  7. _withdrawDeposits(amount, payee);
  8. }
  9. function acceptRelayedCall(address, address, bytes calldata, uint256, uint256, uint256, uint256, bytes calldata, uint256)
  10. external
  11. view
  12. override
  13. returns (uint256, bytes memory)
  14. {
  15. return (0, "");
  16. }
  17. function _preRelayedCall(bytes memory) internal override returns (bytes32) { }
  18. function _postRelayedCall(bytes memory, bool, uint256, bytes32) internal override { }
  19. function upgradeRelayHub(address newRelayHub) public {
  20. return _upgradeRelayHub(newRelayHub);
  21. }
  22. function _msgSender() internal override(Context, GSNRecipient) view virtual returns (address payable) {
  23. return GSNRecipient._msgSender();
  24. }
  25. function _msgData() internal override(Context, GSNRecipient) view virtual returns (bytes memory) {
  26. return GSNRecipient._msgData();
  27. }
  28. }