-
Notifications
You must be signed in to change notification settings - Fork 210
/
AcceptEverythingPaymaster.sol
44 lines (37 loc) · 1.19 KB
/
AcceptEverythingPaymaster.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;
import "@opengsn/contracts/src/BasePaymaster.sol";
// accept everything.
// this paymaster accepts any request.
//
// NOTE: Do NOT use this contract on a mainnet: it accepts anything, so anyone can "grief" it and drain its account
contract AcceptEverythingPaymaster is BasePaymaster {
function versionPaymaster() external view override virtual returns (string memory){
return "3.0.0-beta.3+opengsn.accepteverything.ipaymaster";
}
function _preRelayedCall(
GsnTypes.RelayRequest calldata relayRequest,
bytes calldata signature,
bytes calldata approvalData,
uint256 maxPossibleGas
)
internal
override
virtual
returns (bytes memory context, bool revertOnRecipientRevert) {
(relayRequest, signature, approvalData, maxPossibleGas);
return ("", false);
}
function _postRelayedCall(
bytes calldata context,
bool success,
uint256 gasUseWithoutPost,
GsnTypes.RelayData calldata relayData
)
internal
override
virtual {
(context, success, gasUseWithoutPost, relayData);
}
}