{
  "fileName": "IRelayHub.sol",
  "contractName": "IRelayHub",
  "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Interface for `RelayHub`, the core contract of the GSN. Users should not need to interact with this contract\n * directly.\n *\n * See the https://github.com/OpenZeppelin/openzeppelin-gsn-helpers[OpenZeppelin GSN helpers] for more information on\n * how to deploy an instance of `RelayHub` on your local test network.\n */\ninterface IRelayHub {\n    // Relay management\n\n    /**\n     * @dev Adds stake to a relay and sets its `unstakeDelay`. If the relay does not exist, it is created, and the caller\n     * of this function becomes its owner. If the relay already exists, only the owner can call this function. A relay\n     * cannot be its own owner.\n     *\n     * All Ether in this function call will be added to the relay's stake.\n     * Its unstake delay will be assigned to `unstakeDelay`, but the new value must be greater or equal to the current one.\n     *\n     * Emits a {Staked} event.\n     */\n    function stake(address relayaddr, uint256 unstakeDelay) external payable;\n\n    /**\n     * @dev Emitted when a relay's stake or unstakeDelay are increased\n     */\n    event Staked(address indexed relay, uint256 stake, uint256 unstakeDelay);\n\n    /**\n     * @dev Registers the caller as a relay.\n     * The relay must be staked for, and not be a contract (i.e. this function must be called directly from an EOA).\n     *\n     * This function can be called multiple times, emitting new {RelayAdded} events. Note that the received\n     * `transactionFee` is not enforced by {relayCall}.\n     *\n     * Emits a {RelayAdded} event.\n     */\n    function registerRelay(uint256 transactionFee, string calldata url) external;\n\n    /**\n     * @dev Emitted when a relay is registered or re-registerd. Looking at these events (and filtering out\n     * {RelayRemoved} events) lets a client discover the list of available relays.\n     */\n    event RelayAdded(address indexed relay, address indexed owner, uint256 transactionFee, uint256 stake, uint256 unstakeDelay, string url);\n\n    /**\n     * @dev Removes (deregisters) a relay. Unregistered (but staked for) relays can also be removed.\n     *\n     * Can only be called by the owner of the relay. After the relay's `unstakeDelay` has elapsed, {unstake} will be\n     * callable.\n     *\n     * Emits a {RelayRemoved} event.\n     */\n    function removeRelayByOwner(address relay) external;\n\n    /**\n     * @dev Emitted when a relay is removed (deregistered). `unstakeTime` is the time when unstake will be callable.\n     */\n    event RelayRemoved(address indexed relay, uint256 unstakeTime);\n\n    /** Deletes the relay from the system, and gives back its stake to the owner.\n     *\n     * Can only be called by the relay owner, after `unstakeDelay` has elapsed since {removeRelayByOwner} was called.\n     *\n     * Emits an {Unstaked} event.\n     */\n    function unstake(address relay) external;\n\n    /**\n     * @dev Emitted when a relay is unstaked for, including the returned stake.\n     */\n    event Unstaked(address indexed relay, uint256 stake);\n\n    // States a relay can be in\n    enum RelayState {\n        Unknown, // The relay is unknown to the system: it has never been staked for\n        Staked, // The relay has been staked for, but it is not yet active\n        Registered, // The relay has registered itself, and is active (can relay calls)\n        Removed    // The relay has been removed by its owner and can no longer relay calls. It must wait for its unstakeDelay to elapse before it can unstake\n    }\n\n    /**\n     * @dev Returns a relay's status. Note that relays can be deleted when unstaked or penalized, causing this function\n     * to return an empty entry.\n     */\n    function getRelay(address relay) external view returns (uint256 totalStake, uint256 unstakeDelay, uint256 unstakeTime, address payable owner, RelayState state);\n\n    // Balance management\n\n    /**\n     * @dev Deposits Ether for a contract, so that it can receive (and pay for) relayed transactions.\n     *\n     * Unused balance can only be withdrawn by the contract itself, by calling {withdraw}.\n     *\n     * Emits a {Deposited} event.\n     */\n    function depositFor(address target) external payable;\n\n    /**\n     * @dev Emitted when {depositFor} is called, including the amount and account that was funded.\n     */\n    event Deposited(address indexed recipient, address indexed from, uint256 amount);\n\n    /**\n     * @dev Returns an account's deposits. These can be either a contracts's funds, or a relay owner's revenue.\n     */\n    function balanceOf(address target) external view returns (uint256);\n\n    /**\n     * Withdraws from an account's balance, sending it back to it. Relay owners call this to retrieve their revenue, and\n     * contracts can use it to reduce their funding.\n     *\n     * Emits a {Withdrawn} event.\n     */\n    function withdraw(uint256 amount, address payable dest) external;\n\n    /**\n     * @dev Emitted when an account withdraws funds from `RelayHub`.\n     */\n    event Withdrawn(address indexed account, address indexed dest, uint256 amount);\n\n    // Relaying\n\n    /**\n     * @dev Checks if the `RelayHub` will accept a relayed operation.\n     * Multiple things must be true for this to happen:\n     *  - all arguments must be signed for by the sender (`from`)\n     *  - the sender's nonce must be the current one\n     *  - the recipient must accept this transaction (via {acceptRelayedCall})\n     *\n     * Returns a `PreconditionCheck` value (`OK` when the transaction can be relayed), or a recipient-specific error\n     * code if it returns one in {acceptRelayedCall}.\n     */\n    function canRelay(\n        address relay,\n        address from,\n        address to,\n        bytes calldata encodedFunction,\n        uint256 transactionFee,\n        uint256 gasPrice,\n        uint256 gasLimit,\n        uint256 nonce,\n        bytes calldata signature,\n        bytes calldata approvalData\n    ) external view returns (uint256 status, bytes memory recipientContext);\n\n    // Preconditions for relaying, checked by canRelay and returned as the corresponding numeric values.\n    enum PreconditionCheck {\n        OK,                         // All checks passed, the call can be relayed\n        WrongSignature,             // The transaction to relay is not signed by requested sender\n        WrongNonce,                 // The provided nonce has already been used by the sender\n        AcceptRelayedCallReverted,  // The recipient rejected this call via acceptRelayedCall\n        InvalidRecipientStatusCode  // The recipient returned an invalid (reserved) status code\n    }\n\n    /**\n     * @dev Relays a transaction.\n     *\n     * For this to succeed, multiple conditions must be met:\n     *  - {canRelay} must `return PreconditionCheck.OK`\n     *  - the sender must be a registered relay\n     *  - the transaction's gas price must be larger or equal to the one that was requested by the sender\n     *  - the transaction must have enough gas to not run out of gas if all internal transactions (calls to the\n     * recipient) use all gas available to them\n     *  - the recipient must have enough balance to pay the relay for the worst-case scenario (i.e. when all gas is\n     * spent)\n     *\n     * If all conditions are met, the call will be relayed and the recipient charged. {preRelayedCall}, the encoded\n     * function and {postRelayedCall} will be called in that order.\n     *\n     * Parameters:\n     *  - `from`: the client originating the request\n     *  - `to`: the target {IRelayRecipient} contract\n     *  - `encodedFunction`: the function call to relay, including data\n     *  - `transactionFee`: fee (%) the relay takes over actual gas cost\n     *  - `gasPrice`: gas price the client is willing to pay\n     *  - `gasLimit`: gas to forward when calling the encoded function\n     *  - `nonce`: client's nonce\n     *  - `signature`: client's signature over all previous params, plus the relay and RelayHub addresses\n     *  - `approvalData`: dapp-specific data forwarded to {acceptRelayedCall}. This value is *not* verified by the\n     * `RelayHub`, but it still can be used for e.g. a signature.\n     *\n     * Emits a {TransactionRelayed} event.\n     */\n    function relayCall(\n        address from,\n        address to,\n        bytes calldata encodedFunction,\n        uint256 transactionFee,\n        uint256 gasPrice,\n        uint256 gasLimit,\n        uint256 nonce,\n        bytes calldata signature,\n        bytes calldata approvalData\n    ) external;\n\n    /**\n     * @dev Emitted when an attempt to relay a call failed.\n     *\n     * This can happen due to incorrect {relayCall} arguments, or the recipient not accepting the relayed call. The\n     * actual relayed call was not executed, and the recipient not charged.\n     *\n     * The `reason` parameter contains an error code: values 1-10 correspond to `PreconditionCheck` entries, and values\n     * over 10 are custom recipient error codes returned from {acceptRelayedCall}.\n     */\n    event CanRelayFailed(address indexed relay, address indexed from, address indexed to, bytes4 selector, uint256 reason);\n\n    /**\n     * @dev Emitted when a transaction is relayed.\n     * Useful when monitoring a relay's operation and relayed calls to a contract\n     *\n     * Note that the actual encoded function might be reverted: this is indicated in the `status` parameter.\n     *\n     * `charge` is the Ether value deducted from the recipient's balance, paid to the relay's owner.\n     */\n    event TransactionRelayed(address indexed relay, address indexed from, address indexed to, bytes4 selector, RelayCallStatus status, uint256 charge);\n\n    // Reason error codes for the TransactionRelayed event\n    enum RelayCallStatus {\n        OK,                      // The transaction was successfully relayed and execution successful - never included in the event\n        RelayedCallFailed,       // The transaction was relayed, but the relayed call failed\n        PreRelayedFailed,        // The transaction was not relayed due to preRelatedCall reverting\n        PostRelayedFailed,       // The transaction was relayed and reverted due to postRelatedCall reverting\n        RecipientBalanceChanged  // The transaction was relayed and reverted due to the recipient's balance changing\n    }\n\n    /**\n     * @dev Returns how much gas should be forwarded to a call to {relayCall}, in order to relay a transaction that will\n     * spend up to `relayedCallStipend` gas.\n     */\n    function requiredGas(uint256 relayedCallStipend) external view returns (uint256);\n\n    /**\n     * @dev Returns the maximum recipient charge, given the amount of gas forwarded, gas price and relay fee.\n     */\n    function maxPossibleCharge(uint256 relayedCallStipend, uint256 gasPrice, uint256 transactionFee) external view returns (uint256);\n\n     // Relay penalization.\n     // Any account can penalize relays, removing them from the system immediately, and rewarding the\n    // reporter with half of the relay's stake. The other half is burned so that, even if the relay penalizes itself, it\n    // still loses half of its stake.\n\n    /**\n     * @dev Penalize a relay that signed two transactions using the same nonce (making only the first one valid) and\n     * different data (gas price, gas limit, etc. may be different).\n     *\n     * The (unsigned) transaction data and signature for both transactions must be provided.\n     */\n    function penalizeRepeatedNonce(bytes calldata unsignedTx1, bytes calldata signature1, bytes calldata unsignedTx2, bytes calldata signature2) external;\n\n    /**\n     * @dev Penalize a relay that sent a transaction that didn't target ``RelayHub``'s {registerRelay} or {relayCall}.\n     */\n    function penalizeIllegalTransaction(bytes calldata unsignedTx, bytes calldata signature) external;\n\n    /**\n     * @dev Emitted when a relay is penalized.\n     */\n    event Penalized(address indexed relay, address sender, uint256 amount);\n\n    /**\n     * @dev Returns an account's nonce in `RelayHub`.\n     */\n    function getNonce(address from) external view returns (uint256);\n}\n\n",
  "sourcePath": "contracts/GSN/IRelayHub.sol",
  "sourceMap": "",
  "deployedSourceMap": "",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "relay",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "bytes4",
          "name": "selector",
          "type": "bytes4"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "reason",
          "type": "uint256"
        }
      ],
      "name": "CanRelayFailed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "Deposited",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "relay",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "sender",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "Penalized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "relay",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "transactionFee",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "stake",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "unstakeDelay",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "string",
          "name": "url",
          "type": "string"
        }
      ],
      "name": "RelayAdded",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "relay",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "unstakeTime",
          "type": "uint256"
        }
      ],
      "name": "RelayRemoved",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "relay",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "stake",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "unstakeDelay",
          "type": "uint256"
        }
      ],
      "name": "Staked",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "relay",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "bytes4",
          "name": "selector",
          "type": "bytes4"
        },
        {
          "indexed": false,
          "internalType": "enum IRelayHub.RelayCallStatus",
          "name": "status",
          "type": "uint8"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "charge",
          "type": "uint256"
        }
      ],
      "name": "TransactionRelayed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "relay",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "stake",
          "type": "uint256"
        }
      ],
      "name": "Unstaked",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "dest",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "Withdrawn",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "target",
          "type": "address"
        }
      ],
      "name": "balanceOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "relay",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "encodedFunction",
          "type": "bytes"
        },
        {
          "internalType": "uint256",
          "name": "transactionFee",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "gasPrice",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "gasLimit",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "nonce",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "signature",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "approvalData",
          "type": "bytes"
        }
      ],
      "name": "canRelay",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "status",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "recipientContext",
          "type": "bytes"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "target",
          "type": "address"
        }
      ],
      "name": "depositFor",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "from",
          "type": "address"
        }
      ],
      "name": "getNonce",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "relay",
          "type": "address"
        }
      ],
      "name": "getRelay",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "totalStake",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "unstakeDelay",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "unstakeTime",
          "type": "uint256"
        },
        {
          "internalType": "address payable",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "enum IRelayHub.RelayState",
          "name": "state",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "relayedCallStipend",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "gasPrice",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "transactionFee",
          "type": "uint256"
        }
      ],
      "name": "maxPossibleCharge",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "unsignedTx",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "signature",
          "type": "bytes"
        }
      ],
      "name": "penalizeIllegalTransaction",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "unsignedTx1",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "signature1",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "unsignedTx2",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "signature2",
          "type": "bytes"
        }
      ],
      "name": "penalizeRepeatedNonce",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "transactionFee",
          "type": "uint256"
        },
        {
          "internalType": "string",
          "name": "url",
          "type": "string"
        }
      ],
      "name": "registerRelay",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "encodedFunction",
          "type": "bytes"
        },
        {
          "internalType": "uint256",
          "name": "transactionFee",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "gasPrice",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "gasLimit",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "nonce",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "signature",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "approvalData",
          "type": "bytes"
        }
      ],
      "name": "relayCall",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "relay",
          "type": "address"
        }
      ],
      "name": "removeRelayByOwner",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "relayedCallStipend",
          "type": "uint256"
        }
      ],
      "name": "requiredGas",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "relayaddr",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "unstakeDelay",
          "type": "uint256"
        }
      ],
      "name": "stake",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "relay",
          "type": "address"
        }
      ],
      "name": "unstake",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "address payable",
          "name": "dest",
          "type": "address"
        }
      ],
      "name": "withdraw",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "ast": {
    "absolutePath": "contracts/GSN/IRelayHub.sol",
    "exportedSymbols": {
      "IRelayHub": [
        1128
      ]
    },
    "id": 1129,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 852,
        "literals": [
          "solidity",
          "^",
          "0.7",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "33:23:4"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": {
          "id": 853,
          "nodeType": "StructuredDocumentation",
          "src": "58:329:4",
          "text": " @dev Interface for `RelayHub`, the core contract of the GSN. Users should not need to interact with this contract\n directly.\n See the https://github.com/OpenZeppelin/openzeppelin-gsn-helpers[OpenZeppelin GSN helpers] for more information on\n how to deploy an instance of `RelayHub` on your local test network."
        },
        "fullyImplemented": false,
        "id": 1128,
        "linearizedBaseContracts": [
          1128
        ],
        "name": "IRelayHub",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": null,
            "documentation": {
              "id": 854,
              "nodeType": "StructuredDocumentation",
              "src": "439:528:4",
              "text": " @dev Adds stake to a relay and sets its `unstakeDelay`. If the relay does not exist, it is created, and the caller\n of this function becomes its owner. If the relay already exists, only the owner can call this function. A relay\n cannot be its own owner.\n All Ether in this function call will be added to the relay's stake.\n Its unstake delay will be assigned to `unstakeDelay`, but the new value must be greater or equal to the current one.\n Emits a {Staked} event."
            },
            "functionSelector": "adc9772e",
            "id": 861,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "stake",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 859,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 856,
                  "mutability": "mutable",
                  "name": "relayaddr",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 861,
                  "src": "987:17:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 855,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "987:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 858,
                  "mutability": "mutable",
                  "name": "unstakeDelay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 861,
                  "src": "1006:20:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 857,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1006:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "986:41:4"
            },
            "returnParameters": {
              "id": 860,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1044:0:4"
            },
            "scope": 1128,
            "src": "972:73:4",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": {
              "id": 862,
              "nodeType": "StructuredDocumentation",
              "src": "1051:82:4",
              "text": " @dev Emitted when a relay's stake or unstakeDelay are increased"
            },
            "id": 870,
            "name": "Staked",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 869,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 864,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 870,
                  "src": "1151:21:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 863,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1151:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 866,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "stake",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 870,
                  "src": "1174:13:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 865,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1174:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 868,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "unstakeDelay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 870,
                  "src": "1189:20:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 867,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1189:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1150:60:4"
            },
            "src": "1138:73:4"
          },
          {
            "body": null,
            "documentation": {
              "id": 871,
              "nodeType": "StructuredDocumentation",
              "src": "1217:386:4",
              "text": " @dev Registers the caller as a relay.\n The relay must be staked for, and not be a contract (i.e. this function must be called directly from an EOA).\n This function can be called multiple times, emitting new {RelayAdded} events. Note that the received\n `transactionFee` is not enforced by {relayCall}.\n Emits a {RelayAdded} event."
            },
            "functionSelector": "1166073a",
            "id": 878,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "registerRelay",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 876,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 873,
                  "mutability": "mutable",
                  "name": "transactionFee",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 878,
                  "src": "1631:22:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 872,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1631:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 875,
                  "mutability": "mutable",
                  "name": "url",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 878,
                  "src": "1655:19:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_calldata_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 874,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1655:6:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1630:45:4"
            },
            "returnParameters": {
              "id": 877,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1684:0:4"
            },
            "scope": 1128,
            "src": "1608:77:4",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": {
              "id": 879,
              "nodeType": "StructuredDocumentation",
              "src": "1691:201:4",
              "text": " @dev Emitted when a relay is registered or re-registerd. Looking at these events (and filtering out\n {RelayRemoved} events) lets a client discover the list of available relays."
            },
            "id": 893,
            "name": "RelayAdded",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 892,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 881,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 893,
                  "src": "1914:21:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 880,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1914:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 883,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 893,
                  "src": "1937:21:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 882,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1937:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 885,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "transactionFee",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 893,
                  "src": "1960:22:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 884,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1960:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 887,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "stake",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 893,
                  "src": "1984:13:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 886,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1984:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 889,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "unstakeDelay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 893,
                  "src": "1999:20:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 888,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1999:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 891,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "url",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 893,
                  "src": "2021:10:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 890,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "2021:6:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1913:119:4"
            },
            "src": "1897:136:4"
          },
          {
            "body": null,
            "documentation": {
              "id": 894,
              "nodeType": "StructuredDocumentation",
              "src": "2039:297:4",
              "text": " @dev Removes (deregisters) a relay. Unregistered (but staked for) relays can also be removed.\n Can only be called by the owner of the relay. After the relay's `unstakeDelay` has elapsed, {unstake} will be\n callable.\n Emits a {RelayRemoved} event."
            },
            "functionSelector": "c3e712f2",
            "id": 899,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "removeRelayByOwner",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 897,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 896,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 899,
                  "src": "2369:13:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 895,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2369:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2368:15:4"
            },
            "returnParameters": {
              "id": 898,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2392:0:4"
            },
            "scope": 1128,
            "src": "2341:52:4",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": {
              "id": 900,
              "nodeType": "StructuredDocumentation",
              "src": "2399:128:4",
              "text": " @dev Emitted when a relay is removed (deregistered). `unstakeTime` is the time when unstake will be callable."
            },
            "id": 906,
            "name": "RelayRemoved",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 905,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 902,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 906,
                  "src": "2551:21:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 901,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2551:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 904,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "unstakeTime",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 906,
                  "src": "2574:19:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 903,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2574:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2550:44:4"
            },
            "src": "2532:63:4"
          },
          {
            "body": null,
            "documentation": {
              "id": 907,
              "nodeType": "StructuredDocumentation",
              "src": "2601:251:4",
              "text": "Deletes the relay from the system, and gives back its stake to the owner.\n Can only be called by the relay owner, after `unstakeDelay` has elapsed since {removeRelayByOwner} was called.\n Emits an {Unstaked} event."
            },
            "functionSelector": "f2888dbb",
            "id": 912,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "unstake",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 910,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 909,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 912,
                  "src": "2874:13:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 908,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2874:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2873:15:4"
            },
            "returnParameters": {
              "id": 911,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2897:0:4"
            },
            "scope": 1128,
            "src": "2857:41:4",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": {
              "id": 913,
              "nodeType": "StructuredDocumentation",
              "src": "2904:91:4",
              "text": " @dev Emitted when a relay is unstaked for, including the returned stake."
            },
            "id": 919,
            "name": "Unstaked",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 918,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 915,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 919,
                  "src": "3015:21:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 914,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3015:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 917,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "stake",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 919,
                  "src": "3038:13:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 916,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3038:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3014:38:4"
            },
            "src": "3000:53:4"
          },
          {
            "canonicalName": "IRelayHub.RelayState",
            "id": 924,
            "members": [
              {
                "id": 920,
                "name": "Unknown",
                "nodeType": "EnumValue",
                "src": "3117:7:4"
              },
              {
                "id": 921,
                "name": "Staked",
                "nodeType": "EnumValue",
                "src": "3202:6:4"
              },
              {
                "id": 922,
                "name": "Registered",
                "nodeType": "EnumValue",
                "src": "3277:10:4"
              },
              {
                "id": 923,
                "name": "Removed",
                "nodeType": "EnumValue",
                "src": "3365:7:4"
              }
            ],
            "name": "RelayState",
            "nodeType": "EnumDefinition",
            "src": "3091:430:4"
          },
          {
            "body": null,
            "documentation": {
              "id": 925,
              "nodeType": "StructuredDocumentation",
              "src": "3527:164:4",
              "text": " @dev Returns a relay's status. Note that relays can be deleted when unstaked or penalized, causing this function\n to return an empty entry."
            },
            "functionSelector": "8d851460",
            "id": 940,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getRelay",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 928,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 927,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 940,
                  "src": "3714:13:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 926,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3714:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3713:15:4"
            },
            "returnParameters": {
              "id": 939,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 930,
                  "mutability": "mutable",
                  "name": "totalStake",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 940,
                  "src": "3752:18:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 929,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3752:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 932,
                  "mutability": "mutable",
                  "name": "unstakeDelay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 940,
                  "src": "3772:20:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 931,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3772:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 934,
                  "mutability": "mutable",
                  "name": "unstakeTime",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 940,
                  "src": "3794:19:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 933,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3794:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 936,
                  "mutability": "mutable",
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 940,
                  "src": "3815:21:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address_payable",
                    "typeString": "address payable"
                  },
                  "typeName": {
                    "id": 935,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3815:15:4",
                    "stateMutability": "payable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address_payable",
                      "typeString": "address payable"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 938,
                  "mutability": "mutable",
                  "name": "state",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 940,
                  "src": "3838:16:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_RelayState_$924",
                    "typeString": "enum IRelayHub.RelayState"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 937,
                    "name": "RelayState",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 924,
                    "src": "3838:10:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_RelayState_$924",
                      "typeString": "enum IRelayHub.RelayState"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3751:104:4"
            },
            "scope": 1128,
            "src": "3696:160:4",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": {
              "id": 941,
              "nodeType": "StructuredDocumentation",
              "src": "3889:252:4",
              "text": " @dev Deposits Ether for a contract, so that it can receive (and pay for) relayed transactions.\n Unused balance can only be withdrawn by the contract itself, by calling {withdraw}.\n Emits a {Deposited} event."
            },
            "functionSelector": "aa67c919",
            "id": 946,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "depositFor",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 944,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 943,
                  "mutability": "mutable",
                  "name": "target",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 946,
                  "src": "4166:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 942,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4166:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4165:16:4"
            },
            "returnParameters": {
              "id": 945,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4198:0:4"
            },
            "scope": 1128,
            "src": "4146:53:4",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": {
              "id": 947,
              "nodeType": "StructuredDocumentation",
              "src": "4205:110:4",
              "text": " @dev Emitted when {depositFor} is called, including the amount and account that was funded."
            },
            "id": 955,
            "name": "Deposited",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 954,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 949,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "recipient",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 955,
                  "src": "4336:25:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 948,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4336:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 951,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "from",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 955,
                  "src": "4363:20:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 950,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4363:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 953,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 955,
                  "src": "4385:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 952,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4385:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4335:65:4"
            },
            "src": "4320:81:4"
          },
          {
            "body": null,
            "documentation": {
              "id": 956,
              "nodeType": "StructuredDocumentation",
              "src": "4407:123:4",
              "text": " @dev Returns an account's deposits. These can be either a contracts's funds, or a relay owner's revenue."
            },
            "functionSelector": "70a08231",
            "id": 963,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "balanceOf",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 959,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 958,
                  "mutability": "mutable",
                  "name": "target",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 963,
                  "src": "4554:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 957,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4554:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4553:16:4"
            },
            "returnParameters": {
              "id": 962,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 961,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 963,
                  "src": "4593:7:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 960,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4593:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4592:9:4"
            },
            "scope": 1128,
            "src": "4535:67:4",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": {
              "id": 964,
              "nodeType": "StructuredDocumentation",
              "src": "4608:226:4",
              "text": " Withdraws from an account's balance, sending it back to it. Relay owners call this to retrieve their revenue, and\n contracts can use it to reduce their funding.\n Emits a {Withdrawn} event."
            },
            "functionSelector": "00f714ce",
            "id": 971,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "withdraw",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 969,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 966,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 971,
                  "src": "4857:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 965,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4857:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 968,
                  "mutability": "mutable",
                  "name": "dest",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 971,
                  "src": "4873:20:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address_payable",
                    "typeString": "address payable"
                  },
                  "typeName": {
                    "id": 967,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4873:15:4",
                    "stateMutability": "payable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address_payable",
                      "typeString": "address payable"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4856:38:4"
            },
            "returnParameters": {
              "id": 970,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4903:0:4"
            },
            "scope": 1128,
            "src": "4839:65:4",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": {
              "id": 972,
              "nodeType": "StructuredDocumentation",
              "src": "4910:80:4",
              "text": " @dev Emitted when an account withdraws funds from `RelayHub`."
            },
            "id": 980,
            "name": "Withdrawn",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 979,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 974,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "account",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 980,
                  "src": "5011:23:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 973,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5011:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 976,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "dest",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 980,
                  "src": "5036:20:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 975,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5036:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 978,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 980,
                  "src": "5058:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 977,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5058:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5010:63:4"
            },
            "src": "4995:79:4"
          },
          {
            "body": null,
            "documentation": {
              "id": 981,
              "nodeType": "StructuredDocumentation",
              "src": "5097:513:4",
              "text": " @dev Checks if the `RelayHub` will accept a relayed operation.\n Multiple things must be true for this to happen:\n  - all arguments must be signed for by the sender (`from`)\n  - the sender's nonce must be the current one\n  - the recipient must accept this transaction (via {acceptRelayedCall})\n Returns a `PreconditionCheck` value (`OK` when the transaction can be relayed), or a recipient-specific error\n code if it returns one in {acceptRelayedCall}."
            },
            "functionSelector": "2b601747",
            "id": 1008,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "canRelay",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 1002,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 983,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5642:13:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 982,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5642:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 985,
                  "mutability": "mutable",
                  "name": "from",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5665:12:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 984,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5665:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 987,
                  "mutability": "mutable",
                  "name": "to",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5687:10:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 986,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5687:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 989,
                  "mutability": "mutable",
                  "name": "encodedFunction",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5707:30:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 988,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "5707:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 991,
                  "mutability": "mutable",
                  "name": "transactionFee",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5747:22:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 990,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5747:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 993,
                  "mutability": "mutable",
                  "name": "gasPrice",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5779:16:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 992,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5779:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 995,
                  "mutability": "mutable",
                  "name": "gasLimit",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5805:16:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 994,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5805:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 997,
                  "mutability": "mutable",
                  "name": "nonce",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5831:13:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 996,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5831:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 999,
                  "mutability": "mutable",
                  "name": "signature",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5854:24:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 998,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "5854:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1001,
                  "mutability": "mutable",
                  "name": "approvalData",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5888:27:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1000,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "5888:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5632:289:4"
            },
            "returnParameters": {
              "id": 1007,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1004,
                  "mutability": "mutable",
                  "name": "status",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5945:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1003,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5945:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1006,
                  "mutability": "mutable",
                  "name": "recipientContext",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1008,
                  "src": "5961:29:4",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1005,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "5961:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5944:47:4"
            },
            "scope": 1128,
            "src": "5615:377:4",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "canonicalName": "IRelayHub.PreconditionCheck",
            "id": 1014,
            "members": [
              {
                "id": 1009,
                "name": "OK",
                "nodeType": "EnumValue",
                "src": "6136:2:4"
              },
              {
                "id": 1010,
                "name": "WrongSignature",
                "nodeType": "EnumValue",
                "src": "6218:14:4"
              },
              {
                "id": 1011,
                "name": "WrongNonce",
                "nodeType": "EnumValue",
                "src": "6316:10:4"
              },
              {
                "id": 1012,
                "name": "AcceptRelayedCallReverted",
                "nodeType": "EnumValue",
                "src": "6410:25:4"
              },
              {
                "id": 1013,
                "name": "InvalidRecipientStatusCode",
                "nodeType": "EnumValue",
                "src": "6504:26:4"
              }
            ],
            "name": "PreconditionCheck",
            "nodeType": "EnumDefinition",
            "src": "6103:494:4"
          },
          {
            "body": null,
            "documentation": {
              "id": 1015,
              "nodeType": "StructuredDocumentation",
              "src": "6603:1585:4",
              "text": " @dev Relays a transaction.\n For this to succeed, multiple conditions must be met:\n  - {canRelay} must `return PreconditionCheck.OK`\n  - the sender must be a registered relay\n  - the transaction's gas price must be larger or equal to the one that was requested by the sender\n  - the transaction must have enough gas to not run out of gas if all internal transactions (calls to the\n recipient) use all gas available to them\n  - the recipient must have enough balance to pay the relay for the worst-case scenario (i.e. when all gas is\n spent)\n If all conditions are met, the call will be relayed and the recipient charged. {preRelayedCall}, the encoded\n function and {postRelayedCall} will be called in that order.\n Parameters:\n  - `from`: the client originating the request\n  - `to`: the target {IRelayRecipient} contract\n  - `encodedFunction`: the function call to relay, including data\n  - `transactionFee`: fee (%) the relay takes over actual gas cost\n  - `gasPrice`: gas price the client is willing to pay\n  - `gasLimit`: gas to forward when calling the encoded function\n  - `nonce`: client's nonce\n  - `signature`: client's signature over all previous params, plus the relay and RelayHub addresses\n  - `approvalData`: dapp-specific data forwarded to {acceptRelayedCall}. This value is *not* verified by the\n `RelayHub`, but it still can be used for e.g. a signature.\n Emits a {TransactionRelayed} event."
            },
            "functionSelector": "405cec67",
            "id": 1036,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "relayCall",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 1034,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1017,
                  "mutability": "mutable",
                  "name": "from",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1036,
                  "src": "8221:12:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1016,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "8221:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1019,
                  "mutability": "mutable",
                  "name": "to",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1036,
                  "src": "8243:10:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1018,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "8243:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1021,
                  "mutability": "mutable",
                  "name": "encodedFunction",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1036,
                  "src": "8263:30:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1020,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "8263:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1023,
                  "mutability": "mutable",
                  "name": "transactionFee",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1036,
                  "src": "8303:22:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1022,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8303:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1025,
                  "mutability": "mutable",
                  "name": "gasPrice",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1036,
                  "src": "8335:16:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1024,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8335:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1027,
                  "mutability": "mutable",
                  "name": "gasLimit",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1036,
                  "src": "8361:16:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1026,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8361:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1029,
                  "mutability": "mutable",
                  "name": "nonce",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1036,
                  "src": "8387:13:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1028,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8387:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1031,
                  "mutability": "mutable",
                  "name": "signature",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1036,
                  "src": "8410:24:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1030,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "8410:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1033,
                  "mutability": "mutable",
                  "name": "approvalData",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1036,
                  "src": "8444:27:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1032,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "8444:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8211:266:4"
            },
            "returnParameters": {
              "id": 1035,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8486:0:4"
            },
            "scope": 1128,
            "src": "8193:294:4",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": {
              "id": 1037,
              "nodeType": "StructuredDocumentation",
              "src": "8493:480:4",
              "text": " @dev Emitted when an attempt to relay a call failed.\n This can happen due to incorrect {relayCall} arguments, or the recipient not accepting the relayed call. The\n actual relayed call was not executed, and the recipient not charged.\n The `reason` parameter contains an error code: values 1-10 correspond to `PreconditionCheck` entries, and values\n over 10 are custom recipient error codes returned from {acceptRelayedCall}."
            },
            "id": 1049,
            "name": "CanRelayFailed",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 1048,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1039,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1049,
                  "src": "8999:21:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1038,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "8999:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1041,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "from",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1049,
                  "src": "9022:20:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1040,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "9022:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1043,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "to",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1049,
                  "src": "9044:18:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1042,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "9044:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1045,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "selector",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1049,
                  "src": "9064:15:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes4",
                    "typeString": "bytes4"
                  },
                  "typeName": {
                    "id": 1044,
                    "name": "bytes4",
                    "nodeType": "ElementaryTypeName",
                    "src": "9064:6:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes4",
                      "typeString": "bytes4"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1047,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "reason",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1049,
                  "src": "9081:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1046,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9081:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8998:98:4"
            },
            "src": "8978:119:4"
          },
          {
            "anonymous": false,
            "documentation": {
              "id": 1050,
              "nodeType": "StructuredDocumentation",
              "src": "9103:368:4",
              "text": " @dev Emitted when a transaction is relayed.\n Useful when monitoring a relay's operation and relayed calls to a contract\n Note that the actual encoded function might be reverted: this is indicated in the `status` parameter.\n `charge` is the Ether value deducted from the recipient's balance, paid to the relay's owner."
            },
            "id": 1064,
            "name": "TransactionRelayed",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 1063,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1052,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1064,
                  "src": "9501:21:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1051,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "9501:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1054,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "from",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1064,
                  "src": "9524:20:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1053,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "9524:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1056,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "to",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1064,
                  "src": "9546:18:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1055,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "9546:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1058,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "selector",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1064,
                  "src": "9566:15:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes4",
                    "typeString": "bytes4"
                  },
                  "typeName": {
                    "id": 1057,
                    "name": "bytes4",
                    "nodeType": "ElementaryTypeName",
                    "src": "9566:6:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes4",
                      "typeString": "bytes4"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1060,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "status",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1064,
                  "src": "9583:22:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_RelayCallStatus_$1070",
                    "typeString": "enum IRelayHub.RelayCallStatus"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1059,
                    "name": "RelayCallStatus",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1070,
                    "src": "9583:15:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_RelayCallStatus_$1070",
                      "typeString": "enum IRelayHub.RelayCallStatus"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1062,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "charge",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1064,
                  "src": "9607:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1061,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9607:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9500:122:4"
            },
            "src": "9476:147:4"
          },
          {
            "canonicalName": "IRelayHub.RelayCallStatus",
            "id": 1070,
            "members": [
              {
                "id": 1065,
                "name": "OK",
                "nodeType": "EnumValue",
                "src": "9719:2:4"
              },
              {
                "id": 1066,
                "name": "RelayedCallFailed",
                "nodeType": "EnumValue",
                "src": "9851:17:4"
              },
              {
                "id": 1067,
                "name": "PreRelayedFailed",
                "nodeType": "EnumValue",
                "src": "9944:16:4"
              },
              {
                "id": 1068,
                "name": "PostRelayedFailed",
                "nodeType": "EnumValue",
                "src": "10044:17:4"
              },
              {
                "id": 1069,
                "name": "RecipientBalanceChanged",
                "nodeType": "EnumValue",
                "src": "10154:23:4"
              }
            ],
            "name": "RelayCallStatus",
            "nodeType": "EnumDefinition",
            "src": "9688:580:4"
          },
          {
            "body": null,
            "documentation": {
              "id": 1071,
              "nodeType": "StructuredDocumentation",
              "src": "10274:177:4",
              "text": " @dev Returns how much gas should be forwarded to a call to {relayCall}, in order to relay a transaction that will\n spend up to `relayedCallStipend` gas."
            },
            "functionSelector": "6a7d84a4",
            "id": 1078,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "requiredGas",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 1074,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1073,
                  "mutability": "mutable",
                  "name": "relayedCallStipend",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1078,
                  "src": "10477:26:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1072,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10477:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10476:28:4"
            },
            "returnParameters": {
              "id": 1077,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1076,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1078,
                  "src": "10528:7:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1075,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10528:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10527:9:4"
            },
            "scope": 1128,
            "src": "10456:81:4",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": {
              "id": 1079,
              "nodeType": "StructuredDocumentation",
              "src": "10543:121:4",
              "text": " @dev Returns the maximum recipient charge, given the amount of gas forwarded, gas price and relay fee."
            },
            "functionSelector": "a863f8f9",
            "id": 1090,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "maxPossibleCharge",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 1086,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1081,
                  "mutability": "mutable",
                  "name": "relayedCallStipend",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1090,
                  "src": "10696:26:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1080,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10696:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1083,
                  "mutability": "mutable",
                  "name": "gasPrice",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1090,
                  "src": "10724:16:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1082,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10724:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1085,
                  "mutability": "mutable",
                  "name": "transactionFee",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1090,
                  "src": "10742:22:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1084,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10742:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10695:70:4"
            },
            "returnParameters": {
              "id": 1089,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1088,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1090,
                  "src": "10789:7:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1087,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10789:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10788:9:4"
            },
            "scope": 1128,
            "src": "10669:129:4",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": {
              "id": 1091,
              "nodeType": "StructuredDocumentation",
              "src": "11094:297:4",
              "text": " @dev Penalize a relay that signed two transactions using the same nonce (making only the first one valid) and\n different data (gas price, gas limit, etc. may be different).\n The (unsigned) transaction data and signature for both transactions must be provided."
            },
            "functionSelector": "a8cd9572",
            "id": 1102,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "penalizeRepeatedNonce",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 1100,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1093,
                  "mutability": "mutable",
                  "name": "unsignedTx1",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1102,
                  "src": "11427:26:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1092,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "11427:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1095,
                  "mutability": "mutable",
                  "name": "signature1",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1102,
                  "src": "11455:25:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1094,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "11455:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1097,
                  "mutability": "mutable",
                  "name": "unsignedTx2",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1102,
                  "src": "11482:26:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1096,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "11482:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1099,
                  "mutability": "mutable",
                  "name": "signature2",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1102,
                  "src": "11510:25:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1098,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "11510:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "11426:110:4"
            },
            "returnParameters": {
              "id": 1101,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "11545:0:4"
            },
            "scope": 1128,
            "src": "11396:150:4",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": {
              "id": 1103,
              "nodeType": "StructuredDocumentation",
              "src": "11552:130:4",
              "text": " @dev Penalize a relay that sent a transaction that didn't target ``RelayHub``'s {registerRelay} or {relayCall}."
            },
            "functionSelector": "39002432",
            "id": 1110,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "penalizeIllegalTransaction",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 1108,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1105,
                  "mutability": "mutable",
                  "name": "unsignedTx",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1110,
                  "src": "11723:25:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1104,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "11723:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1107,
                  "mutability": "mutable",
                  "name": "signature",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1110,
                  "src": "11750:24:4",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1106,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "11750:5:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "11722:53:4"
            },
            "returnParameters": {
              "id": 1109,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "11784:0:4"
            },
            "scope": 1128,
            "src": "11687:98:4",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": {
              "id": 1111,
              "nodeType": "StructuredDocumentation",
              "src": "11791:58:4",
              "text": " @dev Emitted when a relay is penalized."
            },
            "id": 1119,
            "name": "Penalized",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 1118,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1113,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "relay",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1119,
                  "src": "11870:21:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1112,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "11870:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1115,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "sender",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1119,
                  "src": "11893:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1114,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "11893:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1117,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1119,
                  "src": "11909:14:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1116,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11909:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "11869:55:4"
            },
            "src": "11854:71:4"
          },
          {
            "body": null,
            "documentation": {
              "id": 1120,
              "nodeType": "StructuredDocumentation",
              "src": "11931:65:4",
              "text": " @dev Returns an account's nonce in `RelayHub`."
            },
            "functionSelector": "2d0335ab",
            "id": 1127,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getNonce",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 1123,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1122,
                  "mutability": "mutable",
                  "name": "from",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1127,
                  "src": "12019:12:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1121,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "12019:7:4",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "12018:14:4"
            },
            "returnParameters": {
              "id": 1126,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1125,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 1127,
                  "src": "12056:7:4",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1124,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "12056:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "12055:9:4"
            },
            "scope": 1128,
            "src": "12001:64:4",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          }
        ],
        "scope": 1129,
        "src": "388:11679:4"
      }
    ],
    "src": "33:12036:4"
  },
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "compiler": {
    "name": "solc",
    "version": "0.7.0+commit.9e61f92b.Emscripten.clang",
    "optimizer": {
      "enabled": false,
      "runs": 200
    },
    "evmVersion": "petersburg"
  }
}
