GSNRecipientMock.sol 1.2 KB

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