false
true
0

Contract Address Details

0x6B93f1739dADa98B0aC315CEC6a17aF0977bfb6d

Contract Name
VotePower
Creator
0x842800–bb3bf7 at 0x4a7f51–eb6dde
Balance
0 tPLS
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
25348835
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
VotePower




Optimization enabled
true
Compiler version
v0.8.19+commit.7dd6d404




Optimization runs
999999
EVM Version
default




Verified at
2023-10-19T20:36:23.685891Z

Constructor Arguments

0x000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea2000000000000000000000000b8d901eae7526555669f0b36b838dc118635262c00000000000000000000000095746ce37cbc36fee4403f26d61eaf136bffa75100000000000000000000000080a2d67fd855a9cd61bc071c0a1c34d0d2279f7b000000000000000000000000835f7ea8be9fb4cad04dbc759fb17b658df13d61

Arg [0] (address) : 0xa374f41c58a3752d1a7e89e6763cf73524051ea2
Arg [1] (address) : 0xb8d901eae7526555669f0b36b838dc118635262c
Arg [2] (address) : 0x95746ce37cbc36fee4403f26d61eaf136bffa751
Arg [3] (address) : 0x80a2d67fd855a9cd61bc071c0a1c34d0d2279f7b
Arg [4] (address) : 0x835f7ea8be9fb4cad04dbc759fb17b658df13d61

              

contracts/vote/VotePower.sol

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/INineInchPool.sol";
import "./interfaces/INineInchFlexiblePool.sol";
import "./interfaces/INineInchFactory.sol";
import "./interfaces/IMasterChef.sol";
import "./interfaces/INineInchPair.sol";

contract VotePower is Ownable {
    IERC20 public immutable token;
    INineInchFactory public immutable factory;
    IMasterChef public immutable masterChef;
    INineInchPool public immutable vault;
    INineInchFlexiblePool public immutable flexibleVault;
    uint256 public multiplier = 10;
    uint256 public constant MAX_MULTIPLIER = 100;

    event AddressUpdated(address _address);
    event NewDurationThreshold(uint256 DURATION_THRESHOLD);
    event NewDurationBoostFactor(uint256 DURATION_BOOST_FACTOR);

    constructor(address _token, address _factory, address _masterChef, address _vault, address _flexibleVault) {
        token = IERC20(_token);
        factory = INineInchFactory(_factory);
        masterChef = IMasterChef(_masterChef);
        vault = INineInchPool(_vault);
        flexibleVault = INineInchFlexiblePool(_flexibleVault);
    }

    function setLpMutiplier(uint256 _multiplier) external onlyOwner {
        require(_multiplier != 0, "Cannot be zero value");
        require(_multiplier < MAX_MULTIPLIER, "Must be less than MAX_MULTIPLIER");
        multiplier = _multiplier;
    }

    function getTokenBalance(address _user) public view returns (uint256) {
        return token.balanceOf(_user);
    }

    function getTokenBalanceFlexible(address _user) public view returns (uint256) {
        uint256 balance;
        (uint256 share, , , , , , uint256 userBoostedShare, bool locked, ) = vault.userInfo(_user);
        uint256 nineinchPoolPricePerFullShare = vault.getPricePerFullShare();
        if (!locked && share > 0) {
            balance += (share * nineinchPoolPricePerFullShare) / 1e18 - userBoostedShare;
        } else if(locked && share > 0) {
            (uint256 shareForFlexiblePool, , , ) = flexibleVault.userInfo(_user);
            uint256 nineinchFlexiblePoolPricePerFullShare = flexibleVault.getPricePerFullShare();
            if (shareForFlexiblePool > 0) {
                balance += (shareForFlexiblePool * nineinchFlexiblePoolPricePerFullShare) / 1e18;
            }
        }
        return balance;
    }

    function getTokenBalanceLocked(address _user) public view returns (uint256) {
        ( , , uint256 lastUserActionAmount, , , , , bool locked, ) = vault.userInfo(_user);
        return locked ? lastUserActionAmount : 0;
    }

    function getTokenBalanceInLiquidity(address _user) public view returns (uint256) {
        uint256 _length = factory.allPairsLength();
        uint256 _total = 0;
        for(uint256 _pid = 0; _pid < _length; _pid++) {
            address _lp = factory.allPairs(_pid);
            INineInchPair _pair = INineInchPair(_lp);
            address _token0 = _pair.token0();
            address _token1 = _pair.token1();
            if(address(token) == _token0 || address(token) == _token1) {
                uint256 _balance = INineInchPair(_lp).balanceOf(_user);
                if(_balance==0)
                    continue;
                uint256 _totalSupply = _pair.totalSupply();
                (uint256 _reserve0, uint256 _reserve1, ) = _pair.getReserves();
                _total += _balance * (address(token) == _token0 ? _reserve0 : _reserve1) / _totalSupply;
            }
        }
        return _total;
    }

    function getTokenBalanceInFarms(address _user) public view returns (uint256) {
        uint256 _length = masterChef.poolLength();
        uint256 _total = 0;
        for(uint256 _pid = 1; _pid < _length; _pid++) {
            address _lp = masterChef.lpToken(_pid);
            INineInchPair _pair = INineInchPair(_lp);
            address _token0 = _pair.token0();
            address _token1 = _pair.token1();
            if(address(token) == _token0 || address(token) == _token1) {
                (uint256 _staked, ) = masterChef.userInfo(_pid, _user);
                if(_staked==0)
                    continue;
                uint256 _totalSupply = _pair.totalSupply();
                (uint256 _reserve0, uint256 _reserve1, ) = _pair.getReserves();
                _total += _staked * (address(token) == _token0 ? _reserve0 : _reserve1) / _totalSupply;
            }
        }
        return _total;
    }

    function getVotingPower(address _user) public view returns (uint256) {
        return getVotingPowerWithoutLps(_user) + (getTokenBalanceInLiquidity(_user) + getTokenBalanceInFarms(_user)) * multiplier / MAX_MULTIPLIER;
    }

    function getVotingPowerWithoutLps(address _user) public view returns (uint256) {
        return
            getTokenBalance(_user) +
            getTokenBalanceLocked(_user) +
            getTokenBalanceFlexible(_user);
    }
}
        

@openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
          

@openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
          

contracts/vote/interfaces/IERC20.sol

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC20 {
  /**
   * @dev Returns the amount of tokens owned by `account`.
   */
  function balanceOf(address account) external view returns (uint256);
}
          

contracts/vote/interfaces/IMasterChef.sol

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IMasterChef {
  function userInfo(uint256 _pid, address _user) external view returns (uint256, uint256);
  function poolLength() external view returns (uint256);
  function lpToken(uint256 _pid) external view returns (address);
}
          

contracts/vote/interfaces/INineInchFactory.sol

// SPDX-License-Identifier: GPLv3
pragma solidity 0.8.19;

interface INineInchFactory {
    event PairCreated(
        address indexed token0,
        address indexed token1,
        address pair,
        uint
    );

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function getPair(
        address tokenA,
        address tokenB
    ) external view returns (address pair);

    function allPairs(uint) external view returns (address pair);

    function allPairsLength() external view returns (uint);

    function createPair(
        address tokenA,
        address tokenB
    ) external returns (address pair);

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;
}
          

contracts/vote/interfaces/INineInchFlexiblePool.sol

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface INineInchFlexiblePool {
  function userInfo(address _user) external view returns (uint256, uint256, uint256, uint256);
  function getPricePerFullShare() external view returns (uint256);
}
          

contracts/vote/interfaces/INineInchPair.sol

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface INineInchPair {
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint256 amount0In,
        uint256 amount1In,
        uint256 amount0Out,
        uint256 amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to) external returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}
          

contracts/vote/interfaces/INineInchPool.sol

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface INineInchPool {
  function userInfo(address _user) external view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool, uint256);
  function getPricePerFullShare() external view returns (uint256);
}
          

Compiler Settings

{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers"]}},"optimizer":{"runs":999999,"enabled":true},"libraries":{}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"address","name":"_factory","internalType":"address"},{"type":"address","name":"_masterChef","internalType":"address"},{"type":"address","name":"_vault","internalType":"address"},{"type":"address","name":"_flexibleVault","internalType":"address"}]},{"type":"event","name":"AddressUpdated","inputs":[{"type":"address","name":"_address","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewDurationBoostFactor","inputs":[{"type":"uint256","name":"DURATION_BOOST_FACTOR","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewDurationThreshold","inputs":[{"type":"uint256","name":"DURATION_THRESHOLD","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_MULTIPLIER","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract INineInchFactory"}],"name":"factory","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract INineInchFlexiblePool"}],"name":"flexibleVault","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTokenBalance","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTokenBalanceFlexible","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTokenBalanceInFarms","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTokenBalanceInLiquidity","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTokenBalanceLocked","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getVotingPower","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getVotingPowerWithoutLps","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IMasterChef"}],"name":"masterChef","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"multiplier","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setLpMutiplier","inputs":[{"type":"uint256","name":"_multiplier","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"token","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract INineInchPool"}],"name":"vault","inputs":[]}]
              

Contract Creation Code

0x610120604052600a6001553480156200001757600080fd5b5060405162001a9e38038062001a9e8339810160408190526200003a91620000dc565b62000045336200006f565b6001600160a01b0394851660805292841660a05290831660c052821660e05216610100526200014c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000d757600080fd5b919050565b600080600080600060a08688031215620000f557600080fd5b6200010086620000bf565b94506200011060208701620000bf565b93506200012060408701620000bf565b92506200013060608701620000bf565b91506200014060808701620000bf565b90509295509295909350565b60805160a05160c05160e05161010051611896620002086000396000818161018201528181610d830152610df90152600081816102d10152818161039d01528181610b890152610c4e0152600081816101e1015281816105cc0152818161069a015261090001526000818161027101528181610f82015261104f0152600081816102f801528181610474015281816108200152818161087501528181610aa5015281816111d50152818161122a015261143201526118966000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063715018a6116100b2578063db9bc58311610081578063f8d6c4bc11610066578063f8d6c4bc146102b9578063fbfa77cf146102cc578063fc0c546a146102f357600080fd5b8063db9bc58314610293578063f2fde38b146102a657600080fd5b8063715018a6146102335780638da5cb5b1461023b578063bb4d443614610259578063c45a01551461026c57600080fd5b80633aecd0e3116101095780635d6a618d116100ee5780635d6a618d146102035780635f1243631461020b5780636c205a241461022057600080fd5b80633aecd0e3146101c9578063575a86b2146101dc57600080fd5b806319afae841461013b5780631a2c6a9e146101615780631b3ed722146101745780632c0a5eae1461017d575b600080fd5b61014e6101493660046115c8565b61031a565b6040519081526020015b60405180910390f35b61014e61016f3660046115c8565b610351565b61014e60015481565b6101a47f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610158565b61014e6101d73660046115c8565b61042c565b6101a47f000000000000000000000000000000000000000000000000000000000000000081565b61014e606481565b61021e6102193660046115ec565b6104e1565b005b61014e61022e3660046115c8565b6105c7565b61021e610b2b565b60005473ffffffffffffffffffffffffffffffffffffffff166101a4565b61014e6102673660046115c8565b610b3f565b6101a47f000000000000000000000000000000000000000000000000000000000000000081565b61014e6102a13660046115c8565b610b7f565b61021e6102b43660046115c8565b610ec6565b61014e6102c73660046115c8565b610f7d565b6101a47f000000000000000000000000000000000000000000000000000000000000000081565b6101a47f000000000000000000000000000000000000000000000000000000000000000081565b600061032582610b7f565b61032e83610351565b6103378461042c565b6103419190611634565b61034b9190611634565b92915050565b6040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152600091829182917f000000000000000000000000000000000000000000000000000000000000000090911690631959a0029060240161012060405180830381865afa1580156103e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040b9190611647565b509750505050509350505080610422576000610424565b815b949350505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156104bd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034b91906116c0565b6104e96114b0565b80600003610558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f43616e6e6f74206265207a65726f2076616c756500000000000000000000000060448201526064015b60405180910390fd5b606481106105c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4d757374206265206c657373207468616e204d41585f4d554c5449504c494552604482015260640161054f565b600155565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663081e3eda6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610635573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065991906116c0565b9050600060015b82811015610b23576040517f78ed5d1f000000000000000000000000000000000000000000000000000000008152600481018290526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906378ed5d1f90602401602060405180830381865afa1580156106f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071a91906116d9565b9050600081905060008173ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa15801561076e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079291906116d9565b905060008273ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080591906116d9565b90508173ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614806108ac57508073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16145b15610b0c576040517f93f1a40b0000000000000000000000000000000000000000000000000000000081526004810186905273ffffffffffffffffffffffffffffffffffffffff8a811660248301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906393f1a40b906044016040805180830381865afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c91906116f6565b50905080600003610981575050505050610b11565b60008473ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f291906116c0565b90506000808673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a66919061173d565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150828673ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610ae55781610ae7565b825b610af1908661178d565b610afb91906117a4565b610b05908b611634565b9950505050505b505050505b80610b1b816117df565b915050610660565b509392505050565b610b336114b0565b610b3d6000611531565b565b60006064600154610b4f846105c7565b610b5885610f7d565b610b629190611634565b610b6c919061178d565b610b7691906117a4565b6103418361031a565b60008060008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631959a002876040518263ffffffff1660e01b8152600401610bfc919073ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b61012060405180830381865afa158015610c1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3e9190611647565b50975097505050505050925060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdb91906116c0565b905081158015610ceb5750600084115b15610d295782670de0b6b3a7640000610d04838761178d565b610d0e91906117a4565b610d189190611817565b610d229086611634565b9450610ebb565b818015610d365750600084115b15610ebb576040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690631959a00290602401608060405180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df0919061182a565b505050905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8691906116c0565b90508115610eb857670de0b6b3a7640000610ea1828461178d565b610eab91906117a4565b610eb59088611634565b96505b50505b509295945050505050565b610ece6114b0565b73ffffffffffffffffffffffffffffffffffffffff8116610f71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161054f565b610f7a81611531565b50565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663574f2ba36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610feb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100f91906116c0565b90506000805b82811015610b23576040517f1e3dd18b000000000000000000000000000000000000000000000000000000008152600481018290526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690631e3dd18b90602401602060405180830381865afa1580156110ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cf91906116d9565b9050600081905060008173ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611123573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114791906116d9565b905060008273ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611196573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ba91906116d9565b90508173ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16148061126157508073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16145b15611499576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152600091908616906370a0823190602401602060405180830381865afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fa91906116c0565b90508060000361130e57505050505061149e565b60008473ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561135b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137f91906116c0565b90506000808673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156113cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f3919061173d565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150828673ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16146114725781611474565b825b61147e908661178d565b61148891906117a4565b611492908b611634565b9950505050505b505050505b806114a8816117df565b915050611015565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161054f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff81168114610f7a57600080fd5b6000602082840312156115da57600080fd5b81356115e5816115a6565b9392505050565b6000602082840312156115fe57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561034b5761034b611605565b60008060008060008060008060006101208a8c03121561166657600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a015180151581146116a757600080fd5b809250506101008a015190509295985092959850929598565b6000602082840312156116d257600080fd5b5051919050565b6000602082840312156116eb57600080fd5b81516115e5816115a6565b6000806040838503121561170957600080fd5b505080516020909101519092909150565b80516dffffffffffffffffffffffffffff8116811461173857600080fd5b919050565b60008060006060848603121561175257600080fd5b61175b8461171a565b92506117696020850161171a565b9150604084015163ffffffff8116811461178257600080fd5b809150509250925092565b808202811582820484141761034b5761034b611605565b6000826117da577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361181057611810611605565b5060010190565b8181038181111561034b5761034b611605565b6000806000806080858703121561184057600080fd5b50508251602084015160408501516060909501519196909550909250905056fea2646970667358221220a145ca416a0fade6fe58417e6e5d6c65ff17f31f394c6d17d85fccb7d968968864736f6c63430008130033000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea2000000000000000000000000b8d901eae7526555669f0b36b838dc118635262c00000000000000000000000095746ce37cbc36fee4403f26d61eaf136bffa75100000000000000000000000080a2d67fd855a9cd61bc071c0a1c34d0d2279f7b000000000000000000000000835f7ea8be9fb4cad04dbc759fb17b658df13d61

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101365760003560e01c8063715018a6116100b2578063db9bc58311610081578063f8d6c4bc11610066578063f8d6c4bc146102b9578063fbfa77cf146102cc578063fc0c546a146102f357600080fd5b8063db9bc58314610293578063f2fde38b146102a657600080fd5b8063715018a6146102335780638da5cb5b1461023b578063bb4d443614610259578063c45a01551461026c57600080fd5b80633aecd0e3116101095780635d6a618d116100ee5780635d6a618d146102035780635f1243631461020b5780636c205a241461022057600080fd5b80633aecd0e3146101c9578063575a86b2146101dc57600080fd5b806319afae841461013b5780631a2c6a9e146101615780631b3ed722146101745780632c0a5eae1461017d575b600080fd5b61014e6101493660046115c8565b61031a565b6040519081526020015b60405180910390f35b61014e61016f3660046115c8565b610351565b61014e60015481565b6101a47f000000000000000000000000835f7ea8be9fb4cad04dbc759fb17b658df13d6181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610158565b61014e6101d73660046115c8565b61042c565b6101a47f00000000000000000000000095746ce37cbc36fee4403f26d61eaf136bffa75181565b61014e606481565b61021e6102193660046115ec565b6104e1565b005b61014e61022e3660046115c8565b6105c7565b61021e610b2b565b60005473ffffffffffffffffffffffffffffffffffffffff166101a4565b61014e6102673660046115c8565b610b3f565b6101a47f000000000000000000000000b8d901eae7526555669f0b36b838dc118635262c81565b61014e6102a13660046115c8565b610b7f565b61021e6102b43660046115c8565b610ec6565b61014e6102c73660046115c8565b610f7d565b6101a47f00000000000000000000000080a2d67fd855a9cd61bc071c0a1c34d0d2279f7b81565b6101a47f000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea281565b600061032582610b7f565b61032e83610351565b6103378461042c565b6103419190611634565b61034b9190611634565b92915050565b6040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152600091829182917f00000000000000000000000080a2d67fd855a9cd61bc071c0a1c34d0d2279f7b90911690631959a0029060240161012060405180830381865afa1580156103e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040b9190611647565b509750505050509350505080610422576000610424565b815b949350505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301526000917f000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea2909116906370a0823190602401602060405180830381865afa1580156104bd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034b91906116c0565b6104e96114b0565b80600003610558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f43616e6e6f74206265207a65726f2076616c756500000000000000000000000060448201526064015b60405180910390fd5b606481106105c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4d757374206265206c657373207468616e204d41585f4d554c5449504c494552604482015260640161054f565b600155565b6000807f00000000000000000000000095746ce37cbc36fee4403f26d61eaf136bffa75173ffffffffffffffffffffffffffffffffffffffff1663081e3eda6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610635573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065991906116c0565b9050600060015b82811015610b23576040517f78ed5d1f000000000000000000000000000000000000000000000000000000008152600481018290526000907f00000000000000000000000095746ce37cbc36fee4403f26d61eaf136bffa75173ffffffffffffffffffffffffffffffffffffffff16906378ed5d1f90602401602060405180830381865afa1580156106f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071a91906116d9565b9050600081905060008173ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa15801561076e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079291906116d9565b905060008273ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080591906116d9565b90508173ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea273ffffffffffffffffffffffffffffffffffffffff1614806108ac57508073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea273ffffffffffffffffffffffffffffffffffffffff16145b15610b0c576040517f93f1a40b0000000000000000000000000000000000000000000000000000000081526004810186905273ffffffffffffffffffffffffffffffffffffffff8a811660248301526000917f00000000000000000000000095746ce37cbc36fee4403f26d61eaf136bffa751909116906393f1a40b906044016040805180830381865afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c91906116f6565b50905080600003610981575050505050610b11565b60008473ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f291906116c0565b90506000808673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a66919061173d565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150828673ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea273ffffffffffffffffffffffffffffffffffffffff1614610ae55781610ae7565b825b610af1908661178d565b610afb91906117a4565b610b05908b611634565b9950505050505b505050505b80610b1b816117df565b915050610660565b509392505050565b610b336114b0565b610b3d6000611531565b565b60006064600154610b4f846105c7565b610b5885610f7d565b610b629190611634565b610b6c919061178d565b610b7691906117a4565b6103418361031a565b60008060008060007f00000000000000000000000080a2d67fd855a9cd61bc071c0a1c34d0d2279f7b73ffffffffffffffffffffffffffffffffffffffff16631959a002876040518263ffffffff1660e01b8152600401610bfc919073ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b61012060405180830381865afa158015610c1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3e9190611647565b50975097505050505050925060007f00000000000000000000000080a2d67fd855a9cd61bc071c0a1c34d0d2279f7b73ffffffffffffffffffffffffffffffffffffffff166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdb91906116c0565b905081158015610ceb5750600084115b15610d295782670de0b6b3a7640000610d04838761178d565b610d0e91906117a4565b610d189190611817565b610d229086611634565b9450610ebb565b818015610d365750600084115b15610ebb576040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301526000917f000000000000000000000000835f7ea8be9fb4cad04dbc759fb17b658df13d6190911690631959a00290602401608060405180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df0919061182a565b505050905060007f000000000000000000000000835f7ea8be9fb4cad04dbc759fb17b658df13d6173ffffffffffffffffffffffffffffffffffffffff166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8691906116c0565b90508115610eb857670de0b6b3a7640000610ea1828461178d565b610eab91906117a4565b610eb59088611634565b96505b50505b509295945050505050565b610ece6114b0565b73ffffffffffffffffffffffffffffffffffffffff8116610f71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161054f565b610f7a81611531565b50565b6000807f000000000000000000000000b8d901eae7526555669f0b36b838dc118635262c73ffffffffffffffffffffffffffffffffffffffff1663574f2ba36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610feb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100f91906116c0565b90506000805b82811015610b23576040517f1e3dd18b000000000000000000000000000000000000000000000000000000008152600481018290526000907f000000000000000000000000b8d901eae7526555669f0b36b838dc118635262c73ffffffffffffffffffffffffffffffffffffffff1690631e3dd18b90602401602060405180830381865afa1580156110ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cf91906116d9565b9050600081905060008173ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611123573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114791906116d9565b905060008273ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611196573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ba91906116d9565b90508173ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea273ffffffffffffffffffffffffffffffffffffffff16148061126157508073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea273ffffffffffffffffffffffffffffffffffffffff16145b15611499576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152600091908616906370a0823190602401602060405180830381865afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fa91906116c0565b90508060000361130e57505050505061149e565b60008473ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561135b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137f91906116c0565b90506000808673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156113cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f3919061173d565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150828673ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000a374f41c58a3752d1a7e89e6763cf73524051ea273ffffffffffffffffffffffffffffffffffffffff16146114725781611474565b825b61147e908661178d565b61148891906117a4565b611492908b611634565b9950505050505b505050505b806114a8816117df565b915050611015565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161054f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff81168114610f7a57600080fd5b6000602082840312156115da57600080fd5b81356115e5816115a6565b9392505050565b6000602082840312156115fe57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561034b5761034b611605565b60008060008060008060008060006101208a8c03121561166657600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a015180151581146116a757600080fd5b809250506101008a015190509295985092959850929598565b6000602082840312156116d257600080fd5b5051919050565b6000602082840312156116eb57600080fd5b81516115e5816115a6565b6000806040838503121561170957600080fd5b505080516020909101519092909150565b80516dffffffffffffffffffffffffffff8116811461173857600080fd5b919050565b60008060006060848603121561175257600080fd5b61175b8461171a565b92506117696020850161171a565b9150604084015163ffffffff8116811461178257600080fd5b809150509250925092565b808202811582820484141761034b5761034b611605565b6000826117da577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361181057611810611605565b5060010190565b8181038181111561034b5761034b611605565b6000806000806080858703121561184057600080fd5b50508251602084015160408501516060909501519196909550909250905056fea2646970667358221220a145ca416a0fade6fe58417e6e5d6c65ff17f31f394c6d17d85fccb7d968968864736f6c63430008130033