Contract 0x3A7083E709BCCd0Fc5fb53cC0Ce9DBd3b5a82DcB

 
Txn Hash
Block
From
To
Value [Txn Fee]
0xa0b960d88aad178ae68c6cc53e1079fc8bcdc1c3c0abb865696aca921878798c56706332021-03-14 10:21:3158 days 22 hrs ago0xdb744d4f65df324e46338bfc1e922d157c7e0852 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.005981616
0x2f0fca6da91878266aed550f711fa69792ef5e0d04ee721573e6e2038dac5c7156682652021-03-14 8:22:4259 days 32 mins ago0xdb744d4f65df324e46338bfc1e922d157c7e0852 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.005981376
0x1bd446b2afd9fa80c8cb21d02f2c7442dae21c3ff4d21bc71516d40a5d8289f256242732021-03-12 19:34:0860 days 13 hrs ago0xdb744d4f65df324e46338bfc1e922d157c7e0852 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.006391872
0x1104abc692cc13cf128f652300ae54786246652c921229b36e0be30be2c9667353274112021-03-02 10:38:2270 days 22 hrs ago0xa975d1de6d7da3140e9e293509337373402558be IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00023011
0x6db3325f92886d7599c4fad4c9c7b966a28ca320d5d6013be8cb467684a24caa53273972021-03-02 10:37:4070 days 22 hrs ago0xa975d1de6d7da3140e9e293509337373402558be IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00023237
0x78f2bb346111d56df5cb2ea0ed2c91f485951d440b2c82472c23ffedfa44747753273802021-03-02 10:36:4970 days 22 hrs ago0xa975d1de6d7da3140e9e293509337373402558be IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00052598
0xededcbfbcd33f7af69b9ad5882edfa50e07f31d219e6e6fa4e1d6c59aba5aa5c52710972021-02-28 11:31:4272 days 21 hrs ago0xdb744d4f65df324e46338bfc1e922d157c7e0852 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00187338
0xb102760ee4ca57ae1ef5ad17a8756468558ebbd12c3e085ce314d626fe17551a49616252021-02-17 14:10:1983 days 18 hrs ago0x30b26341c0310b5e2b1c1fdac43d1c56ffedb550 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00035366
0x4369df9ead8c01f0c641cbb1ecf57ad16f6350ce0c90a1405282cc99970ab2ad42944502021-01-25 8:25:02107 days 30 mins ago0xdb744d4f65df324e46338bfc1e922d157c7e0852 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.003387816
0xb5e999f38d6014ec7f7b58eeefe97689b9d9e39325017cdbe2a577f89ab468cf42713432021-01-24 13:09:40107 days 19 hrs ago0x6bbe31c6730ac06b8f4d3f2ca8bb8575f77215ea IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00046862
0x8a2bdaab7f99d4f4709ea53926f71f453300e0ea15b843a21694d2da07a6451741639002021-01-20 19:36:07111 days 13 hrs ago0xdb744d4f65df324e46338bfc1e922d157c7e0852 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.004107048
0xea09dd04c272af72d39d3b7d7288c10d07543da28a5766544ed4c88eb770f3e541638582021-01-20 19:34:01111 days 13 hrs ago0x30b26341c0310b5e2b1c1fdac43d1c56ffedb550 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00070732
0x817a3729331f03789db543ab9098362ceccf62d958d42985fb73246830f2d90341638582021-01-20 19:34:01111 days 13 hrs ago0x30b26341c0310b5e2b1c1fdac43d1c56ffedb550 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00156614
0x5fe9def250226754d2e26173cceea1e50bb6613f894d2bf7a6b8ff025cd9c58840697852021-01-17 13:10:20114 days 19 hrs ago0xe066d8584cb25d048ffee6e762bcf1b9a8dc5602 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.003286536
0x3512eb3cb58d3b7d97cc563d8c91a451150091ba2a04d21158a721481eb24ae440697742021-01-17 13:09:47114 days 19 hrs ago0xe066d8584cb25d048ffee6e762bcf1b9a8dc5602 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.003747528
0x952e7c1b0bf16b320bce335efaa3304f666b5e6acd9d9980208c4227e1af767338778102021-01-10 21:10:51121 days 11 hrs ago0xe066d8584cb25d048ffee6e762bcf1b9a8dc5602 IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00446676
0xad6cd86f515e47fdf39530571cc7a5b46a37fea5c77c0ca98fc39962c341194d38691412021-01-10 13:57:24121 days 18 hrs ago0xa975d1de6d7da3140e9e293509337373402558be IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00046946
0xe174a18fc12060226ecf211cb26231e939a11da6c4769e73a5d8f0e2b4c5ad4a37937862021-01-07 23:08:37124 days 9 hrs ago0x6bbe31c6730ac06b8f4d3f2ca8bb8575f77215ea IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00070732
0x14d5076ecb590f0546b23da1367d92d2fecd27023b8e1c38c5c3a11299a3769537937862021-01-07 23:08:37124 days 9 hrs ago0x6bbe31c6730ac06b8f4d3f2ca8bb8575f77215ea IN  0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0 BNB0.00156614
0xdddaef92d08a4c1468c90a1c5436dde98116304b567b3e6008cc2043c7b54d8137936032021-01-07 22:59:28124 days 9 hrs ago0xa975d1de6d7da3140e9e293509337373402558be IN  Contract Creation0 BNB0.05921674
[ Download CSV Export 
Latest 6 internal transactions
Parent Txn Hash Block From To Value
0x1fd1f19aa06643c0348bef52be31ada1d2c7cd35326eff2b1f21427b32c240f972472032021-05-08 16:55:113 days 16 hrs ago 0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0xa975d1de6d7da3140e9e293509337373402558be0.0123805844 BNB
0xe31300ef6759516c30f3350e0a5b79ee8e055209bc29438a4d6c7f3f91f633da55927852021-03-11 17:18:4761 days 15 hrs ago 0xed6dae3a3c0090d8feeed03c79f8483753fc2eed 0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0.1 BNB
0x78f2bb346111d56df5cb2ea0ed2c91f485951d440b2c82472c23ffedfa44747753273802021-03-02 10:36:4970 days 22 hrs ago 0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb 0x19120dd5a594da608af904b3becd1a1b9a8391000 BNB
0xb5e999f38d6014ec7f7b58eeefe97689b9d9e39325017cdbe2a577f89ab468cf42713432021-01-24 13:09:40107 days 19 hrs ago 0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0xa975d1de6d7da3140e9e293509337373402558be0.0207754008 BNB
0x5f2250610682a4e8ab799e7e2dd30886799f669b365a567fca420e22fa990bb438780102021-01-10 21:20:51121 days 11 hrs ago 0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0xa975d1de6d7da3140e9e293509337373402558be0.1 BNB
0x53c499f1c98f9f36270b6825dd0ee881a3e86ca31b69939ffa9ce666e9a329da38653862021-01-10 10:49:39121 days 22 hrs ago 0x407a5823f83159fac2be7a5228fbc1ee140fedfd 0x3a7083e709bccd0fc5fb53cc0ce9dbd3b5a82dcb0.15 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x2ebc08948d0dd5d034fbe0b1084c65f57ef7d0bc

Contract Name:
RelayHub

Compiler Version
v0.6.10+commit.00c0fcaf

Optimization Enabled:
Yes with 200 runs

Other Settings:
istanbul EvmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 38 : BasePaymaster.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.10;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/access/Ownable.sol";

import "./interfaces/GsnTypes.sol";
import "./interfaces/IPaymaster.sol";
import "./interfaces/IRelayHub.sol";
import "./utils/GsnEip712Library.sol";
import "./forwarder/Forwarder.sol";

/**
 * Abstract base class to be inherited by a concrete Paymaster
 * A subclass must implement:
 *  - preRelayedCall
 *  - postRelayedCall
 */
abstract contract BasePaymaster is IPaymaster, Ownable {

    IRelayHub internal relayHub;
    IForwarder public override trustedForwarder;

    function getHubAddr() public override view returns (address) {
        return address(relayHub);
    }

    //overhead of forwarder verify+signature, plus hub overhead.
    uint256 constant public FORWARDER_HUB_OVERHEAD = 50000;

    //These parameters are documented in IPaymaster.GasLimits
    uint256 constant public PRE_RELAYED_CALL_GAS_LIMIT = 100000;
    uint256 constant public POST_RELAYED_CALL_GAS_LIMIT = 110000;
    uint256 constant public PAYMASTER_ACCEPTANCE_BUDGET = PRE_RELAYED_CALL_GAS_LIMIT + FORWARDER_HUB_OVERHEAD;

    function getGasLimits()
    public
    override
    virtual
    view
    returns (
        IPaymaster.GasLimits memory limits
    ) {
        return IPaymaster.GasLimits(
            PAYMASTER_ACCEPTANCE_BUDGET,
            PRE_RELAYED_CALL_GAS_LIMIT,
            POST_RELAYED_CALL_GAS_LIMIT
        );
    }

    // this method must be called from preRelayedCall to validate that the forwarder
    // is approved by the paymaster as well as by the recipient contract.
    function _verifyForwarder(GsnTypes.RelayRequest calldata relayRequest)
    public
    view
    {
        require(address(trustedForwarder) == relayRequest.relayData.forwarder, "Forwarder is not trusted");
        GsnEip712Library.verifyForwarderTrusted(relayRequest);
    }

    /*
     * modifier to be used by recipients as access control protection for preRelayedCall & postRelayedCall
     */
    modifier relayHubOnly() {
        require(msg.sender == getHubAddr(), "Function can only be called by RelayHub");
        _;
    }

    function setRelayHub(IRelayHub hub) public onlyOwner {
        relayHub = hub;
    }

    function setTrustedForwarder(IForwarder forwarder) public onlyOwner {
        trustedForwarder = forwarder;
    }

    /// check current deposit on relay hub.
    function getRelayHubDeposit()
    public
    override
    view
    returns (uint) {
        return relayHub.balanceOf(address(this));
    }

    // any money moved into the paymaster is transferred as a deposit.
    // This way, we don't need to understand the RelayHub API in order to replenish
    // the paymaster.
    receive() external virtual payable {
        require(address(relayHub) != address(0), "relay hub address not set");
        relayHub.depositFor{value:msg.value}(address(this));
    }

    /// withdraw deposit from relayHub
    function withdrawRelayHubDepositTo(uint amount, address payable target) public onlyOwner {
        relayHub.withdraw(amount, target);
    }
}

File 2 of 38 : BaseRelayRecipient.sol
// SPDX-License-Identifier:MIT
// solhint-disable no-inline-assembly
pragma solidity ^0.6.2;

import "./interfaces/IRelayRecipient.sol";

/**
 * A base contract to be inherited by any contract that want to receive relayed transactions
 * A subclass must use "_msgSender()" instead of "msg.sender"
 */
abstract contract BaseRelayRecipient is IRelayRecipient {

    /*
     * Forwarder singleton we accept calls from
     */
    address public trustedForwarder;

    function isTrustedForwarder(address forwarder) public override view returns(bool) {
        return forwarder == trustedForwarder;
    }

    /**
     * return the sender of this call.
     * if the call came through our trusted forwarder, return the original sender.
     * otherwise, return `msg.sender`.
     * should be used in the contract anywhere instead of msg.sender
     */
    function _msgSender() internal override virtual view returns (address payable ret) {
        if (msg.data.length >= 24 && isTrustedForwarder(msg.sender)) {
            // At this point we know that the sender is a trusted forwarder,
            // so we trust that the last bytes of msg.data are the verified sender address.
            // extract sender address from the end of msg.data
            assembly {
                ret := shr(96,calldataload(sub(calldatasize(),20)))
            }
        } else {
            return msg.sender;
        }
    }

    /**
     * return the msg.data of this call.
     * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes
     * of the msg.data - so this method will strip those 20 bytes off.
     * otherwise, return `msg.data`
     * should be used in the contract instead of msg.data, where the difference matters (e.g. when explicitly
     * signing or hashing the
     */
    function _msgData() internal override virtual view returns (bytes memory ret) {
        if (msg.data.length >= 24 && isTrustedForwarder(msg.sender)) {
            // At this point we know that the sender is a trusted forwarder,
            // we copy the msg.data , except the last 20 bytes (and update the total length)
            assembly {
                let ptr := mload(0x40)
                // copy only size-20 bytes
                let size := sub(calldatasize(),20)
                // structure RLP data as <offset> <length> <bytes>
                mstore(ptr, 0x20)
                mstore(add(ptr,32), size)
                calldatacopy(add(ptr,64), 0, size)
                return(ptr, add(size,64))
            }
        } else {
            return msg.data;
        }
    }
}

File 3 of 38 : BatchForwarder.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "./forwarder/Forwarder.sol";
import "./BaseRelayRecipient.sol";
import "./utils/GsnUtils.sol";

/**
 * batch forwarder support calling a method sendBatch in the forwarder itself.
 * NOTE: the "target" of the request should be the BatchForwarder itself
 */
contract BatchForwarder is Forwarder, BaseRelayRecipient {

    string public override versionRecipient = "2.0.0+opengsn.batched.irelayrecipient";

    constructor() public {
        //needed for sendBatch
        trustedForwarder = address(this);
    }

    function sendBatch(address[] calldata targets, bytes[] calldata encodedFunctions) external {
        require(targets.length == encodedFunctions.length);
        address sender = _msgSender();
        for (uint i = 0; i < targets.length; i++) {
            // solhint-disable-next-line avoid-low-level-calls
            (bool success, bytes memory ret) = targets[i].call(abi.encodePacked(encodedFunctions[i], sender));
            // TODO: currently, relayed transaction does not report exception string. when it does, this
            // will propagate the inner call exception description
            if (!success){
                //re-throw the revert with the same revert reason.
                GsnUtils.revertWithData(ret);
            }
        }
    }
}

File 4 of 38 : Migrations.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;

contract Migrations {
    address public owner;
    // solhint-disable-next-line var-name-mixedcase
    uint public last_completed_migration;

    constructor() public {
        owner = msg.sender;
    }

    modifier restricted() {
        if (msg.sender == owner) _;
    }

    function setCompleted(uint completed) public restricted {
        last_completed_migration = completed;
    }

    function upgrade(address newAddress) public restricted {
        Migrations upgraded = Migrations(newAddress);
        upgraded.setCompleted(last_completed_migration);
    }
}

File 5 of 38 : Penalizer.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/cryptography/ECDSA.sol";

import "./utils/RLPReader.sol";
import "./utils/GsnUtils.sol";
import "./interfaces/IRelayHub.sol";
import "./interfaces/IPenalizer.sol";

contract Penalizer is IPenalizer{

    string public override versionPenalizer = "2.0.0+opengsn.penalizer.ipenalizer";

    using ECDSA for bytes32;

    function decodeTransaction(bytes memory rawTransaction) private pure returns (Transaction memory transaction) {
        (transaction.nonce,
        transaction.gasPrice,
        transaction.gasLimit,
        transaction.to,
        transaction.value,
        transaction.data) = RLPReader.decodeTransaction(rawTransaction);
        return transaction;

    }

    modifier relayManagerOnly(IRelayHub hub) {
        require(hub.isRelayManagerStaked(msg.sender), "Unknown relay manager");
        _;
    }

    function penalizeRepeatedNonce(
        bytes memory unsignedTx1,
        bytes memory signature1,
        bytes memory unsignedTx2,
        bytes memory signature2,
        IRelayHub hub
    )
    public
    override
    relayManagerOnly(hub)
    {
        // Can be called by a relay manager only.
        // If a relay attacked the system by signing multiple transactions with the same nonce
        // (so only one is accepted), anyone can grab both transactions from the blockchain and submit them here.
        // Check whether unsignedTx1 != unsignedTx2, that both are signed by the same address,
        // and that unsignedTx1.nonce == unsignedTx2.nonce.
        // If all conditions are met, relay is considered an "offending relay".
        // The offending relay will be unregistered immediately, its stake will be forfeited and given
        // to the address who reported it (msg.sender), thus incentivizing anyone to report offending relays.
        // If reported via a relay, the forfeited stake is split between
        // msg.sender (the relay used for reporting) and the address that reported it.

        address addr1 = keccak256(abi.encodePacked(unsignedTx1)).recover(signature1);
        address addr2 = keccak256(abi.encodePacked(unsignedTx2)).recover(signature2);

        require(addr1 == addr2, "Different signer");
        require(addr1 != address(0), "ecrecover failed");

        Transaction memory decodedTx1 = decodeTransaction(unsignedTx1);
        Transaction memory decodedTx2 = decodeTransaction(unsignedTx2);

        // checking that the same nonce is used in both transaction, with both signed by the same address
        // and the actual data is different
        // note: we compare the hash of the tx to save gas over iterating both byte arrays
        require(decodedTx1.nonce == decodedTx2.nonce, "Different nonce");

        bytes memory dataToCheck1 =
        abi.encodePacked(decodedTx1.data, decodedTx1.gasLimit, decodedTx1.to, decodedTx1.value);

        bytes memory dataToCheck2 =
        abi.encodePacked(decodedTx2.data, decodedTx2.gasLimit, decodedTx2.to, decodedTx2.value);

        require(keccak256(dataToCheck1) != keccak256(dataToCheck2), "tx is equal");

        penalize(addr1, hub);
    }

    function penalizeIllegalTransaction(
        bytes memory unsignedTx,
        bytes memory signature,
        IRelayHub hub
    )
    public
    override
    relayManagerOnly(hub)
    {
        Transaction memory decodedTx = decodeTransaction(unsignedTx);
        if (decodedTx.to == address(hub)) {
            bytes4 selector = GsnUtils.getMethodSig(decodedTx.data);
            bool isWrongMethodCall = selector != IRelayHub.relayCall.selector;
            bool isGasLimitWrong = GsnUtils.getParam(decodedTx.data, 4) != decodedTx.gasLimit;
            require(
                isWrongMethodCall || isGasLimitWrong,
                "Legal relay transaction");
        }
        address relay = keccak256(abi.encodePacked(unsignedTx)).recover(signature);
        require(relay != address(0), "ecrecover failed");

        penalize(relay, hub);
    }

    function penalize(address relayWorker, IRelayHub hub) private {
        hub.penalize(relayWorker, msg.sender);
    }
}

File 6 of 38 : RelayHub.sol
/* solhint-disable avoid-low-level-calls */
/* solhint-disable no-inline-assembly */
/* solhint-disable not-rely-on-time */
/* solhint-disable avoid-tx-origin */
/* solhint-disable bracket-align */
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.9;
pragma experimental ABIEncoderV2;

import "./utils/MinLibBytes.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";

import "./utils/GsnUtils.sol";
import "./utils/GsnEip712Library.sol";
import "./interfaces/GsnTypes.sol";
import "./interfaces/IRelayHub.sol";
import "./interfaces/IPaymaster.sol";
import "./forwarder/IForwarder.sol";
import "./interfaces/IStakeManager.sol";

contract RelayHub is IRelayHub {
    using SafeMath for uint256;

    string public override versionHub = "2.0.0+opengsn.hub.irelayhub";

    uint256 public override minimumStake;
    uint256 public override minimumUnstakeDelay;
    uint256 public override maximumRecipientDeposit;
    uint256 public override gasOverhead;
    uint256 public override postOverhead;
    uint256 public override gasReserve;
    uint256 public override maxWorkerCount;
    IStakeManager override public stakeManager;
    address override public penalizer;

    // maps relay worker's address to its manager's address
    mapping(address => address) public override workerToManager;

    // maps relay managers to the number of their workers
    mapping(address => uint256) public override workerCount;

    mapping(address => uint256) private balances;

    constructor (
        IStakeManager _stakeManager,
        address _penalizer,
        uint256 _maxWorkerCount,
        uint256 _gasReserve,
        uint256 _postOverhead,
        uint256 _gasOverhead,
        uint256 _maximumRecipientDeposit,
        uint256 _minimumUnstakeDelay,
        uint256 _minimumStake
    ) public {
        stakeManager = _stakeManager;
        penalizer = _penalizer;
        maxWorkerCount = _maxWorkerCount;
        gasReserve = _gasReserve;
        postOverhead = _postOverhead;
        gasOverhead = _gasOverhead;
        maximumRecipientDeposit = _maximumRecipientDeposit;
        minimumUnstakeDelay = _minimumUnstakeDelay;
        minimumStake =  _minimumStake;
    }

    function registerRelayServer(uint256 baseRelayFee, uint256 pctRelayFee, string calldata url) external override {
        address relayManager = msg.sender;
        require(
            isRelayManagerStaked(relayManager),
            "relay manager not staked"
        );
        require(workerCount[relayManager] > 0, "no relay workers");
        emit RelayServerRegistered(relayManager, baseRelayFee, pctRelayFee, url);
    }

    function addRelayWorkers(address[] calldata newRelayWorkers) external override {
        address relayManager = msg.sender;
        workerCount[relayManager] = workerCount[relayManager] + newRelayWorkers.length;
        require(workerCount[relayManager] <= maxWorkerCount, "too many workers");

        require(
            isRelayManagerStaked(relayManager),
            "relay manager not staked"
        );

        for (uint256 i = 0; i < newRelayWorkers.length; i++) {
            require(workerToManager[newRelayWorkers[i]] == address(0), "this worker has a manager");
            workerToManager[newRelayWorkers[i]] = relayManager;
        }

        emit RelayWorkersAdded(relayManager, newRelayWorkers, workerCount[relayManager]);
    }

    function depositFor(address target) public override payable {
        uint256 amount = msg.value;
        require(amount <= maximumRecipientDeposit, "deposit too big");

        balances[target] = balances[target].add(amount);

        emit Deposited(target, msg.sender, amount);
    }

    function balanceOf(address target) external override view returns (uint256) {
        return balances[target];
    }

    function withdraw(uint256 amount, address payable dest) public override {
        address payable account = msg.sender;
        require(balances[account] >= amount, "insufficient funds");

        balances[account] = balances[account].sub(amount);
        dest.transfer(amount);

        emit Withdrawn(account, dest, amount);
    }

    function verifyGasLimits(
        uint256 paymasterMaxAcceptanceBudget,
        GsnTypes.RelayRequest calldata relayRequest,
        uint256 initialGas
    )
    private
    view
    returns (IPaymaster.GasLimits memory gasLimits, uint256 maxPossibleGas) {
        gasLimits =
            IPaymaster(relayRequest.relayData.paymaster).getGasLimits{gas:50000}();

        require(paymasterMaxAcceptanceBudget >= gasLimits.acceptanceBudget, "unexpected high acceptanceBudget");

        maxPossibleGas =
            gasOverhead.add(
            gasLimits.preRelayedCallGasLimit).add(
            gasLimits.postRelayedCallGasLimit).add(
            relayRequest.request.gas);

        // This transaction must have enough gas to forward the call to the recipient with the requested amount, and not
        // run out of gas later in this function.
        require(
            initialGas >= maxPossibleGas,
            "Not enough gas left for innerRelayCall to complete");

        uint256 maxPossibleCharge = calculateCharge(
            maxPossibleGas,
            relayRequest.relayData
        );

        // We don't yet know how much gas will be used by the recipient, so we make sure there are enough funds to pay
        // for the maximum possible charge.
        require(maxPossibleCharge <= balances[relayRequest.relayData.paymaster],
            "Paymaster balance too low");
    }

    struct RelayCallData {
        bool success;
        bytes4 functionSelector;
        bytes recipientContext;
        bytes relayedCallReturnValue;
        IPaymaster.GasLimits gasLimits;
        RelayCallStatus status;
        uint256 innerGasUsed;
        uint256 maxPossibleGas;
        uint256 gasBeforeInner;
        bytes retData;
    }

    function relayCall(
        uint paymasterMaxAcceptanceBudget,
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        uint externalGasLimit
    )
    external
    override
    returns (bool paymasterAccepted, bytes memory returnValue)
    {
        (signature);
        RelayCallData memory vars;
        vars.functionSelector = MinLibBytes.readBytes4(relayRequest.request.data, 0);
        require(msg.sender == tx.origin, "relay worker cannot be a smart contract");
        require(workerToManager[msg.sender] != address(0), "Unknown relay worker");
        require(relayRequest.relayData.relayWorker == msg.sender, "Not a right worker");
        require(
            isRelayManagerStaked(workerToManager[msg.sender]),
            "relay manager not staked"
        );
        require(relayRequest.relayData.gasPrice <= tx.gasprice, "Invalid gas price");
        require(externalGasLimit <= block.gaslimit, "Impossible gas limit");

        (vars.gasLimits, vars.maxPossibleGas) =
             verifyGasLimits(paymasterMaxAcceptanceBudget, relayRequest, externalGasLimit);

    {

        //How much gas to pass down to innerRelayCall. must be lower than the default 63/64
        // actually, min(gasleft*63/64, gasleft-GAS_RESERVE) might be enough.
        uint256 innerGasLimit = gasleft()*63/64-gasReserve;
        vars.gasBeforeInner = gasleft();

        uint256 _tmpInitialGas = innerGasLimit + externalGasLimit + gasOverhead + postOverhead;
        // Calls to the recipient are performed atomically inside an inner transaction which may revert in case of
        // errors in the recipient. In either case (revert or regular execution) the return data encodes the
        // RelayCallStatus value.
        (bool success, bytes memory relayCallStatus) = address(this).call{gas:innerGasLimit}(
            abi.encodeWithSelector(RelayHub.innerRelayCall.selector, relayRequest, signature, approvalData, vars.gasLimits,
                _tmpInitialGas - gasleft(),
                vars.maxPossibleGas
                )
        );
        vars.success = success;
        vars.innerGasUsed = vars.gasBeforeInner-gasleft();
        (vars.status, vars.relayedCallReturnValue) = abi.decode(relayCallStatus, (RelayCallStatus, bytes));
        if ( vars.relayedCallReturnValue.length>0 ) {
            emit TransactionResult(vars.status, vars.relayedCallReturnValue);
        }
    }
    {
        if (!vars.success) {
            //Failure cases where the PM doesn't pay
            if ( (vars.innerGasUsed < vars.gasLimits.acceptanceBudget ) && (
                    vars.status == RelayCallStatus.RejectedByPreRelayed ||
                    vars.status == RelayCallStatus.RejectedByForwarder ||
                    vars.status == RelayCallStatus.RejectedByRecipientRevert  //can only be thrown if rejectOnRecipientRevert==true
            )) {
                paymasterAccepted=false;

                emit TransactionRejectedByPaymaster(
                    workerToManager[msg.sender],
                    relayRequest.relayData.paymaster,
                    relayRequest.request.from,
                    relayRequest.request.to,
                    msg.sender,
                    vars.functionSelector,
                    vars.innerGasUsed,
                    vars.relayedCallReturnValue);
                return (false, vars.relayedCallReturnValue);
            }
        }
        // We now perform the actual charge calculation, based on the measured gas used
        uint256 gasUsed = (externalGasLimit - gasleft()) + gasOverhead;
        uint256 charge = calculateCharge(gasUsed, relayRequest.relayData);

        balances[relayRequest.relayData.paymaster] = balances[relayRequest.relayData.paymaster].sub(charge);
        balances[workerToManager[msg.sender]] = balances[workerToManager[msg.sender]].add(charge);

        emit TransactionRelayed(
            workerToManager[msg.sender],
            msg.sender,
            relayRequest.request.from,
            relayRequest.request.to,
            relayRequest.relayData.paymaster,
            vars.functionSelector,
            vars.status,
            charge);
        return (true, "");
    }
    }

    struct InnerRelayCallData {
        uint256 balanceBefore;
        bytes32 preReturnValue;
        bool relayedCallSuccess;
        bytes relayedCallReturnValue;
        bytes recipientContext;
        bytes data;
        bool rejectOnRecipientRevert;
    }

    function innerRelayCall(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        IPaymaster.GasLimits calldata gasLimits,
        uint256 totalInitialGas,
        uint256 maxPossibleGas
    )
    external
    returns (RelayCallStatus, bytes memory)
    {
        InnerRelayCallData memory vars;
        // A new gas measurement is performed inside innerRelayCall, since
        // due to EIP150 available gas amounts cannot be directly compared across external calls

        // This external function can only be called by RelayHub itself, creating an internal transaction. Calls to the
        // recipient (preRelayedCall, the relayedCall, and postRelayedCall) are called from inside this transaction.
        require(msg.sender == address(this), "Only RelayHub should call this function");

        // If either pre or post reverts, the whole internal transaction will be reverted, reverting all side effects on
        // the recipient. The recipient will still be charged for the used gas by the relay.

        // The recipient is no allowed to withdraw balance from RelayHub during a relayed transaction. We check pre and
        // post state to ensure this doesn't happen.
        vars.balanceBefore = balances[relayRequest.relayData.paymaster];

        // First preRelayedCall is executed.
        // Note: we open a new block to avoid growing the stack too much.
        vars.data = abi.encodeWithSelector(
            IPaymaster.preRelayedCall.selector,
                relayRequest, signature, approvalData, maxPossibleGas
        );
        {
            bool success;
            bytes memory retData;
            (success, retData) = relayRequest.relayData.paymaster.call{gas:gasLimits.preRelayedCallGasLimit}(vars.data);
            if (!success) {
                GsnEip712Library.truncateInPlace(retData);
                revertWithStatus(RelayCallStatus.RejectedByPreRelayed, retData);
            }
            (vars.recipientContext, vars.rejectOnRecipientRevert) = abi.decode(retData, (bytes,bool));
        }

        // The actual relayed call is now executed. The sender's address is appended at the end of the transaction data

        {
            bool forwarderSuccess;
            (forwarderSuccess, vars.relayedCallSuccess, vars.relayedCallReturnValue) = GsnEip712Library.execute(relayRequest, signature);
            if ( !forwarderSuccess ) {
                revertWithStatus(RelayCallStatus.RejectedByForwarder, vars.relayedCallReturnValue);
            }

            if (vars.rejectOnRecipientRevert && !vars.relayedCallSuccess) {
                //we trusted the recipient, but it reverted...
                revertWithStatus(RelayCallStatus.RejectedByRecipientRevert, vars.relayedCallReturnValue);
            }
        }
        // Finally, postRelayedCall is executed, with the relayedCall execution's status and a charge estimate
        // We now determine how much the recipient will be charged, to pass this value to postRelayedCall for accurate
        // accounting.
        vars.data = abi.encodeWithSelector(
            IPaymaster.postRelayedCall.selector,
            vars.recipientContext,
            vars.relayedCallSuccess,
            totalInitialGas - gasleft(), /*gasUseWithoutPost*/
            relayRequest.relayData
        );

        {
        (bool successPost,bytes memory ret) = relayRequest.relayData.paymaster.call{gas:gasLimits.postRelayedCallGasLimit}(vars.data);

        if (!successPost) {
            revertWithStatus(RelayCallStatus.PostRelayedFailed, ret);
        }
        }

        if (balances[relayRequest.relayData.paymaster] < vars.balanceBefore) {
            revertWithStatus(RelayCallStatus.PaymasterBalanceChanged, "");
        }

        return (vars.relayedCallSuccess ? RelayCallStatus.OK : RelayCallStatus.RelayedCallFailed, vars.relayedCallReturnValue);
    }

    /**
     * @dev Reverts the transaction with return data set to the ABI encoding of the status argument (and revert reason data)
     */
    function revertWithStatus(RelayCallStatus status, bytes memory ret) private pure {
        bytes memory data = abi.encode(status, ret);
        GsnEip712Library.truncateInPlace(data);

        assembly {
            let dataSize := mload(data)
            let dataPtr := add(data, 32)

            revert(dataPtr, dataSize)
        }
    }

    function calculateCharge(uint256 gasUsed, GsnTypes.RelayData calldata relayData) public override virtual view returns (uint256) {
        //       relayData.baseRelayFee + (gasUsed * relayData.gasPrice * (100 + relayData.pctRelayFee)) / 100;
        return relayData.baseRelayFee.add((gasUsed.mul(relayData.gasPrice).mul(relayData.pctRelayFee.add(100))).div(100));
    }

    function isRelayManagerStaked(address relayManager) public override view returns (bool) {
        return stakeManager.isRelayManagerStaked(relayManager, address(this), minimumStake, minimumUnstakeDelay);
    }

    modifier penalizerOnly () {
        require(msg.sender == penalizer, "Not penalizer");
        _;
    }

    function penalize(address relayWorker, address payable beneficiary) external override penalizerOnly {
        address relayManager = workerToManager[relayWorker];
        // The worker must be controlled by a manager with a locked stake
        require(relayManager != address(0), "Unknown relay worker");
        require(
            isRelayManagerStaked(relayManager),
            "relay manager not staked"
        );
        IStakeManager.StakeInfo memory stakeInfo = stakeManager.getStakeInfo(relayManager);
        stakeManager.penalizeRelayManager(relayManager, beneficiary, stakeInfo.stake);
    }
}

File 7 of 38 : StakeManager.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/math/SafeMath.sol";

import "./interfaces/IStakeManager.sol";

contract StakeManager is IStakeManager {
    using SafeMath for uint256;

    string public override versionSM = "2.0.0+opengsn.stakemanager.istakemanager";

    /// maps relay managers to their stakes
    mapping(address => StakeInfo) public stakes;
    function getStakeInfo(address relayManager) external override view returns (StakeInfo memory stakeInfo) {
        return stakes[relayManager];
    }

    /// maps relay managers to a map of addressed of their authorized hubs to the information on that hub
    mapping(address => mapping(address => RelayHubInfo)) public authorizedHubs;

    /// Put a stake for a relayManager and set its unstake delay.
    /// If the entry does not exist, it is created, and the caller of this function becomes its owner.
    /// If the entry already exists, only the owner can call this function.
    /// @param relayManager - address that represents a stake entry and controls relay registrations on relay hubs
    /// @param unstakeDelay - number of blocks to elapse before the owner can retrieve the stake after calling 'unlock'
    function stakeForAddress(address relayManager, uint256 unstakeDelay) external override payable {
        require(stakes[relayManager].owner == address(0) || stakes[relayManager].owner == msg.sender, "not owner");
        require(unstakeDelay >= stakes[relayManager].unstakeDelay, "unstakeDelay cannot be decreased");
        require(msg.sender != relayManager, "relayManager cannot stake for itself");
        require(stakes[msg.sender].owner == address(0), "sender is a relayManager itself");
        stakes[relayManager].owner = msg.sender;
        stakes[relayManager].stake += msg.value;
        stakes[relayManager].unstakeDelay = unstakeDelay;
        emit StakeAdded(relayManager, stakes[relayManager].owner, stakes[relayManager].stake, stakes[relayManager].unstakeDelay);
    }

    function unlockStake(address relayManager) external override {
        StakeInfo storage info = stakes[relayManager];
        require(info.owner == msg.sender, "not owner");
        require(info.withdrawBlock == 0, "already pending");
        info.withdrawBlock = block.number.add(info.unstakeDelay);
        emit StakeUnlocked(relayManager, msg.sender, info.withdrawBlock);
    }

    function withdrawStake(address relayManager) external override {
        StakeInfo storage info = stakes[relayManager];
        require(info.owner == msg.sender, "not owner");
        require(info.withdrawBlock > 0, "Withdrawal is not scheduled");
        require(info.withdrawBlock <= block.number, "Withdrawal is not due");
        uint256 amount = info.stake;
        delete stakes[relayManager];
        msg.sender.transfer(amount);
        emit StakeWithdrawn(relayManager, msg.sender, amount);
    }

    modifier ownerOnly (address relayManager) {
        StakeInfo storage info = stakes[relayManager];
        require(info.owner == msg.sender, "not owner");
        _;
    }

    modifier managerOnly () {
        StakeInfo storage info = stakes[msg.sender];
        require(info.owner != address(0), "not manager");
        _;
    }

    function authorizeHubByOwner(address relayManager, address relayHub) external ownerOnly(relayManager) override {
        _authorizeHub(relayManager, relayHub);
    }

    function authorizeHubByManager(address relayHub) external managerOnly override {
        _authorizeHub(msg.sender, relayHub);
    }

    function _authorizeHub(address relayManager, address relayHub) internal {
        authorizedHubs[relayManager][relayHub].removalBlock = uint(-1);
        emit HubAuthorized(relayManager, relayHub);
    }

    function unauthorizeHubByOwner(address relayManager, address relayHub) external override ownerOnly(relayManager) {
        _unauthorizeHub(relayManager, relayHub);
    }

    function unauthorizeHubByManager(address relayHub) external override managerOnly {
        _unauthorizeHub(msg.sender, relayHub);
    }

    function _unauthorizeHub(address relayManager, address relayHub) internal {
        RelayHubInfo storage hubInfo = authorizedHubs[relayManager][relayHub];
        require(hubInfo.removalBlock == uint(-1), "hub not authorized");
        uint256 removalBlock = block.number.add(stakes[relayManager].unstakeDelay);
        hubInfo.removalBlock = removalBlock;
        emit HubUnauthorized(relayManager, relayHub, removalBlock);
    }

    function isRelayManagerStaked(address relayManager, address relayHub, uint256 minAmount, uint256 minUnstakeDelay)
    external
    override
    view
    returns (bool) {
        StakeInfo storage info = stakes[relayManager];
        bool isAmountSufficient = info.stake >= minAmount;
        bool isDelaySufficient = info.unstakeDelay >= minUnstakeDelay;
        bool isStakeLocked = info.withdrawBlock == 0;
        bool isHubAuthorized = authorizedHubs[relayManager][relayHub].removalBlock == uint(-1);
        return
        isAmountSufficient &&
        isDelaySufficient &&
        isStakeLocked &&
        isHubAuthorized;
    }

    /// Slash the stake of the relay relayManager. In order to prevent stake kidnapping, burns half of stake on the way.
    /// @param relayManager - entry to penalize
    /// @param beneficiary - address that receives half of the penalty amount
    /// @param amount - amount to withdraw from stake
    function penalizeRelayManager(address relayManager, address payable beneficiary, uint256 amount) external override {
        uint256 removalBlock =  authorizedHubs[relayManager][msg.sender].removalBlock;
        require(removalBlock != 0, "hub not authorized");
        require(removalBlock > block.number, "hub authorization expired");

        // Half of the stake will be burned (sent to address 0)
        require(stakes[relayManager].stake >= amount, "penalty exceeds stake");
        stakes[relayManager].stake = SafeMath.sub(stakes[relayManager].stake, amount);

        uint256 toBurn = SafeMath.div(amount, 2);
        uint256 reward = SafeMath.sub(amount, toBurn);

        // Ether is burned and transferred
        address(0).transfer(toBurn);
        beneficiary.transfer(reward);
        emit StakePenalized(relayManager, beneficiary, reward);
    }
}

File 8 of 38 : Forwarder.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/cryptography/ECDSA.sol";
import "./IForwarder.sol";

contract Forwarder is IForwarder {
    using ECDSA for bytes32;

    string public constant GENERIC_PARAMS = "address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data";

    string public constant EIP712_DOMAIN_TYPE = "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)";

    mapping(bytes32 => bool) public typeHashes;
    mapping(bytes32 => bool) public domains;

    // Nonces of senders, used to prevent replay attacks
    mapping(address => uint256) private nonces;

    // solhint-disable-next-line no-empty-blocks
    receive() external payable {}

    function getNonce(address from)
    public view override
    returns (uint256) {
        return nonces[from];
    }

    constructor() public {

        string memory requestType = string(abi.encodePacked("ForwardRequest(", GENERIC_PARAMS, ")"));
        registerRequestTypeInternal(requestType);
    }

    function verify(
        ForwardRequest memory req,
        bytes32 domainSeparator,
        bytes32 requestTypeHash,
        bytes calldata suffixData,
        bytes calldata sig)
    external override view {

        _verifyNonce(req);
        _verifySig(req, domainSeparator, requestTypeHash, suffixData, sig);
    }

    function execute(
        ForwardRequest memory req,
        bytes32 domainSeparator,
        bytes32 requestTypeHash,
        bytes calldata suffixData,
        bytes calldata sig
    )
    external payable
    override
    returns (bool success, bytes memory ret) {
        _verifyNonce(req);
        _verifySig(req, domainSeparator, requestTypeHash, suffixData, sig);
        _updateNonce(req);

        // solhint-disable-next-line avoid-low-level-calls
        (success,ret) = req.to.call{gas : req.gas, value : req.value}(abi.encodePacked(req.data, req.from));
        if ( address(this).balance>0 ) {
            //can't fail: req.from signed (off-chain) the request, so it must be an EOA...
            payable(req.from).transfer(address(this).balance);
        }
        return (success,ret);
    }


    function _verifyNonce(ForwardRequest memory req) internal view {
        require(nonces[req.from] == req.nonce, "nonce mismatch");
    }

    function _updateNonce(ForwardRequest memory req) internal {
        nonces[req.from]++;
    }

    function registerRequestType(string calldata typeName, string calldata typeSuffix) external override {

        for (uint i = 0; i < bytes(typeName).length; i++) {
            bytes1 c = bytes(typeName)[i];
            require(c != "(" && c != ")", "invalid typename");
        }

        string memory requestType = string(abi.encodePacked(typeName, "(", GENERIC_PARAMS, ",", typeSuffix));
        registerRequestTypeInternal(requestType);
    }

    function registerDomainSeparator(string calldata name, string calldata version) external override {
        uint256 chainId;
        /* solhint-disable-next-line no-inline-assembly */
        assembly { chainId := chainid() }

        bytes memory domainValue = abi.encode(
            keccak256(bytes(EIP712_DOMAIN_TYPE)),
            keccak256(bytes(name)),
            keccak256(bytes(version)),
            chainId,
            address(this));

        bytes32 domainHash = keccak256(domainValue);

        domains[domainHash] = true;
        emit DomainRegistered(domainHash, domainValue);
    }

    function registerRequestTypeInternal(string memory requestType) internal {

        bytes32 requestTypehash = keccak256(bytes(requestType));
        typeHashes[requestTypehash] = true;
        emit RequestTypeRegistered(requestTypehash, requestType);
    }

    event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue);

    event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr);


    function _verifySig(
        ForwardRequest memory req,
        bytes32 domainSeparator,
        bytes32 requestTypeHash,
        bytes memory suffixData,
        bytes memory sig)
    internal
    view
    {
        require(domains[domainSeparator], "unregistered domain separator");
        require(typeHashes[requestTypeHash], "unregistered request typehash");
        bytes32 digest = keccak256(abi.encodePacked(
                "\x19\x01", domainSeparator,
                keccak256(_getEncoded(req, requestTypeHash, suffixData))
            ));
        require(digest.recover(sig) == req.from, "signature mismatch");
    }

    function _getEncoded(
        ForwardRequest memory req,
        bytes32 requestTypeHash,
        bytes memory suffixData
    )
    public
    pure
    returns (
        bytes memory
    ) {
        return abi.encodePacked(
            requestTypeHash,
            abi.encode(
                req.from,
                req.to,
                req.value,
                req.gas,
                req.nonce,
                keccak256(req.data)
            ),
            suffixData
        );
    }
}

File 9 of 38 : IForwarder.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

interface IForwarder {

    struct ForwardRequest {
        address from;
        address to;
        uint256 value;
        uint256 gas;
        uint256 nonce;
        bytes data;
    }

    function getNonce(address from)
    external view
    returns(uint256);

    /**
     * verify the transaction would execute.
     * validate the signature and the nonce of the request.
     * revert if either signature or nonce are incorrect.
     */
    function verify(
        ForwardRequest calldata forwardRequest,
        bytes32 domainSeparator,
        bytes32 requestTypeHash,
        bytes calldata suffixData,
        bytes calldata signature
    ) external view;

    /**
     * execute a transaction
     * @param forwardRequest - all transaction parameters
     * @param domainSeparator - domain used when signing this request
     * @param requestTypeHash - request type used when signing this request.
     * @param suffixData - the extension data used when signing this request.
     * @param signature - signature to validate.
     *
     * the transaction is verified, and then executed.
     * the success and ret of "call" are returned.
     * This method would revert only verification errors. target errors
     * are reported using the returned "success" and ret string
     */
    function execute(
        ForwardRequest calldata forwardRequest,
        bytes32 domainSeparator,
        bytes32 requestTypeHash,
        bytes calldata suffixData,
        bytes calldata signature
    )
    external payable
    returns (bool success, bytes memory ret);

    /**
     * Register a new Request typehash.
     * @param typeName - the name of the request type.
     * @param typeSuffix - anything after the generic params can be empty string (if no extra fields are needed)
     *        if it does contain a value, then a comma is added first.
     */
    function registerRequestType(string calldata typeName, string calldata typeSuffix) external;

    /**
     * Register a new domain separator.
     * The domain separator must have the following fields: name,version,chainId, verifyingContract.
     * the chainId is the current network's chainId, and the verifyingContract is this forwarder.
     * This method is given the domain name and version to create and register the domain separator value.
     * @param name the domain's display name
     * @param version the domain/protocol version
     */
    function registerDomainSeparator(string calldata name, string calldata version) external;
}

File 10 of 38 : TestForwarder.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "../Forwarder.sol";

// helper class for testing the forwarder.
contract TestForwarder {
    function callExecute(Forwarder forwarder, Forwarder.ForwardRequest memory req,
        bytes32 domainSeparator, bytes32 requestTypeHash, bytes memory suffixData, bytes memory sig) public payable {
        (bool success, bytes memory error) = forwarder.execute{value:msg.value}(req, domainSeparator, requestTypeHash, suffixData, sig);
        emit Result(success, success ? "" : this.decodeErrorMessage(error));
    }

    event Result(bool success, string error);

    function decodeErrorMessage(bytes calldata ret) external pure returns (string memory message) {
        //decode evert string: assume it has a standard Error(string) signature: simply skip the (selector,offset,length) fields
        if ( ret.length>4+32+32 ) {
            return abi.decode(ret[4:], (string));
        }
        //unknown buffer. return as-is
        return string(ret);
    }

    function getChainId() public pure returns (uint256 id){
        /* solhint-disable-next-line no-inline-assembly */
        assembly { id := chainid() }
    }
}

File 11 of 38 : TestForwarderTarget.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;

import "../../BaseRelayRecipient.sol";

contract TestForwarderTarget is BaseRelayRecipient {

    string public override versionRecipient = "2.0.0+opengsn.test.recipient";

    constructor(address forwarder) public {
        trustedForwarder = forwarder;
    }

    // solhint-disable-next-line no-empty-blocks
    receive() external payable {}

    event TestForwarderMessage(string message, address realSender, address msgSender, address origin);

    function emitMessage(string memory message) public {

        // solhint-disable-next-line avoid-tx-origin
        emit TestForwarderMessage(message, _msgSender(), msg.sender, tx.origin);
    }

    function publicMsgSender() public view returns (address) {
        return _msgSender();
    }

    function publicMsgData() public view returns (bytes memory) {
        return _msgData();
    }

    function mustReceiveEth(uint value) public payable {
        require( msg.value == value, "didn't receive value");
    }

    event Reverting(string message);

    function testRevert() public {
        require(address(this) == address(0), "always fail");
        emit Reverting("if you see this revert failed...");
    }
}

File 12 of 38 : GsnTypes.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;

import "../forwarder/IForwarder.sol";

interface GsnTypes {
    struct RelayData {
        uint256 gasPrice;
        uint256 pctRelayFee;
        uint256 baseRelayFee;
        address relayWorker;
        address paymaster;
        bytes paymasterData;
        uint256 clientId;
        address forwarder;
    }

    //note: must start with the ForwardRequest to be an extension of the generic forwarder
    struct RelayRequest {
        IForwarder.ForwardRequest request;
        RelayData relayData;
    }
}

File 13 of 38 : IKnowForwarderAddress.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;

interface IKnowForwarderAddress {

    /**
     * return the forwarder we trust to forward relayed transactions to us.
     * the forwarder is required to verify the sender's signature, and verify
     * the call is not a replay.
     */
    function getTrustedForwarder() external view returns(address);
}

File 14 of 38 : IPaymaster.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.10;
pragma experimental ABIEncoderV2;

import "./GsnTypes.sol";

interface IPaymaster {

    /**
     * @param acceptanceBudget -
     *      Paymaster expected gas budget to accept (or reject) a request
     *      This a gas required by any calculations that might need to reject the
     *      transaction, by preRelayedCall, forwarder and recipient.
     *      See value in BasePaymaster.PAYMASTER_ACCEPTANCE_BUDGET
     *      Transaction that gets rejected above that gas usage is on the paymaster's expense.
     *      As long this value is above preRelayedCallGasLimit (see defaults in BasePaymaster), the
     *      Paymaster is guaranteed it will never pay for rejected transactions.
     *      If this value is below preRelayedCallGasLimt, it might might make Paymaster open to a "griefing" attack.
     *
     *      Specifying value too high might make the call rejected by some relayers.
     *
     *      From a Relay's point of view, this is the highest gas value a paymaster might "grief" the relay,
     *      since the paymaster will pay anything above that (regardless if the tx reverts)
     *
     * @param preRelayedCallGasLimit - the max gas usage of preRelayedCall. any revert (including OOG)
     *      of preRelayedCall is a reject by the paymaster.
     *      as long as acceptanceBudget is above preRelayedCallGasLimit, any such revert (including OOG)
     *      is not payed by the paymaster.
     * @param postRelayedCallGasLimit - the max gas usage of postRelayedCall.
     *      note that an OOG will revert the transaction, but the paymaster already committed to pay,
     *      so the relay will get compensated, at the expense of the paymaster
     */
    struct GasLimits {
        uint256 acceptanceBudget;
        uint256 preRelayedCallGasLimit;
        uint256 postRelayedCallGasLimit;
    }

    /**
     * Return the GasLimits constants used by the Paymaster.
     */
    function getGasLimits()
    external
    view
    returns (
        GasLimits memory limits
    );

    function trustedForwarder() external view returns (IForwarder);

/**
 * return the relayHub of this contract.
 */
    function getHubAddr() external view returns (address);

    /**
     * Can be used to determine if the contract can pay for incoming calls before making any.
     * @return the paymaster's deposit in the RelayHub.
     */
    function getRelayHubDeposit() external view returns (uint256);

    /**
     * Called by Relay (and RelayHub), to validate if the paymaster agrees to pay for this call.
     *
     * MUST be protected with relayHubOnly() in case it modifies state.
     *
     * The Paymaster rejects by the following "revert" operations
     *  - preRelayedCall() method reverts
     *  - the forwarder reverts because of nonce or signature error
     *  - the paymaster returned "rejectOnRecipientRevert", and the recipient contract reverted.
     * In any of the above cases, all paymaster calls (and recipient call) are reverted.
     * In any other case, the paymaster agrees to pay for the gas cost of the transaction (note
     *  that this includes also postRelayedCall revert)
     *
     * The rejectOnRecipientRevert flag means the Paymaster "delegate" the rejection to the recipient
     *  code.  It also means the Paymaster trust the recipient to reject fast: both preRelayedCall,
     *  forwarder check and receipient checks must fit into the GasLimits.acceptanceBudget,
     *  otherwise the TX is paid by the Paymaster.
     *
     *  @param relayRequest - the full relay request structure
     *  @param signature - user's EIP712-compatible signature of the {@link relayRequest}.
     *              Note that in most cases the paymaster shouldn't try use it at all. It is always checked
     *              by the forwarder immediately after preRelayedCall returns.
     *  @param approvalData - extra dapp-specific data (e.g. signature from trusted party)
     *  @param maxPossibleGas - based on values returned from {@link getGasLimits},
     *         the RelayHub will calculate the maximum possible amount of gas the user may be charged for.
     *         In order to convert this value to wei, the Paymaster has to call "relayHub.calculateCharge()"
     *  return:
     *      a context to be passed to postRelayedCall
     *      rejectOnRecipientRevert - TRUE if paymaster want to reject the TX if the recipient reverts.
     *          FALSE means that rejects by the recipient will be completed on chain, and paid by the paymaster.
     *          (note that in the latter case, the preRelayedCall and postRelayedCall are not reverted).
     */
    function preRelayedCall(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        uint256 maxPossibleGas
    )
    external
    returns (bytes memory context, bool rejectOnRecipientRevert);

    /**
     * This method is called after the actual relayed function call.
     * It may be used to record the transaction (e.g. charge the caller by some contract logic) for this call.
     *
     * MUST be protected with relayHubOnly() in case it modifies state.
     *
     * @param context - the call context, as returned by the preRelayedCall
     * @param success - true if the relayed call succeeded, false if it reverted
     * @param gasUseWithoutPost - the actual amount of gas used by the entire transaction, EXCEPT
     *        the gas used by the postRelayedCall itself.
     * @param relayData - the relay params of the request. can be used by relayHub.calculateCharge()
     *
     * Revert in this functions causes a revert of the client's relayed call (and preRelayedCall(), but the Paymaster
     * is still committed to pay the relay for the entire transaction.
     */
    function postRelayedCall(
        bytes calldata context,
        bool success,
        uint256 gasUseWithoutPost,
        GsnTypes.RelayData calldata relayData
    ) external;

    function versionPaymaster() external view returns (string memory);
}

File 15 of 38 : IPenalizer.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;

import "./IRelayHub.sol";

interface IPenalizer {

    struct Transaction {
        uint256 nonce;
        uint256 gasPrice;
        uint256 gasLimit;
        address to;
        uint256 value;
        bytes data;
    }

    function penalizeRepeatedNonce(
        bytes calldata unsignedTx1,
        bytes calldata signature1,
        bytes calldata unsignedTx2,
        bytes calldata signature2,
        IRelayHub hub
    ) external;

    function penalizeIllegalTransaction(
        bytes calldata unsignedTx,
        bytes calldata signature,
        IRelayHub hub
    ) external;

    function versionPenalizer() external view returns (string memory);
}

File 16 of 38 : IRelayHub.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "./GsnTypes.sol";
import "./IStakeManager.sol";

interface IRelayHub {

    /// Emitted when a relay server registers or updates its details
    /// Looking at these events lets a client discover relay servers
    event RelayServerRegistered(
        address indexed relayManager,
        uint256 baseRelayFee,
        uint256 pctRelayFee,
        string relayUrl);

    /// Emitted when relays are added by a relayManager
    event RelayWorkersAdded(
        address indexed relayManager,
        address[] newRelayWorkers,
        uint256 workersCount
    );

    // Emitted when an account withdraws funds from RelayHub.
    event Withdrawn(
        address indexed account,
        address indexed dest,
        uint256 amount
    );

    // Emitted when depositFor is called, including the amount and account that was funded.
    event Deposited(
        address indexed paymaster,
        address indexed from,
        uint256 amount
    );

    /// Emitted when an attempt to relay a call fails and Paymaster does not accept the transaction.
    /// The actual relayed call was not executed, and the recipient not charged.
    /// @param reason contains a revert reason returned from preRelayedCall or forwarder.
    event TransactionRejectedByPaymaster(
        address indexed relayManager,
        address indexed paymaster,
        address indexed from,
        address to,
        address relayWorker,
        bytes4 selector,
        uint256 innerGasUsed,
        bytes reason);

    // Emitted when a transaction is relayed. Note that the actual encoded function might be reverted: this will be
    // indicated in the status field.
    // Useful when monitoring a relay's operation and relayed calls to a contract.
    // Charge is the ether value deducted from the recipient's balance, paid to the relay's manager.
    event TransactionRelayed(
        address indexed relayManager,
        address indexed relayWorker,
        address indexed from,
        address to,
        address paymaster,
        bytes4 selector,
        RelayCallStatus status,
        uint256 charge);

    event TransactionResult(
        RelayCallStatus status,
        bytes returnValue
    );

    /// Reason error codes for the TransactionRelayed event
    /// @param OK - the transaction was successfully relayed and execution successful - never included in the event
    /// @param RelayedCallFailed - the transaction was relayed, but the relayed call failed
    /// @param RejectedByPreRelayed - the transaction was not relayed due to preRelatedCall reverting
    /// @param RejectedByForwarder - the transaction was not relayed due to forwarder check (signature,nonce)
    /// @param PostRelayedFailed - the transaction was relayed and reverted due to postRelatedCall reverting
    /// @param PaymasterBalanceChanged - the transaction was relayed and reverted due to the paymaster balance change
    enum RelayCallStatus {
        OK,
        RelayedCallFailed,
        RejectedByPreRelayed,
        RejectedByForwarder,
        RejectedByRecipientRevert,
        PostRelayedFailed,
        PaymasterBalanceChanged
    }

    /// Add new worker addresses controlled by sender who must be a staked Relay Manager address.
    /// Emits a RelayWorkersAdded event.
    /// This function can be called multiple times, emitting new events
    function addRelayWorkers(address[] calldata newRelayWorkers) external;

    function registerRelayServer(uint256 baseRelayFee, uint256 pctRelayFee, string calldata url) external;

    // Balance management

    // Deposits ether for a contract, so that it can receive (and pay for) relayed transactions. Unused balance can only
    // be withdrawn by the contract itself, by calling withdraw.
    // Emits a Deposited event.
    function depositFor(address target) external payable;

    // Withdraws from an account's balance, sending it back to it. Relay managers call this to retrieve their revenue, and
    // contracts can also use it to reduce their funding.
    // Emits a Withdrawn event.
    function withdraw(uint256 amount, address payable dest) external;

    // Relaying


    /// Relays a transaction. For this to succeed, multiple conditions must be met:
    ///  - Paymaster's "acceptRelayCall" method must succeed and not revert
    ///  - the sender must be a registered Relay Worker that the user signed
    ///  - the transaction's gas price must be equal or larger than the one that was signed by the sender
    ///  - the transaction must have enough gas to run all internal transactions if they use all gas available to them
    ///  - the Paymaster must have enough balance to pay the Relay Worker for the scenario when all gas is spent
    ///
    /// If all conditions are met, the call will be relayed and the recipient charged.
    ///
    /// Arguments:
    /// @param relayRequest - all details of the requested relayed call
    /// @param signature - client's EIP-712 signature over the relayRequest struct
    /// @param approvalData: dapp-specific data forwarded to preRelayedCall.
    ///        This value is *not* verified by the Hub. For example, it can be used to pass a signature to the Paymaster
    /// @param externalGasLimit - the value passed as gasLimit to the transaction.
    ///
    /// Emits a TransactionRelayed event.
    function relayCall(
        uint paymasterMaxAcceptanceBudget,
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        uint externalGasLimit
    )
    external
    returns (bool paymasterAccepted, bytes memory returnValue);

    function penalize(address relayWorker, address payable beneficiary) external;

    /// The fee is expressed as a base fee in wei plus percentage on actual charge.
    /// E.g. a value of 40 stands for a 40% fee, so the recipient will be
    /// charged for 1.4 times the spent amount.
    function calculateCharge(uint256 gasUsed, GsnTypes.RelayData calldata relayData) external view returns (uint256);

    /* getters */

    /// Returns the stake manager of this RelayHub.
    function stakeManager() external view returns(IStakeManager);
    function penalizer() external view returns(address);

    /// Returns an account's deposits. It can be either a deposit of a paymaster, or a revenue of a relay manager.
    function balanceOf(address target) external view returns (uint256);

    // Minimum stake a relay can have. An attack to the network will never cost less than half this value.
    function minimumStake() external view returns (uint256);

    // Minimum unstake delay blocks of a relay manager's stake on the StakeManager
    function minimumUnstakeDelay() external view returns (uint256);

    // Maximum funds that can be deposited at once. Prevents user error by disallowing large deposits.
    function maximumRecipientDeposit() external view returns (uint256);

    //gas overhead to calculate gasUseWithoutPost
    function postOverhead() external view returns (uint256);

    // Gas set aside for all relayCall() instructions to prevent unexpected out-of-gas exceptions
    function gasReserve() external view returns (uint256);

    // maximum number of worker account allowed per manager
    function maxWorkerCount() external view returns (uint256);

    function workerToManager(address worker) external view returns(address);

    function workerCount(address manager) external view returns(uint256);

    function isRelayManagerStaked(address relayManager) external view returns(bool);

    /**
    * @dev the total gas overhead of relayCall(), before the first gasleft() and after the last gasleft().
    * Assume that relay has non-zero balance (costs 15'000 more otherwise).
    */

    // Gas cost of all relayCall() instructions after actual 'calculateCharge()'
    function gasOverhead() external view returns (uint256);

    function versionHub() external view returns (string memory);
}

File 17 of 38 : IRelayRecipient.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;

/**
 * a contract must implement this interface in order to support relayed transaction.
 * It is better to inherit the BaseRelayRecipient as its implementation.
 */
abstract contract IRelayRecipient {

    /**
     * return if the forwarder is trusted to forward relayed transactions to us.
     * the forwarder is required to verify the sender's signature, and verify
     * the call is not a replay.
     */
    function isTrustedForwarder(address forwarder) public virtual view returns(bool);

    /**
     * return the sender of this call.
     * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes
     * of the msg.data.
     * otherwise, return `msg.sender`
     * should be used in the contract anywhere instead of msg.sender
     */
    function _msgSender() internal virtual view returns (address payable);

    /**
     * return the msg.data of this call.
     * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes
     * of the msg.data - so this method will strip those 20 bytes off.
     * otherwise, return `msg.data`
     * should be used in the contract instead of msg.data, where the difference matters (e.g. when explicitly
     * signing or hashing the
     */
    function _msgData() internal virtual view returns (bytes memory);

    function versionRecipient() external virtual view returns (string memory);
}

File 18 of 38 : IStakeManager.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/math/SafeMath.sol";

interface IStakeManager {

    /// Emitted when a stake or unstakeDelay are initialized or increased
    event StakeAdded(
        address indexed relayManager,
        address indexed owner,
        uint256 stake,
        uint256 unstakeDelay
    );

    /// Emitted once a stake is scheduled for withdrawal
    event StakeUnlocked(
        address indexed relayManager,
        address indexed owner,
        uint256 withdrawBlock
    );

    /// Emitted when owner withdraws relayManager funds
    event StakeWithdrawn(
        address indexed relayManager,
        address indexed owner,
        uint256 amount
    );

    /// Emitted when an authorized Relay Hub penalizes a relayManager
    event StakePenalized(
        address indexed relayManager,
        address indexed beneficiary,
        uint256 reward
    );

    event HubAuthorized(
        address indexed relayManager,
        address indexed relayHub
    );

    event HubUnauthorized(
        address indexed relayManager,
        address indexed relayHub,
        uint256 removalBlock
    );

    /// @param stake - amount of ether staked for this relay
    /// @param unstakeDelay - number of blocks to elapse before the owner can retrieve the stake after calling 'unlock'
    /// @param withdrawBlock - first block number 'withdraw' will be callable, or zero if the unlock has not been called
    /// @param owner - address that receives revenue and manages relayManager's stake
    struct StakeInfo {
        uint256 stake;
        uint256 unstakeDelay;
        uint256 withdrawBlock;
        address payable owner;
    }

    struct RelayHubInfo {
        uint256 removalBlock;
    }

    /// Put a stake for a relayManager and set its unstake delay.
    /// If the entry does not exist, it is created, and the caller of this function becomes its owner.
    /// If the entry already exists, only the owner can call this function.
    /// @param relayManager - address that represents a stake entry and controls relay registrations on relay hubs
    /// @param unstakeDelay - number of blocks to elapse before the owner can retrieve the stake after calling 'unlock'
    function stakeForAddress(address relayManager, uint256 unstakeDelay) external payable;

    function unlockStake(address relayManager) external;

    function withdrawStake(address relayManager) external;

    function authorizeHubByOwner(address relayManager, address relayHub) external;

    function authorizeHubByManager(address relayHub) external;

    function unauthorizeHubByOwner(address relayManager, address relayHub) external;

    function unauthorizeHubByManager(address relayHub) external;

    function isRelayManagerStaked(address relayManager, address relayHub, uint256 minAmount, uint256 minUnstakeDelay)
    external
    view
    returns (bool);

    /// Slash the stake of the relay relayManager. In order to prevent stake kidnapping, burns half of stake on the way.
    /// @param relayManager - entry to penalize
    /// @param beneficiary - address that receives half of the penalty amount
    /// @param amount - amount to withdraw from stake
    function penalizeRelayManager(address relayManager, address payable beneficiary, uint256 amount) external;

    function getStakeInfo(address relayManager) external view returns (StakeInfo memory stakeInfo);

    function versionSM() external view returns (string memory);
}

File 19 of 38 : IVersionRegistry.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;

interface IVersionRegistry {

    //event emitted whenever a version is added
    event VersionAdded(bytes32 indexed id, bytes32 version, string value, uint time);

    //event emitted whenever a version is canceled
    event VersionCanceled(bytes32 indexed id, bytes32 version, string reason);

    /**
     * add a version
     * @param id the object-id to add a version (32-byte string)
     * @param version the new version to add (32-byte string)
     * @param value value to attach to this version
     */
    function addVersion(bytes32 id, bytes32 version, string calldata value) external;

    /**
     * cancel a version.
     */
    function cancelVersion(bytes32 id, bytes32 version, string calldata reason) external;
}

File 20 of 38 : PayableWithEmit.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
import "../../contracts/BaseRelayRecipient.sol";

//make sure that "payable" function that uses _msgSender() still works
// (its not required to use _msgSender(), since the default function
// will never be called through GSN, but still, if someone uses it,
// it should work)
contract PayableWithEmit is BaseRelayRecipient {

  string public override versionRecipient = "2.0.0+opengsn.payablewithemit.irelayrecipient";

  event Received(address sender, uint value, uint gasleft);

  receive () external payable {

    emit Received(_msgSender(), msg.value, gasleft());
  }


  //helper: send value to another contract
  function doSend(address payable target) public payable {

    uint before = gasleft();
    // solhint-disable-next-line check-send-result
    bool success = target.send(msg.value);
    uint gasAfter = gasleft();
    emit GasUsed(before-gasAfter, success);
  }
  event GasUsed(uint gasUsed, bool success);
}

File 21 of 38 : TestPaymasterConfigurableMisbehavior.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "./TestPaymasterEverythingAccepted.sol";

contract TestPaymasterConfigurableMisbehavior is TestPaymasterEverythingAccepted {

    bool public withdrawDuringPostRelayedCall;
    bool public withdrawDuringPreRelayedCall;
    bool public returnInvalidErrorCode;
    bool public revertPostRelayCall;
    bool public overspendAcceptGas;
    bool public revertPreRelayCall;
    bool public revertPreRelayCallOnEvenBlocks;
    bool public greedyAcceptanceBudget;
    bool public expensiveGasLimits;

    function setWithdrawDuringPostRelayedCall(bool val) public {
        withdrawDuringPostRelayedCall = val;
    }
    function setWithdrawDuringPreRelayedCall(bool val) public {
        withdrawDuringPreRelayedCall = val;
    }
    function setReturnInvalidErrorCode(bool val) public {
        returnInvalidErrorCode = val;
    }
    function setRevertPostRelayCall(bool val) public {
        revertPostRelayCall = val;
    }
    function setRevertPreRelayCall(bool val) public {
        revertPreRelayCall = val;
    }
    function setRevertPreRelayCallOnEvenBlocks(bool val) public {
        revertPreRelayCallOnEvenBlocks = val;
    }
    function setOverspendAcceptGas(bool val) public {
        overspendAcceptGas = val;
    }

    function setGreedyAcceptanceBudget(bool val) public {
        greedyAcceptanceBudget = val;
    }
    function setExpensiveGasLimits(bool val) public {
        expensiveGasLimits = val;
    }

    function preRelayedCall(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        uint256 maxPossibleGas
    )
    external
    override
    relayHubOnly
    returns (bytes memory, bool) {
        (signature, approvalData, maxPossibleGas);
        if (overspendAcceptGas) {
            uint i = 0;
            while (true) {
                i++;
            }
        }

        require(!returnInvalidErrorCode, "invalid code");

        if (withdrawDuringPreRelayedCall) {
            withdrawAllBalance();
        }
        if (revertPreRelayCall) {
            revert("You asked me to revert, remember?");
        }
        if (revertPreRelayCallOnEvenBlocks && block.number % 2 == 0) {
            revert("You asked me to revert on even blocks, remember?");
        }
        _verifyForwarder(relayRequest);
        return ("", trustRecipientRevert);
    }

    function postRelayedCall(
        bytes calldata context,
        bool success,
        uint256 gasUseWithoutPost,
        GsnTypes.RelayData calldata relayData
    )
    external
    override
    relayHubOnly
    {
        (context, success, gasUseWithoutPost, relayData);
        if (withdrawDuringPostRelayedCall) {
            withdrawAllBalance();
        }
        if (revertPostRelayCall) {
            revert("You asked me to revert, remember?");
        }
    }

    /// leaving withdrawal public and unprotected
    function withdrawAllBalance() public returns (uint256) {
        require(address(relayHub) != address(0), "relay hub address not set");
        uint256 balance = relayHub.balanceOf(address(this));
        relayHub.withdraw(balance, address(this));
        return balance;
    }

    IPaymaster.GasLimits private limits = super.getGasLimits();

    function getGasLimits()
    public override view
    returns (IPaymaster.GasLimits memory) {

        if (expensiveGasLimits) {
            uint sum;
            //memory access is 700gas, so we waste ~50000
            for ( int i=0; i<60000; i+=700 ) {
                sum  = sum + limits.acceptanceBudget;
            }
        }
        if (greedyAcceptanceBudget) {
            return IPaymaster.GasLimits(limits.acceptanceBudget * 9, limits.preRelayedCallGasLimit, limits.postRelayedCallGasLimit);
        }
        return limits;
    }

    bool private trustRecipientRevert;

    function setGasLimits(uint acceptanceBudget, uint preRelayedCallGasLimit, uint postRelayedCallGasLimit) public {
        limits = IPaymaster.GasLimits(
            acceptanceBudget,
            preRelayedCallGasLimit,
            postRelayedCallGasLimit
        );
    }

    function setTrustRecipientRevert(bool on) public {
        trustRecipientRevert = on;
    }

    // solhint-disable-next-line no-empty-blocks
    receive() external override payable {}
}

File 22 of 38 : TestPaymasterEverythingAccepted.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "../forwarder/IForwarder.sol";
import "../BasePaymaster.sol";

contract TestPaymasterEverythingAccepted is BasePaymaster {

    function versionPaymaster() external view override virtual returns (string memory){
        return "2.0.0+opengsn.test-pea.ipaymaster";
    }

    event SampleRecipientPreCall();
    event SampleRecipientPostCall(bool success, uint actualCharge);

    function preRelayedCall(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        uint256 maxPossibleGas
    )
    external
    override
    virtual
    returns (bytes memory, bool) {
        (signature);
        _verifyForwarder(relayRequest);
        (approvalData, maxPossibleGas);
        emit SampleRecipientPreCall();
        return ("no revert here",false);
    }

    function postRelayedCall(
        bytes calldata context,
        bool success,
        uint256 gasUseWithoutPost,
        GsnTypes.RelayData calldata relayData
    )
    external
    override
    virtual
    {
        (context, gasUseWithoutPost, relayData);
        emit SampleRecipientPostCall(success, gasUseWithoutPost);
    }

    function deposit() public payable {
        require(address(relayHub) != address(0), "relay hub address not set");
        relayHub.depositFor{value:msg.value}(address(this));
    }

    function withdrawAll(address payable destination) public {
        uint256 amount = relayHub.balanceOf(address(this));
        withdrawRelayHubDepositTo(amount, destination);
    }
}

File 23 of 38 : TestPaymasterOwnerSignature.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/cryptography/ECDSA.sol";

import "./TestPaymasterEverythingAccepted.sol";

contract TestPaymasterOwnerSignature is TestPaymasterEverythingAccepted {
    using ECDSA for bytes32;

    /**
     * This demonstrates how dapps can provide an off-chain signatures to relayed transactions.
     */
    function preRelayedCall(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        uint256 maxPossibleGas
    )
    external
    override
    returns (bytes memory, bool) {
        (signature, maxPossibleGas);
        _verifyForwarder(relayRequest);

        address signer =
            keccak256(abi.encodePacked("I approve", relayRequest.request.from))
            .toEthSignedMessageHash()
            .recover(approvalData);
        require(signer == owner(), "test: not approved");
        return ("",false);
    }
}

File 24 of 38 : TestPaymasterPreconfiguredApproval.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "./TestPaymasterEverythingAccepted.sol";

contract TestPaymasterPreconfiguredApproval is TestPaymasterEverythingAccepted {

    bytes public expectedApprovalData;

    function setExpectedApprovalData(bytes memory val) public {
        expectedApprovalData = val;
    }

    function preRelayedCall(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        uint256 maxPossibleGas
    )
    external
    override
    returns (bytes memory, bool) {
        (relayRequest, signature, approvalData, maxPossibleGas);
        _verifyForwarder(relayRequest);
        require(keccak256(expectedApprovalData) == keccak256(approvalData),
            string(abi.encodePacked(
                "test: unexpected approvalData: '", approvalData, "' instead of '", expectedApprovalData, "'")));
        return ("",false);
    }
}

File 25 of 38 : TestPaymasterStoreContext.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "./TestPaymasterEverythingAccepted.sol";

contract TestPaymasterStoreContext is TestPaymasterEverythingAccepted {

    event SampleRecipientPreCallWithValues(
        address relay,
        address from,
        bytes encodedFunction,
        uint256 baseRelayFee,
        uint256 pctRelayFee,
        uint256 gasPrice,
        uint256 gasLimit,
        bytes approvalData,
        uint256 maxPossibleGas
    );

    event SampleRecipientPostCallWithValues(
        string context
    );

    /**
     * This demonstrates how preRelayedCall can return 'context' data for reuse in postRelayedCall.
     */
    function preRelayedCall(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        uint256 maxPossibleGas
    )
    external
    override
    returns (bytes memory, bool) {
        (signature, approvalData, maxPossibleGas);
        _verifyForwarder(relayRequest);

        emit SampleRecipientPreCallWithValues(
            relayRequest.relayData.relayWorker,
            relayRequest.request.from,
            relayRequest.request.data,
            relayRequest.relayData.baseRelayFee,
            relayRequest.relayData.pctRelayFee,
            relayRequest.relayData.gasPrice,
            relayRequest.request.gas,
            approvalData,
            maxPossibleGas);
        return ("context passed from preRelayedCall to postRelayedCall",false);
    }

    function postRelayedCall(
        bytes calldata context,
        bool success,
        uint256 gasUseWithoutPost,
        GsnTypes.RelayData calldata relayData
    )
    external
    override
    relayHubOnly
    {
        (context, success, gasUseWithoutPost, relayData);
        emit SampleRecipientPostCallWithValues(string(context));
    }
}

File 26 of 38 : TestPaymasterVariableGasLimits.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "./TestPaymasterEverythingAccepted.sol";

contract TestPaymasterVariableGasLimits is TestPaymasterEverythingAccepted {

    string public override versionPaymaster = "2.0.0+opengsn.test-vgl.ipaymaster";

    event SampleRecipientPreCallWithValues(
        uint256 gasleft,
        uint256 maxPossibleGas
    );

    event SampleRecipientPostCallWithValues(
        uint256 gasleft,
        uint256 gasUseWithoutPost
    );

    function preRelayedCall(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature,
        bytes calldata approvalData,
        uint256 maxPossibleGas
    )
    external
    override
    returns (bytes memory, bool) {
        (signature, approvalData);
        _verifyForwarder(relayRequest);
        emit SampleRecipientPreCallWithValues(
            gasleft(), maxPossibleGas);
        return ("", false);
    }

    function postRelayedCall(
        bytes calldata context,
        bool success,
        uint256 gasUseWithoutPost,
        GsnTypes.RelayData calldata relayData
    )
    external
    override
    relayHubOnly
    {
        (context, success, gasUseWithoutPost, relayData);
        emit SampleRecipientPostCallWithValues(gasleft(), gasUseWithoutPost);
    }
}

File 27 of 38 : TestRecipient.sol
/* solhint-disable avoid-tx-origin */
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;

import "../utils/GsnUtils.sol";
import "../BaseRelayRecipient.sol";
import "./TestPaymasterConfigurableMisbehavior.sol";
import "../interfaces/IKnowForwarderAddress.sol";

contract TestRecipient is BaseRelayRecipient, IKnowForwarderAddress {

    string public override versionRecipient = "2.0.0+opengsn.test.irelayrecipient";

    constructor(address forwarder) public {
        setTrustedForwarder(forwarder);
    }

    function getTrustedForwarder() public override view returns(address) {
        return trustedForwarder;
    }

    function setTrustedForwarder(address forwarder) internal {
        trustedForwarder = forwarder;
    }

    event Reverting(string message);

    function testRevert() public {
        require(address(this) == address(0), "always fail");
        emit Reverting("if you see this revert failed...");
    }

    address payable public paymaster;

    function setWithdrawDuringRelayedCall(address payable _paymaster) public {
        paymaster = _paymaster;
    }

    // solhint-disable-next-line no-empty-blocks
    receive() external payable {}

    event SampleRecipientEmitted(string message, address realSender, address msgSender, address origin, uint256 msgValue, uint256 balance);

    function emitMessage(string memory message) public payable returns (string memory) {
        if (paymaster != address(0)) {
            withdrawAllBalance();
        }

        emit SampleRecipientEmitted(message, _msgSender(), msg.sender, tx.origin, msg.value, address(this).balance);
        return "emitMessage return value";
    }

    function withdrawAllBalance() public {
        TestPaymasterConfigurableMisbehavior(paymaster).withdrawAllBalance();
    }

    // solhint-disable-next-line no-empty-blocks
    function dontEmitMessage(string memory message) public {}

    function emitMessageNoParams() public {
        emit SampleRecipientEmitted("Method with no parameters", _msgSender(), msg.sender, tx.origin, 0, address(this).balance);
    }

    //return (or revert) with a string in the given length
    function checkReturnValues(uint len, bool doRevert) public view returns (string memory) {
        (this);
        string memory mesg = "this is a long message that we are going to return a small part from. we don't use a loop since we want a fixed gas usage of the method itself.";
        require( bytes(mesg).length>=len, "invalid len: too large");

        /* solhint-disable no-inline-assembly */
        //cut the msg at that length
        assembly { mstore(mesg, len) }
        require(!doRevert, mesg);
        return mesg;
    }

    //function with no return value (also test revert with no msg.
    function checkNoReturnValues(bool doRevert) public view {
        (this);
        require(!doRevert);
    }

}

File 28 of 38 : TestRelayWorkerContract.sol
/* solhint-disable avoid-tx-origin */
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "../interfaces/IRelayHub.sol";

contract TestRelayWorkerContract {

    function relayCall(
        IRelayHub hub,
        uint maxAcceptanceBudget,
        GsnTypes.RelayRequest memory relayRequest,
        bytes memory signature,
        uint externalGasLimit)
    public
    {
        hub.relayCall{gas:externalGasLimit}(maxAcceptanceBudget, relayRequest, signature, "", externalGasLimit);
    }
}

File 29 of 38 : TestUtil.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "../interfaces/GsnTypes.sol";
import "../utils/GsnEip712Library.sol";
import "../utils/GsnUtils.sol";

contract TestUtil {

    function libRelayRequestName() public pure returns (string memory) {
        return GsnEip712Library.RELAY_REQUEST_NAME;
    }

    function libRelayRequestType() public pure returns (string memory) {
        return string(GsnEip712Library.RELAY_REQUEST_TYPE);
    }

    function libRelayRequestTypeHash() public pure returns (bytes32) {
        return GsnEip712Library.RELAY_REQUEST_TYPEHASH;
    }

    function libRelayRequestSuffix() public pure returns (string memory) {
        return GsnEip712Library.RELAY_REQUEST_SUFFIX;
    }

    //helpers for test to call the library funcs:
    function callForwarderVerify(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature
    )
    external
    view {
        GsnEip712Library.verify(relayRequest, signature);
    }

    function callForwarderVerifyAndCall(
        GsnTypes.RelayRequest calldata relayRequest,
        bytes calldata signature
    )
    external
    returns (
        bool success,
        bytes memory ret
    ) {
        bool forwarderSuccess;
        (forwarderSuccess, success, ret) = GsnEip712Library.execute(relayRequest, signature);
        if ( !forwarderSuccess) {
            GsnUtils.revertWithData(ret);
        }
        emit Called(success, success == false ? ret : bytes(""));
    }

    event Called(bool success, bytes error);

    function splitRequest(
        GsnTypes.RelayRequest calldata relayRequest
    )
    external
    pure
    returns (
        IForwarder.ForwardRequest memory forwardRequest,
        bytes32 typeHash,
        bytes memory suffixData
    ) {
        (forwardRequest, suffixData) = GsnEip712Library.splitRequest(relayRequest);
        typeHash = GsnEip712Library.RELAY_REQUEST_TYPEHASH;
    }

    function libDomainSeparator(address forwarder) public pure returns (bytes32) {
        return GsnEip712Library.domainSeparator(forwarder);
    }

    function libGetChainID() public pure returns (uint256) {
        return GsnEip712Library.getChainID();
    }
}

File 30 of 38 : GsnEip712Library.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;

import "../interfaces/GsnTypes.sol";
import "../interfaces/IRelayRecipient.sol";
import "../forwarder/IForwarder.sol";

import "./GsnUtils.sol";

/**
 * Bridge Library to map GSN RelayRequest into a call of a Forwarder
 */
library GsnEip712Library {
    // maximum length of return value/revert reason for 'execute' method. Will truncate result if exceeded.
    uint256 private constant MAX_RETURN_SIZE = 1024;

    //copied from Forwarder (can't reference string constants even from another library)
    string public constant GENERIC_PARAMS = "address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data";

    bytes public constant RELAYDATA_TYPE = "RelayData(uint256 gasPrice,uint256 pctRelayFee,uint256 baseRelayFee,address relayWorker,address paymaster,address forwarder,bytes paymasterData,uint256 clientId)";

    string public constant RELAY_REQUEST_NAME = "RelayRequest";
    string public constant RELAY_REQUEST_SUFFIX = string(abi.encodePacked("RelayData relayData)", RELAYDATA_TYPE));

    bytes public constant RELAY_REQUEST_TYPE = abi.encodePacked(
        RELAY_REQUEST_NAME,"(",GENERIC_PARAMS,",", RELAY_REQUEST_SUFFIX);

    bytes32 public constant RELAYDATA_TYPEHASH = keccak256(RELAYDATA_TYPE);
    bytes32 public constant RELAY_REQUEST_TYPEHASH = keccak256(RELAY_REQUEST_TYPE);


    struct EIP712Domain {
        string name;
        string version;
        uint256 chainId;
        address verifyingContract;
    }

    bytes32 public constant EIP712DOMAIN_TYPEHASH = keccak256(
        "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
    );

    function splitRequest(
        GsnTypes.RelayRequest calldata req
    )
    internal
    pure
    returns (
        IForwarder.ForwardRequest memory forwardRequest,
        bytes memory suffixData
    ) {
        forwardRequest = IForwarder.ForwardRequest(
            req.request.from,
            req.request.to,
            req.request.value,
            req.request.gas,
            req.request.nonce,
            req.request.data
        );
        suffixData = abi.encode(
            hashRelayData(req.relayData));
    }

    //verify that the recipient trusts the given forwarder
    // MUST be called by paymaster
    function verifyForwarderTrusted(GsnTypes.RelayRequest calldata relayRequest) internal view {
        (bool success, bytes memory ret) = relayRequest.request.to.staticcall(
            abi.encodeWithSelector(
                IRelayRecipient.isTrustedForwarder.selector, relayRequest.relayData.forwarder
            )
        );
        require(success, "isTrustedForwarder reverted");
        require(ret.length == 32, "isTrustedForwarder returned invalid response");
        require(abi.decode(ret, (bool)), "invalid forwarder for recipient");
    }

    function verifySignature(GsnTypes.RelayRequest calldata relayRequest, bytes calldata signature) internal view {
        (IForwarder.ForwardRequest memory forwardRequest, bytes memory suffixData) = splitRequest(relayRequest);
        bytes32 domainSeparator = domainSeparator(relayRequest.relayData.forwarder);
        IForwarder forwarder = IForwarder(payable(relayRequest.relayData.forwarder));
        forwarder.verify(forwardRequest, domainSeparator, RELAY_REQUEST_TYPEHASH, suffixData, signature);
    }

    function verify(GsnTypes.RelayRequest calldata relayRequest, bytes calldata signature) internal view {
        verifyForwarderTrusted(relayRequest);
        verifySignature(relayRequest, signature);
    }

    function execute(GsnTypes.RelayRequest calldata relayRequest, bytes calldata signature) internal returns (bool forwarderSuccess, bool callSuccess, bytes memory ret) {
        (IForwarder.ForwardRequest memory forwardRequest, bytes memory suffixData) = splitRequest(relayRequest);
        bytes32 domainSeparator = domainSeparator(relayRequest.relayData.forwarder);
        /* solhint-disable-next-line avoid-low-level-calls */
        (forwarderSuccess, ret) = relayRequest.relayData.forwarder.call(
            abi.encodeWithSelector(IForwarder.execute.selector,
            forwardRequest, domainSeparator, RELAY_REQUEST_TYPEHASH, suffixData, signature
        ));
        if ( forwarderSuccess ) {

          //decode return value of execute:
          (callSuccess, ret) = abi.decode(ret, (bool, bytes));
        }
        truncateInPlace(ret);
    }

    //truncate the given parameter (in-place) if its length is above the given maximum length
    // do nothing otherwise.
    //NOTE: solidity warns unless the method is marked "pure", but it DOES modify its parameter.
    function truncateInPlace(bytes memory data) internal pure {
        MinLibBytes.truncateInPlace(data, MAX_RETURN_SIZE);
    }

    function domainSeparator(address forwarder) internal pure returns (bytes32) {
        return hashDomain(EIP712Domain({
            name : "GSN Relayed Transaction",
            version : "2",
            chainId : getChainID(),
            verifyingContract : forwarder
            }));
    }

    function getChainID() internal pure returns (uint256 id) {
        /* solhint-disable no-inline-assembly */
        assembly {
            id := chainid()
        }
    }

    function hashDomain(EIP712Domain memory req) internal pure returns (bytes32) {
        return keccak256(abi.encode(
                EIP712DOMAIN_TYPEHASH,
                keccak256(bytes(req.name)),
                keccak256(bytes(req.version)),
                req.chainId,
                req.verifyingContract));
    }

    function hashRelayData(GsnTypes.RelayData calldata req) internal pure returns (bytes32) {
        return keccak256(abi.encode(
                RELAYDATA_TYPEHASH,
                req.gasPrice,
                req.pctRelayFee,
                req.baseRelayFee,
                req.relayWorker,
                req.paymaster,
                req.forwarder,
                keccak256(req.paymasterData),
                req.clientId
            ));
    }


}

File 31 of 38 : GsnUtils.sol
/* solhint-disable no-inline-assembly */
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;

import "../utils/MinLibBytes.sol";

library GsnUtils {

    /**
     * extract method sig from encoded function call
     */
    function getMethodSig(bytes memory msgData) internal pure returns (bytes4) {
        return MinLibBytes.readBytes4(msgData, 0);
    }

    /**
     * extract parameter from encoded-function block.
     * see: https://solidity.readthedocs.io/en/develop/abi-spec.html#formal-specification-of-the-encoding
     * the return value should be casted to the right type (uintXXX/bytesXXX/address/bool/enum)
     */
    function getParam(bytes memory msgData, uint index) internal pure returns (uint) {
        return MinLibBytes.readUint256(msgData, 4 + index * 32);
    }

    //re-throw revert with the same revert data.
    function revertWithData(bytes memory data) internal pure {
        assembly {
            revert(add(data,32), mload(data))
        }
    }

}

File 32 of 38 : MinLibBytes.sol
// SPDX-License-Identifier: MIT
// minimal bytes manipulation required by GSN
// a minimal subset from 0x/LibBytes
/* solhint-disable no-inline-assembly */
pragma solidity ^0.6.2;

library MinLibBytes {

    //truncate the given parameter (in-place) if its length is above the given maximum length
    // do nothing otherwise.
    //NOTE: solidity warns unless the method is marked "pure", but it DOES modify its parameter.
    function truncateInPlace(bytes memory data, uint256 maxlen) internal pure {
        if (data.length > maxlen) {
            assembly { mstore(data, maxlen) }
        }
    }

    /// @dev Reads an address from a position in a byte array.
    /// @param b Byte array containing an address.
    /// @param index Index in byte array of address.
    /// @return result address from byte array.
    function readAddress(
        bytes memory b,
        uint256 index
    )
        internal
        pure
        returns (address result)
    {
        require (b.length >= index + 20, "readAddress: data too short");

        // Add offset to index:
        // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)
        // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)
        index += 20;

        // Read address from array memory
        assembly {
            // 1. Add index to address of bytes array
            // 2. Load 32-byte word from memory
            // 3. Apply 20-byte mask to obtain address
            result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)
        }
        return result;
    }

    function readBytes32(
        bytes memory b,
        uint256 index
    )
        internal
        pure
        returns (bytes32 result)
    {
        require(b.length >= index + 32, "readBytes32: data too short" );

        // Read the bytes32 from array memory
        assembly {
            result := mload(add(b, add(index,32)))
        }
        return result;
    }

    /// @dev Reads a uint256 value from a position in a byte array.
    /// @param b Byte array containing a uint256 value.
    /// @param index Index in byte array of uint256 value.
    /// @return result uint256 value from byte array.
    function readUint256(
        bytes memory b,
        uint256 index
    )
        internal
        pure
        returns (uint256 result)
    {
        result = uint256(readBytes32(b, index));
        return result;
    }

    function readBytes4(
        bytes memory b,
        uint256 index
    )
        internal
        pure
        returns (bytes4 result)
    {
        require(b.length >= index + 4, "readBytes4: data too short");

        // Read the bytes4 from array memory
        assembly {
            result := mload(add(b, add(index,32)))
            // Solidity does not require us to clean the trailing bytes.
            // We do it anyway
            result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000)
        }
        return result;
    }
}

File 33 of 38 : RLPReader.sol
// SPDX-License-Identifier:APACHE-2.0
/*
* Taken from https://github.com/hamdiallam/Solidity-RLP
*/
/* solhint-disable */
pragma solidity ^0.6.2;

library RLPReader {

    uint8 constant STRING_SHORT_START = 0x80;
    uint8 constant STRING_LONG_START = 0xb8;
    uint8 constant LIST_SHORT_START = 0xc0;
    uint8 constant LIST_LONG_START = 0xf8;
    uint8 constant WORD_SIZE = 32;

    struct RLPItem {
        uint len;
        uint memPtr;
    }

    using RLPReader for bytes;
    using RLPReader for uint;
    using RLPReader for RLPReader.RLPItem;

    // helper function to decode rlp encoded  ethereum transaction
    /*
    * @param rawTransaction RLP encoded ethereum transaction
    * @return tuple (nonce,gasPrice,gasLimit,to,value,data)
    */

    function decodeTransaction(bytes memory rawTransaction) internal pure returns (uint, uint, uint, address, uint, bytes memory){
        RLPReader.RLPItem[] memory values = rawTransaction.toRlpItem().toList(); // must convert to an rlpItem first!
        return (values[0].toUint(), values[1].toUint(), values[2].toUint(), values[3].toAddress(), values[4].toUint(), values[5].toBytes());
    }

    /*
    * @param item RLP encoded bytes
    */
    function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {
        if (item.length == 0)
            return RLPItem(0, 0);
        uint memPtr;
        assembly {
            memPtr := add(item, 0x20)
        }
        return RLPItem(item.length, memPtr);
    }
    /*
    * @param item RLP encoded list in bytes
    */
    function toList(RLPItem memory item) internal pure returns (RLPItem[] memory result) {
        require(isList(item), "isList failed");
        uint items = numItems(item);
        result = new RLPItem[](items);
        uint memPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint dataLen;
        for (uint i = 0; i < items; i++) {
            dataLen = _itemLength(memPtr);
            result[i] = RLPItem(dataLen, memPtr);
            memPtr = memPtr + dataLen;
        }
    }
    /*
    * Helpers
    */
    // @return indicator whether encoded payload is a list. negate this function call for isData.
    function isList(RLPItem memory item) internal pure returns (bool) {
        uint8 byte0;
        uint memPtr = item.memPtr;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }
        if (byte0 < LIST_SHORT_START)
            return false;
        return true;
    }
    // @return number of payload items inside an encoded list.
    function numItems(RLPItem memory item) internal pure returns (uint) {
        uint count = 0;
        uint currPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint endPtr = item.memPtr + item.len;
        while (currPtr < endPtr) {
            currPtr = currPtr + _itemLength(currPtr);
            // skip over an item
            count++;
        }
        return count;
    }
    // @return entire rlp item byte length
    function _itemLength(uint memPtr) internal pure returns (uint len) {
        uint byte0;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }
        if (byte0 < STRING_SHORT_START)
            return 1;
        else if (byte0 < STRING_LONG_START)
            return byte0 - STRING_SHORT_START + 1;
        else if (byte0 < LIST_SHORT_START) {
            assembly {
                let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is
                memPtr := add(memPtr, 1) // skip over the first byte
            /* 32 byte word size */
                let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len
                len := add(dataLen, add(byteLen, 1))
            }
        }
        else if (byte0 < LIST_LONG_START) {
            return byte0 - LIST_SHORT_START + 1;
        }
        else {
            assembly {
                let byteLen := sub(byte0, 0xf7)
                memPtr := add(memPtr, 1)
                let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length
                len := add(dataLen, add(byteLen, 1))
            }
        }
    }
    // @return number of bytes until the data
    function _payloadOffset(uint memPtr) internal pure returns (uint) {
        uint byte0;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }
        if (byte0 < STRING_SHORT_START)
            return 0;
        else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START))
            return 1;
        else if (byte0 < LIST_SHORT_START)  // being explicit
            return byte0 - (STRING_LONG_START - 1) + 1;
        else
            return byte0 - (LIST_LONG_START - 1) + 1;
    }
    /** RLPItem conversions into data types **/
    // @returns raw rlp encoding in bytes
    function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) {
        bytes memory result = new bytes(item.len);
        uint ptr;
        assembly {
            ptr := add(0x20, result)
        }
        copy(item.memPtr, ptr, item.len);
        return result;
    }

    function toBoolean(RLPItem memory item) internal pure returns (bool) {
        require(item.len == 1, "Invalid RLPItem. Booleans are encoded in 1 byte");
        uint result;
        uint memPtr = item.memPtr;
        assembly {
            result := byte(0, mload(memPtr))
        }
        return result == 0 ? false : true;
    }

    function toAddress(RLPItem memory item) internal pure returns (address) {
        // 1 byte for the length prefix according to RLP spec
        require(item.len <= 21, "Invalid RLPItem. Addresses are encoded in 20 bytes or less");
        return address(toUint(item));
    }

    function toUint(RLPItem memory item) internal pure returns (uint) {
        uint offset = _payloadOffset(item.memPtr);
        uint len = item.len - offset;
        uint memPtr = item.memPtr + offset;
        uint result;
        assembly {
            result := div(mload(memPtr), exp(256, sub(32, len))) // shift to the correct location
        }
        return result;
    }

    function toBytes(RLPItem memory item) internal pure returns (bytes memory) {
        uint offset = _payloadOffset(item.memPtr);
        uint len = item.len - offset;
        // data length
        bytes memory result = new bytes(len);
        uint destPtr;
        assembly {
            destPtr := add(0x20, result)
        }
        copy(item.memPtr + offset, destPtr, len);
        return result;
    }
    /*
    * @param src Pointer to source
    * @param dest Pointer to destination
    * @param len Amount of memory to copy from the source
    */
    function copy(uint src, uint dest, uint len) internal pure {
        // copy as many word sizes as possible
        for (; len >= WORD_SIZE; len -= WORD_SIZE) {
            assembly {
                mstore(dest, mload(src))
            }
            src += WORD_SIZE;
            dest += WORD_SIZE;
        }
        // left over bytes. Mask is used to remove unwanted bytes from the word
        uint mask = 256 ** (WORD_SIZE - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask)) // zero out src
            let destpart := and(mload(dest), mask) // retrieve the bytes
            mstore(dest, or(destpart, srcpart))
        }
    }
}

File 34 of 38 : VersionRegistry.sol
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
// solhint-disable not-rely-on-time

import "../interfaces/IVersionRegistry.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract VersionRegistry is IVersionRegistry, Ownable {

    function addVersion(bytes32 id, bytes32 version, string calldata value) external override onlyOwner {
        require(id != bytes32(0), "missing id");
        require(version != bytes32(0), "missing version");
        emit VersionAdded(id, version, value, block.timestamp);
    }

    function cancelVersion(bytes32 id, bytes32 version, string calldata reason) external override onlyOwner {
        emit VersionCanceled(id, version, reason);
    }
}

File 35 of 38 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "../GSN/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 36 of 38 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        if (signature.length != 65) {
            revert("ECDSA: invalid signature length");
        }

        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }

        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            revert("ECDSA: invalid signature 's' value");
        }

        if (v != 27 && v != 28) {
            revert("ECDSA: invalid signature 'v' value");
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * replicates the behavior of the
     * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
     * JSON-RPC method.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }
}

File 37 of 38 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 38 of 38 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"contract IStakeManager","name":"_stakeManager","type":"address"},{"internalType":"address","name":"_penalizer","type":"address"},{"internalType":"uint256","name":"_maxWorkerCount","type":"uint256"},{"internalType":"uint256","name":"_gasReserve","type":"uint256"},{"internalType":"uint256","name":"_postOverhead","type":"uint256"},{"internalType":"uint256","name":"_gasOverhead","type":"uint256"},{"internalType":"uint256","name":"_maximumRecipientDeposit","type":"uint256"},{"internalType":"uint256","name":"_minimumUnstakeDelay","type":"uint256"},{"internalType":"uint256","name":"_minimumStake","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"paymaster","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":"relayManager","type":"address"},{"indexed":false,"internalType":"uint256","name":"baseRelayFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pctRelayFee","type":"uint256"},{"indexed":false,"internalType":"string","name":"relayUrl","type":"string"}],"name":"RelayServerRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"relayManager","type":"address"},{"indexed":false,"internalType":"address[]","name":"newRelayWorkers","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"workersCount","type":"uint256"}],"name":"RelayWorkersAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"relayManager","type":"address"},{"indexed":true,"internalType":"address","name":"paymaster","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"relayWorker","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"uint256","name":"innerGasUsed","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"TransactionRejectedByPaymaster","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"relayManager","type":"address"},{"indexed":true,"internalType":"address","name":"relayWorker","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"paymaster","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":false,"internalType":"enum IRelayHub.RelayCallStatus","name":"status","type":"uint8"},{"indexed":false,"internalType":"bytes","name":"returnValue","type":"bytes"}],"name":"TransactionResult","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":"newRelayWorkers","type":"address[]"}],"name":"addRelayWorkers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"components":[{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"uint256","name":"pctRelayFee","type":"uint256"},{"internalType":"uint256","name":"baseRelayFee","type":"uint256"},{"internalType":"address","name":"relayWorker","type":"address"},{"internalType":"address","name":"paymaster","type":"address"},{"internalType":"bytes","name":"paymasterData","type":"bytes"},{"internalType":"uint256","name":"clientId","type":"uint256"},{"internalType":"address","name":"forwarder","type":"address"}],"internalType":"struct GsnTypes.RelayData","name":"relayData","type":"tuple"}],"name":"calculateCharge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"depositFor","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gasOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IForwarder.ForwardRequest","name":"request","type":"tuple"},{"components":[{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"uint256","name":"pctRelayFee","type":"uint256"},{"internalType":"uint256","name":"baseRelayFee","type":"uint256"},{"internalType":"address","name":"relayWorker","type":"address"},{"internalType":"address","name":"paymaster","type":"address"},{"internalType":"bytes","name":"paymasterData","type":"bytes"},{"internalType":"uint256","name":"clientId","type":"uint256"},{"internalType":"address","name":"forwarder","type":"address"}],"internalType":"struct GsnTypes.RelayData","name":"relayData","type":"tuple"}],"internalType":"struct GsnTypes.RelayRequest","name":"relayRequest","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"approvalData","type":"bytes"},{"components":[{"internalType":"uint256","name":"acceptanceBudget","type":"uint256"},{"internalType":"uint256","name":"preRelayedCallGasLimit","type":"uint256"},{"internalType":"uint256","name":"postRelayedCallGasLimit","type":"uint256"}],"internalType":"struct IPaymaster.GasLimits","name":"gasLimits","type":"tuple"},{"internalType":"uint256","name":"totalInitialGas","type":"uint256"},{"internalType":"uint256","name":"maxPossibleGas","type":"uint256"}],"name":"innerRelayCall","outputs":[{"internalType":"enum IRelayHub.RelayCallStatus","name":"","type":"uint8"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"relayManager","type":"address"}],"name":"isRelayManagerStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWorkerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maximumRecipientDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumUnstakeDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"relayWorker","type":"address"},{"internalType":"address payable","name":"beneficiary","type":"address"}],"name":"penalize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"penalizer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"postOverhead","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"baseRelayFee","type":"uint256"},{"internalType":"uint256","name":"pctRelayFee","type":"uint256"},{"internalType":"string","name":"url","type":"string"}],"name":"registerRelayServer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"paymasterMaxAcceptanceBudget","type":"uint256"},{"components":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IForwarder.ForwardRequest","name":"request","type":"tuple"},{"components":[{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"uint256","name":"pctRelayFee","type":"uint256"},{"internalType":"uint256","name":"baseRelayFee","type":"uint256"},{"internalType":"address","name":"relayWorker","type":"address"},{"internalType":"address","name":"paymaster","type":"address"},{"internalType":"bytes","name":"paymasterData","type":"bytes"},{"internalType":"uint256","name":"clientId","type":"uint256"},{"internalType":"address","name":"forwarder","type":"address"}],"internalType":"struct GsnTypes.RelayData","name":"relayData","type":"tuple"}],"internalType":"struct GsnTypes.RelayRequest","name":"relayRequest","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"approvalData","type":"bytes"},{"internalType":"uint256","name":"externalGasLimit","type":"uint256"}],"name":"relayCall","outputs":[{"internalType":"bool","name":"paymasterAccepted","type":"bool"},{"internalType":"bytes","name":"returnValue","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeManager","outputs":[{"internalType":"contract IStakeManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionHub","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"dest","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"workerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"workerToManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c0604052601b60808190527f322e302e302b6f70656e67736e2e6875622e6972656c6179687562000000000060a0908152620000409160009190620000c5565b503480156200004e57600080fd5b50604051620032d3380380620032d383398101604081905262000071916200016a565b600880546001600160a01b039a8b166001600160a01b0319918216179091556009805499909a1698169790971790975560079490945560069290925560055560045560035560029190915560015562000205565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200010857805160ff191683800117855562000138565b8280016001018555821562000138579182015b82811115620001385782518255916020019190600101906200011b565b50620001469291506200014a565b5090565b6200016791905b8082111562000146576000815560010162000151565b90565b60008060008060008060008060006101208a8c03121562000189578485fd5b89516200019681620001ec565b60208b0151909950620001a981620001ec565b8098505060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a015191506101008a015190509295985092959850929598565b6001600160a01b03811681146200020257600080fd5b50565b6130be80620002156000396000f3fe6080604052600436106101345760003560e01c8063aa67c919116100ab578063d904c7321161006f578063d904c7321461032a578063e5fad9781461034c578063ebcd31ac14610361578063ec5ffac214610381578063eea7570e14610396578063fbb44607146103ab57610134565b8063aa67c919146102ad578063ba3ecc5b146102c0578063c2da0786146102d5578063c4775a68146102f5578063ca998f561461030a57610134565b806370a08231116100fd57806370a082311461020157806371116320146102215780637542ff951461023657806383b718711461025857806383fea4ef1461027857806386a16f8f1461028d57610134565b8062f714ce14610139578063194ac3071461015b57806327b4256a146101915780632ad311b5146101bf5780633a3e83ac146101ec575b600080fd5b34801561014557600080fd5b5061015961015436600461220b565b6103d9565b005b34801561016757600080fd5b5061017b610176366004611f33565b6104d5565b60405161018891906127e3565b60405180910390f35b34801561019d57600080fd5b506101b16101ac36600461227d565b6104e7565b6040516101889291906127c0565b3480156101cb57600080fd5b506101df6101da366004611f33565b610b3f565b60405161018891906127b5565b3480156101f857600080fd5b5061017b610bd2565b34801561020d57600080fd5b5061017b61021c366004611f33565b610bd8565b34801561022d57600080fd5b5061017b610bf3565b34801561024257600080fd5b5061024b610bf9565b604051610188919061266a565b34801561026457600080fd5b50610159610273366004612320565b610c08565b34801561028457600080fd5b5061017b610cb1565b34801561029957600080fd5b5061017b6102a836600461222f565b610cb7565b6101596102bb366004611f33565b610d1b565b3480156102cc57600080fd5b5061017b610dc4565b3480156102e157600080fd5b506101596102f0366004611f87565b610dca565b34801561030157600080fd5b5061024b610f4b565b34801561031657600080fd5b5061024b610325366004611f33565b610f5a565b34801561033657600080fd5b5061033f610f75565b60405161018891906128b6565b34801561035857600080fd5b5061017b611003565b34801561036d57600080fd5b5061015961037c366004611f4f565b611009565b34801561038d57600080fd5b5061017b611187565b3480156103a257600080fd5b5061017b61118d565b3480156103b757600080fd5b506103cb6103c6366004612100565b611193565b604051610188929190612895565b336000818152600c60205260409020548311156104115760405162461bcd60e51b815260040161040890612bc1565b60405180910390fd5b6001600160a01b0381166000908152600c602052604090205461043a908463ffffffff61151316565b6001600160a01b038083166000908152600c60205260408082209390935591519084169185156108fc02918691818181858888f19350505050158015610484573d6000803e3d6000fd5b50816001600160a01b0316816001600160a01b03167fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb856040516104c891906127e3565b60405180910390a3505050565b600b6020526000908152604090205481565b600060606104f3611d28565b6105486105008a80612e7f565b61050e9060a0810190612e38565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250611555915050565b6001600160e01b03191660208201523332146105765760405162461bcd60e51b815260040161040890612abe565b336000908152600a60205260409020546001600160a01b03166105ab5760405162461bcd60e51b815260040161040890612c87565b336105b960208b018b612e94565b6105ca906080810190606001611f33565b6001600160a01b0316146105f05760405162461bcd60e51b815260040161040890612bed565b336000908152600a6020526040902054610612906001600160a01b0316610b3f565b61062e5760405162461bcd60e51b815260040161040890612a87565b3a61063c60208b018b612e94565b35111561065b5760405162461bcd60e51b8152600401610408906129ac565b4584111561067b5760405162461bcd60e51b8152600401610408906128c9565b6106868a8a8661158e565b60e0830152608082015260065460009060405a603f02816106a357fe5b040390505a8261010001818152505060006005546004548784010101905060006060306001600160a01b03168463fbb4460760e01b8f8f8f8f8f8c608001515a8c038e60e00151604051602401610701989796959493929190612d58565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161073f9190612545565b60006040518083038160008787f1925050503d806000811461077d576040519150601f19603f3d011682016040523d82523d6000602084013e610782565b606091505b50811515875290925090505a6101008601510360c086015280516107af90820160209081019083016120a3565b8660a001876060018290528260068111156107c657fe5b60068111156107d157fe5b9052505060608501515115610822577fa1478a4242848419db824250a0dddc645dca0d6a9b12ab1fd79b00145a0ba98e8560a001518660600151604051610819929190612895565b60405180910390a15b5050505080600001516109625760808101515160c0820151108015610889575060028160a00151600681111561085457fe5b148061086f575060038160a00151600681111561086d57fe5b145b80610889575060048160a00151600681111561088757fe5b145b15610962576000925061089c8980612e7f565b6108aa906020810190611f33565b6001600160a01b03166108c060208b018b612e94565b6108d19060a0810190608001611f33565b336000908152600a60205260409020546001600160a01b0391821691167fddb88484d11f800b80fe63aa67488ec56ee001d85896d528912c5d850cbcd06a6109198d80612e7f565b61092a906040810190602001611f33565b3386602001518760c00151886060015160405161094b95949392919061267e565b60405180910390a460600151600092509050610b33565b60006004545a86030190506000610980826102a860208e018e612e94565b90506109d181600c60008e806020019061099a9190612e94565b6109ab9060a0810190608001611f33565b6001600160a01b031681526020810191909152604001600020549063ffffffff61151316565b600c60006109e260208f018f612e94565b6109f39060a0810190608001611f33565b6001600160a01b0390811682526020808301939093526040918201600090812094909455338452600a835281842054168352600c909152902054610a3d908263ffffffff61172e16565b336000908152600a60209081526040808320546001600160a01b03168352600c909152902055610a6d8b80612e7f565b610a7b906020810190611f33565b336000818152600a60205260409020546001600160a01b0392831692167fc9aa709786a3d5fe2cc947abc1ba8cbb0f6decb57aa74b84eb7f558125fee454610ac38f80612e7f565b610ad4906040810190602001611f33565b8f8060200190610ae49190612e94565b610af59060a0810190608001611f33565b88602001518960a0015188604051610b119594939291906126f0565b60405180910390a4600160405180602001604052806000815250945094505050505b97509795505050505050565b600854600154600254604051636de8dd4160e01b81526000936001600160a01b031692636de8dd4192610b7a92879230929091600401612736565b60206040518083038186803b158015610b9257600080fd5b505afa158015610ba6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bca9190611ff3565b90505b919050565b60035481565b6001600160a01b03166000908152600c602052604090205490565b60025481565b6008546001600160a01b031681565b33610c1281610b3f565b610c2e5760405162461bcd60e51b815260040161040890612a87565b6001600160a01b0381166000908152600b6020526040902054610c635760405162461bcd60e51b815260040161040890612b05565b806001600160a01b03167f77f2d8afec4b9d82ffa0dea525320620292bd1067f575964994d5c4501479aed86868686604051610ca29493929190612e18565b60405180910390a25050505050565b60045481565b6000610d12610d016064610cf5610cd860208701358363ffffffff61172e16565b610ce988883563ffffffff61175316565b9063ffffffff61175316565b9063ffffffff61178d16565b60408401359063ffffffff61172e16565b90505b92915050565b6003543490811115610d3f5760405162461bcd60e51b815260040161040890612a5e565b6001600160a01b0382166000908152600c6020526040902054610d68908263ffffffff61172e16565b6001600160a01b0383166000818152600c6020526040908190209290925590513391907f8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a790610db89085906127e3565b60405180910390a35050565b60055481565b336000818152600b6020526040902080548301908190556007541015610e025760405162461bcd60e51b815260040161040890612b97565b610e0b81610b3f565b610e275760405162461bcd60e51b815260040161040890612a87565b60005b82811015610ef1576000600a81868685818110610e4357fe5b9050602002016020810190610e589190611f33565b6001600160a01b0390811682526020820192909252604001600020541614610e925760405162461bcd60e51b8152600401610408906128f7565b81600a6000868685818110610ea357fe5b9050602002016020810190610eb89190611f33565b6001600160a01b039081168252602082019290925260400160002080546001600160a01b03191692909116919091179055600101610e2a565b506001600160a01b0381166000818152600b6020526040908190205490517febf4a9bffb39f7c5dbf3f65540183b9381ae226ac3d0a45b4cad484713bd4a2891610f3e918791879161275f565b60405180910390a2505050565b6009546001600160a01b031681565b600a602052600090815260409020546001600160a01b031681565b6000805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610ffb5780601f10610fd057610100808354040283529160200191610ffb565b820191906000526020600020905b815481529060010190602001808311610fde57829003601f168201915b505050505081565b60075481565b6009546001600160a01b031633146110335760405162461bcd60e51b815260040161040890612b2f565b6001600160a01b038083166000908152600a6020526040902054168061106b5760405162461bcd60e51b815260040161040890612c87565b61107481610b3f565b6110905760405162461bcd60e51b815260040161040890612a87565b611098611d8d565b60085460405163c345315360e01b81526001600160a01b039091169063c3453153906110c890859060040161266a565b60806040518083038186803b1580156110e057600080fd5b505afa1580156110f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111891906121be565b600854815160405163026822bd60e21b81529293506001600160a01b03909116916309a08af49161114f91869188916004016126cc565b600060405180830381600087803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b5050505050505050565b60015481565b60065481565b6000606061119f611dbe565b3330146111be5760405162461bcd60e51b81526004016104089061292e565b600c60006111cf60208e018e612e94565b6111e09060a0810190608001611f33565b6001600160a01b0316815260208101919091526040908101600020548252516372e0922360e11b90611220908d908d908d908d908d908b90602401612dca565b60408051601f19818403018152919052602080820180516001600160e01b03166001600160e01b03199094169390931790925260a083015260009060609061126a908e018e612e94565b61127b9060a0810190608001611f33565b6001600160a01b031688602001358460a0015160405161129b9190612545565b60006040518083038160008787f1925050503d80600081146112d9576040519150601f19603f3d011682016040523d82523d6000602084013e6112de565b606091505b509092509050816112fd576112f2816117cf565b6112fd6002826117de565b80806020019051810190611311919061205e565b151560c08501526080840152506000905061132d8c8c8c611817565b60608501521515604084015290508061134f5761134f600383606001516117de565b8160c00151801561136257508160400151155b1561137657611376600483606001516117de565b50638e9483b060e01b816080015182604001515a88038e806020019061139c9190612e94565b6040516024016113af9493929190612862565b60408051601f19818403018152919052602080820180516001600160e01b03166001600160e01b03199094169390931790925260a08301526000906060906113f9908e018e612e94565b61140a9060a0810190608001611f33565b6001600160a01b031688604001358460a0015160405161142a9190612545565b60006040518083038160008787f1925050503d8060008114611468576040519150601f19603f3d011682016040523d82523d6000602084013e61146d565b606091505b509150915081611482576114826005826117de565b50508051600c600061149760208f018f612e94565b6114a89060a0810190608001611f33565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156114e9576114e96006604051806020016040528060008152506117de565b80604001516114f95760016114fc565b60005b816060015192509250509850989650505050505050565b6000610d1283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a00565b6000816004018351101561157b5760405162461bcd60e51b815260040161040890612c50565b5001602001516001600160e01b03191690565b611596611df9565b60006115a56020850185612e94565b6115b69060a0810190608001611f33565b6001600160a01b0316635ea54eee61c3506040518263ffffffff1660e01b815260040160606040518083038187803b1580156115f157600080fd5b5086fa158015611605573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061162a91906120c3565b805190925085101561164e5760405162461bcd60e51b8152600401610408906129d7565b61168c61165b8580612e7f565b606001356116808460400151611680866020015160045461172e90919063ffffffff16565b9063ffffffff61172e16565b9050808310156116ae5760405162461bcd60e51b815260040161040890612a0c565b60006116c1826102a86020880188612e94565b9050600c60006116d46020880188612e94565b6116e59060a0810190608001611f33565b6001600160a01b03166001600160a01b03168152602001908152602001600020548111156117255760405162461bcd60e51b815260040161040890612c19565b50935093915050565b600082820183811015610d125760405162461bcd60e51b815260040161040890612975565b60008261176257506000610d15565b8282028284828161176f57fe5b0414610d125760405162461bcd60e51b815260040161040890612b56565b6000610d1283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611a2c565b6117db81610400611a63565b50565b606082826040516020016117f3929190612895565b604051602081830303815290604052905061180d816117cf565b8051602082018181fd5b6000806060611824611e1a565b606061182f88611a74565b9092509050600061185d61184660208b018b612e94565b6118589061010081019060e001611f33565b611b9e565b905061186c60208a018a612e94565b61187e9061010081019060e001611f33565b6001600160a01b031663cdf5735a60e01b84836040518060400160405280600c81526020016b14995b185e54995c5d595cdd60a21b8152506040518060800160405280604a815260200161303f604a91396040518060e0016040528060a18152602001612f9e60a191396040516020016118f891906125c4565b60408051601f1981840301815290829052611917939291602001612561565b60405160208183030381529060405280519060200120868d8d60405160240161194596959493929190612cb5565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516119839190612545565b6000604051808303816000865af19150503d80600081146119c0576040519150601f19603f3d011682016040523d82523d6000602084013e6119c5565b606091505b50909650935085156119eb57838060200190518101906119e5919061200f565b90955093505b6119f4846117cf565b50505093509350939050565b60008184841115611a245760405162461bcd60e51b815260040161040891906128b6565b505050900390565b60008183611a4d5760405162461bcd60e51b815260040161040891906128b6565b506000838581611a5957fe5b0495945050505050565b8082511115611a70578082525b5050565b611a7c611e1a565b6040805160c0810190915260609080611a958580612e7f565b611aa3906020810190611f33565b6001600160a01b03168152602001611abb8580612e7f565b611acc906040810190602001611f33565b6001600160a01b03168152602001611ae48580612e7f565b604001358152602001611af78580612e7f565b606001358152602001611b0a8580612e7f565b608001358152602001611b1d8580612e7f565b611b2b9060a0810190612e38565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152509150611b78611b736020850185612e94565b611c1e565b604051602001611b8891906127e3565b6040516020818303038152906040529050915091565b6040805160c0810182526017608082019081527f47534e2052656c61796564205472616e73616374696f6e00000000000000000060a083015281528151808301835260018152601960f91b602082810191909152820152600091610bca91908101611c07611cd8565b8152602001846001600160a01b0316815250611cdc565b60006040518060e0016040528060a18152602001612f9e60a191398051602091820120908335908401356040850135611c5d6080870160608801611f33565b611c6d60a0880160808901611f33565b611c7e610100890160e08a01611f33565b611c8b60a08a018a612e38565b604051611c99929190612535565b604051908190038120611cbb989796959493929160c08c013590602001612818565b604051602081830303815290604052805190602001209050919050565b4690565b6000604051611cea90612600565b604051809103902082600001518051906020012083602001518051906020012084604001518560600151604051602001611cbb9594939291906127ec565b60405180610140016040528060001515815260200160006001600160e01b03191681526020016060815260200160608152602001611d64611df9565b815260200160008152602001600081526020016000815260200160008152602001606081525090565b604051806080016040528060008152602001600081526020016000815260200160006001600160a01b031681525090565b6040805160e08101825260008082526020820181905291810182905260608082018190526080820181905260a082015260c081019190915290565b60405180606001604052806000815260200160008152602001600081525090565b6040518060c0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001606081525090565b8035610d1581612f7a565b60008083601f840112611e7e578182fd5b50813567ffffffffffffffff811115611e95578182fd5b602083019150836020828501011115611ead57600080fd5b9250929050565b600082601f830112611ec4578081fd5b815167ffffffffffffffff811115611eda578182fd5b611eed601f8201601f1916602001612ea9565b9150808252836020828501011115611f0457600080fd5b611f15816020840160208601612f4a565b5092915050565b600060408284031215611f2d578081fd5b50919050565b600060208284031215611f44578081fd5b8135610d1281612f7a565b60008060408385031215611f61578081fd5b8235611f6c81612f7a565b91506020830135611f7c81612f7a565b809150509250929050565b60008060208385031215611f99578182fd5b823567ffffffffffffffff80821115611fb0578384fd5b81850186601f820112611fc1578485fd5b8035925081831115611fd1578485fd5b8660208085028301011115611fe4578485fd5b60200196919550909350505050565b600060208284031215612004578081fd5b8151610d1281612f8f565b60008060408385031215612021578182fd5b825161202c81612f8f565b602084015190925067ffffffffffffffff811115612048578182fd5b61205485828601611eb4565b9150509250929050565b60008060408385031215612070578182fd5b825167ffffffffffffffff811115612086578283fd5b61209285828601611eb4565b9250506020830151611f7c81612f8f565b600080604083850312156120b5578182fd5b82516007811061202c578283fd5b6000606082840312156120d4578081fd5b6120de6060612ea9565b8251815260208301516020820152604083015160408201528091505092915050565b600080600080600080600080888a0361010081121561211d578485fd5b893567ffffffffffffffff80821115612134578687fd5b6121408d838e01611f1c565b9a5060208c0135915080821115612155578687fd5b6121618d838e01611e6d565b909a50985060408c0135915080821115612179578687fd5b506121868c828d01611e6d565b9097509550506060605f198201121561219d578384fd5b5096999598509396929550909360608301935060c08301359260e001359150565b6000608082840312156121cf578081fd5b6121d96080612ea9565b82518152602083015160208201526040830151604082015260608301516121ff81612f7a565b60608201529392505050565b6000806040838503121561221d578182fd5b823591506020830135611f7c81612f7a565b60008060408385031215612241578182fd5b82359150602083013567ffffffffffffffff81111561225e578182fd5b8084016101008187031215612271578283fd5b80925050509250929050565b600080600080600080600060a0888a031215612297578081fd5b87359650602088013567ffffffffffffffff808211156122b5578283fd5b6122c18b838c01611f1c565b975060408a01359150808211156122d6578283fd5b6122e28b838c01611e6d565b909750955060608a01359150808211156122fa578283fd5b506123078a828b01611e6d565b989b979a50959894979596608090950135949350505050565b60008060008060608587031215612335578182fd5b8435935060208501359250604085013567ffffffffffffffff811115612359578283fd5b61236587828801611e6d565b95989497509550505050565b6001600160a01b03169052565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b600081518084526123c0816020860160208601612f4a565b601f01601f19169290920160200192915050565b600061010082358452602083013560208501526040830135604085015260608301356123ff81612f7a565b6001600160a01b03908116606086015260808401359061241e82612f7a565b16608085015261243160a0840184612ed0565b8260a0870152612444838701828461237e565b60c086013560c088015260e0860135935061245e84612f7a565b61246b60e0880185612371565b9695505050505050565b6000813560be1983360301811261248a578182fd5b60408452820180359061249c82612f7a565b6001600160a01b03918216604086810191909152810191806124c18460208501611e62565b1660608701525081356080860152606081013560a0860152608081013560c08601526124f060a0820182612ed0565b925060c060e08701526125086101008701848361237e565b9150506125186020850185612f15565b9150848103602086015261252c81836123d4565b95945050505050565b6000828483379101908152919050565b60008251612557818460208701612f4a565b9190910192915050565b60008451612573818460208901612f4a565b808301600560fb1b815285519150612592826001830160208901612f4a565b818101600b60fa1b6001820152855192506125b4836002830160208901612f4a565b9091016002019695505050505050565b60007352656c6179446174612072656c6179446174612960601b825282516125f3816014850160208701612f4a565b9190910160140192915050565b7f454950373132446f6d61696e28737472696e67206e616d652c737472696e672081527f76657273696f6e2c75696e7432353620636861696e49642c6164647265737320602082015271766572696679696e67436f6e74726163742960701b604082015260520190565b6001600160a01b0391909116815260200190565b6001600160a01b038681168252851660208201526001600160e01b0319841660408201526060810183905260a0608082018190526000906126c1908301846123a8565b979650505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038681168252851660208201526001600160e01b03198416604082015260a0810161272184612f3f565b60608301528260808301529695505050505050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6040808252810183905260008460608301825b868110156127a2576020833561278781612f7a565b6001600160a01b031683529283019290910190600101612772565b5060209390930193909352509392505050565b901515815260200190565b60008315158252604060208301526127db60408301846123a8565b949350505050565b90815260200190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b9889526020890197909752604088019590955260608701939093526001600160a01b039182166080870152811660a08601521660c084015260e08301526101008201526101200190565b60006080825261287560808301876123a8565b851515602084015284604084015282810360608401526126c181856123d4565b60006128a084612f3f565b8252604060208301526127db60408301846123a8565b600060208252610d1260208301846123a8565b602080825260149082015273125b5c1bdcdcda589b194819d85cc81b1a5b5a5d60621b604082015260600190565b60208082526019908201527f7468697320776f726b6572206861732061206d616e6167657200000000000000604082015260600190565b60208082526027908201527f4f6e6c792052656c61794875622073686f756c642063616c6c207468697320666040820152663ab731ba34b7b760c91b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b602080825260119082015270496e76616c69642067617320707269636560781b604082015260600190565b6020808252818101527f756e6578706563746564206869676820616363657074616e6365427564676574604082015260600190565b60208082526032908201527f4e6f7420656e6f75676820676173206c65667420666f7220696e6e657252656c604082015271617943616c6c20746f20636f6d706c65746560701b606082015260800190565b6020808252600f908201526e6465706f73697420746f6f2062696760881b604082015260600190565b60208082526018908201527f72656c6179206d616e61676572206e6f74207374616b65640000000000000000604082015260600190565b60208082526027908201527f72656c617920776f726b65722063616e6e6f74206265206120736d61727420636040820152661bdb9d1c9858dd60ca1b606082015260800190565b60208082526010908201526f6e6f2072656c617920776f726b65727360801b604082015260600190565b6020808252600d908201526c2737ba103832b730b634bd32b960991b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526010908201526f746f6f206d616e7920776f726b65727360801b604082015260600190565b602080825260129082015271696e73756666696369656e742066756e647360701b604082015260600190565b6020808252601290820152712737ba1030903934b3b43a103bb7b935b2b960711b604082015260600190565b60208082526019908201527f5061796d61737465722062616c616e636520746f6f206c6f7700000000000000604082015260600190565b6020808252601a908201527f726561644279746573343a206461746120746f6f2073686f7274000000000000604082015260600190565b6020808252601490820152732ab735b737bbb7103932b630bc903bb7b935b2b960611b604082015260600190565b600060a08252612cc58851612f33565b60a083015260018060a01b0360208901511660c0830152604088015160e08301526060880151610100830152608088015161012083015260a088015160c0610140840152612d176101608401826123a8565b8860208501528760408501528381036060850152612d3581886123a8565b9150508281036080840152612d4b81858761237e565b9998505050505050505050565b6000610100808352612d6c8184018c612475565b8381036020850152612d7f818b8d61237e565b9150508281036040840152612d9581888a61237e565b865160608501526020870151608085015260409096015160a0840152505060c081019290925260e09091015295945050505050565b600060808252612ddd6080830189612475565b8281036020840152612df081888a61237e565b8381036040850152612e0381878961237e565b92505050826060830152979650505050505050565b60008582528460208301526060604083015261246b60608301848661237e565b6000808335601e19843603018112612e4e578283fd5b8084018035925067ffffffffffffffff831115612e69578384fd5b60200192505036819003821315611ead57600080fd5b6000823560be19833603018112612557578182fd5b6000823560fe19833603018112612557578182fd5b60405181810167ffffffffffffffff81118282101715612ec857600080fd5b604052919050565b6000808335601e19843603018112612ee6578283fd5b830160208101925035905067ffffffffffffffff811115612f0657600080fd5b803603831315611ead57600080fd5b6000823560fe19833603018112612f2a578182fd5b90910192915050565b6001600160a01b031690565b8060078110610bcd57fe5b60005b83811015612f65578181015183820152602001612f4d565b83811115612f74576000848401525b50505050565b6001600160a01b03811681146117db57600080fd5b80151581146117db57600080fdfe52656c6179446174612875696e743235362067617350726963652c75696e743235362070637452656c61794665652c75696e74323536206261736552656c61794665652c616464726573732072656c6179576f726b65722c61646472657373207061796d61737465722c6164647265737320666f727761726465722c6279746573207061796d6173746572446174612c75696e7432353620636c69656e74496429616464726573732066726f6d2c6164647265737320746f2c75696e743235362076616c75652c75696e74323536206761732c75696e74323536206e6f6e63652c62797465732064617461a26469706673582212203aed185c4945a69a47b1d120bd0f8314c05a4653672f2c271eae76e1d161c6fd64736f6c634300060a003300000000000000000000000019120dd5a594da608af904b3becd1a1b9a839100000000000000000000000000b851b09efe4a5021e9a4ecddbc5d9c9ce2640ccb000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000367e0000000000000000000000000000000000000000000000000000000000008c7d000000000000000000000000000000000000000000000001158e460913d0000000000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000001158e460913d00000

Deployed ByteCode Sourcemap

635:15469:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3778:332;;;;;;;;;;-1:-1:-1;3778:332:5;;;;;;;;:::i;:::-;;1360:55;;;;;;;;;;-1:-1:-1;1360:55:5;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;5860:4246;;;;;;;;;;-1:-1:-1;5860:4246:5;;;;;;;;:::i;:::-;;;;;;;;;15173:209;;;;;;;;;;-1:-1:-1;15173:209:5;;;;;;;;:::i;:::-;;;;;;;;868:47;;;;;;;;;;;;;:::i;3656:116::-;;;;;;;;;;-1:-1:-1;3656:116:5;;;;;;;;:::i;819:43::-;;;;;;;;;;;;;:::i;1088:42::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;2182:426;;;;;;;;;;-1:-1:-1;2182:426:5;;;;;;;;:::i;921:35::-;;;;;;;;;;;;;:::i;14797:370::-;;;;;;;;;;-1:-1:-1;14797:370:5;;;;;;;;:::i;3365:285::-;;;;;;;;;:::i;962:36::-;;;;;;;;;;;;;:::i;2614:745::-;;;;;;;;;;-1:-1:-1;2614:745:5;;;;;;;;:::i;1136:33::-;;;;;;;;;;;;;:::i;1236:59::-;;;;;;;;;;-1:-1:-1;1236:59:5;;;;;;;;:::i;705:65::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;1044:38;;;;;;;;;;;;;:::i;15497:605::-;;;;;;;;;;-1:-1:-1;15497:605:5;;;;;;;;:::i;777:36::-;;;;;;;;;;;;;:::i;1004:34::-;;;;;;;;;;;;;:::i;10375:3930::-;;;;;;;;;;-1:-1:-1;10375:3930:5;;;;;;;;:::i;:::-;;;;;;;;;3778:332;3886:10;3860:23;3914:17;;;:8;:17;;;;;;:27;-1:-1:-1;3914:27:5;3906:58;;;;-1:-1:-1;;;3906:58:5;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3995:17:5;;;;;;:8;:17;;;;;;:29;;4017:6;3995:29;:21;:29;:::i;:::-;-1:-1:-1;;;;;3975:17:5;;;;;;;:8;:17;;;;;;:49;;;;4034:21;;:13;;;;:21;;;;;4048:6;;4034:21;3975:17;4034:21;4048:6;4034:13;:21;;;;;;;;;;;;;;;;;;;;;4090:4;-1:-1:-1;;;;;4071:32:5;4081:7;-1:-1:-1;;;;;4071:32:5;;4096:6;4071:32;;;;;;;;;;;;;;;3778:332;;;:::o;1360:55::-;;;;;;;;;;;;;:::o;5860:4246::-;6122:22;6146:24;6207:25;;:::i;:::-;6266:52;6289:20;:12;;:20;;;:25;;;;;;;;;6266:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6266:52:5;-1:-1:-1;6266:22:5;;-1:-1:-1;;6266:52:5:i;:::-;-1:-1:-1;;;;;;6242:76:5;:21;;;:76;6336:10;6350:9;6336:23;6328:75;;;;-1:-1:-1;;;6328:75:5;;;;;;;;;6437:10;6460:1;6421:27;;;:15;:27;;;;;;-1:-1:-1;;;;;6421:27:5;6413:74;;;;-1:-1:-1;;;6413:74:5;;;;;;;;;6543:10;6505:22;;;;:12;:22;;;:34;;;;;;;;;;;-1:-1:-1;;;;;6505:48:5;;6497:79;;;;-1:-1:-1;;;6497:79:5;;;;;;;;;6644:10;6628:27;;;;:15;:27;;;;;;6607:49;;-1:-1:-1;;;;;6628:27:5;6607:20;:49::i;:::-;6586:120;;;;-1:-1:-1;;;6586:120:5;;;;;;;;;6759:11;6724:22;;;;:12;:22;;;:31;:46;;6716:76;;;;-1:-1:-1;;;6716:76:5;;;;;;;;;6830:14;6810:16;:34;;6802:67;;;;-1:-1:-1;;;6802:67:5;;;;;;;;;6933:77;6949:28;6979:12;6993:16;6933:15;:77::i;:::-;6897:19;;;6880:130;6881:14;;;6880:130;7238:10;;-1:-1:-1;;7235:2:5;7222:9;7232:2;7222:12;:15;;;;;;:26;7198:50;;7280:9;7258:4;:19;;:31;;;;;7300:22;7374:12;;7360:11;;7341:16;7325:13;:32;:46;:61;7300:86;;7655:12;7669:28;7709:4;-1:-1:-1;;;;;7701:18:5;7724:13;7775:32;;;7809:12;7823:9;;7834:12;;7848:4;:14;;;7897:9;7880:14;:26;7924:4;:19;;;7752:209;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;7752:209:5;;;;;;;;;;;;;;-1:-1:-1;;;;;7752:209:5;-1:-1:-1;;;;;;7752:209:5;;;;;;;;;;7701:270;;;;7752:209;7701:270;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7981:22:5;;;;;7654:317;;-1:-1:-1;7654:317:5;-1:-1:-1;8053:9:5;8033:19;;;;:29;8013:17;;;:49;8117:53;;;;;;;;;;;;;;;;8073:4;:11;;8086:4;:27;;8072:98;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8185:27:5;;;;:34;:36;8180:133;;8243:59;8261:4;:11;;;8274:4;:27;;;8243:59;;;;;;;;;;;;;;;;8180:133;5860:4246;;;;8339:4;:12;;;8334:987;;8446:14;;;;:31;8426:17;;;;:51;8425:354;;;;-1:-1:-1;8520:36:5;8505:4;:11;;;:51;;;;;;;;;:125;;;-1:-1:-1;8595:35:5;8580:4;:11;;;:50;;;;;;;;;8505:125;:205;;;-1:-1:-1;8669:41:5;8654:4;:11;;;:56;;;;;;;;;8505:205;8420:891;;;8817:5;;-1:-1:-1;9001:20:5;:12;;:20;;;:25;;;;;;;;;-1:-1:-1;;;;;8846:389:5;8947:22;;;;:12;:22;;;:32;;;;;;;;;;;8914:10;8898:27;;;;:15;:27;;;;;;-1:-1:-1;;;;;8846:389:5;;;;8898:27;8846:389;9048:20;:12;;:20;;;:23;;;;;;;;;;;9093:10;9125:4;:21;;;9168:4;:17;;;9207:4;:27;;;8846:389;;;;;;;;;;;;;;;;;;;9268:27;;;9261:5;;-1:-1:-1;9268:27:5;-1:-1:-1;9253:43:5;;8420:891;9418:15;9469:11;;9456:9;9437:28;;9436:44;;-1:-1:-1;9490:14:5;9507:48;9436:44;9532:22;;;;:12;:22;;9507:48;9490:65;;9611:54;9658:6;9611:8;:42;9620:12;:22;;;;;;;;;;:32;;;;;;;;;;;-1:-1:-1;;;;;9611:42:5;;;;;;;;;;;;-1:-1:-1;9611:42:5;;;:54;:46;:54;:::i;:::-;9566:8;:42;9575:22;;;;:12;:22;;;:32;;;;;;;;;;;-1:-1:-1;;;;;9566:42:5;;;;;;;;;;;;;;;;;-1:-1:-1;9566:42:5;;;:99;;;;9740:10;9724:27;;:15;:27;;;;;;;9715:37;;:8;:37;;;;;;:49;;9757:6;9715:49;:41;:49;:::i;:::-;9700:10;9675:37;9684:27;;;:15;:27;;;;;;;;;-1:-1:-1;;;;;9684:27:5;9675:37;;:8;:37;;;;;:89;9877:20;:12;;:20;;;:25;;;;;;;;;9853:10;9812:27;;;;:15;:27;;;;;;-1:-1:-1;;;;;9780:286:5;;;;9812:27;9780:286;9916:20;:12;;:20;;;:23;;;;;;;;;;;9953:12;:22;;;;;;;;;;:32;;;;;;;;;;;9999:4;:21;;;10034:4;:11;;;10059:6;9780:286;;;;;;;;;;;;;;;;;;;10084:4;10076:17;;;;;;;;;;;;;;;;;;;5860:4246;;;;;;;;;;;:::o;15173:209::-;15278:12;;;15341;15355:19;;15278:97;;-1:-1:-1;;;15278:97:5;;15255:4;;-1:-1:-1;;;;;15278:12:5;;:33;;:97;;15312:12;;15334:4;;15341:12;;15278:97;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15271:104;;15173:209;;;;:::o;868:47::-;;;;:::o;3656:116::-;-1:-1:-1;;;;;3749:16:5;3723:7;3749:16;;;:8;:16;;;;;;;3656:116::o;819:43::-;;;;:::o;1088:42::-;;;-1:-1:-1;;;;;1088:42:5;;:::o;2182:426::-;2326:10;2367:34;2326:10;2367:20;:34::i;:::-;2346:105;;;;-1:-1:-1;;;2346:105:5;;;;;;;;;-1:-1:-1;;;;;2469:25:5;;2497:1;2469:25;;;:11;:25;;;;;;2461:58;;;;-1:-1:-1;;;2461:58:5;;;;;;;;;2556:12;-1:-1:-1;;;;;2534:67:5;;2570:12;2584:11;2597:3;;2534:67;;;;;;;;;;;;;;;;;;2182:426;;;;;:::o;921:35::-;;;;:::o;14797:370::-;14916:7;15054:106;15081:78;15155:3;15082:67;15118:30;:21;;;;15155:3;15118:30;:25;:30;:::i;:::-;15082:31;:7;15094:18;;15082:31;:11;:31;:::i;:::-;:35;:67;:35;:67;:::i;:::-;15081:73;:78;:73;:78;:::i;:::-;15054:22;;;;;:106;:26;:106;:::i;:::-;15047:113;;14797:370;;;;;:::o;3365:285::-;3489:23;;3452:9;;3479:33;;;3471:61;;;;-1:-1:-1;;;3471:61:5;;;;;;;;;-1:-1:-1;;;;;3562:16:5;;;;;;:8;:16;;;;;;:28;;3583:6;3562:28;:20;:28;:::i;:::-;-1:-1:-1;;;;;3543:16:5;;;;;;:8;:16;;;;;;;:47;;;;3606:37;;3624:10;;3543:16;3606:37;;;;3636:6;;3606:37;;;;;;;;;;3365:285;;:::o;962:36::-;;;;:::o;2614:745::-;2726:10;2703:20;2774:25;;;:11;:25;;;;;;;:50;;2746:78;;;;2871:14;;-1:-1:-1;2842:43:5;2834:72;;;;-1:-1:-1;;;2834:72:5;;;;;;;;;2938:34;2959:12;2938:20;:34::i;:::-;2917:105;;;;-1:-1:-1;;;2917:105:5;;;;;;;;;3038:9;3033:229;3053:26;;;3033:229;;;3155:1;3108:15;3155:1;3124:15;;3140:1;3124:18;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3108:35:5;;;;;;;;;;;;;;-1:-1:-1;3108:35:5;;;:49;3100:87;;;;-1:-1:-1;;;3100:87:5;;;;;;;;;3239:12;3201:15;:35;3217:15;;3233:1;3217:18;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3201:35:5;;;;;;;;;;;;;;-1:-1:-1;3201:35:5;:50;;-1:-1:-1;;;;;;3201:50:5;;;;;;;;;;;-1:-1:-1;3081:3:5;3033:229;;;-1:-1:-1;;;;;;3277:75:5;;3326:25;;;;:11;:25;;;;;;;;3277:75;;;;;;3309:15;;;;3277:75;;;;;;;;;;2614:745;;;:::o;1136:33::-;;;-1:-1:-1;;;;;1136:33:5;;:::o;1236:59::-;;;;;;;;;;;;-1:-1:-1;;;;;1236:59:5;;:::o;705:65::-;;;;;;;;;;;;;;;-1:-1:-1;;705:65:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1044:38::-;;;;:::o;15497:605::-;15446:9;;-1:-1:-1;;;;;15446:9:5;15432:10;:23;15424:49;;;;-1:-1:-1;;;15424:49:5;;;;;;;;;-1:-1:-1;;;;;15630:28:5;;::::1;15607:20;15630:28:::0;;;:15:::1;:28;::::0;;;;;::::1;15750:26:::0;15742:59:::1;;;;-1:-1:-1::0;;;15742:59:5::1;;;;;;;;;15832:34;15853:12;15832:20;:34::i;:::-;15811:105;;;;-1:-1:-1::0;;;15811:105:5::1;;;;;;;;;15926:40;;:::i;:::-;15969:12;::::0;:39:::1;::::0;-1:-1:-1;;;15969:39:5;;-1:-1:-1;;;;;15969:12:5;;::::1;::::0;:25:::1;::::0;:39:::1;::::0;15995:12;;15969:39:::1;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16018:12;::::0;16079:15;;16018:77:::1;::::0;-1:-1:-1;;;16018:77:5;;15926:82;;-1:-1:-1;;;;;;16018:12:5;;::::1;::::0;:33:::1;::::0;:77:::1;::::0;16052:12;;16066:11;;16018:77:::1;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;15483:1;;15497:605:::0;;:::o;777:36::-;;;;:::o;1004:34::-;;;;:::o;10375:3930::-;10669:15;10686:12;10714:30;;:::i;:::-;11172:10;11194:4;11172:27;11164:79;;;;-1:-1:-1;;;11164:79:5;;;;;;;;;11663:8;:42;11672:22;;;;:12;:22;;;:32;;;;;;;;;;;-1:-1:-1;;;;;11663:42:5;;;;;;;;;;;;;;-1:-1:-1;11663:42:5;;11642:63;;11847:151;-1:-1:-1;;;11883:34:5;11847:151;;11935:12;;11949:9;;;;11960:12;;;;11974:14;;11847:151;;;;;;;;-1:-1:-1;;11847:151:5;;;;;;;;;;;;;;;-1:-1:-1;;;;;11847:151:5;-1:-1:-1;;;;;;11847:151:5;;;;;;;;;;11835:9;;;:163;-1:-1:-1;;12048:20:5;;12103:22;;;;:12;:22;;;:32;;;;;;;;;;;-1:-1:-1;;;;;12103:37:5;12145:9;:32;;;12179:4;:9;;;12103:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12082:107:5;;-1:-1:-1;12082:107:5;-1:-1:-1;12082:107:5;12203:169;;12235:41;12268:7;12235:32;:41::i;:::-;12294:63;12311:36;12349:7;12294:16;:63::i;:::-;12452:7;12441:33;;;;;;;;;;;;;;12385:89;;12409:28;;;12385:89;12386:21;;;12385:89;-1:-1:-1;;;;12740:49:5;12765:12;12779:9;;12740:24;:49::i;:::-;12709:27;;;12665:124;;;12684:23;;;12665:124;;-1:-1:-1;12665:124:5;12803:140;;12846:82;12863:35;12900:4;:27;;;12846:16;:82::i;:::-;12961:4;:28;;;:56;;;;;12994:4;:23;;;12993:24;12961:56;12957:246;;;13100:88;13117:41;13160:4;:27;;;13100:16;:88::i;:::-;10375:3930;13523:35;;;13572:4;:21;;;13607:4;:23;;;13662:9;13644:15;:27;13707:12;:22;;;;;;;;;;13487:252;;;;;;;;;;;;;;;;-1:-1:-1;;13487:252:5;;;;;;;;;;;;;;;-1:-1:-1;;;;;13487:252:5;-1:-1:-1;;;;;;13487:252:5;;;;;;;;;;13475:9;;;:264;-1:-1:-1;;13778:16:5;;13798:22;;;;:12;:22;;;:32;;;;;;;;;;;-1:-1:-1;;;;;13798:37:5;13840:9;:33;;;13875:4;:9;;;13798:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13760:125;;;;13901:11;13896:99;;13928:56;13945:33;13980:3;13928:16;:56::i;:::-;-1:-1:-1;;14064:18:5;;14019:8;14064:18;14028:22;;;;:12;:22;;;:32;;;;;;;;;;;-1:-1:-1;;;;;14019:42:5;-1:-1:-1;;;;;14019:42:5;;;;;;;;;;;;;:63;14015:155;;;14098:61;14115:39;14098:61;;;;;;;;;;;;:16;:61::i;:::-;14188:4;:23;;;:80;;14235:33;14188:80;;;14214:18;14188:80;14270:4;:27;;;14180:118;;;;;10375:3930;;;;;;;;;;;:::o;1321:134:37:-;1379:7;1405:43;1409:1;1412;1405:43;;;;;;;;;;;;;;;;;:3;:43::i;2482:571:31:-;2602:13;2651:5;2659:1;2651:9;2639:1;:8;:21;;2631:60;;;;-1:-1:-1;;;2631:60:31;;;;;;;;;-1:-1:-1;2786:21:31;2803:2;2786:21;2780:28;-1:-1:-1;;;;;;2935:79:31;;2482:571::o;4116:1390:5:-;4308:37;;:::i;:::-;4347:22;4416;;;;:12;:22;;;:32;;;;;;;;;;;-1:-1:-1;;;;;4405:57:5;;4467:5;4405:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4526:26;;4381:94;;-1:-1:-1;4494:58:5;;;4486:103;;;;-1:-1:-1;;;4486:103:5;;;;;;;;;4629:157;4761:20;:12;;:20;;;:24;;;4629:114;4709:9;:33;;;4629:62;4658:9;:32;;;4629:11;;:15;;:62;;;;:::i;:::-;:66;:114;:66;:114;:::i;:157::-;4600:186;;5003:14;4989:10;:28;;4968:116;;;;-1:-1:-1;;;4968:116:5;;;;;;;;;5095:25;5123:89;5152:14;5180:22;;;;:12;:22;;5123:89;5095:117;-1:-1:-1;5415:8:5;:42;5424:22;;;;:12;:22;;;:32;;;;;;;;;;;-1:-1:-1;;;;;5415:42:5;-1:-1:-1;;;;;5415:42:5;;;;;;;;;;;;;5394:17;:63;;5386:113;;;;-1:-1:-1;;;5386:113:5;;;;;;;;;4116:1390;;;;;;;:::o;874:176:37:-;932:7;963:5;;;986:6;;;;978:46;;;;-1:-1:-1;;;978:46:37;;;;;;;;2180:459;2238:7;2479:6;2475:45;;-1:-1:-1;2508:1:37;2501:8;;2475:45;2542:5;;;2546:1;2542;:5;:1;2565:5;;;;;:10;2557:56;;;;-1:-1:-1;;;2557:56:37;;;;;;;;3101:130;3159:7;3185:39;3189:1;3192;3185:39;;;;;;;;;;;;;;;;;:3;:39::i;4697:125:29:-;4765:50;4793:4;495;4765:27;:50::i;:::-;4697:125;:::o;14452:339:5:-;14543:17;14574:6;14582:3;14563:23;;;;;;;;;;;;;;;;;;;;;;;14543:43;;14596:38;14629:4;14596:32;:38::i;:::-;14690:4;14684:11;14733:2;14727:4;14723:13;14766:8;14757:7;14750:25;3617:854:29;3723:21;3746:16;3764;3793:47;;:::i;:::-;3842:23;3869:26;3882:12;3869;:26::i;:::-;3792:103;;-1:-1:-1;3792:103:29;-1:-1:-1;3905:23:29;3931:49;3947:22;;;;:12;:22;;;:32;;;;;;;;;;;3931:15;:49::i;:::-;3905:75;-1:-1:-1;4078:22:29;;;;:12;:22;;;:32;;;;;;;;;;;-1:-1:-1;;;;;4078:37:29;4152:27;;;4193:14;4209:15;1177:18;;;;;;;;;;;;;-1:-1:-1;;;1177:18:29;;;1200:14;;;;;;;;;;;;;;;;;1085;;;;;;;;;;;;;;;;;1044:56;;;;;;;;;;;;;-1:-1:-1;;1044:56:29;;;;;;;;;;1151:90;;;;1044:56;1151:90;;;;;;;;;;;;;;;;1373:29;;;;;;4250:10;4262:9;;4129:152;;;;;;;;;;;;;;;;;;-1:-1:-1;;4129:152:29;;;;;;;;;;;;;;-1:-1:-1;;;;;4129:152:29;-1:-1:-1;;;;;;4129:152:29;;;;;;;;;;4078:204;;;;4129:152;4078:204;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4052:230:29;;-1:-1:-1;4052:230:29;-1:-1:-1;4292:143:29;;;;4405:3;4394:30;;;;;;;;;;;;;;4373:51;;-1:-1:-1;4373:51:29;-1:-1:-1;4292:143:29;4444:20;4460:3;4444:15;:20::i;:::-;3617:854;;;;;;;;;;:::o;1746:187:37:-;1832:7;1867:12;1859:6;;;;1851:29;;;;-1:-1:-1;;;1851:29:37;;;;;;;;;;-1:-1:-1;;;1902:5:37;;;1746:187::o;3713:272::-;3799:7;3833:12;3826:5;3818:28;;;;-1:-1:-1;;;3818:28:37;;;;;;;;;;;3856:9;3872:1;3868;:5;;;;;;;3713:272;-1:-1:-1;;;;;3713:272:37:o;428:173:31:-;530:6;516:4;:11;:20;512:83;;;576:6;570:4;563:20;561:24;428:173;;:::o;1712:527:29:-;1828:47;;:::i;:::-;1942:214;;;;;;;;;1885:23;;1942:214;1981:11;:3;;:11;;;:16;;;;;;;;;-1:-1:-1;;;;;1942:214:29;;;;;2011:11;:3;;:11;;;:14;;;;;;;;;;;-1:-1:-1;;;;;1942:214:29;;;;;2039:11;:3;;:11;;;:17;;;1942:214;;;;2070:11;:3;;:11;;;:15;;;1942:214;;;;2099:11;:3;;:11;;;:17;;;1942:214;;;;2130:11;:3;;:11;;;:16;;;;;;;;;1942:214;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1942:214:29;;-1:-1:-1;1925:231:29;-1:-1:-1;2203:28:29;2217:13;;;;:3;:13;;;2203;:28::i;:::-;2179:53;;;;;;;;;;;;;;;;;;;;;;2166:66;;1712:527;;;:::o;4828:292::-;4932:180;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4932:180:29;;;;;;;;;;;4895:7;;4921:192;;4932:180;-1:-1:-1;;5042:12:29;:10;:12::i;:::-;4932:180;;;;5088:9;-1:-1:-1;;;;;4932:180:29;;;;4921:10;:192::i;5629:451::-;5708:7;1303:14;;;;;;;;;;;;;;;;;1293:25;;;;;;;;5808:12;;;5838:15;;;5871:16;;;;5905:15;;;;;;;;;;5938:13;;;;;;;;;;5969;;;;;;;;;;6010:17;;;;:3;:17;;;6000:28;;;;;;;;;;;;;;;;;5744:328;;;;;;;;;6046:12;;;;;5744:328;;;;;;;;;;;;;;;;;5734:339;;;;;;5727:346;;5629:451;;;:::o;5126:170::-;5271:9;;5251:39::o;5302:321::-;5370:7;1596:109;;;;;;;;;;;;;;5489:3;:8;;;5473:26;;;;;;5533:3;:11;;;5517:29;;;;;;5564:3;:11;;;5593:3;:21;;;5406:209;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:130::-;72:20;;97:33;72:20;97:33;;979:336;;;1093:3;1086:4;1078:6;1074:17;1070:27;1060:2;;-1:-1;;1101:12;1060:2;-1:-1;1131:20;;1171:18;1160:30;;1157:2;;;-1:-1;;1193:12;1157:2;1237:4;1229:6;1225:17;1213:29;;1288:3;1237:4;1268:17;1229:6;1254:32;;1251:41;1248:2;;;1305:1;;1295:12;1248:2;1053:262;;;;;;1324:442;;1436:3;1429:4;1421:6;1417:17;1413:27;1403:2;;-1:-1;;1444:12;1403:2;1484:6;1478:13;58048:18;58040:6;58037:30;58034:2;;;-1:-1;;58070:12;58034:2;1506:64;58143:9;58124:17;;-1:-1;;58120:33;58211:4;58201:15;1506:64;;;1497:73;;1590:6;1583:5;1576:21;1694:3;58211:4;1685:6;1618;1676:16;;1673:25;1670:2;;;1711:1;;1701:12;1670:2;1721:39;1753:6;58211:4;1652:5;1648:16;58211:4;1618:6;1614:17;1721:39;;;;1396:370;;;;;3504:163;;3620:2;3611:6;3606:3;3602:16;3598:25;3595:2;;;-1:-1;;3626:12;3595:2;-1:-1;3646:15;3588:79;-1:-1;3588:79;4835:241;;4939:2;4927:9;4918:7;4914:23;4910:32;4907:2;;;-1:-1;;4945:12;4907:2;85:6;72:20;97:33;124:5;97:33;;5083:382;;;5212:2;5200:9;5191:7;5187:23;5183:32;5180:2;;;-1:-1;;5218:12;5180:2;85:6;72:20;97:33;124:5;97:33;;;5270:63;-1:-1;5370:2;5417:22;;217:20;242:41;217:20;242:41;;;5378:71;;;;5174:291;;;;;;5472:397;;;5611:2;5599:9;5590:7;5586:23;5582:32;5579:2;;;-1:-1;;5617:12;5579:2;5675:17;5662:31;5713:18;;5705:6;5702:30;5699:2;;;-1:-1;;5735:12;5699:2;5836:6;5825:9;5821:22;600:3;593:4;585:6;581:17;577:27;567:2;;-1:-1;;608:12;567:2;651:6;638:20;628:30;;5713:18;670:6;667:30;664:2;;;-1:-1;;700:12;664:2;795:3;5611:2;;779:6;775:17;736:6;761:32;;758:41;755:2;;;-1:-1;;802:12;755:2;5611;732:17;;5763:90;;-1:-1;5573:296;;-1:-1;;;;5573:296;5876:257;;5988:2;5976:9;5967:7;5963:23;5959:32;5956:2;;;-1:-1;;5994:12;5956:2;911:6;905:13;923:30;947:5;923:30;;6140:490;;;6278:2;6266:9;6257:7;6253:23;6249:32;6246:2;;;-1:-1;;6284:12;6246:2;911:6;905:13;923:30;947:5;923:30;;;6465:2;6450:18;;6444:25;6336:71;;-1:-1;6489:18;6478:30;;6475:2;;;-1:-1;;6511:12;6475:2;6541:73;6606:7;6597:6;6586:9;6582:22;6541:73;;;6531:83;;;6240:390;;;;;;6637:490;;;6775:2;6763:9;6754:7;6750:23;6746:32;6743:2;;;-1:-1;;6781:12;6743:2;6832:17;6826:24;6870:18;6862:6;6859:30;6856:2;;;-1:-1;;6892:12;6856:2;6922:73;6987:7;6978:6;6967:9;6963:22;6922:73;;;6912:83;;;7032:2;7083:9;7079:22;905:13;923:30;947:5;923:30;;7134:536;;;7295:2;7283:9;7274:7;7270:23;7266:32;7263:2;;;-1:-1;;7301:12;7263:2;1878:6;1872:13;63983:1;63976:5;63973:12;63963:2;;-1:-1;;63989:12;7677:317;;7819:2;7807:9;7798:7;7794:23;7790:32;7787:2;;;-1:-1;;7825:12;7787:2;2715:20;7819:2;2715:20;;;2861:22;4772:13;2811:16;2804:86;2969:2;3038:9;3034:22;4772:13;2969:2;2988:5;2984:16;2977:86;3143:2;3212:9;3208:22;4772:13;3143:2;3162:5;3158:16;3151:86;7877:101;;;;7781:213;;;;;8001:1325;;;;;;;;;8277:9;8268:7;8264:23;8289:3;8264:23;8260:33;8257:2;;;-1:-1;;8296:12;8257:2;8354:17;8341:31;8392:18;;8384:6;8381:30;8378:2;;;-1:-1;;8414:12;8378:2;8444:85;8521:7;8512:6;8501:9;8497:22;8444:85;;;8434:95;;8594:2;8583:9;8579:18;8566:32;8552:46;;8392:18;8610:6;8607:30;8604:2;;;-1:-1;;8640:12;8604:2;8678:64;8734:7;8725:6;8714:9;8710:22;8678:64;;;8668:74;;-1:-1;8668:74;-1:-1;8807:2;8792:18;;8779:32;;-1:-1;8820:30;;;8817:2;;;-1:-1;;8853:12;8817:2;;8891:64;8947:7;8938:6;8927:9;8923:22;8891:64;;;8881:74;;-1:-1;8881:74;-1:-1;;8992:2;-1:-1;;2446:16;;2442:25;2439:2;;;-1:-1;;2470:12;2439:2;-1:-1;8251:1075;;;;-1:-1;8251:1075;;;;-1:-1;8251:1075;;8992:2;9060:22;;;-1:-1;9129:3;9169:22;;4624:20;;9238:3;9278:22;4624:20;;-1:-1;8251:1075;9333:318;;9475:3;9463:9;9454:7;9450:23;9446:33;9443:2;;;-1:-1;;9482:12;9443:2;3874:20;9475:3;3874:20;;;4778:6;4772:13;3959:16;3952:86;4107:2;4176:9;4172:22;4772:13;4107:2;4126:5;4122:16;4115:86;4271:2;4340:9;4336:22;4772:13;4271:2;4290:5;4286:16;4279:86;4427:2;4504:9;4500:22;381:13;399:41;434:5;399:41;;;4427:2;4442:16;;4435:94;4446:5;9437:214;-1:-1;;;9437:214;9658:382;;;9787:2;9775:9;9766:7;9762:23;9758:32;9755:2;;;-1:-1;;9793:12;9755:2;4637:6;4624:20;9845:63;;9945:2;9996:9;9992:22;217:20;242:41;277:5;242:41;;10047:510;;;10197:2;10185:9;10176:7;10172:23;10168:32;10165:2;;;-1:-1;;10203:12;10165:2;4637:6;4624:20;10255:63;;10383:2;10372:9;10368:18;10355:32;10407:18;10399:6;10396:30;10393:2;;;-1:-1;;10429:12;10393:2;10524:6;10513:9;10509:22;3412:3;3403:6;3398:3;3394:16;3390:26;3387:2;;;-1:-1;;3419:12;3387:2;10449:92;;;;;10159:398;;;;;;10564:1141;;;;;;;;10806:3;10794:9;10785:7;10781:23;10777:33;10774:2;;;-1:-1;;10813:12;10774:2;4637:6;4624:20;10865:63;;10993:2;10982:9;10978:18;10965:32;11017:18;;11009:6;11006:30;11003:2;;;-1:-1;;11039:12;11003:2;11069:85;11146:7;11137:6;11126:9;11122:22;11069:85;;;11059:95;;11219:2;11208:9;11204:18;11191:32;11177:46;;11017:18;11235:6;11232:30;11229:2;;;-1:-1;;11265:12;11229:2;11303:64;11359:7;11350:6;11339:9;11335:22;11303:64;;;11293:74;;-1:-1;11293:74;-1:-1;11432:2;11417:18;;11404:32;;-1:-1;11445:30;;;11442:2;;;-1:-1;;11478:12;11442:2;;11516:64;11572:7;11563:6;11552:9;11548:22;11516:64;;;10768:937;;;;-1:-1;10768:937;;;;;;11617:3;11657:22;;;4624:20;;10768:937;-1:-1;;;;10768:937;11712:617;;;;;11870:2;11858:9;11849:7;11845:23;11841:32;11838:2;;;-1:-1;;11876:12;11838:2;4637:6;4624:20;11928:63;;12028:2;12071:9;12067:22;4624:20;12036:63;;12164:2;12153:9;12149:18;12136:32;12188:18;12180:6;12177:30;12174:2;;;-1:-1;;12210:12;12174:2;12248:65;12305:7;12296:6;12285:9;12281:22;12248:65;;;11832:497;;;;-1:-1;12238:75;-1:-1;;;;11832:497;12667:137;-1:-1;;;;;61872:54;12754:45;;12748:56;14116:277;;58863:6;58858:3;58851:19;62940:6;62935:3;58900:4;58895:3;58891:14;62917:30;-1:-1;58900:4;62987:6;58895:3;62978:16;;62971:27;58900:4;58143:9;;63377:2;14379:6;63357:14;63353:28;58895:3;14348:39;;14341:46;;14206:187;;;;;;15070:323;;15202:5;58445:12;58863:6;58858:3;58851:19;15285:52;15330:6;58900:4;58895:3;58891:14;58900:4;15311:5;15307:16;15285:52;;;58143:9;63357:14;-1:-1;;63353:28;15349:39;;;;58900:4;15349:39;;15150:243;-1:-1;;15150:243;29130:1797;;29277:6;4637;4624:20;13934:3;13927:37;61113:2;29382:16;61104:12;4624:20;61113:2;29645:3;29641:14;13927:37;29770:4;29763:5;29759:16;4624:20;29770:4;29834:3;29830:14;13927:37;29958:4;29951:5;29947:16;72:20;97:33;124:5;97:33;;;-1:-1;;;;;61872:54;;;29958:4;30018:14;;12754:45;30144:4;30133:16;;72:20;;97:33;72:20;97:33;;;61872:54;30144:4;30204:14;;12754:45;30304:61;30359:4;30348:16;;30352:5;30304:61;;;29277:6;30359:4;30389:3;30385:14;30378:38;30431:87;29277:6;29272:3;29268:16;30499:12;30485;30431:87;;;30634:4;30627:5;30623:16;4624:20;30634:4;30698:3;30694:14;13927:37;30820:4;30813:5;30809:16;72:20;63:29;;97:33;124:5;97:33;;;30832:63;30820:4;30884:3;30880:14;30866:12;30832:63;;;30911:11;29250:1677;-1:-1;;;;;;29250:1677;32876:866;;60508:3;60495:17;60552:48;;60576:8;60560:14;60556:29;60552:48;60532:18;60528:73;60518:2;;-1:-1;;60605:12;60518:2;33039:4;33205:38;;60634:33;;72:20;;;97:33;72:20;97:33;;;-1:-1;;;;;61872:54;;;33039:4;33030:14;;;12754:45;;;;59831:12;;;61883:42;59805:39;59831:12;59840:2;59831:12;;59805:39;;;61872:54;26140:14;33034:3;26140:14;12754:45;;61099:3;4624:20;26322:14;33034:3;26322:14;13927:37;26140:14;26255:5;61104:12;4624:20;26502:14;33034:3;26502:14;13927:37;26322:14;26435:5;61104:12;4624:20;25791:4;33034:3;26684:14;13927:37;26775:61;26502:14;26823:5;26819:16;26812:5;26775:61;;;26741:95;;25791:4;26856:14;33034:3;26856:14;26849:38;26902:87;25782:14;33034:3;25782:14;26970:12;26956;26902:87;;;27011:11;;;33450:79;59840:2;33516:5;33512:16;33505:5;33450:79;;;33430:99;;33575:3;33569:4;33565:14;59840:2;33553:3;33549:14;33542:38;33595:109;33699:4;33685:12;33595:109;;;33726:11;33012:730;-1:-1;;;;;33012:730;33979:291;;62940:6;62935:3;62930;62917:30;62978:16;;62971:27;;;62978:16;34123:147;-1:-1;34123:147;34277:271;;15910:5;58445:12;16021:52;16066:6;16061:3;16054:4;16047:5;16043:16;16021:52;;;16085:16;;;;;34411:137;-1:-1;;34411:137;34555:1131;;15910:5;58445:12;16021:52;16066:6;16061:3;16054:4;16047:5;16043:16;16021:52;;;16094:6;16089:3;16085:16;-1:-1;;;20215:11;20208:24;15910:5;58445:12;15864:52;;16021;16066:6;20193:1;20255:3;20251:11;16054:4;16047:5;16043:16;16021:52;;;16094:6;20255:3;16085:16;-1:-1;;;20193:1;16085:16;;19173:24;15910:5;58445:12;15864:52;;16021;16066:6;19216:11;16085:16;19216:11;16054:4;16047:5;16043:16;16021:52;;;16085:16;;;19216:11;16085:16;;34989:697;-1:-1;;;;;;34989:697;35693:538;;-1:-1;;;19525:11;19518:43;15910:5;58445:12;16021:52;16066:6;19502:2;19584:3;19580:12;16054:4;16047:5;16043:16;16021:52;;;16085:16;;;;19502:2;16085:16;;35928:303;-1:-1;;35928:303;36238:381;22999:34;22979:55;;23068:34;23063:2;23054:12;;23047:56;-1:-1;;;23132:2;23123:12;;23116:42;22963:2;23177:12;;36427:192;36626:222;-1:-1;;;;;61872:54;;;;12754:45;;36753:2;36738:18;;36724:124;36855:764;-1:-1;;;;;61872:54;;;12754:45;;61872:54;;37291:2;37276:18;;12597:58;-1:-1;;;;;;61567:78;;37372:2;37357:18;;14045:36;37455:2;37440:18;;13927:37;;;61883:42;37492:3;37477:19;;37470:49;;;36855:764;;37533:76;;37103:19;;37595:6;37533:76;;;37525:84;37089:530;-1:-1;;;;;;;37089:530;37626:476;-1:-1;;;;;61872:54;;;12754:45;;61872:54;;;;38005:2;37990:18;;12754:45;38088:2;38073:18;;13927:37;;;;37825:2;37810:18;;37796:306;38109:700;-1:-1;;;;;61872:54;;;12754:45;;61872:54;;38529:2;38514:18;;12754:45;-1:-1;;;;;;61567:78;;38610:2;38595:18;;14045:36;38364:3;38349:19;;62559:44;16440:5;62559:44;;;38711:2;38700:9;38696:18;16379:68;13957:5;38794:3;38783:9;38779:19;13927:37;38335:474;;;;;;;;;38816:556;-1:-1;;;;;61872:54;;;12754:45;;61872:54;;;;39192:2;39177:18;;12754:45;39275:2;39260:18;;13927:37;39358:2;39343:18;;13927:37;;;;39027:3;39012:19;;38998:374;39379:501;39594:2;39608:47;;;39579:18;;58851:19;;;39379:501;13397:21;58891:14;;;39379:501;13424:291;13449:6;13446:1;13443:13;13424:291;;;58900:4;85:6;72:20;97:33;124:5;97:33;;;-1:-1;;;;;61872:54;12754:45;;59831:12;;;;12490:14;;;;1171:18;13464:9;13424:291;;;-1:-1;58900:4;39851:18;;;;13927:37;;;;-1:-1;39661:126;39565:315;-1:-1;;;39565:315;39887:210;61401:13;;61394:21;13810:34;;40008:2;39993:18;;39979:118;40104:405;;13837:5;61401:13;61394:21;13817:3;13810:34;40271:2;40383;40372:9;40368:18;40361:48;40423:76;40271:2;40260:9;40256:18;40485:6;40423:76;;;40415:84;40242:267;-1:-1;;;;40242:267;40516:222;13927:37;;;40643:2;40628:18;;40614:124;40745:668;13927:37;;;41149:2;41134:18;;13927:37;;;;41232:2;41217:18;;13927:37;;;;41315:2;41300:18;;13927:37;-1:-1;;;;;61872:54;41398:3;41383:19;;12754:45;40984:3;40969:19;;40955:458;41420:1116;13927:37;;;41936:2;41921:18;;13927:37;;;;42019:2;42004:18;;13927:37;;;;42102:2;42087:18;;13927:37;;;;-1:-1;;;;;61872:54;;;42185:3;42170:19;;12754:45;61872:54;;61883:42;42254:19;;12754:45;61872:54;42353:3;42338:19;;12754:45;42437:3;42422:19;;13927:37;42521:3;42506:19;;13927:37;41771:3;41756:19;;41742:794;42543:788;;42822:3;42844:17;42837:47;42898:76;42822:3;42811:9;42807:19;42960:6;42898:76;;;13837:5;61401:13;61394:21;43047:2;43036:9;43032:18;13810:34;13957:5;43130:2;43119:9;43115:18;13927:37;43182:9;43176:4;43172:20;43167:2;43156:9;43152:18;43145:48;43207:114;43316:4;43307:6;43207:114;;43611:453;;62559:44;16440:5;62559:44;;;16386:3;16379:68;43802:2;43938;43927:9;43923:18;43916:48;43978:76;43802:2;43791:9;43787:18;44040:6;43978:76;;44071:310;;44218:2;44239:17;44232:47;44293:78;44218:2;44207:9;44203:18;44357:6;44293:78;;44388:416;44588:2;44602:47;;;17738:2;44573:18;;;58851:19;-1:-1;;;58891:14;;;17754:43;17816:12;;;44559:245;44811:416;45011:2;45025:47;;;18067:2;44996:18;;;58851:19;18103:27;58891:14;;;18083:48;18150:12;;;44982:245;45234:416;45434:2;45448:47;;;18401:2;45419:18;;;58851:19;18437:34;58891:14;;;18417:55;-1:-1;;;18492:12;;;18485:31;18535:12;;;45405:245;45657:416;45857:2;45871:47;;;18786:2;45842:18;;;58851:19;18822:29;58891:14;;;18802:50;18871:12;;;45828:245;46080:416;46280:2;46294:47;;;19831:2;46265:18;;;58851:19;-1:-1;;;58891:14;;;19847:40;19906:12;;;46251:245;46503:416;46703:2;46717:47;;;46688:18;;;58851:19;20537:34;58891:14;;;20517:55;20591:12;;;46674:245;46926:416;47126:2;47140:47;;;20842:2;47111:18;;;58851:19;20878:34;58891:14;;;20858:55;-1:-1;;;20933:12;;;20926:42;20987:12;;;47097:245;47349:416;47549:2;47563:47;;;21238:2;47534:18;;;58851:19;-1:-1;;;58891:14;;;21254:38;21311:12;;;47520:245;47772:416;47972:2;47986:47;;;21562:2;47957:18;;;58851:19;21598:26;58891:14;;;21578:47;21644:12;;;47943:245;48195:416;48395:2;48409:47;;;21895:2;48380:18;;;58851:19;21931:34;58891:14;;;21911:55;-1:-1;;;21986:12;;;21979:31;22029:12;;;48366:245;48618:416;48818:2;48832:47;;;22280:2;48803:18;;;58851:19;-1:-1;;;58891:14;;;22296:39;22354:12;;;48789:245;49041:416;49241:2;49255:47;;;22605:2;49226:18;;;58851:19;-1:-1;;;58891:14;;;22621:36;22676:12;;;49212:245;49464:416;49664:2;49678:47;;;23428:2;49649:18;;;58851:19;23464:34;58891:14;;;23444:55;-1:-1;;;23519:12;;;23512:25;23556:12;;;49635:245;49887:416;50087:2;50101:47;;;23807:2;50072:18;;;58851:19;-1:-1;;;58891:14;;;23823:39;23881:12;;;50058:245;50310:416;50510:2;50524:47;;;24132:2;50495:18;;;58851:19;-1:-1;;;58891:14;;;24148:41;24208:12;;;50481:245;50733:416;50933:2;50947:47;;;24459:2;50918:18;;;58851:19;-1:-1;;;58891:14;;;24475:41;24535:12;;;50904:245;51156:416;51356:2;51370:47;;;24786:2;51341:18;;;58851:19;24822:27;58891:14;;;24802:48;24869:12;;;51327:245;51579:416;51779:2;51793:47;;;25120:2;51764:18;;;58851:19;25156:28;58891:14;;;25136:49;25204:12;;;51750:245;52002:416;52202:2;52216:47;;;25455:2;52187:18;;;58851:19;-1:-1;;;58891:14;;;25471:43;25533:12;;;52173:245;52425:1032;;52774:3;52796:17;52789:47;61193:24;27346:16;27340:23;61193:24;;;52774:3;52763:9;52759:19;12754:45;1171:18;;61883:42;;;27509:4;27502:5;27498:16;27492:23;61872:54;27274:4;52763:9;27569:14;12754:45;27664:4;27657:5;27653:16;27647:23;27724:14;52763:9;27724:14;13927:37;27817:4;27810:5;27806:16;27800:23;27877:14;52763:9;27877:14;13927:37;27972:4;27965:5;27961:16;27955:23;28032:14;52763:9;28032:14;13927:37;52774:3;28119:5;28115:16;28109:23;27274:4;28152:14;52763:9;28152:14;28145:38;28198:71;27265:14;52763:9;27265:14;28250:12;28198:71;;;13957:5;27509:4;53040:9;53036:18;13927:37;13957:5;27664:4;53123:9;53119:18;13927:37;53186:9;53180:4;53176:20;27817:4;53160:9;53156:18;53149:48;53211:76;53282:4;53273:6;53211:76;;;53203:84;;;53336:9;53330:4;53326:20;27972:4;53309:9;53305:19;53298:49;53361:86;53442:4;53433:6;53425;53361:86;;;53353:94;52745:712;-1:-1;;;;;;;;;52745:712;53464:1268;;53903:3;;53925:17;53918:47;53979:120;53903:3;53892:9;53888:19;54085:6;53979:120;;;54147:9;54141:4;54137:20;54132:2;54121:9;54117:18;54110:48;54172:86;54253:4;54244:6;54236;54172:86;;;54164:94;;;54306:9;54300:4;54296:20;54291:2;54280:9;54276:18;54269:48;54331:86;54412:4;54403:6;54395;54331:86;;;28604:23;;54550:2;54535:18;;13927:37;54132:2;28782:16;;28776:23;28853:14;;;13927:37;54291:2;28955:16;;;28949:23;29026:14;;;13927:37;-1:-1;;54633:3;54618:19;;13927:37;;;;54717:3;54702:19;;;13927:37;54323:94;53874:858;-1:-1;;;;;53874:858;54739:936;;55068:3;55090:17;55083:47;55144:120;55068:3;55057:9;55053:19;55250:6;55144:120;;;55312:9;55306:4;55302:20;55297:2;55286:9;55282:18;55275:48;55337:86;55418:4;55409:6;55401;55337:86;;;55471:9;55465:4;55461:20;55456:2;55445:9;55441:18;55434:48;55496:86;55577:4;55568:6;55560;55496:86;;;55488:94;;;;13957:5;55661:2;55650:9;55646:18;13927:37;55039:636;;;;;;;;;;55911:552;;13957:5;13934:3;13927:37;13957:5;56288:2;56277:9;56273:18;13927:37;56124:2;56325;56314:9;56310:18;56303:48;56365:88;56124:2;56113:9;56109:18;56439:6;56431;56365:88;;56470:506;;;56605:11;56592:25;56656:48;;56680:8;56664:14;56660:29;56656:48;56636:18;56632:73;56622:2;;-1:-1;;56709:12;56622:2;56750:18;56740:8;56736:33;56803:4;56790:18;56780:28;;56828:18;56820:6;56817:30;56814:2;;;-1:-1;;56850:12;56814:2;56695:4;56878:13;;-1:-1;;56664:14;56910:38;;;56900:49;;56897:2;;;56962:1;;56952:12;56983:324;;57133:11;57120:25;60552:48;;57208:8;57192:14;57188:29;57184:48;57164:18;57160:73;57150:2;;-1:-1;;57237:12;57314:321;;57459:11;57446:25;57510:50;;57534:8;57518:14;57514:29;57510:50;57490:18;57486:75;57476:2;;-1:-1;;57565:12;57642:256;57704:2;57698:9;57730:17;;;57805:18;57790:34;;57826:22;;;57787:62;57784:2;;;57862:1;;57852:12;57784:2;57704;57871:22;57682:216;;-1:-1;57682:216;59859:501;;;59983:3;59970:17;56656:48;;60051:8;60035:14;60031:29;60027:48;60007:18;60003:73;59993:2;;-1:-1;;60080:12;59993:2;60109:33;;60066:4;60198:16;;;-1:-1;60164:19;;-1:-1;60234:18;60223:30;;60220:2;;;60266:1;;60256:12;60220:2;60313:17;60035:14;60293:38;60283:8;60279:53;60276:2;;;60345:1;;60335:12;60688:307;;60822:3;60809:17;57510:50;;60890:8;60874:14;60870:29;60866:50;60846:18;60842:75;60832:2;;-1:-1;;60921:12;60832:2;60950:33;;;;60776:219;-1:-1;;60776:219;61131:91;-1:-1;;;;;61872:54;;61176:46;61657:146;61728:16;63483:1;63473:12;;63463:2;;63489:9;63013:268;63078:1;63085:101;63099:6;63096:1;63093:13;63085:101;;;63166:11;;;63160:18;63147:11;;;63140:39;63121:2;63114:10;63085:101;;;63201:6;63198:1;63195:13;63192:2;;;63078:1;63257:6;63252:3;63248:16;63241:27;63192:2;;63062:219;;;;63512:117;-1:-1;;;;;61872:54;;63571:35;;63561:2;;63620:1;;63610:12;63776:111;63857:5;61401:13;61394:21;63835:5;63832:32;63822:2;;63878:1;;63868:12

Swarm Source

ipfs://3aed185c4945a69a47b1d120bd0f8314c05a4653672f2c271eae76e1d161c6fd
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.