{
  "address": "0x692e8Dc1CdAda8559cc29AdBC9699583592603ff",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_gasOracle",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_priceOracle",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_pos",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_feeRaiseTimeout",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_maxGasRaise",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_maxFeePercentageRaise",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "pool",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "fee",
          "type": "address"
        }
      ],
      "name": "NewFlatRateCommissionStakingPool",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "pool",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "fee",
          "type": "address"
        }
      ],
      "name": "NewGasTaxCommissionStakingPool",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "Paused",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "_pos",
          "type": "address"
        }
      ],
      "name": "PoSAddressChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "pool",
          "type": "address"
        }
      ],
      "name": "ReferencePoolChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "Unpaused",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "commission",
          "type": "uint256"
        }
      ],
      "name": "createFlatRateCommission",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "gas",
          "type": "uint256"
        }
      ],
      "name": "createGasTaxCommission",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "feeRaiseTimeout",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "gasOracle",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getPoS",
      "outputs": [
        {
          "internalType": "address",
          "name": "_pos",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "maxFeePercentageRaise",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "maxGasRaise",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "pause",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "paused",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "pos",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "priceOracle",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "referencePool",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_pos",
          "type": "address"
        }
      ],
      "name": "setPoSAddress",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_referencePool",
          "type": "address"
        }
      ],
      "name": "setReferencePool",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "unpause",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "stateMutability": "payable",
      "type": "receive"
    }
  ],
  "transactionHash": "0x50c5d48eb864d6111f6c7516461b6c6ff81e7be5fc975e5bfd1010370ff41432",
  "receipt": {
    "to": null,
    "from": "0x18930e8a66a1DbE21D00581216789AAB7460Afd0",
    "contractAddress": "0x692e8Dc1CdAda8559cc29AdBC9699583592603ff",
    "transactionIndex": 124,
    "gasUsed": "1894979",
    "logsBloom": "0x04000000000000000000000000000000000000000000000000800020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000020000000000000000000000000000000000000000000000000000000024000000000",
    "blockHash": "0x985d9d400d1a591bbb65825f33c61edd5f55895a96dbd4392d9a6f235f09418f",
    "transactionHash": "0x50c5d48eb864d6111f6c7516461b6c6ff81e7be5fc975e5bfd1010370ff41432",
    "logs": [
      {
        "transactionIndex": 124,
        "blockNumber": 5242308,
        "transactionHash": "0x50c5d48eb864d6111f6c7516461b6c6ff81e7be5fc975e5bfd1010370ff41432",
        "address": "0x692e8Dc1CdAda8559cc29AdBC9699583592603ff",
        "topics": [
          "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
          "0x0000000000000000000000000000000000000000000000000000000000000000",
          "0x00000000000000000000000018930e8a66a1dbe21d00581216789aab7460afd0"
        ],
        "data": "0x",
        "logIndex": 209,
        "blockHash": "0x985d9d400d1a591bbb65825f33c61edd5f55895a96dbd4392d9a6f235f09418f"
      }
    ],
    "blockNumber": 5242308,
    "cumulativeGasUsed": "12010851",
    "status": 1,
    "byzantium": true
  },
  "args": [
    "0x451B611D38140993ec16a82E48aC720EBd0AB35C",
    "0xD304De7988a4285c8b49eC4dB751F28b1f1465B0",
    "0x19A8FB7d7C4D53713327cEb6ba1293d1F364c502",
    120,
    20000,
    500
  ],
  "numDeployments": 1,
  "solcInputHash": "e0af42a1786a87e4c045271b4c5b79b4",
  "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gasOracle\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_priceOracle\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_pos\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeRaiseTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxGasRaise\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePercentageRaise\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fee\",\"type\":\"address\"}],\"name\":\"NewFlatRateCommissionStakingPool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fee\",\"type\":\"address\"}],\"name\":\"NewGasTaxCommissionStakingPool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_pos\",\"type\":\"address\"}],\"name\":\"PoSAddressChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"ReferencePoolChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"commission\",\"type\":\"uint256\"}],\"name\":\"createFlatRateCommission\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"createGasTaxCommission\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeRaiseTimeout\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_pos\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxFeePercentageRaise\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxGasRaise\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pos\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"referencePool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_pos\",\"type\":\"address\"}],\"name\":\"setPoSAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_referencePool\",\"type\":\"address\"}],\"name\":\"setReferencePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"createFlatRateCommission(uint256)\":{\"returns\":{\"_0\":\"new pool address\"}},\"createGasTaxCommission(uint256)\":{\"returns\":{\"_0\":\"new pool address\"}},\"getPoS()\":{\"returns\":{\"_pos\":\"address for the PoS contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"events\":{\"NewFlatRateCommissionStakingPool(address,address)\":{\"notice\":\"Event emmited when a pool is created\"},\"NewGasTaxCommissionStakingPool(address,address)\":{\"notice\":\"Event emmited when a pool is created\"}},\"kind\":\"user\",\"methods\":{\"createFlatRateCommission(uint256)\":{\"notice\":\"Creates a new staking pool emits NewStakingPool with the parameters of the new pool\"},\"createGasTaxCommission(uint256)\":{\"notice\":\"Creates a new staking pool using a gas tax commission model emits NewGasTaxCommissionStakingPool with the parameters of the new pool\"},\"getPoS()\":{\"notice\":\"Returns configuration for the working pools of the current version\"},\"setPoSAddress(address)\":{\"notice\":\"Change the pos address\"},\"setReferencePool(address)\":{\"notice\":\"Change the pool reference implementation\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/StakingPoolFactoryImpl.sol\":\"StakingPoolFactoryImpl\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n    address private _owner;\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the deployer as the initial owner.\\n     */\\n    constructor() {\\n        _setOwner(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby removing any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        _setOwner(address(0));\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n        _setOwner(newOwner);\\n    }\\n\\n    function _setOwner(address newOwner) private {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Clones.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\\n * deploying minimal proxy contracts, also known as \\\"clones\\\".\\n *\\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\\n *\\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\\n * deterministic method.\\n *\\n * _Available since v3.4._\\n */\\nlibrary Clones {\\n    /**\\n     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\\n     *\\n     * This function uses the create opcode, which should never revert.\\n     */\\n    function clone(address implementation) internal returns (address instance) {\\n        assembly {\\n            let ptr := mload(0x40)\\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n            mstore(add(ptr, 0x14), shl(0x60, implementation))\\n            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n            instance := create(0, ptr, 0x37)\\n        }\\n        require(instance != address(0), \\\"ERC1167: create failed\\\");\\n    }\\n\\n    /**\\n     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\\n     *\\n     * This function uses the create2 opcode and a `salt` to deterministically deploy\\n     * the clone. Using the same `implementation` and `salt` multiple time will revert, since\\n     * the clones cannot be deployed twice at the same address.\\n     */\\n    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\\n        assembly {\\n            let ptr := mload(0x40)\\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n            mstore(add(ptr, 0x14), shl(0x60, implementation))\\n            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n            instance := create2(0, ptr, 0x37, salt)\\n        }\\n        require(instance != address(0), \\\"ERC1167: create2 failed\\\");\\n    }\\n\\n    /**\\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n     */\\n    function predictDeterministicAddress(\\n        address implementation,\\n        bytes32 salt,\\n        address deployer\\n    ) internal pure returns (address predicted) {\\n        assembly {\\n            let ptr := mload(0x40)\\n            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n            mstore(add(ptr, 0x14), shl(0x60, implementation))\\n            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)\\n            mstore(add(ptr, 0x38), shl(0x60, deployer))\\n            mstore(add(ptr, 0x4c), salt)\\n            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))\\n            predicted := keccak256(add(ptr, 0x37), 0x55)\\n        }\\n    }\\n\\n    /**\\n     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n     */\\n    function predictDeterministicAddress(address implementation, bytes32 salt)\\n        internal\\n        view\\n        returns (address predicted)\\n    {\\n        return predictDeterministicAddress(implementation, salt, address(this));\\n    }\\n}\\n\",\"keccak256\":\"0xa3bbab77849522b73d8c6cd3d2ac54bef7580e4354484f35f4cabf55d3d2b3f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n    /**\\n     * @dev Emitted when the pause is triggered by `account`.\\n     */\\n    event Paused(address account);\\n\\n    /**\\n     * @dev Emitted when the pause is lifted by `account`.\\n     */\\n    event Unpaused(address account);\\n\\n    bool private _paused;\\n\\n    /**\\n     * @dev Initializes the contract in unpaused state.\\n     */\\n    constructor() {\\n        _paused = false;\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is paused, and false otherwise.\\n     */\\n    function paused() public view virtual returns (bool) {\\n        return _paused;\\n    }\\n\\n    /**\\n     * @dev Modifier to make a function callable only when the contract is not paused.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must not be paused.\\n     */\\n    modifier whenNotPaused() {\\n        require(!paused(), \\\"Pausable: paused\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Modifier to make a function callable only when the contract is paused.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must be paused.\\n     */\\n    modifier whenPaused() {\\n        require(paused(), \\\"Pausable: not paused\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Triggers stopped state.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must not be paused.\\n     */\\n    function _pause() internal virtual whenNotPaused {\\n        _paused = true;\\n        emit Paused(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Returns to normal state.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must be paused.\\n     */\\n    function _unpause() internal virtual whenPaused {\\n        _paused = false;\\n        emit Unpaused(_msgSender());\\n    }\\n}\\n\",\"keccak256\":\"0xa35b1f2a670cd2a701a52c398032c9fed72df1909fe394d77ceacbf074e8937b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n    function _msgSender() internal view virtual returns (address) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes calldata) {\\n        return msg.data;\\n    }\\n}\\n\",\"keccak256\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/FlatRateCommission.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\n/// @title Interface staking contract\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./interfaces/Fee.sol\\\";\\n\\ncontract FlatRateCommission is Fee, Ownable {\\n    uint256 public immutable feeRaiseTimeout;\\n    uint256 public immutable maxRaise; // 500 = 5%\\n    uint256 public constant BASE = 1E4;\\n    uint256 public rate;\\n    uint256 public timeoutTimestamp;\\n\\n    /// @notice Event emmited when a contract is created\\n    /// @param commission commission charged by the pool\\n    event FlatRateCommissionCreated(uint256 commission);\\n\\n    /// @notice event fired when setRate function is called and successful\\n    /// @param newRate commission charged by the pool effective immediatly\\n    /// @param timeout timestamp for a new change if raising the fee\\n    event FlatRateChanged(uint256 newRate, uint256 timeout);\\n\\n    constructor(\\n        uint256 _rate,\\n        uint256 _feeRaiseTimeout,\\n        uint256 _maxRaise\\n    ) {\\n        rate = _rate;\\n        feeRaiseTimeout = _feeRaiseTimeout;\\n        maxRaise = _maxRaise;\\n        emit FlatRateChanged(_rate, timeoutTimestamp);\\n    }\\n\\n    /// @notice calculates the total amount of the reward that will be directed to the PoolManager\\n    /// @return commissionTotal is the amount subtracted from the rewardAmount\\n    function getCommission(uint256, uint256 rewardAmount)\\n        external\\n        view\\n        override\\n        returns (uint256)\\n    {\\n        uint256 commission = (rewardAmount * rate) / BASE;\\n\\n        // cap commission to 100%\\n        return commission > rewardAmount ? rewardAmount : commission;\\n    }\\n\\n    /// @notice allows for the poolManager to reduce how much they want to charge for the block production tx\\n    function setRate(uint256 newRate) external onlyOwner {\\n        if (newRate > rate) {\\n            require(\\n                timeoutTimestamp <= block.timestamp,\\n                \\\"FlatRateCommission: the fee raise timeout is not expired yet\\\"\\n            );\\n            require(\\n                (newRate - rate) <= maxRaise,\\n                \\\"FlatRateCommission: the fee raise is over the maximum allowed percentage value\\\"\\n            );\\n            timeoutTimestamp = block.timestamp + feeRaiseTimeout;\\n        }\\n        rate = newRate;\\n        emit FlatRateChanged(newRate, timeoutTimestamp);\\n    }\\n}\\n\",\"keccak256\":\"0x97fb67a50bc4cb1ac08c946d26ed61c38b80b69fe6281da2187dee920843ad85\",\"license\":\"Apache-2.0\"},\"contracts/GasTaxCommission.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\n/// @title Gas tax based commission model\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./interfaces/Fee.sol\\\";\\nimport \\\"./oracle/GasOracle.sol\\\";\\nimport \\\"./oracle/PriceOracle.sol\\\";\\n\\ncontract GasTaxCommission is Fee, Ownable {\\n    uint256 public immutable feeRaiseTimeout;\\n    uint256 public immutable maxRaise; // 21000 is one simple tx\\n    GasOracle public immutable gasOracle;\\n\\n    PriceOracle public immutable priceOracle;\\n    uint256 public timeoutTimestamp;\\n\\n    uint256 public gas;\\n\\n    /// @notice event fired when setGas function is called and successful\\n    /// @param timeout timestamp for a new change if raising the fee\\n    event GasTaxChanged(uint256 newGas, uint256 timeout);\\n\\n    constructor(\\n        address _gasOracle,\\n        address _priceOracle,\\n        uint256 _gas,\\n        uint256 _feeRaiseTimeout,\\n        uint256 _maxRaise\\n    ) {\\n        gasOracle = GasOracle(_gasOracle);\\n        priceOracle = PriceOracle(_priceOracle);\\n        gas = _gas;\\n        feeRaiseTimeout = _feeRaiseTimeout;\\n        maxRaise = _maxRaise;\\n        emit GasTaxChanged(_gas, timeoutTimestamp);\\n    }\\n\\n    /// @notice calculates the total amount of the reward that will be directed to the PoolManager\\n    /// @return commissionTotal is the amount subtracted from the rewardAmount\\n    function getCommission(uint256, uint256 rewardAmount)\\n        external\\n        view\\n        override\\n        returns (uint256)\\n    {\\n        // get gas price (in Wei) from chainlink oracle, at https://data.chain.link/fast-gas-gwei\\n        uint256 gasPrice = gasOracle.getGasPrice();\\n\\n        // gas fee (in Wei) charged by pool manager\\n        uint256 gasFee = gasPrice * gas;\\n\\n        // get Wei price of 1 CTSI\\n        uint256 ctsiPrice = priceOracle.getPrice();\\n\\n        // convert gas in Wei to gas in CTSI\\n        uint256 gasFeeCTSI = ctsiPrice > 0\\n            ? (gasFee * (10**18)) / ctsiPrice\\n            : 0;\\n\\n        // this is the commission, maxed by the reward\\n        return gasFeeCTSI > rewardAmount ? rewardAmount : gasFeeCTSI;\\n    }\\n\\n    /// @notice allows for the poolManager to reduce how much they want to charge for the block production tx\\n    function setGas(uint256 newGasCommission) external onlyOwner {\\n        if (newGasCommission > gas) {\\n            require(\\n                timeoutTimestamp <= block.timestamp,\\n                \\\"GasTaxCommission: the fee raise timeout is not expired yet\\\"\\n            );\\n            require(\\n                (newGasCommission - gas) <= maxRaise,\\n                \\\"GasTaxCommission: the fee raise is over the maximum allowed gas value\\\"\\n            );\\n            timeoutTimestamp = block.timestamp + feeRaiseTimeout;\\n        }\\n        gas = newGasCommission;\\n        emit GasTaxChanged(newGasCommission, timeoutTimestamp);\\n    }\\n}\\n\",\"keccak256\":\"0x6e79f59576eb07df0443d9352271b044420df1ee5a872c5b770a493de587ff46\",\"license\":\"Apache-2.0\"},\"contracts/StakingPoolFactoryImpl.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\n/// @title Factory of staking pools\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/Clones.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"./interfaces/StakingPool.sol\\\";\\nimport \\\"./interfaces/StakingPoolFactory.sol\\\";\\nimport \\\"./FlatRateCommission.sol\\\";\\nimport \\\"./GasTaxCommission.sol\\\";\\n\\ncontract StakingPoolFactoryImpl is Ownable, Pausable, StakingPoolFactory {\\n    address public referencePool;\\n    address public immutable gasOracle;\\n    address public immutable priceOracle;\\n    uint256 public immutable feeRaiseTimeout;\\n    uint256 public immutable maxGasRaise;\\n    uint256 public immutable maxFeePercentageRaise;\\n\\n    address public pos;\\n\\n    event ReferencePoolChanged(address indexed pool);\\n    event PoSAddressChanged(address indexed _pos);\\n\\n    receive() external payable {}\\n\\n    constructor(\\n        address _gasOracle,\\n        address _priceOracle,\\n        address _pos,\\n        uint256 _feeRaiseTimeout,\\n        uint256 _maxGasRaise,\\n        uint256 _maxFeePercentageRaise\\n    ) {\\n        require(\\n            _gasOracle != address(0),\\n            \\\"StakingPoolFactoryImpl: parameter can not be zero address.\\\"\\n        );\\n        require(\\n            _priceOracle != address(0),\\n            \\\"StakingPoolFactoryImpl: parameter can not be zero address.\\\"\\n        );\\n        gasOracle = _gasOracle;\\n        priceOracle = _priceOracle;\\n        feeRaiseTimeout = _feeRaiseTimeout;\\n        maxGasRaise = _maxGasRaise;\\n        maxFeePercentageRaise = _maxFeePercentageRaise;\\n        pos = _pos;\\n    }\\n\\n    /// @notice Change the pool reference implementation\\n    function setReferencePool(address _referencePool) external onlyOwner {\\n        referencePool = _referencePool;\\n        emit ReferencePoolChanged(_referencePool);\\n    }\\n\\n    /// @notice Change the pos address\\n    function setPoSAddress(address _pos) external onlyOwner {\\n        pos = _pos;\\n        emit PoSAddressChanged(_pos);\\n    }\\n\\n    /// @notice Creates a new staking pool\\n    /// emits NewStakingPool with the parameters of the new pool\\n    /// @return new pool address\\n    function createFlatRateCommission(uint256 commission)\\n        external\\n        payable\\n        override\\n        whenNotPaused\\n        returns (address)\\n    {\\n        require(\\n            referencePool != address(0),\\n            \\\"StakingPoolFactoryImpl: undefined reference pool\\\"\\n        );\\n        FlatRateCommission fee = new FlatRateCommission(\\n            commission,\\n            feeRaiseTimeout,\\n            maxFeePercentageRaise\\n        );\\n        address payable deployed = payable(Clones.clone(referencePool));\\n        StakingPool pool = StakingPool(deployed);\\n        pool.initialize(address(fee), pos);\\n        pool.transferOwnership(msg.sender);\\n        fee.transferOwnership(msg.sender);\\n        // sends msg.value to complete hiring process\\n        pool.selfhire{value: msg.value}(); //@dev: ignore reentrancy guard warning\\n\\n        // returns unused user payment\\n        payable(msg.sender).transfer(msg.value); //@dev: ignore reentrancy guard warning\\n\\n        emit NewFlatRateCommissionStakingPool(address(pool), address(fee));\\n        return address(pool);\\n    }\\n\\n    function createGasTaxCommission(uint256 gas)\\n        external\\n        payable\\n        override\\n        whenNotPaused\\n        returns (address)\\n    {\\n        require(\\n            referencePool != address(0),\\n            \\\"StakingPoolFactoryImpl: undefined reference pool\\\"\\n        );\\n        GasTaxCommission fee = new GasTaxCommission(\\n            gasOracle,\\n            priceOracle,\\n            gas,\\n            feeRaiseTimeout,\\n            maxGasRaise\\n        );\\n        address payable deployed = payable(Clones.clone(referencePool));\\n        StakingPool pool = StakingPool(deployed);\\n        pool.initialize(address(fee), pos);\\n        pool.transferOwnership(msg.sender);\\n        fee.transferOwnership(msg.sender);\\n        // sends msg.value to complete hiring process\\n        pool.selfhire{value: msg.value}(); //@dev: ignore reentrancy guard warning\\n\\n        // returns unused user payment\\n        payable(msg.sender).transfer(msg.value); //@dev: ignore reentrancy guard warning\\n\\n        emit NewGasTaxCommissionStakingPool(address(pool), address(fee));\\n        return address(pool);\\n    }\\n\\n    /// @notice Returns configuration for the working pools of the current version\\n    /// @return _pos address for the PoS contract\\n    function getPoS() external view override returns (address _pos) {\\n        return pos;\\n    }\\n\\n    function pause() public whenNotPaused onlyOwner {\\n        _pause();\\n    }\\n\\n    function unpause() external whenPaused onlyOwner {\\n        _unpause();\\n    }\\n}\\n\",\"keccak256\":\"0x0a9ca1f9a1819b7252a4e248e212c9dd93664201c08fa874f8a9a91d5ebf50c4\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/Fee.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Calculator of pool owner commission for each block reward\\n/// @author Danilo Tuler\\n/// @notice This provides flexibility for different commission models\\ninterface Fee {\\n    /// @notice calculates the total amount of the reward that will be directed to the pool owner\\n    /// @return amount of tokens taken by the pool owner as commission\\n    function getCommission(uint256 posIndex, uint256 rewardAmount)\\n        external\\n        view\\n        returns (uint256);\\n}\\n\",\"keccak256\":\"0x6f0bafc511d75503c33709e4bb0d6c8cf191f06331e7fa4505540d8d1836e55a\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/StakingPool.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\npragma solidity >=0.7.0;\\n\\nimport \\\"./StakingPoolManagement.sol\\\";\\nimport \\\"./StakingPoolProducer.sol\\\";\\nimport \\\"./StakingPoolStaking.sol\\\";\\nimport \\\"./StakingPoolUser.sol\\\";\\nimport \\\"./StakingPoolWorker.sol\\\";\\n\\n/// @title Staking Pool interface\\n/// @author Danilo Tuler\\n/// @notice This interface aggregates all facets of a staking pool.\\n/// It is broken down into the following sub-interfaces:\\n/// - StakingPoolManagement: management operations on the pool, called by the owner\\n/// - StakingPoolProducer: operations related to block production\\n/// - StakingPoolStaking: interaction between the pool and the staking contract\\n/// - StakingPoolUser: interaction between the pool users and the pool\\n/// - StakingPoolWorker: interaction between the pool and the worker node\\ninterface StakingPool is\\n    StakingPoolManagement,\\n    StakingPoolProducer,\\n    StakingPoolStaking,\\n    StakingPoolUser,\\n    StakingPoolWorker\\n{\\n    /// @notice initialize pool (from reference)\\n    function initialize(address fee, address _pos) external;\\n\\n    /// @notice Transfer ownership of pool to its deployer\\n    function transferOwnership(address newOwner) external;\\n\\n    /// @notice updates the internal settings for important pieces of the Cartesi PoS system\\n    function update() external;\\n}\\n\",\"keccak256\":\"0x102c3eb490a239bfb98f38363c2218edacdeb64db46493a3a84cbcc431903b77\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/StakingPoolFactory.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\npragma solidity >=0.7.0;\\n\\ninterface StakingPoolFactory {\\n    /// @notice Creates a new staking pool using a flat commission model\\n    /// emits NewFlatRateCommissionStakingPool with the parameters of the new pool\\n    /// @return new pool address\\n    function createFlatRateCommission(uint256 commission)\\n        external\\n        payable\\n        returns (address);\\n\\n    /// @notice Creates a new staking pool using a gas tax commission model\\n    /// emits NewGasTaxCommissionStakingPool with the parameters of the new pool\\n    /// @return new pool address\\n    function createGasTaxCommission(uint256 gas)\\n        external\\n        payable\\n        returns (address);\\n\\n    /// @notice Returns configuration for the working pools of the current version\\n    /// @return _pos address for the PoS contract\\n    function getPoS() external view returns (address _pos);\\n\\n    /// @notice Event emmited when a pool is created\\n    /// @param pool address of the new pool\\n    /// @param fee address of the commission contract\\n    event NewFlatRateCommissionStakingPool(address indexed pool, address fee);\\n\\n    /// @notice Event emmited when a pool is created\\n    /// @param pool address of the new pool\\n    /// @param fee address of thhe commission contract\\n    event NewGasTaxCommissionStakingPool(address indexed pool, address fee);\\n}\\n\",\"keccak256\":\"0x5e35f11721eee583e20da68db531eefd391300d6c14a757ccf42a5c189929a7a\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/StakingPoolManagement.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\npragma solidity >=0.7.0;\\n\\ninterface StakingPoolManagement {\\n    /// @notice sets a name for the pool using ENS service\\n    function setName(string memory name) external;\\n\\n    /// @notice pauses new staking on the pool\\n    function pause() external;\\n\\n    /// @notice unpauses new staking on the pool\\n    function unpause() external;\\n\\n    /// @notice Event emmited when a pool is rename\\n    event StakingPoolRenamed(string name);\\n}\\n\",\"keccak256\":\"0xff9727e06a79e361f3873da5336d7a7c976f1163b763ccece276c37e046038cf\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/StakingPoolProducer.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\npragma solidity >=0.7.0;\\n\\n/// @title Interaction between a pool and the PoS block production.\\n/// @author Danilo Tuler\\n/// @notice This interface provides an opportunity to handle the necessary logic\\n/// after a block is produced.\\n/// A commission is taken from the block reward, and the remaining stays in the pool,\\n/// raising the pool share value, and being further staked.\\ninterface StakingPoolProducer {\\n    /// @notice routes produceBlock to POS contract and\\n    /// updates internal states of the pool\\n    /// @return true when everything went fine\\n    function produceBlock(uint256 _index) external returns (bool);\\n\\n    /// @notice this event is emitted at every produceBlock call\\n    /// reward is the block reward\\n    /// commission is how much CTSI is directed to the pool owner\\n    event BlockProduced(uint256 reward, uint256 commission);\\n}\\n\",\"keccak256\":\"0xf9895f06eff4ce10a53a1e4d4138cc3784584b52975e69757a73dc85bebb6602\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/StakingPoolStaking.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\npragma solidity >=0.7.0;\\n\\n/// @title Interaction between a pool and the staking contract\\n/// @author Danilo Tuler\\n/// @notice This interface models all interactions between a pool and the staking contract,\\n/// including staking, unstaking and withdrawing.\\n/// Tokens staked by pool users will stay at the pool until the pool owner decides to\\n/// stake them in the staking contract. On the other hand, tokens unstaked by pool users\\n/// are added to a required liquidity accumulator, and must be unstaked and withdrawn from\\n/// the staking contract.\\ninterface StakingPoolStaking {\\n    /// @notice Move tokens from pool to staking or vice-versa, according to required liquidity.\\n    /// If the pool has more liquidity then necessary, it stakes tokens.\\n    /// If the pool has less liquidity then necessary, and has not started an unstake, it unstakes.\\n    /// If the pool has less liquity than necessary, and has started an unstake, it withdraws if possible.\\n    function rebalance() external;\\n\\n    /// @notice provide information for offchain about the amount for each\\n    /// staking operation on the main Staking contract\\n    /// @return stake amount of tokens that can be staked\\n    /// @return unstake amount of tokens that must be unstaked to add liquidity\\n    /// @return withdraw amount of tokens that can be withdrawn to add liquidity\\n    function amounts()\\n        external\\n        view\\n        returns (\\n            uint256 stake,\\n            uint256 unstake,\\n            uint256 withdraw\\n        );\\n}\\n\",\"keccak256\":\"0xd79a4bbc8defea295205493352e73802c29a3478fe345b04885eef3cb82c3a25\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/StakingPoolUser.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\npragma solidity >=0.7.0;\\n\\n/// @title Interaction between a pool user and a pool\\n/// @author Danilo Tuler\\n/// @notice This interface models all interactions between a pool user and a pool,\\n/// including staking, unstaking and withdrawing. A pool user always holds pool shares.\\n/// When a user stakes tokens, he immediately receive shares. When he unstakes shares\\n/// he is asking to release tokens. Those tokens need to be withdrawn by an additional\\n/// call to withdraw()\\ninterface StakingPoolUser {\\n    /// @notice Deposit tokens to user pool balance\\n    /// @param amount amount of token deposited in the pool\\n    function deposit(uint256 amount) external;\\n\\n    /// @notice Stake an amount of tokens, immediately earning pool shares in returns\\n    /// @param amount amount of tokens to convert to shares\\n    function stake(uint256 amount) external;\\n\\n    /// @notice Unstake an specified amount of shares of the calling user\\n    /// @dev Shares are immediately converted to tokens, and added to the pool liquidity requirement\\n    function unstake(uint256 shares) external;\\n\\n    /// @notice Transfer tokens back to calling user wallet\\n    /// @dev this will transfer tokens from user pool account to user's wallet\\n    function withdraw(uint256 amount) external;\\n\\n    /// @notice Returns the amount of tokens that can be immediately withdrawn by the calling user\\n    /// @dev there is no way to know the exact time in the future the requested tokens will be available\\n    /// @return the amount of tokens that can be immediately withdrawn by the calling user\\n    function getWithdrawBalance() external returns (uint256);\\n\\n    /// @notice Tokens were deposited, available for staking or withdrawal\\n    /// @param user address of msg.sender\\n    /// @param amount amount of tokens deposited by the user\\n    /// @param stakeTimestamp instant when the amount can be staked\\n    event Deposit(address indexed user, uint256 amount, uint256 stakeTimestamp);\\n\\n    /// @notice Tokens were deposited, they count as shares immediatly\\n    /// @param user address of msg.sender\\n    /// @param amount amount deposited by the user\\n    /// @param shares number of shares emitted for user\\n    event Stake(address indexed user, uint256 amount, uint256 shares);\\n\\n    /// @notice Request to unstake tokens. Additional liquidity requested for the pool\\n    /// @param user address of msg.sender\\n    /// @param amount amount of tokens to be released\\n    /// @param shares number of shares being liquidated\\n    event Unstake(address indexed user, uint256 amount, uint256 shares);\\n\\n    /// @notice Withdraw performed by a user\\n    /// @param user address of msg.sender\\n    /// @param amount amount of tokens withdrawn\\n    event Withdraw(address indexed user, uint256 amount);\\n}\\n\",\"keccak256\":\"0xdd0612eef33a71a77364bd68c573dbb950b195500dc21c15f52ff32908fabc60\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/StakingPoolWorker.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\npragma solidity >=0.7.0;\\n\\ninterface StakingPoolWorker {\\n    /// @notice allows for the pool to act on its own behalf when producing blocks.\\n    function selfhire() external payable;\\n\\n    /// @notice Asks the worker to work for the sender. Sender needs to pay something.\\n    /// @param workerAddress address of the worker\\n    function hire(address payable workerAddress) external payable;\\n\\n    /// @notice Called by the user to cancel a job offer\\n    /// @param workerAddress address of the worker node\\n    function cancelHire(address workerAddress) external;\\n\\n    /// @notice Called by the user to retire his worker.\\n    /// @param workerAddress address of the worker to be retired\\n    /// @dev this also removes all authorizations in place\\n    function retire(address payable workerAddress) external;\\n}\\n\",\"keccak256\":\"0x66b0366bc973b3dbc8591c1cd6e558ee5456192a31ee1262b8b5e855c30a9023\",\"license\":\"Apache-2.0\"},\"contracts/oracle/GasOracle.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\n/// @title Interface staking contract\\npragma solidity ^0.8.0;\\n\\ninterface GasOracle {\\n    /// @notice Returns current network gas price\\n    /// @return value of gas price\\n    function getGasPrice() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7ad0683de70d2fbb8dd0f9fafeea8e05d1c9ca872f53296456ad615d75051e79\",\"license\":\"Apache-2.0\"},\"contracts/oracle/PriceOracle.sol\":{\"content\":\"// Copyright 2021 Cartesi Pte. Ltd.\\n\\n// SPDX-License-Identifier: Apache-2.0\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use\\n// this file except in compliance with the License. You may obtain a copy of the\\n// License at http://www.apache.org/licenses/LICENSE-2.0\\n\\n// Unless required by applicable law or agreed to in writing, software distributed\\n// under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR\\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\\n// specific language governing permissions and limitations under the License.\\n\\n/// @title Interface staking contract\\npragma solidity >=0.5.0 <0.9.0;\\n\\ninterface PriceOracle {\\n    /// @notice Returns price of CTSI in ETH\\n    /// @return value of 1 ETH in CTSI\\n    function getPrice() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xfa7ef41ddc10fbf80d09ad56eb247609ebae765ef47e74d98230b2718dba3ddb\",\"license\":\"Apache-2.0\"}},\"version\":1}",
  "bytecode": "0x6101206040523480156200001257600080fd5b506040516200234e3803806200234e8339810160408190526200003591620001eb565b62000040336200017e565b6000805460ff60a01b191690556001600160a01b038616620000be5760405162461bcd60e51b815260206004820152603a60248201526000805160206200232e83398151915260448201527f722063616e206e6f74206265207a65726f20616464726573732e00000000000060648201526084015b60405180910390fd5b6001600160a01b0385166200012b5760405162461bcd60e51b815260206004820152603a60248201526000805160206200232e83398151915260448201527f722063616e206e6f74206265207a65726f20616464726573732e0000000000006064820152608401620000b5565b606095861b6001600160601b03199081166080529490951b90931660a05260c05260e09190915261010091909152600280546001600160a01b0319166001600160a01b0390921691909117905562000251565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001e657600080fd5b919050565b60008060008060008060c087890312156200020557600080fd5b6200021087620001ce565b95506200022060208801620001ce565b94506200023060408801620001ce565b9350606087015192506080870151915060a087015190509295509295509295565b60805160601c60a05160601c60c05160e05161010051612068620002c66000396000818161027101526105470152600081816102e201526108d701526000818161012b0152818161052601526108b6015260008181610172015261089401526000818161023d015261087301526120686000f3fe60806040526004361061010d5760003560e01c80638456cb591161009557806395994ef71161006457806395994ef714610322578063964658b614610342578063c56551b614610355578063df6efe1514610375578063f2fde38b1461039557600080fd5b80638456cb59146102a857806386f1a717146102bd578063896c5107146102d05780638da5cb5b1461030457600080fd5b8063533135b6116100dc578063533135b6146101e15780635c975abb146102015780635d62a8dd1461022b5780636c678ff11461025f578063715018a61461029357600080fd5b8063112cde6a146101195780632630c12f146101605780632686e29d146101ac5780633f4ba83a146101ca57600080fd5b3661011457005b600080fd5b34801561012557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561016c57600080fd5b506101947f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610157565b3480156101b857600080fd5b506002546001600160a01b0316610194565b3480156101d657600080fd5b506101df6103b5565b005b3480156101ed57600080fd5b50600154610194906001600160a01b031681565b34801561020d57600080fd5b50600054600160a01b900460ff166040519015158152602001610157565b34801561023757600080fd5b506101947f000000000000000000000000000000000000000000000000000000000000000081565b34801561026b57600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561029f57600080fd5b506101df61043e565b3480156102b457600080fd5b506101df610472565b6101946102cb366004610e87565b6104ce565b3480156102dc57600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561031057600080fd5b506000546001600160a01b0316610194565b34801561032e57600080fd5b506101df61033d366004610e57565b6107a8565b610194610350366004610e87565b61081c565b34801561036157600080fd5b50600254610194906001600160a01b031681565b34801561038157600080fd5b506101df610390366004610e57565b610b42565b3480156103a157600080fd5b506101df6103b0366004610e57565b610bb6565b600054600160a01b900460ff1661040a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064015b60405180910390fd5b6000546001600160a01b031633146104345760405162461bcd60e51b815260040161040190610eca565b61043c610c51565b565b6000546001600160a01b031633146104685760405162461bcd60e51b815260040161040190610eca565b61043c6000610cee565b600054600160a01b900460ff161561049c5760405162461bcd60e51b815260040161040190610ea0565b6000546001600160a01b031633146104c65760405162461bcd60e51b815260040161040190610eca565b61043c610d3e565b60008054600160a01b900460ff16156104f95760405162461bcd60e51b815260040161040190610ea0565b6001546001600160a01b03166105215760405162461bcd60e51b815260040161040190610eff565b6000827f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405161057290610e3b565b92835260208301919091526040820152606001604051809103906000f0801580156105a1573d6000803e3d6000fd5b506001549091506000906105bd906001600160a01b0316610da3565b60025460405163485cc95560e01b81526001600160a01b038581166004830152918216602482015291925082919082169063485cc95590604401600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b505060405163f2fde38b60e01b81523360048201526001600160a01b038416925063f2fde38b9150602401600060405180830381600087803b15801561066a57600080fd5b505af115801561067e573d6000803e3d6000fd5b505060405163f2fde38b60e01b81523360048201526001600160a01b038616925063f2fde38b9150602401600060405180830381600087803b1580156106c357600080fd5b505af11580156106d7573d6000803e3d6000fd5b50505050806001600160a01b0316636ff46a6c346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561071657600080fd5b505af115801561072a573d6000803e3d6000fd5b50506040513393503480156108fc02935091506000818181858888f1935050505015801561075c573d6000803e3d6000fd5b506040516001600160a01b0384811682528216907fdca0276ad17c3c65434ae45a0754677f87ae465de69763ebe79ceaeff2805bc7906020015b60405180910390a2925050505b919050565b6000546001600160a01b031633146107d25760405162461bcd60e51b815260040161040190610eca565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f5e3b1dda0e29fe5d32248c3be6ac8f07890d4bc593a7810238b65d512197042490600090a250565b60008054600160a01b900460ff16156108475760405162461bcd60e51b815260040161040190610ea0565b6001546001600160a01b031661086f5760405162461bcd60e51b815260040161040190610eff565b60007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000847f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405161090290610e49565b6001600160a01b03958616815294909316602085015260408401919091526060830152608082015260a001604051809103906000f080158015610949573d6000803e3d6000fd5b50600154909150600090610965906001600160a01b0316610da3565b60025460405163485cc95560e01b81526001600160a01b038581166004830152918216602482015291925082919082169063485cc95590604401600060405180830381600087803b1580156109b957600080fd5b505af11580156109cd573d6000803e3d6000fd5b505060405163f2fde38b60e01b81523360048201526001600160a01b038416925063f2fde38b9150602401600060405180830381600087803b158015610a1257600080fd5b505af1158015610a26573d6000803e3d6000fd5b505060405163f2fde38b60e01b81523360048201526001600160a01b038616925063f2fde38b9150602401600060405180830381600087803b158015610a6b57600080fd5b505af1158015610a7f573d6000803e3d6000fd5b50505050806001600160a01b0316636ff46a6c346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610abe57600080fd5b505af1158015610ad2573d6000803e3d6000fd5b50506040513393503480156108fc02935091506000818181858888f19350505050158015610b04573d6000803e3d6000fd5b506040516001600160a01b0384811682528216907f93b9326c0865b177ab4a6131c8e6806a0edc9f3585dbaeb773542d3582d0457190602001610796565b6000546001600160a01b03163314610b6c5760405162461bcd60e51b815260040161040190610eca565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f961b87fd32dc3f26edfd7988b7e4b99084f44baeee37421669be170af4e3e61e90600090a250565b6000546001600160a01b03163314610be05760405162461bcd60e51b815260040161040190610eca565b6001600160a01b038116610c455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610401565b610c4e81610cee565b50565b600054600160a01b900460ff16610ca15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610401565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff1615610d685760405162461bcd60e51b815260040161040190610ea0565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610cd13390565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b0381166107a35760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b6044820152606401610401565b61074f8062000f5083390190565b610994806200169f83390190565b600060208284031215610e6957600080fd5b81356001600160a01b0381168114610e8057600080fd5b9392505050565b600060208284031215610e9957600080fd5b5035919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526030908201527f5374616b696e67506f6f6c466163746f7279496d706c3a20756e646566696e6560408201526f19081c9959995c995b98d9481c1bdbdb60821b60608201526080019056fe60c060405234801561001057600080fd5b5060405161074f38038061074f83398101604081905261002f916100dc565b6100383361008c565b6001839055608082905260a08190526002546040805185815260208101929092527f8a36c5a730a168f010484976acd9da00019dde58dcdaa557ec1035ade3805c92910160405180910390a150505061010a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000606084860312156100f157600080fd5b8351925060208401519150604084015190509250925092565b60805160a05161061361013c60003960008181610108015261023401526000818160a801526102f101526106136000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b1461012a578063b1fc8ad414610145578063c2ce5e8614610158578063ec342ad014610161578063f2fde38b1461016a57600080fd5b8063112cde6a146100a35780632c4e722e146100dd57806334fcf437146100e6578063715018a6146100fb578063719ec6b114610103575b600080fd5b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100ca60015481565b6100f96100f43660046104e7565b61017d565b005b6100f961035f565b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6000546040516001600160a01b0390911681526020016100d4565b6100ca610153366004610500565b610395565b6100ca60025481565b6100ca61271081565b6100f96101783660046104b7565b6103cc565b6000546001600160a01b031633146101b05760405162461bcd60e51b81526004016101a790610522565b60405180910390fd5b60015481111561031a574260025411156102325760405162461bcd60e51b815260206004820152603c60248201527f466c617452617465436f6d6d697373696f6e3a2074686520666565207261697360448201527f652074696d656f7574206973206e6f742065787069726564207965740000000060648201526084016101a7565b7f00000000000000000000000000000000000000000000000000000000000000006001548261026191906105b0565b11156102ec5760405162461bcd60e51b815260206004820152604e60248201527f466c617452617465436f6d6d697373696f6e3a2074686520666565207261697360448201527f65206973206f76657220746865206d6178696d756d20616c6c6f77656420706560648201526d7263656e746167652076616c756560901b608482015260a4016101a7565b6103167f000000000000000000000000000000000000000000000000000000000000000042610557565b6002555b60018190556002546040805183815260208101929092527f8a36c5a730a168f010484976acd9da00019dde58dcdaa557ec1035ade3805c92910160405180910390a150565b6000546001600160a01b031633146103895760405162461bcd60e51b81526004016101a790610522565b6103936000610467565b565b600080612710600154846103a99190610591565b6103b3919061056f565b90508281116103c257806103c4565b825b949350505050565b6000546001600160a01b031633146103f65760405162461bcd60e51b81526004016101a790610522565b6001600160a01b03811661045b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101a7565b61046481610467565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156104c957600080fd5b81356001600160a01b03811681146104e057600080fd5b9392505050565b6000602082840312156104f957600080fd5b5035919050565b6000806040838503121561051357600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561056a5761056a6105c7565b500190565b60008261058c57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156105ab576105ab6105c7565b500290565b6000828210156105c2576105c26105c7565b500390565b634e487b7160e01b600052601160045260246000fdfea264697066735822122085d5e30b0c1c3dd32e67b134dcbea33c284a9d2d18b3b24dc7185d78620b356664736f6c6343000807003361010060405234801561001157600080fd5b506040516109943803806109948339810160408190526100309161011d565b610039336100b1565b6001600160601b0319606086811b821660c05285901b1660e0526002839055608082905260a08190526001546040517fefb1b20d1d12d754c2da7fe3a7f0b7ea7f1d320144c1a2f873d1eeed95e5c54a9161009f91869190918252602082015260400190565b60405180910390a1505050505061016b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b038116811461011857600080fd5b919050565b600080600080600060a0868803121561013557600080fd5b61013e86610101565b945061014c60208701610101565b6040870151606088015160809098015196999198509695945092505050565b60805160a05160c05160601c60e05160601c6107d06101c46000396000818160ed01526102c601526000818161012c015261021f015260008181610166015261044e01526000818160b3015261050201526107d06000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063719ec6b111610071578063719ec6b1146101615780638da5cb5b14610188578063b1fc8ad414610199578063c2ce5e86146101ac578063dd51faa2146101b5578063f2fde38b146101c857600080fd5b8063112cde6a146100ae5780632630c12f146100e85780635d62a8dd146101275780636ca7c2161461014e578063715018a614610157575b600080fd5b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61010f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100df565b61010f7f000000000000000000000000000000000000000000000000000000000000000081565b6100d560025481565b61015f6101db565b005b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661010f565b6100d56101a73660046106bd565b61021a565b6100d560015481565b61015f6101c336600461068b565b6103a0565b61015f6101d636600461065b565b610570565b6000546001600160a01b0316331461020e5760405162461bcd60e51b8152600401610205906106df565b60405180910390fd5b610218600061060b565b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663455259cb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561027657600080fd5b505afa15801561028a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ae91906106a4565b90506000600254826102c0919061074e565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166398d5fdca6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031d57600080fd5b505afa158015610331573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035591906106a4565b90506000808211610367576000610384565b8161037a84670de0b6b3a764000061074e565b610384919061072c565b90508581116103935780610395565b855b979650505050505050565b6000546001600160a01b031633146103ca5760405162461bcd60e51b8152600401610205906106df565b60025481111561052b5742600154111561044c5760405162461bcd60e51b815260206004820152603a60248201527f476173546178436f6d6d697373696f6e3a20746865206665652072616973652060448201527f74696d656f7574206973206e6f742065787069726564207965740000000000006064820152608401610205565b7f00000000000000000000000000000000000000000000000000000000000000006002548261047b919061076d565b11156104fd5760405162461bcd60e51b815260206004820152604560248201527f476173546178436f6d6d697373696f6e3a20746865206665652072616973652060448201527f6973206f76657220746865206d6178696d756d20616c6c6f776564206761732060648201526476616c756560d81b608482015260a401610205565b6105277f000000000000000000000000000000000000000000000000000000000000000042610714565b6001555b60028190556001546040805183815260208101929092527fefb1b20d1d12d754c2da7fe3a7f0b7ea7f1d320144c1a2f873d1eeed95e5c54a910160405180910390a150565b6000546001600160a01b0316331461059a5760405162461bcd60e51b8152600401610205906106df565b6001600160a01b0381166105ff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610205565b6106088161060b565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561066d57600080fd5b81356001600160a01b038116811461068457600080fd5b9392505050565b60006020828403121561069d57600080fd5b5035919050565b6000602082840312156106b657600080fd5b5051919050565b600080604083850312156106d057600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561072757610727610784565b500190565b60008261074957634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561076857610768610784565b500290565b60008282101561077f5761077f610784565b500390565b634e487b7160e01b600052601160045260246000fdfea26469706673582212202a34e654068e336e0a34dcb92a0711e3100f288563a3cd159b7e93312093ab8f64736f6c63430008070033a26469706673582212204e8fdf47fa57242741f4072fecfebd30263ff375e9c3e1c1b79ab3add346eaf164736f6c634300080700335374616b696e67506f6f6c466163746f7279496d706c3a20706172616d657465",
  "deployedBytecode": "0x60806040526004361061010d5760003560e01c80638456cb591161009557806395994ef71161006457806395994ef714610322578063964658b614610342578063c56551b614610355578063df6efe1514610375578063f2fde38b1461039557600080fd5b80638456cb59146102a857806386f1a717146102bd578063896c5107146102d05780638da5cb5b1461030457600080fd5b8063533135b6116100dc578063533135b6146101e15780635c975abb146102015780635d62a8dd1461022b5780636c678ff11461025f578063715018a61461029357600080fd5b8063112cde6a146101195780632630c12f146101605780632686e29d146101ac5780633f4ba83a146101ca57600080fd5b3661011457005b600080fd5b34801561012557600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561016c57600080fd5b506101947f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610157565b3480156101b857600080fd5b506002546001600160a01b0316610194565b3480156101d657600080fd5b506101df6103b5565b005b3480156101ed57600080fd5b50600154610194906001600160a01b031681565b34801561020d57600080fd5b50600054600160a01b900460ff166040519015158152602001610157565b34801561023757600080fd5b506101947f000000000000000000000000000000000000000000000000000000000000000081565b34801561026b57600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561029f57600080fd5b506101df61043e565b3480156102b457600080fd5b506101df610472565b6101946102cb366004610e87565b6104ce565b3480156102dc57600080fd5b5061014d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561031057600080fd5b506000546001600160a01b0316610194565b34801561032e57600080fd5b506101df61033d366004610e57565b6107a8565b610194610350366004610e87565b61081c565b34801561036157600080fd5b50600254610194906001600160a01b031681565b34801561038157600080fd5b506101df610390366004610e57565b610b42565b3480156103a157600080fd5b506101df6103b0366004610e57565b610bb6565b600054600160a01b900460ff1661040a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064015b60405180910390fd5b6000546001600160a01b031633146104345760405162461bcd60e51b815260040161040190610eca565b61043c610c51565b565b6000546001600160a01b031633146104685760405162461bcd60e51b815260040161040190610eca565b61043c6000610cee565b600054600160a01b900460ff161561049c5760405162461bcd60e51b815260040161040190610ea0565b6000546001600160a01b031633146104c65760405162461bcd60e51b815260040161040190610eca565b61043c610d3e565b60008054600160a01b900460ff16156104f95760405162461bcd60e51b815260040161040190610ea0565b6001546001600160a01b03166105215760405162461bcd60e51b815260040161040190610eff565b6000827f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405161057290610e3b565b92835260208301919091526040820152606001604051809103906000f0801580156105a1573d6000803e3d6000fd5b506001549091506000906105bd906001600160a01b0316610da3565b60025460405163485cc95560e01b81526001600160a01b038581166004830152918216602482015291925082919082169063485cc95590604401600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b505060405163f2fde38b60e01b81523360048201526001600160a01b038416925063f2fde38b9150602401600060405180830381600087803b15801561066a57600080fd5b505af115801561067e573d6000803e3d6000fd5b505060405163f2fde38b60e01b81523360048201526001600160a01b038616925063f2fde38b9150602401600060405180830381600087803b1580156106c357600080fd5b505af11580156106d7573d6000803e3d6000fd5b50505050806001600160a01b0316636ff46a6c346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561071657600080fd5b505af115801561072a573d6000803e3d6000fd5b50506040513393503480156108fc02935091506000818181858888f1935050505015801561075c573d6000803e3d6000fd5b506040516001600160a01b0384811682528216907fdca0276ad17c3c65434ae45a0754677f87ae465de69763ebe79ceaeff2805bc7906020015b60405180910390a2925050505b919050565b6000546001600160a01b031633146107d25760405162461bcd60e51b815260040161040190610eca565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f5e3b1dda0e29fe5d32248c3be6ac8f07890d4bc593a7810238b65d512197042490600090a250565b60008054600160a01b900460ff16156108475760405162461bcd60e51b815260040161040190610ea0565b6001546001600160a01b031661086f5760405162461bcd60e51b815260040161040190610eff565b60007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000847f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060405161090290610e49565b6001600160a01b03958616815294909316602085015260408401919091526060830152608082015260a001604051809103906000f080158015610949573d6000803e3d6000fd5b50600154909150600090610965906001600160a01b0316610da3565b60025460405163485cc95560e01b81526001600160a01b038581166004830152918216602482015291925082919082169063485cc95590604401600060405180830381600087803b1580156109b957600080fd5b505af11580156109cd573d6000803e3d6000fd5b505060405163f2fde38b60e01b81523360048201526001600160a01b038416925063f2fde38b9150602401600060405180830381600087803b158015610a1257600080fd5b505af1158015610a26573d6000803e3d6000fd5b505060405163f2fde38b60e01b81523360048201526001600160a01b038616925063f2fde38b9150602401600060405180830381600087803b158015610a6b57600080fd5b505af1158015610a7f573d6000803e3d6000fd5b50505050806001600160a01b0316636ff46a6c346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610abe57600080fd5b505af1158015610ad2573d6000803e3d6000fd5b50506040513393503480156108fc02935091506000818181858888f19350505050158015610b04573d6000803e3d6000fd5b506040516001600160a01b0384811682528216907f93b9326c0865b177ab4a6131c8e6806a0edc9f3585dbaeb773542d3582d0457190602001610796565b6000546001600160a01b03163314610b6c5760405162461bcd60e51b815260040161040190610eca565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f961b87fd32dc3f26edfd7988b7e4b99084f44baeee37421669be170af4e3e61e90600090a250565b6000546001600160a01b03163314610be05760405162461bcd60e51b815260040161040190610eca565b6001600160a01b038116610c455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610401565b610c4e81610cee565b50565b600054600160a01b900460ff16610ca15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610401565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff1615610d685760405162461bcd60e51b815260040161040190610ea0565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610cd13390565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b0381166107a35760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b6044820152606401610401565b61074f8062000f5083390190565b610994806200169f83390190565b600060208284031215610e6957600080fd5b81356001600160a01b0381168114610e8057600080fd5b9392505050565b600060208284031215610e9957600080fd5b5035919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526030908201527f5374616b696e67506f6f6c466163746f7279496d706c3a20756e646566696e6560408201526f19081c9959995c995b98d9481c1bdbdb60821b60608201526080019056fe60c060405234801561001057600080fd5b5060405161074f38038061074f83398101604081905261002f916100dc565b6100383361008c565b6001839055608082905260a08190526002546040805185815260208101929092527f8a36c5a730a168f010484976acd9da00019dde58dcdaa557ec1035ade3805c92910160405180910390a150505061010a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000606084860312156100f157600080fd5b8351925060208401519150604084015190509250925092565b60805160a05161061361013c60003960008181610108015261023401526000818160a801526102f101526106136000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b1461012a578063b1fc8ad414610145578063c2ce5e8614610158578063ec342ad014610161578063f2fde38b1461016a57600080fd5b8063112cde6a146100a35780632c4e722e146100dd57806334fcf437146100e6578063715018a6146100fb578063719ec6b114610103575b600080fd5b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100ca60015481565b6100f96100f43660046104e7565b61017d565b005b6100f961035f565b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6000546040516001600160a01b0390911681526020016100d4565b6100ca610153366004610500565b610395565b6100ca60025481565b6100ca61271081565b6100f96101783660046104b7565b6103cc565b6000546001600160a01b031633146101b05760405162461bcd60e51b81526004016101a790610522565b60405180910390fd5b60015481111561031a574260025411156102325760405162461bcd60e51b815260206004820152603c60248201527f466c617452617465436f6d6d697373696f6e3a2074686520666565207261697360448201527f652074696d656f7574206973206e6f742065787069726564207965740000000060648201526084016101a7565b7f00000000000000000000000000000000000000000000000000000000000000006001548261026191906105b0565b11156102ec5760405162461bcd60e51b815260206004820152604e60248201527f466c617452617465436f6d6d697373696f6e3a2074686520666565207261697360448201527f65206973206f76657220746865206d6178696d756d20616c6c6f77656420706560648201526d7263656e746167652076616c756560901b608482015260a4016101a7565b6103167f000000000000000000000000000000000000000000000000000000000000000042610557565b6002555b60018190556002546040805183815260208101929092527f8a36c5a730a168f010484976acd9da00019dde58dcdaa557ec1035ade3805c92910160405180910390a150565b6000546001600160a01b031633146103895760405162461bcd60e51b81526004016101a790610522565b6103936000610467565b565b600080612710600154846103a99190610591565b6103b3919061056f565b90508281116103c257806103c4565b825b949350505050565b6000546001600160a01b031633146103f65760405162461bcd60e51b81526004016101a790610522565b6001600160a01b03811661045b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101a7565b61046481610467565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156104c957600080fd5b81356001600160a01b03811681146104e057600080fd5b9392505050565b6000602082840312156104f957600080fd5b5035919050565b6000806040838503121561051357600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561056a5761056a6105c7565b500190565b60008261058c57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156105ab576105ab6105c7565b500290565b6000828210156105c2576105c26105c7565b500390565b634e487b7160e01b600052601160045260246000fdfea264697066735822122085d5e30b0c1c3dd32e67b134dcbea33c284a9d2d18b3b24dc7185d78620b356664736f6c6343000807003361010060405234801561001157600080fd5b506040516109943803806109948339810160408190526100309161011d565b610039336100b1565b6001600160601b0319606086811b821660c05285901b1660e0526002839055608082905260a08190526001546040517fefb1b20d1d12d754c2da7fe3a7f0b7ea7f1d320144c1a2f873d1eeed95e5c54a9161009f91869190918252602082015260400190565b60405180910390a1505050505061016b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b038116811461011857600080fd5b919050565b600080600080600060a0868803121561013557600080fd5b61013e86610101565b945061014c60208701610101565b6040870151606088015160809098015196999198509695945092505050565b60805160a05160c05160601c60e05160601c6107d06101c46000396000818160ed01526102c601526000818161012c015261021f015260008181610166015261044e01526000818160b3015261050201526107d06000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063719ec6b111610071578063719ec6b1146101615780638da5cb5b14610188578063b1fc8ad414610199578063c2ce5e86146101ac578063dd51faa2146101b5578063f2fde38b146101c857600080fd5b8063112cde6a146100ae5780632630c12f146100e85780635d62a8dd146101275780636ca7c2161461014e578063715018a614610157575b600080fd5b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61010f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100df565b61010f7f000000000000000000000000000000000000000000000000000000000000000081565b6100d560025481565b61015f6101db565b005b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661010f565b6100d56101a73660046106bd565b61021a565b6100d560015481565b61015f6101c336600461068b565b6103a0565b61015f6101d636600461065b565b610570565b6000546001600160a01b0316331461020e5760405162461bcd60e51b8152600401610205906106df565b60405180910390fd5b610218600061060b565b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663455259cb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561027657600080fd5b505afa15801561028a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ae91906106a4565b90506000600254826102c0919061074e565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166398d5fdca6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031d57600080fd5b505afa158015610331573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035591906106a4565b90506000808211610367576000610384565b8161037a84670de0b6b3a764000061074e565b610384919061072c565b90508581116103935780610395565b855b979650505050505050565b6000546001600160a01b031633146103ca5760405162461bcd60e51b8152600401610205906106df565b60025481111561052b5742600154111561044c5760405162461bcd60e51b815260206004820152603a60248201527f476173546178436f6d6d697373696f6e3a20746865206665652072616973652060448201527f74696d656f7574206973206e6f742065787069726564207965740000000000006064820152608401610205565b7f00000000000000000000000000000000000000000000000000000000000000006002548261047b919061076d565b11156104fd5760405162461bcd60e51b815260206004820152604560248201527f476173546178436f6d6d697373696f6e3a20746865206665652072616973652060448201527f6973206f76657220746865206d6178696d756d20616c6c6f776564206761732060648201526476616c756560d81b608482015260a401610205565b6105277f000000000000000000000000000000000000000000000000000000000000000042610714565b6001555b60028190556001546040805183815260208101929092527fefb1b20d1d12d754c2da7fe3a7f0b7ea7f1d320144c1a2f873d1eeed95e5c54a910160405180910390a150565b6000546001600160a01b0316331461059a5760405162461bcd60e51b8152600401610205906106df565b6001600160a01b0381166105ff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610205565b6106088161060b565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561066d57600080fd5b81356001600160a01b038116811461068457600080fd5b9392505050565b60006020828403121561069d57600080fd5b5035919050565b6000602082840312156106b657600080fd5b5051919050565b600080604083850312156106d057600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561072757610727610784565b500190565b60008261074957634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561076857610768610784565b500290565b60008282101561077f5761077f610784565b500390565b634e487b7160e01b600052601160045260246000fdfea26469706673582212202a34e654068e336e0a34dcb92a0711e3100f288563a3cd159b7e93312093ab8f64736f6c63430008070033a26469706673582212204e8fdf47fa57242741f4072fecfebd30263ff375e9c3e1c1b79ab3add346eaf164736f6c63430008070033",
  "devdoc": {
    "kind": "dev",
    "methods": {
      "createFlatRateCommission(uint256)": {
        "returns": {
          "_0": "new pool address"
        }
      },
      "createGasTaxCommission(uint256)": {
        "returns": {
          "_0": "new pool address"
        }
      },
      "getPoS()": {
        "returns": {
          "_pos": "address for the PoS contract"
        }
      },
      "owner()": {
        "details": "Returns the address of the current owner."
      },
      "paused()": {
        "details": "Returns true if the contract is paused, and false otherwise."
      },
      "renounceOwnership()": {
        "details": "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."
      },
      "transferOwnership(address)": {
        "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
      }
    },
    "version": 1
  },
  "userdoc": {
    "events": {
      "NewFlatRateCommissionStakingPool(address,address)": {
        "notice": "Event emmited when a pool is created"
      },
      "NewGasTaxCommissionStakingPool(address,address)": {
        "notice": "Event emmited when a pool is created"
      }
    },
    "kind": "user",
    "methods": {
      "createFlatRateCommission(uint256)": {
        "notice": "Creates a new staking pool emits NewStakingPool with the parameters of the new pool"
      },
      "createGasTaxCommission(uint256)": {
        "notice": "Creates a new staking pool using a gas tax commission model emits NewGasTaxCommissionStakingPool with the parameters of the new pool"
      },
      "getPoS()": {
        "notice": "Returns configuration for the working pools of the current version"
      },
      "setPoSAddress(address)": {
        "notice": "Change the pos address"
      },
      "setReferencePool(address)": {
        "notice": "Change the pool reference implementation"
      }
    },
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 1184,
        "contract": "contracts/StakingPoolFactoryImpl.sol:StakingPoolFactoryImpl",
        "label": "_owner",
        "offset": 0,
        "slot": "0",
        "type": "t_address"
      },
      {
        "astId": 1378,
        "contract": "contracts/StakingPoolFactoryImpl.sol:StakingPoolFactoryImpl",
        "label": "_paused",
        "offset": 20,
        "slot": "0",
        "type": "t_bool"
      },
      {
        "astId": 1970,
        "contract": "contracts/StakingPoolFactoryImpl.sol:StakingPoolFactoryImpl",
        "label": "referencePool",
        "offset": 0,
        "slot": "1",
        "type": "t_address"
      },
      {
        "astId": 1982,
        "contract": "contracts/StakingPoolFactoryImpl.sol:StakingPoolFactoryImpl",
        "label": "pos",
        "offset": 0,
        "slot": "2",
        "type": "t_address"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_bool": {
        "encoding": "inplace",
        "label": "bool",
        "numberOfBytes": "1"
      }
    }
  }
}