GSNContextMock.sol 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. pragma solidity ^0.5.0;
  2. import "./ContextMock.sol";
  3. import "../GSN/GSNContext.sol";
  4. import "../GSN/IRelayRecipient.sol";
  5. // By inheriting from GSNContext, Context's internal functions are overridden automatically
  6. contract GSNContextMock is ContextMock, GSNContext, IRelayRecipient {
  7. function getHubAddr() public view returns (address) {
  8. return _getRelayHub();
  9. }
  10. function acceptRelayedCall(
  11. address,
  12. address,
  13. bytes calldata,
  14. uint256,
  15. uint256,
  16. uint256,
  17. uint256,
  18. bytes calldata,
  19. uint256
  20. )
  21. external
  22. view
  23. returns (uint256, bytes memory)
  24. {
  25. return (0, "");
  26. }
  27. function preRelayedCall(bytes calldata) external returns (bytes32) {
  28. // solhint-disable-previous-line no-empty-blocks
  29. }
  30. function postRelayedCall(bytes calldata, bool, uint256, bytes32) external {
  31. // solhint-disable-previous-line no-empty-blocks
  32. }
  33. function getRelayHub() public view returns (address) {
  34. return _getRelayHub();
  35. }
  36. function upgradeRelayHub(address newRelayHub) public {
  37. return _upgradeRelayHub(newRelayHub);
  38. }
  39. }