* Fix unnamed return variable warning This commit fixes warnings thrown by the solc 0.7.4 compiler: "Warning: Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable." * Fix function state mutability warning This commit fixes warnings thrown by the solc 0.7.4 compiler: "Warning: Function state mutability can be restricted to pure" * Fix shadows an existing declaration warning This commit fixes warnings thrown by the solc 0.7.4 compiler: "Warning: This declaration shadows an existing declaration." 1. Arguments by default are not underscored. 2. If the name isn't available due to shadowing, use prefix underscore. 3. If prefix underscore isn't available due to shadowing, use suffix underscore.
39 lines
1.2 KiB
Solidity
39 lines
1.2 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.7.0;
|
|
|
|
import "./ContextMock.sol";
|
|
import "../GSN/GSNRecipient.sol";
|
|
|
|
// By inheriting from GSNRecipient, Context's internal functions are overridden automatically
|
|
contract GSNRecipientMock is ContextMock, GSNRecipient {
|
|
function withdrawDeposits(uint256 amount, address payable payee) public {
|
|
_withdrawDeposits(amount, payee);
|
|
}
|
|
|
|
function acceptRelayedCall(address, address, bytes calldata, uint256, uint256, uint256, uint256, bytes calldata, uint256)
|
|
external
|
|
pure
|
|
override
|
|
returns (uint256, bytes memory)
|
|
{
|
|
return (0, "");
|
|
}
|
|
|
|
function _preRelayedCall(bytes memory) internal override returns (bytes32) { }
|
|
|
|
function _postRelayedCall(bytes memory, bool, uint256, bytes32) internal override { }
|
|
|
|
function upgradeRelayHub(address newRelayHub) public {
|
|
return _upgradeRelayHub(newRelayHub);
|
|
}
|
|
|
|
function _msgSender() internal override(Context, GSNRecipient) view virtual returns (address payable) {
|
|
return GSNRecipient._msgSender();
|
|
}
|
|
|
|
function _msgData() internal override(Context, GSNRecipient) view virtual returns (bytes memory) {
|
|
return GSNRecipient._msgData();
|
|
}
|
|
}
|