{
    "contractName": "IPaymaster",
    "abi": [
        {
            "inputs": [
                {
                    "internalType": "bytes4",
                    "name": "interfaceId",
                    "type": "bytes4"
                }
            ],
            "name": "supportsInterface",
            "outputs": [
                {
                    "internalType": "bool",
                    "name": "",
                    "type": "bool"
                }
            ],
            "stateMutability": "view",
            "type": "function"
        },
        {
            "inputs": [],
            "name": "getGasAndDataLimits",
            "outputs": [
                {
                    "components": [
                        {
                            "internalType": "uint256",
                            "name": "acceptanceBudget",
                            "type": "uint256"
                        },
                        {
                            "internalType": "uint256",
                            "name": "preRelayedCallGasLimit",
                            "type": "uint256"
                        },
                        {
                            "internalType": "uint256",
                            "name": "postRelayedCallGasLimit",
                            "type": "uint256"
                        },
                        {
                            "internalType": "uint256",
                            "name": "calldataSizeLimit",
                            "type": "uint256"
                        }
                    ],
                    "internalType": "struct IPaymaster.GasAndDataLimits",
                    "name": "limits",
                    "type": "tuple"
                }
            ],
            "stateMutability": "view",
            "type": "function"
        },
        {
            "inputs": [],
            "name": "getTrustedForwarder",
            "outputs": [
                {
                    "internalType": "address",
                    "name": "trustedForwarder",
                    "type": "address"
                }
            ],
            "stateMutability": "view",
            "type": "function"
        },
        {
            "inputs": [],
            "name": "getRelayHub",
            "outputs": [
                {
                    "internalType": "address",
                    "name": "relayHub",
                    "type": "address"
                }
            ],
            "stateMutability": "view",
            "type": "function"
        },
        {
            "inputs": [
                {
                    "components": [
                        {
                            "components": [
                                {
                                    "internalType": "address",
                                    "name": "from",
                                    "type": "address"
                                },
                                {
                                    "internalType": "address",
                                    "name": "to",
                                    "type": "address"
                                },
                                {
                                    "internalType": "uint256",
                                    "name": "value",
                                    "type": "uint256"
                                },
                                {
                                    "internalType": "uint256",
                                    "name": "gas",
                                    "type": "uint256"
                                },
                                {
                                    "internalType": "uint256",
                                    "name": "nonce",
                                    "type": "uint256"
                                },
                                {
                                    "internalType": "bytes",
                                    "name": "data",
                                    "type": "bytes"
                                },
                                {
                                    "internalType": "uint256",
                                    "name": "validUntilTime",
                                    "type": "uint256"
                                }
                            ],
                            "internalType": "struct IForwarder.ForwardRequest",
                            "name": "request",
                            "type": "tuple"
                        },
                        {
                            "components": [
                                {
                                    "internalType": "uint256",
                                    "name": "maxFeePerGas",
                                    "type": "uint256"
                                },
                                {
                                    "internalType": "uint256",
                                    "name": "maxPriorityFeePerGas",
                                    "type": "uint256"
                                },
                                {
                                    "internalType": "uint256",
                                    "name": "transactionCalldataGasUsed",
                                    "type": "uint256"
                                },
                                {
                                    "internalType": "address",
                                    "name": "relayWorker",
                                    "type": "address"
                                },
                                {
                                    "internalType": "address",
                                    "name": "paymaster",
                                    "type": "address"
                                },
                                {
                                    "internalType": "address",
                                    "name": "forwarder",
                                    "type": "address"
                                },
                                {
                                    "internalType": "bytes",
                                    "name": "paymasterData",
                                    "type": "bytes"
                                },
                                {
                                    "internalType": "uint256",
                                    "name": "clientId",
                                    "type": "uint256"
                                }
                            ],
                            "internalType": "struct GsnTypes.RelayData",
                            "name": "relayData",
                            "type": "tuple"
                        }
                    ],
                    "internalType": "struct GsnTypes.RelayRequest",
                    "name": "relayRequest",
                    "type": "tuple"
                },
                {
                    "internalType": "bytes",
                    "name": "signature",
                    "type": "bytes"
                },
                {
                    "internalType": "bytes",
                    "name": "approvalData",
                    "type": "bytes"
                },
                {
                    "internalType": "uint256",
                    "name": "maxPossibleGas",
                    "type": "uint256"
                }
            ],
            "name": "preRelayedCall",
            "outputs": [
                {
                    "internalType": "bytes",
                    "name": "context",
                    "type": "bytes"
                },
                {
                    "internalType": "bool",
                    "name": "rejectOnRecipientRevert",
                    "type": "bool"
                }
            ],
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "inputs": [
                {
                    "internalType": "bytes",
                    "name": "context",
                    "type": "bytes"
                },
                {
                    "internalType": "bool",
                    "name": "success",
                    "type": "bool"
                },
                {
                    "internalType": "uint256",
                    "name": "gasUseWithoutPost",
                    "type": "uint256"
                },
                {
                    "components": [
                        {
                            "internalType": "uint256",
                            "name": "maxFeePerGas",
                            "type": "uint256"
                        },
                        {
                            "internalType": "uint256",
                            "name": "maxPriorityFeePerGas",
                            "type": "uint256"
                        },
                        {
                            "internalType": "uint256",
                            "name": "transactionCalldataGasUsed",
                            "type": "uint256"
                        },
                        {
                            "internalType": "address",
                            "name": "relayWorker",
                            "type": "address"
                        },
                        {
                            "internalType": "address",
                            "name": "paymaster",
                            "type": "address"
                        },
                        {
                            "internalType": "address",
                            "name": "forwarder",
                            "type": "address"
                        },
                        {
                            "internalType": "bytes",
                            "name": "paymasterData",
                            "type": "bytes"
                        },
                        {
                            "internalType": "uint256",
                            "name": "clientId",
                            "type": "uint256"
                        }
                    ],
                    "internalType": "struct GsnTypes.RelayData",
                    "name": "relayData",
                    "type": "tuple"
                }
            ],
            "name": "postRelayedCall",
            "outputs": [],
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "inputs": [],
            "name": "versionPaymaster",
            "outputs": [
                {
                    "internalType": "string",
                    "name": "",
                    "type": "string"
                }
            ],
            "stateMutability": "view",
            "type": "function"
        }
    ],
    "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getGasAndDataLimits\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"acceptanceBudget\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"preRelayedCallGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"postRelayedCallGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"calldataSizeLimit\",\"type\":\"uint256\"}],\"internalType\":\"struct IPaymaster.GasAndDataLimits\",\"name\":\"limits\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRelayHub\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"relayHub\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTrustedForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"trustedForwarder\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"context\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUseWithoutPost\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"maxFeePerGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxPriorityFeePerGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transactionCalldataGasUsed\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayWorker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"paymaster\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"paymasterData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"clientId\",\"type\":\"uint256\"}],\"internalType\":\"struct GsnTypes.RelayData\",\"name\":\"relayData\",\"type\":\"tuple\"}],\"name\":\"postRelayedCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"validUntilTime\",\"type\":\"uint256\"}],\"internalType\":\"struct IForwarder.ForwardRequest\",\"name\":\"request\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"maxFeePerGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxPriorityFeePerGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transactionCalldataGasUsed\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"relayWorker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"paymaster\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"paymasterData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"clientId\",\"type\":\"uint256\"}],\"internalType\":\"struct GsnTypes.RelayData\",\"name\":\"relayData\",\"type\":\"tuple\"}],\"internalType\":\"struct GsnTypes.RelayRequest\",\"name\":\"relayRequest\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"approvalData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maxPossibleGas\",\"type\":\"uint256\"}],\"name\":\"preRelayedCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"context\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"rejectOnRecipientRevert\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"versionPaymaster\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getGasAndDataLimits()\":{\"returns\":{\"limits\":\"An instance of the `GasAndDataLimits` struct ##### `acceptanceBudget` If the transactions consumes more than `acceptanceBudget` this Paymaster will be charged for gas no matter what. Transaction that gets rejected after consuming more than `acceptanceBudget` gas is on this Paymaster's expense. Should be set to an amount gas this Paymaster expects to spend deciding whether to accept or reject a request. This includes gas consumed by calculations in the `preRelayedCall`, `Forwarder` and the recipient contract. :warning: **Warning** :warning: As long this value is above `preRelayedCallGasLimit` (see defaults in `BasePaymaster`), the Paymaster is guaranteed it will never pay for rejected transactions. If this value is below `preRelayedCallGasLimit`, it might might make Paymaster open to a \\\"griefing\\\" attack. The relayers should prefer lower `acceptanceBudget`, as it improves their chances of being compensated. From a Relay's point of view, this is the highest gas value a bad Paymaster may cost the relay, since the paymaster will pay anything above that value regardless of whether the transaction succeeds or reverts. Specifying value too high might make the call rejected by relayers (see `maxAcceptanceBudget` in server config). ##### `preRelayedCallGasLimit` The max gas usage of preRelayedCall. Any revert of the `preRelayedCall` is a request rejection by the paymaster. As long as `acceptanceBudget` is above `preRelayedCallGasLimit`, any such revert is not payed by the paymaster. ##### `postRelayedCallGasLimit` The max gas usage of postRelayedCall. The Paymaster is not charged for the maximum, only for actually used gas. Note that an OOG will revert the inner transaction, but the paymaster will be charged for it anyway.\"}},\"getRelayHub()\":{\"returns\":{\"relayHub\":\"The address of the `RelayHub` that is trusted by this Paymaster to execute the requests.\"}},\"getTrustedForwarder()\":{\"returns\":{\"trustedForwarder\":\"The address of the `Forwarder` that is trusted by this Paymaster to execute the requests.\"}},\"postRelayedCall(bytes,bool,uint256,(uint256,uint256,uint256,address,address,address,bytes,uint256))\":{\"params\":{\"context\":\"The call context, as returned by the preRelayedCall\",\"gasUseWithoutPost\":\"The actual amount of gas used by the entire transaction, EXCEPT        the gas used by the postRelayedCall itself.\",\"relayData\":\"The relay params of the request. can be used by relayHub.calculateCharge()\",\"success\":\"`true` if the relayed call succeeded, false if it reverted\"}},\"preRelayedCall(((address,address,uint256,uint256,uint256,bytes,uint256),(uint256,uint256,uint256,address,address,address,bytes,uint256)),bytes,bytes,uint256)\":{\"params\":{\"approvalData\":\"- extra dapp-specific data (e.g. signature from trusted party)\",\"maxPossibleGas\":\"- based on values returned from `getGasAndDataLimits` the RelayHub will calculate the maximum possible amount of gas the user may be charged for. In order to convert this value to wei, the Paymaster has to call \\\"relayHub.calculateCharge()\\\"\",\"relayRequest\":\"- the full relay request structure\",\"signature\":\"- user's EIP712-compatible signature of the `relayRequest`. Note that in most cases the paymaster shouldn't try use it at all. It is always checked by the forwarder immediately after preRelayedCall returns.\"},\"returns\":{\"context\":\"A byte array to be passed to postRelayedCall. Can contain any data needed by this Paymaster in any form or be empty if no extra data is needed.\",\"rejectOnRecipientRevert\":\"The flag that allows a Paymaster to \\\"delegate\\\" the rejection to the recipient code. It also means the Paymaster trust the recipient to reject fast: both preRelayedCall, forwarder check and recipient checks must fit into the GasLimits.acceptanceBudget, otherwise the TX is paid by the Paymaster. `true` if the Paymaster wants to reject the TX if the recipient reverts. `false` if the Paymaster wants rejects by the recipient to be completed on chain and paid by the Paymaster.\"}},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"},\"versionPaymaster()\":{\"returns\":{\"_0\":\"version The SemVer string of this Paymaster's version.\"}}},\"title\":\"The Paymaster Interface\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getGasAndDataLimits()\":{\"notice\":\"Return the Gas Limits for Paymaster's functions and maximum msg.data length values for this Paymaster. This function allows different paymasters to have different properties without changes to the RelayHub.\"},\"getTrustedForwarder()\":{\"notice\":\":warning: **Warning** :warning: using incorrect Forwarder may cause the Paymaster to agreeing to pay for invalid transactions.\"},\"postRelayedCall(bytes,bool,uint256,(uint256,uint256,uint256,address,address,address,bytes,uint256))\":{\"notice\":\"This method is called after the actual relayed function call. It may be used to record the transaction (e.g. charge the caller by some contract logic) for this call. Revert in this functions causes a revert of the client's relayed call (and preRelayedCall(), but the Paymaster is still committed to pay the relay for the entire transaction.\"},\"preRelayedCall(((address,address,uint256,uint256,uint256,bytes,uint256),(uint256,uint256,uint256,address,address,address,bytes,uint256)),bytes,bytes,uint256)\":{\"notice\":\"Called by the Relay in view mode and later by the `RelayHub` on-chain to validate that the Paymaster agrees to pay for this call. The request is considered to be rejected by the Paymaster in one of the following conditions:  - `preRelayedCall()` method reverts  - the `Forwarder` reverts because of nonce or signature error  - the `Paymaster` returned `rejectOnRecipientRevert: true` and the recipient contract reverted    (and all that did not consume more than `acceptanceBudget` gas). In any of the above cases, all Paymaster calls and the recipient call are reverted. In any other case the Paymaster will pay for the gas cost of the transaction. Note that even if `postRelayedCall` is reverted the Paymaster will be charged.\"}},\"notice\":\"Contracts implementing this interface exist to make decision about paying the transaction fee to the relay.There are two callbacks here that are executed by the RelayHub: `preRelayedCall` and `postRelayedCall`.It is recommended that your implementation inherits from the abstract BasePaymaster contract.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/alexf/gsn2/packages/contracts/solpp/interfaces/IPaymaster.sol\":\"IPaymaster\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/alexf/gsn2/packages/contracts/solpp/forwarder/IForwarder.sol\":{\"keccak256\":\"0xef3d770001c3245db4408cdd0afdfc622695ccfe31f28b74571d05158bbf83f8\",\"license\":\"GPL-3.0-only\",\"urls\":[\"bzz-raw://08949174ed05b596d89c8f1eeedfeb254993b84054bbc1ff6081ad926f5db406\",\"dweb:/ipfs/QmNQtKzHpie4Esocxuc9YrPtGQyA928a1a5TWbVc7cPoqk\"]},\"/Users/alexf/gsn2/packages/contracts/solpp/interfaces/IPaymaster.sol\":{\"keccak256\":\"0x205617108fad6f3543fc12773e9d25998e944852e8ed9d71f79cb799ae299246\",\"license\":\"GPL-3.0-only\",\"urls\":[\"bzz-raw://4903018f63b15211f2714edcf1c56f5c0bee6fea07efaaf908d3a78d07fb6d84\",\"dweb:/ipfs/Qmezexeh6GszFUHW2dgTGWTfb613Ni3tfjLqAtdAYAxCpQ\"]},\"/Users/alexf/gsn2/packages/contracts/solpp/utils/GsnTypes.sol\":{\"keccak256\":\"0xfc3ed2bbd925e24facf0c3bb96d57dd7fc5bcc4a684b5473f04e8d209b758805\",\"license\":\"GPL-3.0-only\",\"urls\":[\"bzz-raw://cb57b5b38d3e588f119ae45174891f2049d1d0de160a12b81a20335cd8bf731b\",\"dweb:/ipfs/Qmf6xfbdLbTKEpnzxwnSaRy1YZJtLYTZh8URqry86oyoSU\"]},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0xd04b0f06e0666f29cf7cccc82894de541e19bb30a765b107b1e40bb7fe5f7d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7b652499d098e88d8d878374616bb58434301061cae2253298b3f374044e0ddb\",\"dweb:/ipfs/QmbhAzctqo5jrSKU6idHdVyqfmzCcDbNUPvmx4GiXxfA6q\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]}},\"version\":1}",
    "bytecode": "0x",
    "deployedBytecode": "0x",
    "immutableReferences": {},
    "sourceMap": "",
    "deployedSourceMap": "",
    "source": "pragma solidity >=0.7.6;\npragma abicoder v2;\n\n// SPDX-License-Identifier: GPL-3.0-only\n\nimport \"@openzeppelin/contracts/interfaces/IERC165.sol\";\n\nimport \"../utils/GsnTypes.sol\";\n\n/**\n * @title The Paymaster Interface\n * @notice Contracts implementing this interface exist to make decision about paying the transaction fee to the relay.\n *\n * @notice There are two callbacks here that are executed by the RelayHub: `preRelayedCall` and `postRelayedCall`.\n *\n * @notice It is recommended that your implementation inherits from the abstract BasePaymaster contract.\n*/\ninterface IPaymaster is IERC165 {\n    /**\n     * @notice The limits this Paymaster wants to be imposed by the RelayHub on user input. See `getGasAndDataLimits`.\n     */\n    struct GasAndDataLimits {\n        uint256 acceptanceBudget;\n        uint256 preRelayedCallGasLimit;\n        uint256 postRelayedCallGasLimit;\n        uint256 calldataSizeLimit;\n    }\n\n    /**\n     * @notice Return the Gas Limits for Paymaster's functions and maximum msg.data length values for this Paymaster.\n     * This function allows different paymasters to have different properties without changes to the RelayHub.\n     * @return limits An instance of the `GasAndDataLimits` struct\n     *\n     * ##### `acceptanceBudget`\n     * If the transactions consumes more than `acceptanceBudget` this Paymaster will be charged for gas no matter what.\n     * Transaction that gets rejected after consuming more than `acceptanceBudget` gas is on this Paymaster's expense.\n     *\n     * Should be set to an amount gas this Paymaster expects to spend deciding whether to accept or reject a request.\n     * This includes gas consumed by calculations in the `preRelayedCall`, `Forwarder` and the recipient contract.\n     *\n     * :warning: **Warning** :warning: As long this value is above `preRelayedCallGasLimit`\n     * (see defaults in `BasePaymaster`), the Paymaster is guaranteed it will never pay for rejected transactions.\n     * If this value is below `preRelayedCallGasLimit`, it might might make Paymaster open to a \"griefing\" attack.\n     *\n     * The relayers should prefer lower `acceptanceBudget`, as it improves their chances of being compensated.\n     * From a Relay's point of view, this is the highest gas value a bad Paymaster may cost the relay,\n     * since the paymaster will pay anything above that value regardless of whether the transaction succeeds or reverts.\n     * Specifying value too high might make the call rejected by relayers (see `maxAcceptanceBudget` in server config).\n     *\n     * ##### `preRelayedCallGasLimit`\n     * The max gas usage of preRelayedCall. Any revert of the `preRelayedCall` is a request rejection by the paymaster.\n     * As long as `acceptanceBudget` is above `preRelayedCallGasLimit`, any such revert is not payed by the paymaster.\n     *\n     * ##### `postRelayedCallGasLimit`\n     * The max gas usage of postRelayedCall. The Paymaster is not charged for the maximum, only for actually used gas.\n     * Note that an OOG will revert the inner transaction, but the paymaster will be charged for it anyway.\n     */\n    function getGasAndDataLimits()\n    external\n    view\n    returns (\n        GasAndDataLimits memory limits\n    );\n\n    /**\n     * @notice :warning: **Warning** :warning: using incorrect Forwarder may cause the Paymaster to agreeing to pay for invalid transactions.\n     * @return trustedForwarder The address of the `Forwarder` that is trusted by this Paymaster to execute the requests.\n     */\n    function getTrustedForwarder() external view returns (address trustedForwarder);\n\n    /**\n     * @return relayHub The address of the `RelayHub` that is trusted by this Paymaster to execute the requests.\n     */\n    function getRelayHub() external view returns (address relayHub);\n\n    /**\n     * @notice Called by the Relay in view mode and later by the `RelayHub` on-chain to validate that\n     * the Paymaster agrees to pay for this call.\n     *\n     * The request is considered to be rejected by the Paymaster in one of the following conditions:\n     *  - `preRelayedCall()` method reverts\n     *  - the `Forwarder` reverts because of nonce or signature error\n     *  - the `Paymaster` returned `rejectOnRecipientRevert: true` and the recipient contract reverted\n     *    (and all that did not consume more than `acceptanceBudget` gas).\n     *\n     * In any of the above cases, all Paymaster calls and the recipient call are reverted.\n     * In any other case the Paymaster will pay for the gas cost of the transaction.\n     * Note that even if `postRelayedCall` is reverted the Paymaster will be charged.\n     *\n\n     * @param relayRequest - the full relay request structure\n     * @param signature - user's EIP712-compatible signature of the `relayRequest`.\n     * Note that in most cases the paymaster shouldn't try use it at all. It is always checked\n     * by the forwarder immediately after preRelayedCall returns.\n     * @param approvalData - extra dapp-specific data (e.g. signature from trusted party)\n     * @param maxPossibleGas - based on values returned from `getGasAndDataLimits`\n     * the RelayHub will calculate the maximum possible amount of gas the user may be charged for.\n     * In order to convert this value to wei, the Paymaster has to call \"relayHub.calculateCharge()\"\n     *\n     * @return context\n     * A byte array to be passed to postRelayedCall.\n     * Can contain any data needed by this Paymaster in any form or be empty if no extra data is needed.\n     * @return rejectOnRecipientRevert\n     * The flag that allows a Paymaster to \"delegate\" the rejection to the recipient code.\n     * It also means the Paymaster trust the recipient to reject fast: both preRelayedCall,\n     * forwarder check and recipient checks must fit into the GasLimits.acceptanceBudget,\n     * otherwise the TX is paid by the Paymaster.\n     * `true` if the Paymaster wants to reject the TX if the recipient reverts.\n     * `false` if the Paymaster wants rejects by the recipient to be completed on chain and paid by the Paymaster.\n     */\n    function preRelayedCall(\n        GsnTypes.RelayRequest calldata relayRequest,\n        bytes calldata signature,\n        bytes calldata approvalData,\n        uint256 maxPossibleGas\n    )\n    external\n    returns (bytes memory context, bool rejectOnRecipientRevert);\n\n    /**\n     * @notice This method is called after the actual relayed function call.\n     * It may be used to record the transaction (e.g. charge the caller by some contract logic) for this call.\n     *\n     * Revert in this functions causes a revert of the client's relayed call (and preRelayedCall(), but the Paymaster\n     * is still committed to pay the relay for the entire transaction.\n     *\n     * @param context The call context, as returned by the preRelayedCall\n     * @param success `true` if the relayed call succeeded, false if it reverted\n     * @param gasUseWithoutPost The actual amount of gas used by the entire transaction, EXCEPT\n     *        the gas used by the postRelayedCall itself.\n     * @param relayData The relay params of the request. can be used by relayHub.calculateCharge()\n     *\n     */\n    function postRelayedCall(\n        bytes calldata context,\n        bool success,\n        uint256 gasUseWithoutPost,\n        GsnTypes.RelayData calldata relayData\n    ) external;\n\n    /**\n     * @return version The SemVer string of this Paymaster's version.\n     */\n    function versionPaymaster() external view returns (string memory);\n}",
    "sourcePath": "/Users/alexf/gsn2/packages/contracts/solpp/interfaces/IPaymaster.sol",
    "ast": {
        "absolutePath": "/Users/alexf/gsn2/packages/contracts/solpp/interfaces/IPaymaster.sol",
        "exportedSymbols": {
            "GsnTypes": [
                8492
            ],
            "IERC165": [
                12352
            ],
            "IForwarder": [
                5129
            ],
            "IPaymaster": [
                5447
            ]
        },
        "id": 5448,
        "license": "GPL-3.0-only",
        "nodeType": "SourceUnit",
        "nodes": [
            {
                "id": 5376,
                "literals": [
                    "solidity",
                    ">=",
                    "0.7",
                    ".6"
                ],
                "nodeType": "PragmaDirective",
                "src": "0:24:14"
            },
            {
                "id": 5377,
                "literals": [
                    "abicoder",
                    "v2"
                ],
                "nodeType": "PragmaDirective",
                "src": "25:19:14"
            },
            {
                "absolutePath": "@openzeppelin/contracts/interfaces/IERC165.sol",
                "file": "@openzeppelin/contracts/interfaces/IERC165.sol",
                "id": 5378,
                "nameLocation": "-1:-1:-1",
                "nodeType": "ImportDirective",
                "scope": 5448,
                "sourceUnit": 10186,
                "src": "88:56:14",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "absolutePath": "/Users/alexf/gsn2/packages/contracts/solpp/utils/GsnTypes.sol",
                "file": "../utils/GsnTypes.sol",
                "id": 5379,
                "nameLocation": "-1:-1:-1",
                "nodeType": "ImportDirective",
                "scope": 5448,
                "sourceUnit": 8493,
                "src": "146:31:14",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "abstract": false,
                "baseContracts": [
                    {
                        "baseName": {
                            "id": 5381,
                            "name": "IERC165",
                            "nodeType": "IdentifierPath",
                            "referencedDeclaration": 12352,
                            "src": "589:7:14"
                        },
                        "id": 5382,
                        "nodeType": "InheritanceSpecifier",
                        "src": "589:7:14"
                    }
                ],
                "contractDependencies": [],
                "contractKind": "interface",
                "documentation": {
                    "id": 5380,
                    "nodeType": "StructuredDocumentation",
                    "src": "179:385:14",
                    "text": " @title The Paymaster Interface\n @notice Contracts implementing this interface exist to make decision about paying the transaction fee to the relay.\n @notice There are two callbacks here that are executed by the RelayHub: `preRelayedCall` and `postRelayedCall`.\n @notice It is recommended that your implementation inherits from the abstract BasePaymaster contract."
                },
                "fullyImplemented": false,
                "id": 5447,
                "linearizedBaseContracts": [
                    5447,
                    12352
                ],
                "name": "IPaymaster",
                "nameLocation": "575:10:14",
                "nodeType": "ContractDefinition",
                "nodes": [
                    {
                        "canonicalName": "IPaymaster.GasAndDataLimits",
                        "id": 5391,
                        "members": [
                            {
                                "constant": false,
                                "id": 5384,
                                "mutability": "mutable",
                                "name": "acceptanceBudget",
                                "nameLocation": "780:16:14",
                                "nodeType": "VariableDeclaration",
                                "scope": 5391,
                                "src": "772:24:14",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                },
                                "typeName": {
                                    "id": 5383,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "772:7:14",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    }
                                },
                                "visibility": "internal"
                            },
                            {
                                "constant": false,
                                "id": 5386,
                                "mutability": "mutable",
                                "name": "preRelayedCallGasLimit",
                                "nameLocation": "814:22:14",
                                "nodeType": "VariableDeclaration",
                                "scope": 5391,
                                "src": "806:30:14",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                },
                                "typeName": {
                                    "id": 5385,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "806:7:14",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    }
                                },
                                "visibility": "internal"
                            },
                            {
                                "constant": false,
                                "id": 5388,
                                "mutability": "mutable",
                                "name": "postRelayedCallGasLimit",
                                "nameLocation": "854:23:14",
                                "nodeType": "VariableDeclaration",
                                "scope": 5391,
                                "src": "846:31:14",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                },
                                "typeName": {
                                    "id": 5387,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "846:7:14",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    }
                                },
                                "visibility": "internal"
                            },
                            {
                                "constant": false,
                                "id": 5390,
                                "mutability": "mutable",
                                "name": "calldataSizeLimit",
                                "nameLocation": "895:17:14",
                                "nodeType": "VariableDeclaration",
                                "scope": 5391,
                                "src": "887:25:14",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                },
                                "typeName": {
                                    "id": 5389,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "887:7:14",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    }
                                },
                                "visibility": "internal"
                            }
                        ],
                        "name": "GasAndDataLimits",
                        "nameLocation": "745:16:14",
                        "nodeType": "StructDefinition",
                        "scope": 5447,
                        "src": "738:181:14",
                        "visibility": "public"
                    },
                    {
                        "documentation": {
                            "id": 5392,
                            "nodeType": "StructuredDocumentation",
                            "src": "925:2173:14",
                            "text": " @notice Return the Gas Limits for Paymaster's functions and maximum msg.data length values for this Paymaster.\n This function allows different paymasters to have different properties without changes to the RelayHub.\n @return limits An instance of the `GasAndDataLimits` struct\n ##### `acceptanceBudget`\n If the transactions consumes more than `acceptanceBudget` this Paymaster will be charged for gas no matter what.\n Transaction that gets rejected after consuming more than `acceptanceBudget` gas is on this Paymaster's expense.\n Should be set to an amount gas this Paymaster expects to spend deciding whether to accept or reject a request.\n This includes gas consumed by calculations in the `preRelayedCall`, `Forwarder` and the recipient contract.\n :warning: **Warning** :warning: As long this value is above `preRelayedCallGasLimit`\n (see defaults in `BasePaymaster`), the Paymaster is guaranteed it will never pay for rejected transactions.\n If this value is below `preRelayedCallGasLimit`, it might might make Paymaster open to a \"griefing\" attack.\n The relayers should prefer lower `acceptanceBudget`, as it improves their chances of being compensated.\n From a Relay's point of view, this is the highest gas value a bad Paymaster may cost the relay,\n since the paymaster will pay anything above that value regardless of whether the transaction succeeds or reverts.\n Specifying value too high might make the call rejected by relayers (see `maxAcceptanceBudget` in server config).\n ##### `preRelayedCallGasLimit`\n The max gas usage of preRelayedCall. Any revert of the `preRelayedCall` is a request rejection by the paymaster.\n As long as `acceptanceBudget` is above `preRelayedCallGasLimit`, any such revert is not payed by the paymaster.\n ##### `postRelayedCallGasLimit`\n The max gas usage of postRelayedCall. The Paymaster is not charged for the maximum, only for actually used gas.\n Note that an OOG will revert the inner transaction, but the paymaster will be charged for it anyway."
                        },
                        "functionSelector": "b039a88f",
                        "id": 5398,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "getGasAndDataLimits",
                        "nameLocation": "3112:19:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5393,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "3131:2:14"
                        },
                        "returnParameters": {
                            "id": 5397,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5396,
                                    "mutability": "mutable",
                                    "name": "limits",
                                    "nameLocation": "3202:6:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5398,
                                    "src": "3178:30:14",
                                    "stateVariable": false,
                                    "storageLocation": "memory",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_GasAndDataLimits_$5391_memory_ptr",
                                        "typeString": "struct IPaymaster.GasAndDataLimits"
                                    },
                                    "typeName": {
                                        "id": 5395,
                                        "nodeType": "UserDefinedTypeName",
                                        "pathNode": {
                                            "id": 5394,
                                            "name": "GasAndDataLimits",
                                            "nodeType": "IdentifierPath",
                                            "referencedDeclaration": 5391,
                                            "src": "3178:16:14"
                                        },
                                        "referencedDeclaration": 5391,
                                        "src": "3178:16:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_GasAndDataLimits_$5391_storage_ptr",
                                            "typeString": "struct IPaymaster.GasAndDataLimits"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "3168:46:14"
                        },
                        "scope": 5447,
                        "src": "3103:112:14",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5399,
                            "nodeType": "StructuredDocumentation",
                            "src": "3221:275:14",
                            "text": " @notice :warning: **Warning** :warning: using incorrect Forwarder may cause the Paymaster to agreeing to pay for invalid transactions.\n @return trustedForwarder The address of the `Forwarder` that is trusted by this Paymaster to execute the requests."
                        },
                        "functionSelector": "ce1b815f",
                        "id": 5404,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "getTrustedForwarder",
                        "nameLocation": "3510:19:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5400,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "3529:2:14"
                        },
                        "returnParameters": {
                            "id": 5403,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5402,
                                    "mutability": "mutable",
                                    "name": "trustedForwarder",
                                    "nameLocation": "3563:16:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5404,
                                    "src": "3555:24:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5401,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "3555:7:14",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "3554:26:14"
                        },
                        "scope": 5447,
                        "src": "3501:80:14",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5405,
                            "nodeType": "StructuredDocumentation",
                            "src": "3587:124:14",
                            "text": " @return relayHub The address of the `RelayHub` that is trusted by this Paymaster to execute the requests."
                        },
                        "functionSelector": "7bdf2ec7",
                        "id": 5410,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "getRelayHub",
                        "nameLocation": "3725:11:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5406,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "3736:2:14"
                        },
                        "returnParameters": {
                            "id": 5409,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5408,
                                    "mutability": "mutable",
                                    "name": "relayHub",
                                    "nameLocation": "3770:8:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5410,
                                    "src": "3762:16:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5407,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "3762:7:14",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "3761:18:14"
                        },
                        "scope": 5447,
                        "src": "3716:64:14",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5411,
                            "nodeType": "StructuredDocumentation",
                            "src": "3786:2265:14",
                            "text": " @notice Called by the Relay in view mode and later by the `RelayHub` on-chain to validate that\n the Paymaster agrees to pay for this call.\n The request is considered to be rejected by the Paymaster in one of the following conditions:\n  - `preRelayedCall()` method reverts\n  - the `Forwarder` reverts because of nonce or signature error\n  - the `Paymaster` returned `rejectOnRecipientRevert: true` and the recipient contract reverted\n    (and all that did not consume more than `acceptanceBudget` gas).\n In any of the above cases, all Paymaster calls and the recipient call are reverted.\n In any other case the Paymaster will pay for the gas cost of the transaction.\n Note that even if `postRelayedCall` is reverted the Paymaster will be charged.\n @param relayRequest - the full relay request structure\n @param signature - user's EIP712-compatible signature of the `relayRequest`.\n Note that in most cases the paymaster shouldn't try use it at all. It is always checked\n by the forwarder immediately after preRelayedCall returns.\n @param approvalData - extra dapp-specific data (e.g. signature from trusted party)\n @param maxPossibleGas - based on values returned from `getGasAndDataLimits`\n the RelayHub will calculate the maximum possible amount of gas the user may be charged for.\n In order to convert this value to wei, the Paymaster has to call \"relayHub.calculateCharge()\"\n @return context\n A byte array to be passed to postRelayedCall.\n Can contain any data needed by this Paymaster in any form or be empty if no extra data is needed.\n @return rejectOnRecipientRevert\n The flag that allows a Paymaster to \"delegate\" the rejection to the recipient code.\n It also means the Paymaster trust the recipient to reject fast: both preRelayedCall,\n forwarder check and recipient checks must fit into the GasLimits.acceptanceBudget,\n otherwise the TX is paid by the Paymaster.\n `true` if the Paymaster wants to reject the TX if the recipient reverts.\n `false` if the Paymaster wants rejects by the recipient to be completed on chain and paid by the Paymaster."
                        },
                        "functionSelector": "00be5dd4",
                        "id": 5427,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "preRelayedCall",
                        "nameLocation": "6065:14:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5421,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5414,
                                    "mutability": "mutable",
                                    "name": "relayRequest",
                                    "nameLocation": "6120:12:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6089:43:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_RelayRequest_$8491_calldata_ptr",
                                        "typeString": "struct GsnTypes.RelayRequest"
                                    },
                                    "typeName": {
                                        "id": 5413,
                                        "nodeType": "UserDefinedTypeName",
                                        "pathNode": {
                                            "id": 5412,
                                            "name": "GsnTypes.RelayRequest",
                                            "nodeType": "IdentifierPath",
                                            "referencedDeclaration": 8491,
                                            "src": "6089:21:14"
                                        },
                                        "referencedDeclaration": 8491,
                                        "src": "6089:21:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_RelayRequest_$8491_storage_ptr",
                                            "typeString": "struct GsnTypes.RelayRequest"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5416,
                                    "mutability": "mutable",
                                    "name": "signature",
                                    "nameLocation": "6157:9:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6142:24:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_calldata_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5415,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6142:5:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5418,
                                    "mutability": "mutable",
                                    "name": "approvalData",
                                    "nameLocation": "6191:12:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6176:27:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_calldata_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5417,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6176:5:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5420,
                                    "mutability": "mutable",
                                    "name": "maxPossibleGas",
                                    "nameLocation": "6221:14:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6213:22:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    },
                                    "typeName": {
                                        "id": 5419,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6213:7:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "6079:162:14"
                        },
                        "returnParameters": {
                            "id": 5426,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5423,
                                    "mutability": "mutable",
                                    "name": "context",
                                    "nameLocation": "6281:7:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6268:20:14",
                                    "stateVariable": false,
                                    "storageLocation": "memory",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5422,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6268:5:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5425,
                                    "mutability": "mutable",
                                    "name": "rejectOnRecipientRevert",
                                    "nameLocation": "6295:23:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6290:28:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                    },
                                    "typeName": {
                                        "id": 5424,
                                        "name": "bool",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6290:4:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "6267:52:14"
                        },
                        "scope": 5447,
                        "src": "6056:264:14",
                        "stateMutability": "nonpayable",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5428,
                            "nodeType": "StructuredDocumentation",
                            "src": "6326:817:14",
                            "text": " @notice This method is called after the actual relayed function call.\n It may be used to record the transaction (e.g. charge the caller by some contract logic) for this call.\n Revert in this functions causes a revert of the client's relayed call (and preRelayedCall(), but the Paymaster\n is still committed to pay the relay for the entire transaction.\n @param context The call context, as returned by the preRelayedCall\n @param success `true` if the relayed call succeeded, false if it reverted\n @param gasUseWithoutPost The actual amount of gas used by the entire transaction, EXCEPT\n        the gas used by the postRelayedCall itself.\n @param relayData The relay params of the request. can be used by relayHub.calculateCharge()"
                        },
                        "functionSelector": "76fa01c3",
                        "id": 5440,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "postRelayedCall",
                        "nameLocation": "7157:15:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5438,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5430,
                                    "mutability": "mutable",
                                    "name": "context",
                                    "nameLocation": "7197:7:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5440,
                                    "src": "7182:22:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_calldata_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5429,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "7182:5:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5432,
                                    "mutability": "mutable",
                                    "name": "success",
                                    "nameLocation": "7219:7:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5440,
                                    "src": "7214:12:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                    },
                                    "typeName": {
                                        "id": 5431,
                                        "name": "bool",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "7214:4:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5434,
                                    "mutability": "mutable",
                                    "name": "gasUseWithoutPost",
                                    "nameLocation": "7244:17:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5440,
                                    "src": "7236:25:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    },
                                    "typeName": {
                                        "id": 5433,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "7236:7:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5437,
                                    "mutability": "mutable",
                                    "name": "relayData",
                                    "nameLocation": "7299:9:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5440,
                                    "src": "7271:37:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_RelayData_$8484_calldata_ptr",
                                        "typeString": "struct GsnTypes.RelayData"
                                    },
                                    "typeName": {
                                        "id": 5436,
                                        "nodeType": "UserDefinedTypeName",
                                        "pathNode": {
                                            "id": 5435,
                                            "name": "GsnTypes.RelayData",
                                            "nodeType": "IdentifierPath",
                                            "referencedDeclaration": 8484,
                                            "src": "7271:18:14"
                                        },
                                        "referencedDeclaration": 8484,
                                        "src": "7271:18:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_RelayData_$8484_storage_ptr",
                                            "typeString": "struct GsnTypes.RelayData"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "7172:142:14"
                        },
                        "returnParameters": {
                            "id": 5439,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "7323:0:14"
                        },
                        "scope": 5447,
                        "src": "7148:176:14",
                        "stateMutability": "nonpayable",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5441,
                            "nodeType": "StructuredDocumentation",
                            "src": "7330:81:14",
                            "text": " @return version The SemVer string of this Paymaster's version."
                        },
                        "functionSelector": "921276ea",
                        "id": 5446,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "versionPaymaster",
                        "nameLocation": "7425:16:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5442,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "7441:2:14"
                        },
                        "returnParameters": {
                            "id": 5445,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5444,
                                    "mutability": "mutable",
                                    "name": "",
                                    "nameLocation": "-1:-1:-1",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5446,
                                    "src": "7467:13:14",
                                    "stateVariable": false,
                                    "storageLocation": "memory",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_string_memory_ptr",
                                        "typeString": "string"
                                    },
                                    "typeName": {
                                        "id": 5443,
                                        "name": "string",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "7467:6:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_string_storage_ptr",
                                            "typeString": "string"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "7466:15:14"
                        },
                        "scope": 5447,
                        "src": "7416:66:14",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "external"
                    }
                ],
                "scope": 5448,
                "src": "565:6919:14",
                "usedErrors": []
            }
        ],
        "src": "0:7484:14"
    },
    "legacyAST": {
        "absolutePath": "/Users/alexf/gsn2/packages/contracts/solpp/interfaces/IPaymaster.sol",
        "exportedSymbols": {
            "GsnTypes": [
                8492
            ],
            "IERC165": [
                12352
            ],
            "IForwarder": [
                5129
            ],
            "IPaymaster": [
                5447
            ]
        },
        "id": 5448,
        "license": "GPL-3.0-only",
        "nodeType": "SourceUnit",
        "nodes": [
            {
                "id": 5376,
                "literals": [
                    "solidity",
                    ">=",
                    "0.7",
                    ".6"
                ],
                "nodeType": "PragmaDirective",
                "src": "0:24:14"
            },
            {
                "id": 5377,
                "literals": [
                    "abicoder",
                    "v2"
                ],
                "nodeType": "PragmaDirective",
                "src": "25:19:14"
            },
            {
                "absolutePath": "@openzeppelin/contracts/interfaces/IERC165.sol",
                "file": "@openzeppelin/contracts/interfaces/IERC165.sol",
                "id": 5378,
                "nameLocation": "-1:-1:-1",
                "nodeType": "ImportDirective",
                "scope": 5448,
                "sourceUnit": 10186,
                "src": "88:56:14",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "absolutePath": "/Users/alexf/gsn2/packages/contracts/solpp/utils/GsnTypes.sol",
                "file": "../utils/GsnTypes.sol",
                "id": 5379,
                "nameLocation": "-1:-1:-1",
                "nodeType": "ImportDirective",
                "scope": 5448,
                "sourceUnit": 8493,
                "src": "146:31:14",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "abstract": false,
                "baseContracts": [
                    {
                        "baseName": {
                            "id": 5381,
                            "name": "IERC165",
                            "nodeType": "IdentifierPath",
                            "referencedDeclaration": 12352,
                            "src": "589:7:14"
                        },
                        "id": 5382,
                        "nodeType": "InheritanceSpecifier",
                        "src": "589:7:14"
                    }
                ],
                "contractDependencies": [],
                "contractKind": "interface",
                "documentation": {
                    "id": 5380,
                    "nodeType": "StructuredDocumentation",
                    "src": "179:385:14",
                    "text": " @title The Paymaster Interface\n @notice Contracts implementing this interface exist to make decision about paying the transaction fee to the relay.\n @notice There are two callbacks here that are executed by the RelayHub: `preRelayedCall` and `postRelayedCall`.\n @notice It is recommended that your implementation inherits from the abstract BasePaymaster contract."
                },
                "fullyImplemented": false,
                "id": 5447,
                "linearizedBaseContracts": [
                    5447,
                    12352
                ],
                "name": "IPaymaster",
                "nameLocation": "575:10:14",
                "nodeType": "ContractDefinition",
                "nodes": [
                    {
                        "canonicalName": "IPaymaster.GasAndDataLimits",
                        "id": 5391,
                        "members": [
                            {
                                "constant": false,
                                "id": 5384,
                                "mutability": "mutable",
                                "name": "acceptanceBudget",
                                "nameLocation": "780:16:14",
                                "nodeType": "VariableDeclaration",
                                "scope": 5391,
                                "src": "772:24:14",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                },
                                "typeName": {
                                    "id": 5383,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "772:7:14",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    }
                                },
                                "visibility": "internal"
                            },
                            {
                                "constant": false,
                                "id": 5386,
                                "mutability": "mutable",
                                "name": "preRelayedCallGasLimit",
                                "nameLocation": "814:22:14",
                                "nodeType": "VariableDeclaration",
                                "scope": 5391,
                                "src": "806:30:14",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                },
                                "typeName": {
                                    "id": 5385,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "806:7:14",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    }
                                },
                                "visibility": "internal"
                            },
                            {
                                "constant": false,
                                "id": 5388,
                                "mutability": "mutable",
                                "name": "postRelayedCallGasLimit",
                                "nameLocation": "854:23:14",
                                "nodeType": "VariableDeclaration",
                                "scope": 5391,
                                "src": "846:31:14",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                },
                                "typeName": {
                                    "id": 5387,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "846:7:14",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    }
                                },
                                "visibility": "internal"
                            },
                            {
                                "constant": false,
                                "id": 5390,
                                "mutability": "mutable",
                                "name": "calldataSizeLimit",
                                "nameLocation": "895:17:14",
                                "nodeType": "VariableDeclaration",
                                "scope": 5391,
                                "src": "887:25:14",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                },
                                "typeName": {
                                    "id": 5389,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "887:7:14",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    }
                                },
                                "visibility": "internal"
                            }
                        ],
                        "name": "GasAndDataLimits",
                        "nameLocation": "745:16:14",
                        "nodeType": "StructDefinition",
                        "scope": 5447,
                        "src": "738:181:14",
                        "visibility": "public"
                    },
                    {
                        "documentation": {
                            "id": 5392,
                            "nodeType": "StructuredDocumentation",
                            "src": "925:2173:14",
                            "text": " @notice Return the Gas Limits for Paymaster's functions and maximum msg.data length values for this Paymaster.\n This function allows different paymasters to have different properties without changes to the RelayHub.\n @return limits An instance of the `GasAndDataLimits` struct\n ##### `acceptanceBudget`\n If the transactions consumes more than `acceptanceBudget` this Paymaster will be charged for gas no matter what.\n Transaction that gets rejected after consuming more than `acceptanceBudget` gas is on this Paymaster's expense.\n Should be set to an amount gas this Paymaster expects to spend deciding whether to accept or reject a request.\n This includes gas consumed by calculations in the `preRelayedCall`, `Forwarder` and the recipient contract.\n :warning: **Warning** :warning: As long this value is above `preRelayedCallGasLimit`\n (see defaults in `BasePaymaster`), the Paymaster is guaranteed it will never pay for rejected transactions.\n If this value is below `preRelayedCallGasLimit`, it might might make Paymaster open to a \"griefing\" attack.\n The relayers should prefer lower `acceptanceBudget`, as it improves their chances of being compensated.\n From a Relay's point of view, this is the highest gas value a bad Paymaster may cost the relay,\n since the paymaster will pay anything above that value regardless of whether the transaction succeeds or reverts.\n Specifying value too high might make the call rejected by relayers (see `maxAcceptanceBudget` in server config).\n ##### `preRelayedCallGasLimit`\n The max gas usage of preRelayedCall. Any revert of the `preRelayedCall` is a request rejection by the paymaster.\n As long as `acceptanceBudget` is above `preRelayedCallGasLimit`, any such revert is not payed by the paymaster.\n ##### `postRelayedCallGasLimit`\n The max gas usage of postRelayedCall. The Paymaster is not charged for the maximum, only for actually used gas.\n Note that an OOG will revert the inner transaction, but the paymaster will be charged for it anyway."
                        },
                        "functionSelector": "b039a88f",
                        "id": 5398,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "getGasAndDataLimits",
                        "nameLocation": "3112:19:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5393,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "3131:2:14"
                        },
                        "returnParameters": {
                            "id": 5397,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5396,
                                    "mutability": "mutable",
                                    "name": "limits",
                                    "nameLocation": "3202:6:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5398,
                                    "src": "3178:30:14",
                                    "stateVariable": false,
                                    "storageLocation": "memory",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_GasAndDataLimits_$5391_memory_ptr",
                                        "typeString": "struct IPaymaster.GasAndDataLimits"
                                    },
                                    "typeName": {
                                        "id": 5395,
                                        "nodeType": "UserDefinedTypeName",
                                        "pathNode": {
                                            "id": 5394,
                                            "name": "GasAndDataLimits",
                                            "nodeType": "IdentifierPath",
                                            "referencedDeclaration": 5391,
                                            "src": "3178:16:14"
                                        },
                                        "referencedDeclaration": 5391,
                                        "src": "3178:16:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_GasAndDataLimits_$5391_storage_ptr",
                                            "typeString": "struct IPaymaster.GasAndDataLimits"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "3168:46:14"
                        },
                        "scope": 5447,
                        "src": "3103:112:14",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5399,
                            "nodeType": "StructuredDocumentation",
                            "src": "3221:275:14",
                            "text": " @notice :warning: **Warning** :warning: using incorrect Forwarder may cause the Paymaster to agreeing to pay for invalid transactions.\n @return trustedForwarder The address of the `Forwarder` that is trusted by this Paymaster to execute the requests."
                        },
                        "functionSelector": "ce1b815f",
                        "id": 5404,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "getTrustedForwarder",
                        "nameLocation": "3510:19:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5400,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "3529:2:14"
                        },
                        "returnParameters": {
                            "id": 5403,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5402,
                                    "mutability": "mutable",
                                    "name": "trustedForwarder",
                                    "nameLocation": "3563:16:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5404,
                                    "src": "3555:24:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5401,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "3555:7:14",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "3554:26:14"
                        },
                        "scope": 5447,
                        "src": "3501:80:14",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5405,
                            "nodeType": "StructuredDocumentation",
                            "src": "3587:124:14",
                            "text": " @return relayHub The address of the `RelayHub` that is trusted by this Paymaster to execute the requests."
                        },
                        "functionSelector": "7bdf2ec7",
                        "id": 5410,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "getRelayHub",
                        "nameLocation": "3725:11:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5406,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "3736:2:14"
                        },
                        "returnParameters": {
                            "id": 5409,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5408,
                                    "mutability": "mutable",
                                    "name": "relayHub",
                                    "nameLocation": "3770:8:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5410,
                                    "src": "3762:16:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5407,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "3762:7:14",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "3761:18:14"
                        },
                        "scope": 5447,
                        "src": "3716:64:14",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5411,
                            "nodeType": "StructuredDocumentation",
                            "src": "3786:2265:14",
                            "text": " @notice Called by the Relay in view mode and later by the `RelayHub` on-chain to validate that\n the Paymaster agrees to pay for this call.\n The request is considered to be rejected by the Paymaster in one of the following conditions:\n  - `preRelayedCall()` method reverts\n  - the `Forwarder` reverts because of nonce or signature error\n  - the `Paymaster` returned `rejectOnRecipientRevert: true` and the recipient contract reverted\n    (and all that did not consume more than `acceptanceBudget` gas).\n In any of the above cases, all Paymaster calls and the recipient call are reverted.\n In any other case the Paymaster will pay for the gas cost of the transaction.\n Note that even if `postRelayedCall` is reverted the Paymaster will be charged.\n @param relayRequest - the full relay request structure\n @param signature - user's EIP712-compatible signature of the `relayRequest`.\n Note that in most cases the paymaster shouldn't try use it at all. It is always checked\n by the forwarder immediately after preRelayedCall returns.\n @param approvalData - extra dapp-specific data (e.g. signature from trusted party)\n @param maxPossibleGas - based on values returned from `getGasAndDataLimits`\n the RelayHub will calculate the maximum possible amount of gas the user may be charged for.\n In order to convert this value to wei, the Paymaster has to call \"relayHub.calculateCharge()\"\n @return context\n A byte array to be passed to postRelayedCall.\n Can contain any data needed by this Paymaster in any form or be empty if no extra data is needed.\n @return rejectOnRecipientRevert\n The flag that allows a Paymaster to \"delegate\" the rejection to the recipient code.\n It also means the Paymaster trust the recipient to reject fast: both preRelayedCall,\n forwarder check and recipient checks must fit into the GasLimits.acceptanceBudget,\n otherwise the TX is paid by the Paymaster.\n `true` if the Paymaster wants to reject the TX if the recipient reverts.\n `false` if the Paymaster wants rejects by the recipient to be completed on chain and paid by the Paymaster."
                        },
                        "functionSelector": "00be5dd4",
                        "id": 5427,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "preRelayedCall",
                        "nameLocation": "6065:14:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5421,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5414,
                                    "mutability": "mutable",
                                    "name": "relayRequest",
                                    "nameLocation": "6120:12:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6089:43:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_RelayRequest_$8491_calldata_ptr",
                                        "typeString": "struct GsnTypes.RelayRequest"
                                    },
                                    "typeName": {
                                        "id": 5413,
                                        "nodeType": "UserDefinedTypeName",
                                        "pathNode": {
                                            "id": 5412,
                                            "name": "GsnTypes.RelayRequest",
                                            "nodeType": "IdentifierPath",
                                            "referencedDeclaration": 8491,
                                            "src": "6089:21:14"
                                        },
                                        "referencedDeclaration": 8491,
                                        "src": "6089:21:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_RelayRequest_$8491_storage_ptr",
                                            "typeString": "struct GsnTypes.RelayRequest"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5416,
                                    "mutability": "mutable",
                                    "name": "signature",
                                    "nameLocation": "6157:9:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6142:24:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_calldata_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5415,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6142:5:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5418,
                                    "mutability": "mutable",
                                    "name": "approvalData",
                                    "nameLocation": "6191:12:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6176:27:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_calldata_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5417,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6176:5:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5420,
                                    "mutability": "mutable",
                                    "name": "maxPossibleGas",
                                    "nameLocation": "6221:14:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6213:22:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    },
                                    "typeName": {
                                        "id": 5419,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6213:7:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "6079:162:14"
                        },
                        "returnParameters": {
                            "id": 5426,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5423,
                                    "mutability": "mutable",
                                    "name": "context",
                                    "nameLocation": "6281:7:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6268:20:14",
                                    "stateVariable": false,
                                    "storageLocation": "memory",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5422,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6268:5:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5425,
                                    "mutability": "mutable",
                                    "name": "rejectOnRecipientRevert",
                                    "nameLocation": "6295:23:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5427,
                                    "src": "6290:28:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                    },
                                    "typeName": {
                                        "id": 5424,
                                        "name": "bool",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "6290:4:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "6267:52:14"
                        },
                        "scope": 5447,
                        "src": "6056:264:14",
                        "stateMutability": "nonpayable",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5428,
                            "nodeType": "StructuredDocumentation",
                            "src": "6326:817:14",
                            "text": " @notice This method is called after the actual relayed function call.\n It may be used to record the transaction (e.g. charge the caller by some contract logic) for this call.\n Revert in this functions causes a revert of the client's relayed call (and preRelayedCall(), but the Paymaster\n is still committed to pay the relay for the entire transaction.\n @param context The call context, as returned by the preRelayedCall\n @param success `true` if the relayed call succeeded, false if it reverted\n @param gasUseWithoutPost The actual amount of gas used by the entire transaction, EXCEPT\n        the gas used by the postRelayedCall itself.\n @param relayData The relay params of the request. can be used by relayHub.calculateCharge()"
                        },
                        "functionSelector": "76fa01c3",
                        "id": 5440,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "postRelayedCall",
                        "nameLocation": "7157:15:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5438,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5430,
                                    "mutability": "mutable",
                                    "name": "context",
                                    "nameLocation": "7197:7:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5440,
                                    "src": "7182:22:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_calldata_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5429,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "7182:5:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5432,
                                    "mutability": "mutable",
                                    "name": "success",
                                    "nameLocation": "7219:7:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5440,
                                    "src": "7214:12:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                    },
                                    "typeName": {
                                        "id": 5431,
                                        "name": "bool",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "7214:4:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5434,
                                    "mutability": "mutable",
                                    "name": "gasUseWithoutPost",
                                    "nameLocation": "7244:17:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5440,
                                    "src": "7236:25:14",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    },
                                    "typeName": {
                                        "id": 5433,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "7236:7:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5437,
                                    "mutability": "mutable",
                                    "name": "relayData",
                                    "nameLocation": "7299:9:14",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5440,
                                    "src": "7271:37:14",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_RelayData_$8484_calldata_ptr",
                                        "typeString": "struct GsnTypes.RelayData"
                                    },
                                    "typeName": {
                                        "id": 5436,
                                        "nodeType": "UserDefinedTypeName",
                                        "pathNode": {
                                            "id": 5435,
                                            "name": "GsnTypes.RelayData",
                                            "nodeType": "IdentifierPath",
                                            "referencedDeclaration": 8484,
                                            "src": "7271:18:14"
                                        },
                                        "referencedDeclaration": 8484,
                                        "src": "7271:18:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_RelayData_$8484_storage_ptr",
                                            "typeString": "struct GsnTypes.RelayData"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "7172:142:14"
                        },
                        "returnParameters": {
                            "id": 5439,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "7323:0:14"
                        },
                        "scope": 5447,
                        "src": "7148:176:14",
                        "stateMutability": "nonpayable",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "documentation": {
                            "id": 5441,
                            "nodeType": "StructuredDocumentation",
                            "src": "7330:81:14",
                            "text": " @return version The SemVer string of this Paymaster's version."
                        },
                        "functionSelector": "921276ea",
                        "id": 5446,
                        "implemented": false,
                        "kind": "function",
                        "modifiers": [],
                        "name": "versionPaymaster",
                        "nameLocation": "7425:16:14",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 5442,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "7441:2:14"
                        },
                        "returnParameters": {
                            "id": 5445,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5444,
                                    "mutability": "mutable",
                                    "name": "",
                                    "nameLocation": "-1:-1:-1",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 5446,
                                    "src": "7467:13:14",
                                    "stateVariable": false,
                                    "storageLocation": "memory",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_string_memory_ptr",
                                        "typeString": "string"
                                    },
                                    "typeName": {
                                        "id": 5443,
                                        "name": "string",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "7467:6:14",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_string_storage_ptr",
                                            "typeString": "string"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "7466:15:14"
                        },
                        "scope": 5447,
                        "src": "7416:66:14",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "external"
                    }
                ],
                "scope": 5448,
                "src": "565:6919:14",
                "usedErrors": []
            }
        ],
        "src": "0:7484:14"
    },
    "compiler": {
        "name": "solc",
        "version": "0.8.7+commit.e28d00a7.Emscripten.clang"
    },
    "networks": {},
    "schemaVersion": "3.1.0",
    "updatedAt": "2023-03-16T16:54:15.202Z",
    "devdoc": {
        "kind": "dev",
        "methods": {
            "getGasAndDataLimits()": {
                "returns": {
                    "limits": "An instance of the `GasAndDataLimits` struct ##### `acceptanceBudget` If the transactions consumes more than `acceptanceBudget` this Paymaster will be charged for gas no matter what. Transaction that gets rejected after consuming more than `acceptanceBudget` gas is on this Paymaster's expense. Should be set to an amount gas this Paymaster expects to spend deciding whether to accept or reject a request. This includes gas consumed by calculations in the `preRelayedCall`, `Forwarder` and the recipient contract. :warning: **Warning** :warning: As long this value is above `preRelayedCallGasLimit` (see defaults in `BasePaymaster`), the Paymaster is guaranteed it will never pay for rejected transactions. If this value is below `preRelayedCallGasLimit`, it might might make Paymaster open to a \"griefing\" attack. The relayers should prefer lower `acceptanceBudget`, as it improves their chances of being compensated. From a Relay's point of view, this is the highest gas value a bad Paymaster may cost the relay, since the paymaster will pay anything above that value regardless of whether the transaction succeeds or reverts. Specifying value too high might make the call rejected by relayers (see `maxAcceptanceBudget` in server config). ##### `preRelayedCallGasLimit` The max gas usage of preRelayedCall. Any revert of the `preRelayedCall` is a request rejection by the paymaster. As long as `acceptanceBudget` is above `preRelayedCallGasLimit`, any such revert is not payed by the paymaster. ##### `postRelayedCallGasLimit` The max gas usage of postRelayedCall. The Paymaster is not charged for the maximum, only for actually used gas. Note that an OOG will revert the inner transaction, but the paymaster will be charged for it anyway."
                }
            },
            "getRelayHub()": {
                "returns": {
                    "relayHub": "The address of the `RelayHub` that is trusted by this Paymaster to execute the requests."
                }
            },
            "getTrustedForwarder()": {
                "returns": {
                    "trustedForwarder": "The address of the `Forwarder` that is trusted by this Paymaster to execute the requests."
                }
            },
            "postRelayedCall(bytes,bool,uint256,(uint256,uint256,uint256,address,address,address,bytes,uint256))": {
                "params": {
                    "context": "The call context, as returned by the preRelayedCall",
                    "gasUseWithoutPost": "The actual amount of gas used by the entire transaction, EXCEPT        the gas used by the postRelayedCall itself.",
                    "relayData": "The relay params of the request. can be used by relayHub.calculateCharge()",
                    "success": "`true` if the relayed call succeeded, false if it reverted"
                }
            },
            "preRelayedCall(((address,address,uint256,uint256,uint256,bytes,uint256),(uint256,uint256,uint256,address,address,address,bytes,uint256)),bytes,bytes,uint256)": {
                "params": {
                    "approvalData": "- extra dapp-specific data (e.g. signature from trusted party)",
                    "maxPossibleGas": "- based on values returned from `getGasAndDataLimits` the RelayHub will calculate the maximum possible amount of gas the user may be charged for. In order to convert this value to wei, the Paymaster has to call \"relayHub.calculateCharge()\"",
                    "relayRequest": "- the full relay request structure",
                    "signature": "- user's EIP712-compatible signature of the `relayRequest`. Note that in most cases the paymaster shouldn't try use it at all. It is always checked by the forwarder immediately after preRelayedCall returns."
                },
                "returns": {
                    "context": "A byte array to be passed to postRelayedCall. Can contain any data needed by this Paymaster in any form or be empty if no extra data is needed.",
                    "rejectOnRecipientRevert": "The flag that allows a Paymaster to \"delegate\" the rejection to the recipient code. It also means the Paymaster trust the recipient to reject fast: both preRelayedCall, forwarder check and recipient checks must fit into the GasLimits.acceptanceBudget, otherwise the TX is paid by the Paymaster. `true` if the Paymaster wants to reject the TX if the recipient reverts. `false` if the Paymaster wants rejects by the recipient to be completed on chain and paid by the Paymaster."
                }
            },
            "supportsInterface(bytes4)": {
                "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
            },
            "versionPaymaster()": {
                "returns": {
                    "_0": "version The SemVer string of this Paymaster's version."
                }
            }
        },
        "title": "The Paymaster Interface",
        "version": 1
    },
    "userdoc": {
        "kind": "user",
        "methods": {
            "getGasAndDataLimits()": {
                "notice": "Return the Gas Limits for Paymaster's functions and maximum msg.data length values for this Paymaster. This function allows different paymasters to have different properties without changes to the RelayHub."
            },
            "getTrustedForwarder()": {
                "notice": ":warning: **Warning** :warning: using incorrect Forwarder may cause the Paymaster to agreeing to pay for invalid transactions."
            },
            "postRelayedCall(bytes,bool,uint256,(uint256,uint256,uint256,address,address,address,bytes,uint256))": {
                "notice": "This method is called after the actual relayed function call. It may be used to record the transaction (e.g. charge the caller by some contract logic) for this call. Revert in this functions causes a revert of the client's relayed call (and preRelayedCall(), but the Paymaster is still committed to pay the relay for the entire transaction."
            },
            "preRelayedCall(((address,address,uint256,uint256,uint256,bytes,uint256),(uint256,uint256,uint256,address,address,address,bytes,uint256)),bytes,bytes,uint256)": {
                "notice": "Called by the Relay in view mode and later by the `RelayHub` on-chain to validate that the Paymaster agrees to pay for this call. The request is considered to be rejected by the Paymaster in one of the following conditions:  - `preRelayedCall()` method reverts  - the `Forwarder` reverts because of nonce or signature error  - the `Paymaster` returned `rejectOnRecipientRevert: true` and the recipient contract reverted    (and all that did not consume more than `acceptanceBudget` gas). In any of the above cases, all Paymaster calls and the recipient call are reverted. In any other case the Paymaster will pay for the gas cost of the transaction. Note that even if `postRelayedCall` is reverted the Paymaster will be charged."
            }
        },
        "notice": "Contracts implementing this interface exist to make decision about paying the transaction fee to the relay.There are two callbacks here that are executed by the RelayHub: `preRelayedCall` and `postRelayedCall`.It is recommended that your implementation inherits from the abstract BasePaymaster contract.",
        "version": 1
    }
}
