Contract 0x07780f3b498a60c5086e342e605a1b9bc4f61a61

Contract Overview

Balance:
0 HT

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x41afb86efda133a04aa13ba2c0960c6f8544e14495cda09ac00bc27ec331386aVote Sub Transfe...103446222021-11-26 11:03:1911 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000062975 1
0x10a64450ad415f1be4b28b0284cbe527a6d4ccfed06b64129b5e0c3a6d373b77Vote Sub Transfe...103445672021-11-26 11:00:3411 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000033512 1
0x0ee10e342f160adae5c3e38a846d22544f16573fb107facf31cd29fd601400d3Vote Sub Transfe...103445412021-11-26 10:59:1611 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000080075 1
0xeee606d76eeba486d6e2fa6917a0275788ca02b139246bb68912bc0b5e78c3b0Vote Sub Transfe...103444952021-11-26 10:56:5811 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000026678 1
0x91dbbd2643a0c2f7fdd71232dae2cc0b3ffb881d0db5a33cfd00c2d496edb85bVote Add103444262021-11-26 10:53:3111 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000030734 1
0x1284b994bb1a12cbcd254b9f913534ae3c6e6b088130b4302b4a79e1cdbc344fVote Sub103444132021-11-26 10:52:5211 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000024142 1
0x1fa33240f614b6614294de5c584374810656986fb87834943060c8d946f4d008Vote Sub103443892021-11-26 10:51:4011 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000053861 1
0x895d0973d49931b94d6e9bcd8d6d49f28637455527f584ca1812532b718dcc56Reset Candidate103443842021-11-26 10:51:2511 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000035439 1
0x5beba707451a7e3a97c7a149ba4d460df7c85ee06f6940db8e21d38185f44facReset Paused103443402021-11-26 10:49:1311 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000030196 1
0x42a9904a44105aa82f145fce8f416c12a2be09e794d4bb4ebe6383152566c614Vote Add103443242021-11-26 10:48:2511 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000024181 1
0xa9b7f1cba47b81a9dd16c3fe3e44ef56fcd5f72a7416cab34fa069e421660e80Vote Sub103442892021-11-26 10:46:4011 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000053861 1
0x31e9b8d304af4dde8336345a5890222aad0565deb40c1599717c97bc35302b09Reset Paused103442712021-11-26 10:45:4611 days 7 hrs ago0x76d3957f50d80e9f624e34dc8a1c751c4c86ffe9 IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000030208 1
0x6cf5d2a3537c3ada507543e273a0a60fda3c591650d7eaff51b71804a48285c1Vote Sub103441962021-11-26 10:42:0111 days 7 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000053861 1
0xcf4d56048391d747cb19c270db34ea0ece288d87e71bdac8128123326c24341cVote Sub103441032021-11-26 10:37:2211 days 7 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.00004352 1
0x72203f05477d5248249c0fdee5e1266539f1b40eb90f6af6a44673381f70b87bVote Sub103440102021-11-26 10:32:4311 days 7 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000053861 1
0xe4d30ce124d8104668cd4c8d66043b71266c05d74f26ad6f715ccb06100dce80Vote Sub103439682021-11-26 10:30:3711 days 7 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.00002419 1
0x71d92c098b6d7fcdf23ab8bb283dd35827133afe6bf1ce43685f3f003dc784abVote Add103439242021-11-26 10:28:2511 days 8 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000032848 1
0xe7b9c0465e9e3e3ec1815a929dfc3ff8ea12760ee1b0524276d8c19378a60855Vote Add103439182021-11-26 10:28:0711 days 8 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.00008613 1
0xa33724eaaa4c4308086e95c893d32d7951b73af461398318db37f7035240a62aVote Add103429672021-11-26 9:40:3411 days 8 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000072183 1
0x5bdd2cba4055cb72497e63ef38c9b616ac480cdc331531af30da6e1942734a52Vote Add103425042021-11-26 9:17:2511 days 9 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.00008133 1
0x87ec70a3fce4fe439fa212f276d665832e79feacbc24140a399ed18ac4a4a594Vote Add103424622021-11-26 9:15:1911 days 9 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.00013263 1
0x11c65d090fc5a466b5d76c9202092b69a4a0e8393e071634439ace4a9b3b8a6cVote Add103424122021-11-26 9:12:4911 days 9 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000117987 1
0x1ec8befe1b174f6017330c9b1ec873bd2caf0b0fc77fad529c1d63b6ecdfe9d4Vote Add103423382021-11-26 9:09:0711 days 9 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000117987 1
0x241e0e4a16ecc9e2c0e73d24bc116f407ef3ef8e8210a8472cf6951b71f33881Vote Add103423122021-11-26 9:07:4911 days 9 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000117987 1
0xa4605eb14af534f09a015441ad37417759152dd5f6c79d64e792887415af5bb1Vote Add103422962021-11-26 9:07:0111 days 9 hrs ago0x5433bfd13b86ffe533223f2d0a7e4e647e66396e IN 0x07780f3b498a60c5086e342e605a1b9bc4f61a610 HT0.000117987 1
[ Download CSV Export 
Latest 14 internal transactions
Parent Txn Hash Block From To Value
0x41afb86efda133a04aa13ba2c0960c6f8544e14495cda09ac00bc27ec331386a103446222021-11-26 11:03:1911 days 7 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0x0ee10e342f160adae5c3e38a846d22544f16573fb107facf31cd29fd601400d3103445412021-11-26 10:59:1611 days 7 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0xe7b9c0465e9e3e3ec1815a929dfc3ff8ea12760ee1b0524276d8c19378a60855103439182021-11-26 10:28:0711 days 8 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0xa33724eaaa4c4308086e95c893d32d7951b73af461398318db37f7035240a62a103429672021-11-26 9:40:3411 days 8 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0x5bdd2cba4055cb72497e63ef38c9b616ac480cdc331531af30da6e1942734a52103425042021-11-26 9:17:2511 days 9 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0x87ec70a3fce4fe439fa212f276d665832e79feacbc24140a399ed18ac4a4a594103424622021-11-26 9:15:1911 days 9 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0x11c65d090fc5a466b5d76c9202092b69a4a0e8393e071634439ace4a9b3b8a6c103424122021-11-26 9:12:4911 days 9 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0x1ec8befe1b174f6017330c9b1ec873bd2caf0b0fc77fad529c1d63b6ecdfe9d4103423382021-11-26 9:09:0711 days 9 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0x241e0e4a16ecc9e2c0e73d24bc116f407ef3ef8e8210a8472cf6951b71f33881103423122021-11-26 9:07:4911 days 9 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0xa4605eb14af534f09a015441ad37417759152dd5f6c79d64e792887415af5bb1103422962021-11-26 9:07:0111 days 9 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0xdfcce0ccc58fbb63af4e114d543a41952884e466bc89e8b0b687bba28e0dcadd103421902021-11-26 9:01:4311 days 9 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0x5c96ed35d09fb2f32bc0a59f57719aa0031a9a9c108990f8ca8698ff75c7e011103421222021-11-26 8:58:1911 days 9 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0xeae1897dd5eddc0322aa1b3b9e35dcea43aaaaf41559a420f63110d14b10f421103413552021-11-26 8:19:5811 days 10 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
0x28c1a2237c21790e10c7e86ed8a126b4f09adb252dd54c252605ee3178f47492103413302021-11-26 8:18:4311 days 10 hrs ago 0x07780f3b498a60c5086e342e605a1b9bc4f61a61 0xeae9c24b32aec44b810474a0e14387d21b41a6310 HT
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingVote

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 15 : HotWalletTransfer.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;

import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";

contract HotWalletTransfer {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    event BatchTransfer(address indexed token, uint256 totalCount, uint256 totalAmount);

    function batchTransfer(address token, address[] calldata tos,uint256[] calldata amounts) public{
        require(token != address(0), "Token is the zero address");
        require(tos.length == amounts.length,"The lengths must match");

        uint256 totalAmount = 0;
        for(uint256 i = 0; i < tos.length; i++){
            address to = tos[i];
            uint256 amount = amounts[i];
            totalAmount = totalAmount.add(amount);
            IERC20(token).safeTransferFrom(msg.sender, to, amount);
        }

        emit BatchTransfer(token, tos.length, totalAmount);
    }
}

File 2 of 15 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 3 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 15 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

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

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 5 of 15 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 6 of 15 : StakingVote.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;
//pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "./interfaces/IStakingVote.sol";

contract StakingVote is IStakingVote{
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    modifier validChairperson(){
        require(msg.sender == chairperson, "Illegal operation");
        _;
    }

    modifier validCandidate(address candidate){
        uint pid = candidatePidMapping[candidate];
        require(pid != 0, "Candidate not exist");
        require(candidates[pid-1].legal,"Not a legitimate candidate");
        _;
    }

    modifier validPaused(){
        require(!paused, "Voting has been suspended");
        _;
    }

    constructor(address _underlying, uint _perFee, address _feeTo, uint _voteAddMin, uint _voteSubMin, uint _candidateMax){
        chairperson = msg.sender;
        underlying = _underlying;
        perFee = _perFee;
        feeTo = _feeTo;
        voteAddMin = _voteAddMin;
        voteSubMin = _voteSubMin;
        candidateMax = _candidateMax;
    }

//    function initializeVote(address _underlying, uint _perFee,
//        address _feeTo, uint _voteAddMin, uint _voteSubMin,
//        uint _candidateMax) public{
//        underlying = _underlying;
//        perFee = _perFee;
//        feeTo = _feeTo;
//        voteAddMin = _voteAddMin;
//        voteSubMin = _voteSubMin;
//        candidateMax = _candidateMax;
//    }

    function resetChairperson(address payable newChairperson) external override validChairperson{
        address oldChairperson = chairperson;
        chairperson = newChairperson;
        emit ResetChairperson(oldChairperson, newChairperson);
    }

    function resetPaused(bool _paused) external override validChairperson{
        require(paused != _paused, "Illegal operation");
        paused = _paused;

        emit ResetPaused(!_paused, _paused);
    }

    function resetPerFee(uint _perFee) external override validChairperson{
        require(_perFee <= perFeeMax,"PerFee must be less than perFeeMax");
        uint oldPerFee = perFee;
        perFee = _perFee;

        emit ResetPerFee(oldPerFee, _perFee);
    }

    function resetFeeTo(address _feeTo) external override validChairperson{
        address oldFeeTo = feeTo;
        feeTo = _feeTo;

        emit ResetFeeTo(oldFeeTo, _feeTo);
    }

    function resetVoteAddMin(uint _voteAddMin) external override validChairperson{
        uint oldVoteAddMin = voteAddMin;
        voteAddMin = _voteAddMin;

        emit ResetVoteAddMin(oldVoteAddMin, _voteAddMin);
    }

    function resetVoteSubMin(uint _voteSubMin) external override validChairperson{
        uint oldVoteSubMin = voteSubMin;
        voteSubMin = _voteSubMin;

        emit ResetVoteSubMin(oldVoteSubMin, _voteSubMin);
    }

    function resetCandidateMax(uint _candidateMax) external override validChairperson{
        uint oldCandidateMax = candidateMax;
        candidateMax = _candidateMax;

        emit ResetCandidateMax(oldCandidateMax, _candidateMax);
    }

    function resetCandidate(address _candidate, bool _legal) external override validChairperson{
        uint pid = candidatePidMapping[_candidate];
        require(pid != 0, "Candidate not exist");
        Candidate storage candidate = candidates[pid-1];
        require(candidate.legal != _legal, "Illegal operation");

        candidate.legal = _legal;
        emit ResetCandidate(_candidate, !_legal, _legal);
    }

    function becomeCandidate(address _candidate) external override validPaused validChairperson{
        require(candidatesLength() < candidateMax, "The maximum number of candidates has been exceeded");

        uint pid = candidatePidMapping[_candidate];
        require(pid == 0, "Candidate already exists");

        Candidate memory candidate = Candidate({
            candidate: _candidate,
            legal: true,
            totalVote: 0
        });

        candidates.push(candidate);
        candidatePidMapping[_candidate] = candidates.length;

        emit BecomeCandidate(_candidate, candidates.length);
    }

    function voteAdd(address candidate, uint amount) external override validPaused validCandidate(candidate){
        require(amount >= voteAddMin,"Less than the minimum vote");
        vote(candidate, amount, 0);
    }

    function voteSub(address candidate, uint amount) external override{
        require(amount >= voteSubMin,"Less than the minimum vote");
        require(amount > perFee, "Less than the perFee");
        uint pid = candidatePidMapping[candidate];
        require(pid != 0, "Candidate not exist");

        vote(candidate, 0, amount);
    }

    function vote(address _candidate, uint amountIn, uint amountOut) internal{
        require(amountIn == 0 || amountOut == 0,"Illegal operation");

        uint pid = candidatePidMapping[_candidate];
        Candidate storage candidate = candidates[pid-1];

        if(amountIn != 0){
            totalVote = totalVote.add(amountIn);
            candidate.totalVote = candidate.totalVote.add(amountIn);
            candidateVoterMapping[_candidate][msg.sender] = candidateVoterMapping[_candidate][msg.sender].add(amountIn);
            voterMapping[msg.sender].totalUnderlying = voterMapping[msg.sender].totalUnderlying.add(amountIn);
            voterMapping[msg.sender].totalVote = voterMapping[msg.sender].totalVote.add(amountIn);

            IERC20(underlying).safeTransferFrom(msg.sender, address(this), amountIn);
        }else if(amountOut != 0){
            totalVote = totalVote.sub(amountOut);
            candidate.totalVote = candidate.totalVote.sub(amountOut);
            candidateVoterMapping[_candidate][msg.sender] = candidateVoterMapping[_candidate][msg.sender].sub(amountOut);
            voterMapping[msg.sender].totalVote = voterMapping[msg.sender].totalVote.sub(amountOut);
        }

        emit Vote(_candidate, msg.sender, amountIn, amountOut);
    }

    function voteSubTransfer(address candidate, address voter, uint amount) external override validChairperson {
        require(amount > perFee, "The transfer amount should be greater than perFee");

        uint pid = candidatePidMapping[candidate];
        require(pid != 0, "Candidate not exist");
        require(voterMapping[voter].totalUnderlying > voterMapping[voter].totalVote, "The totalUnderlying should be greater than totalVote");

        voterMapping[voter].totalUnderlying = voterMapping[voter].totalUnderlying.sub(amount);
        totalFee = totalFee.add(perFee);

        IERC20(underlying).safeTransfer(voter, amount.sub(perFee));

        emit VoteSubTransfer(candidate, voter, amount, perFee);
    }

    function withdrawTotalFee(uint amount) external override validChairperson{
        amount = amount == 0 ? totalFee : amount;
        require(amount > 0 && amount <= totalFee, "TotalFee not enough");

        totalFee = totalFee.sub(amount);
        IERC20(underlying).safeTransfer(feeTo, amount);

        emit WithdrawTotalFee(feeTo, amount);
    }

    function underlyingBalance() public view override returns(uint){
        return IERC20(underlying).balanceOf(address(this));
    }

    function stakingUnderlyingBalance() public view override returns(uint){
        return underlyingBalance().sub(totalFee);
    }

    function candidateInfo(address _candidate) public view override returns(bool,uint){
        uint pid = candidatePidMapping[_candidate];
        if(pid == 0){
            return (false,0);
        }
        Candidate storage candidate = candidates[pid-1];

        return (candidate.legal,candidate.totalVote);
    }

    function voterInfo(address voter) public view override returns(uint,uint){
        return (voterMapping[voter].totalUnderlying,voterMapping[voter].totalVote);
    }

    function candidateVoterInfo(address candidate,address _voter) public view override returns(uint){
        return candidateVoterMapping[candidate][_voter];
    }

    function candidatesLength() public view override returns (uint) {
        return candidates.length;
    }
}

File 7 of 15 : IStakingVote.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;
pragma experimental ABIEncoderV2;

import "../StakingVoteStorage.sol";

abstract contract IStakingVote is StakingVoteStorage{

    event ResetChairperson(address indexed oldChairperson, address indexed newChairperson);
    event ResetPaused(bool oldPaused, bool newPaused);
    event ResetPerFee(uint oldPerFee, uint newPerFee);
    event ResetFeeTo(address oldFeeTo, address newFeeTo);
    event ResetVoteAddMin(uint oldVoteAddMin, uint newVoteAddMin);
    event ResetVoteSubMin(uint oldVoteSubMin, uint newVoteSubMin);
    event ResetCandidateMax(uint oldCandidateMax, uint newCandidateMax);
    event ResetCandidate(address indexed candidate, bool oldLegal, bool newLegal);
    event BecomeCandidate(address indexed candidate, uint length);
    event Vote(address indexed candidate, address indexed voter, uint amountIn, uint amountOut);
    event VoteSubTransfer(address indexed candidate, address indexed voter, uint amount, uint perFee);
    event WithdrawTotalFee(address indexed beneficiary, uint amount);

    function resetChairperson(address payable newChairperson) external virtual;
    function resetPaused(bool _paused) external virtual;
    function resetPerFee(uint _perFee) external virtual;
    function resetFeeTo(address _feeTo) external virtual;
    function resetVoteAddMin(uint _voteAddMin) external virtual;
    function resetVoteSubMin(uint _voteSubMin) external virtual;
    function resetCandidateMax(uint _candidateMax) external virtual;
    function resetCandidate(address _candidate, bool _legal) external virtual;
    function becomeCandidate(address _candidate) external virtual;
    function voteAdd(address candidate, uint amount) external virtual;
    function voteSub(address candidate, uint amount) external virtual;
    function voteSubTransfer(address _candidate, address voter, uint amount) external virtual;
    function withdrawTotalFee(uint amount) external virtual;

    function underlyingBalance() external view virtual returns(uint);
    function stakingUnderlyingBalance() external view virtual returns(uint);
    function candidateInfo(address candidate) external view virtual returns(bool,uint);
    function voterInfo(address voter) external view virtual returns(uint,uint);
    function candidateVoterInfo(address candidate,address voter) external view virtual returns(uint);
    function candidatesLength() external view virtual returns (uint);
}

File 8 of 15 : StakingVoteStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;

contract StakingVoteStorage {

    address payable public chairperson;

    struct Voter{
        uint totalUnderlying;
        uint totalVote;
    }

    struct Candidate{
        address candidate;
        bool legal;
        uint totalVote;
    }

    uint public immutable perFeeMax = 10e18;

    address public underlying;
    bool public paused;
    uint public totalVote;
    uint public perFee;
    uint public totalFee;
    uint public voteAddMin;
    uint public voteSubMin;
    uint public candidateMax;
    address public feeTo;

    Candidate[] public candidates;

    mapping(address => uint) public candidatePidMapping;
    mapping(address => Voter) public voterMapping;
    //candidate address =>(voter address => totalVote)
    mapping(address => mapping(address => uint)) public candidateVoterMapping;
}

File 9 of 15 : StakingVoteLens.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;
pragma experimental ABIEncoderV2;

import "./interfaces/IStakingVote.sol";
contract StakingVoteLens {

    struct BasicMetadata {
        address chairperson;
        address underlying;
        address feeTo;
        bool paused;
        uint totalUnderlying;
        uint totalStakingUnderlying;
        uint totalVote;
        uint perFee;
        uint totalFee;
        uint voteAddMin;
        uint voteSubMin;
        uint candidateMax;
    }

    function getBasicInfo(IStakingVote stakingVote) public view returns(BasicMetadata memory){
        return BasicMetadata({
            chairperson: stakingVote.chairperson(),
            underlying: stakingVote.underlying(),
            feeTo: stakingVote.feeTo(),
            paused: stakingVote.paused(),
            totalUnderlying: stakingVote.underlyingBalance(),
            totalStakingUnderlying: stakingVote.stakingUnderlyingBalance(),
            totalVote: stakingVote.totalVote(),
            perFee: stakingVote.perFee(),
            totalFee: stakingVote.totalFee(),
            voteAddMin: stakingVote.voteAddMin(),
            voteSubMin: stakingVote.voteSubMin(),
            candidateMax: stakingVote.candidateMax()
        });
    }

    struct CandidateMetadata {
        uint totalUnderlying;
        uint totalVote;
        bool candidateLegal;
        uint candidateTotalVote;
    }

    function getCandidateInfo(IStakingVote stakingVote, address candidate) public view returns(CandidateMetadata memory){
        (bool _candidateLegal, uint _candidateTotalVote)  = stakingVote.candidateInfo(candidate);

        return CandidateMetadata({
            totalUnderlying: stakingVote.underlyingBalance(),
            totalVote: stakingVote.totalVote(),
            candidateLegal: _candidateLegal,
            candidateTotalVote: _candidateTotalVote
        });
    }

    struct VoterMetadata {
        uint totalVote;
        uint totalUnderlying;
        uint voterTotalUnderlying;
        uint voterTotalVote;
    }

    function getVoterInfo(IStakingVote stakingVote, address voter) public view returns(VoterMetadata memory){
        (uint _voterTotalUnderlying,uint _voterTotalVote)  = stakingVote.voterInfo(voter);

        return VoterMetadata({
            totalVote: stakingVote.totalVote(),
            totalUnderlying: stakingVote.underlyingBalance(),
            voterTotalUnderlying: _voterTotalUnderlying,
            voterTotalVote: _voterTotalVote
        });
    }
}

File 10 of 15 : StakingFunds.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;

import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "./interfaces/IStakingFunds.sol";

contract StakingFunds is IStakingFunds{
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    modifier validChairperson(){
        require(msg.sender == chairperson, "Illegal operation");
        _;
    }

    modifier validPaused(){
        require(!paused, "Staking has been suspended");
        _;
    }

    function initializeStakingFunds(address _underlying,address _feeTo,
        uint256 _perFee,uint256 _minStake)
    public{
        chairperson = msg.sender;
        underlying = _underlying;
        perFee = _perFee;
        feeTo = _feeTo;
        minStake = _minStake;
    }

    function _acceptAdmin(address payable newChairperson) external override validChairperson{
        address oldChairperson = chairperson;
        chairperson = newChairperson;
        emit ResetChairperson(oldChairperson, newChairperson);
    }

    function resetPaused(bool _paused) external override validChairperson{
        require(paused != _paused, "Illegal operation");
        paused = _paused;

        emit ResetPaused(!_paused, _paused);
    }

    function resetPerFee(uint256 _perFee) external override validChairperson{
        uint256 oldPerFee = perFee;
        perFee = _perFee;

        emit ResetPerFee(oldPerFee, _perFee);
    }

    function stakingAdd(uint256 amount) external override validPaused {
        require(amount > 0,"Illegal operation");
        staking(amount, 0);
    }

    function stakingSub(uint256 amount) external override validPaused {
        require(amount > 0,"Illegal operation");
        staking(0, amount);
    }

    function staking(uint256 amountIn, uint256 amountOut) internal{
        require(amountIn == 0 || amountOut == 0,"Illegal operation");

        if(amountIn != 0){
            totalStake = totalStake.add(amountIn);
            stakingMapping[msg.sender].totalStake = stakingMapping[msg.sender].totalStake.add(amountIn);
            stakingMapping[msg.sender].totalUnderlying = stakingMapping[msg.sender].totalUnderlying.add(amountIn);

            IERC20(underlying).safeTransferFrom(msg.sender, address(this), amountIn);
        }else if(amountOut != 0){
            totalStake = totalStake.sub(amountOut);
            stakingMapping[msg.sender].totalStake = stakingMapping[msg.sender].totalStake.sub(amountOut);
        }

        emit Stake(msg.sender, amountIn, amountOut);
    }

    function stakingSubTransfer(address staker, uint256 amount) external override validChairperson {
        require(amount > perFee, "The transfer amount should be greater than perFee");


        require(stakingMapping[staker].totalUnderlying > stakingMapping[staker].totalStake, "The totalUnderlying should be greater than totalStake");

        stakingMapping[staker].totalUnderlying = stakingMapping[staker].totalUnderlying.sub(amount);

        IERC20(underlying).safeTransfer(staker, amount.sub(perFee));
        totalFee = totalFee.add(perFee);
        emit StakeSubTransfer(staker, amount, perFee);
    }

    function withdrawTotalFee(uint256 amount) external override validChairperson{
        amount = amount == 0 ? totalFee : amount;
        require(amount > 0 && amount <= totalFee, "TotalFee not enough");

        totalFee = totalFee.sub(amount);
        IERC20(underlying).safeTransfer(feeTo, amount);

        emit WithdrawTotalFee(feeTo, amount);
    }

    function underlyingBalance() public view override returns(uint){
        return IERC20(underlying).balanceOf(address(this));
    }

    function stakerInfo(address staker) public view override returns(uint,uint){
        return (stakingMapping[staker].totalStake,stakingMapping[staker].totalUnderlying);
    }
}

File 11 of 15 : IStakingFunds.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;

import "../StakingFundsStorage.sol";

abstract contract IStakingFunds is StakingFundsStorage{

    event ResetChairperson(address indexed oldChairperson, address indexed newChairperson);
    event ResetPaused(bool oldPaused, bool newPaused);
    event ResetPerFee(uint256 oldPerFee, uint256 newPerFee);
    event Stake(address indexed staker, uint256 amountIn, uint256 amountOut);
    event StakeSubTransfer(address indexed staker, uint256 amount, uint256 perFee);
    event WithdrawTotalFee(address indexed beneficiary, uint256 amount);

    function _acceptAdmin(address payable newChairperson) external virtual;
    function resetPaused(bool _paused) external virtual;
    function resetPerFee(uint256 _perFee) external virtual;
    function stakingAdd(uint256 amount) external virtual;
    function stakingSub(uint256 amount) external virtual;
    function stakingSubTransfer(address staker, uint256 amount) external virtual;
    function withdrawTotalFee(uint256 amount) external virtual;

    function underlyingBalance() external view virtual returns(uint);
    function stakerInfo(address staker) external view virtual returns(uint,uint);
}

File 12 of 15 : StakingFundsStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;

contract StakingFundsStorage {

    address payable public chairperson;

    struct Staker{
        uint256 totalUnderlying;
        uint256 totalStake;
    }

    address public underlying;
    bool public paused;
    uint256 public totalStake;
    uint256 public perFee;
    uint256 public totalFee;
    uint256 public minStake;
    address public feeTo;

    mapping(address => Staker) public stakingMapping;
}

File 13 of 15 : StakingFundsDelegate.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;

import "./StakingFunds.sol";
import "./interfaces/StakingInterfaces.sol";

contract StakingFundsDelegate is StakingFunds,StakingDelegateInterface{

    /**
 * @notice Construct an empty delegate
 */
    constructor() {}

    /**
     * @notice Called by the delegator on a delegate to initialize it for duty
     * @param data The encoded bytes data for any initialization
     */
    function _becomeImplementation(bytes memory data) public override{
        // Shh -- currently unused
        data;
        // Shh -- we don't ever want this hook to be marked pure
        if (false) {
            implementation = address(0);
        }
        require(msg.sender == chairperson, "only the admin may call _becomeImplementation");
    }

    /**
     * @notice Called by the delegator on a delegate to forfeit its responsibility
     */
    function _resignImplementation() public override{
        // Shh -- we don't ever want this hook to be marked pure
        if (false) {
            implementation = address(0);
        }
        require(msg.sender == chairperson, "only the admin may call _resignImplementation");
    }
}

File 14 of 15 : StakingInterfaces.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;

contract  StakingDelegationStorage {

    /**
     * @notice Implementation address for this contract
     */
    address public implementation;
}

abstract contract StakingDelegatorInterface is StakingDelegationStorage{

    /**
     * @notice Emitted when implementation is changed
     */
    event NewImplementation(address oldImplementation, address newImplementation);

    /**
     * @notice Called by the admin to update the implementation of the delegator
     * @param implementation_ The address of the new implementation for delegation
     * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation
     * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation
     */
    function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) external virtual;
}

abstract contract StakingDelegateInterface is StakingDelegationStorage{
    /**
     * @notice Called by the delegator on a delegate to initialize it for duty
     * @dev Should revert if any issues arise which make it unfit for delegation
     * @param data The encoded bytes data for any initialization
     */
    function _becomeImplementation(bytes memory data) external virtual;

    /**
     * @notice Called by the delegator on a delegate to forfeit its responsibility
     */
    function _resignImplementation() external virtual;
}

File 15 of 15 : StakingFundsDelegator.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;

import "./interfaces/IStakingFunds.sol";
import "./interfaces/StakingInterfaces.sol";

contract StakingFundsDelegator is IStakingFunds,StakingDelegatorInterface{

    constructor(address underlying_,
        address feeTo_,
        address implementation_,
        uint256 perFee_,
        uint256 minStake_ ,
        bytes memory becomeImplementationData) {
        // Set the proper admin now that initialization is done
        chairperson = msg.sender;
        // First delegate gets to initialize the delegator (i.e. storage contract)
        delegateTo(implementation_, abi.encodeWithSignature("initializeStakingFunds(address,address,uint256,uint256)",
            underlying_,
            feeTo_,
            perFee_,
            minStake_));
        // New implementations always get set via the settor (post-initialize)
        _setImplementation(implementation_, false,becomeImplementationData);
    }

    /**
     * @notice Called by the admin to update the implementation of the delegator
     * @param implementation_ The address of the new implementation for delegation
     * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation
     * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation
     */
    function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public override{
        require(msg.sender == chairperson, "StakingFundsDelegator==_setImplementation: Caller must be admin");
        if (allowResign) {
            delegateToImplementation(abi.encodeWithSignature("_resignImplementation()"));
        }
        address oldImplementation = implementation;
        implementation = implementation_;
        delegateToImplementation(abi.encodeWithSignature("_becomeImplementation(bytes)", becomeImplementationData));

        emit NewImplementation(oldImplementation, implementation);
    }

    function resetPaused(bool _paused) external override{
        _paused;
        delegateAndReturn();
    }

    function resetPerFee(uint256 _perFee) external override{
        _perFee;
        delegateAndReturn();
    }

    function stakingAdd(uint256 amount) external override{
        amount;
        delegateAndReturn();
    }

    function stakingSub(uint256 amount) external override{
        amount;
        delegateAndReturn();
    }

    function stakingSubTransfer(address staker, uint256 amount) external override{
        staker;amount;
        delegateAndReturn();
    }

    function withdrawTotalFee(uint256 amount) external override{
        amount;
        delegateAndReturn();
    }

    function underlyingBalance() external view override returns(uint){
        delegateToViewAndReturn();
    }

    function stakerInfo(address staker) external view override returns(uint,uint){
        staker;
        delegateToViewAndReturn();
    }

    function _acceptAdmin(address payable newChairperson) external override{
        newChairperson;
        delegateAndReturn();
    }


    function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returnData) = callee.delegatecall(data);
        assembly {
            if eq(success, 0) {
                revert(add(returnData, mload(0x20)), returndatasize())
            }
        }
        return returnData;
    }

    /**
     * @notice Delegates execution to the implementation contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     * @param data The raw data to delegatecall
     * @return The returned bytes from the delegatecall
     */
    function delegateToImplementation(bytes memory data) public returns (bytes memory) {
        return delegateTo(implementation, data);
    }

    function delegateToViewAndReturn() private view returns (bytes memory) {
        (bool success, ) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", msg.data));

        assembly {
            let free_mem_ptr := mload(0x40)
            returndatacopy(free_mem_ptr, 0, returndatasize())
        //returndatacopy(0, 0, returndatasize())

            switch success
            case 0 { revert(0, returndatasize()) }
            default { return(add(free_mem_ptr,0x40), returndatasize()) }
        }
    }

    /**
     * @notice Delegates execution to an implementation contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     *  There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.
     * @param data The raw data to delegatecall
     * @return The returned bytes from the delegatecall
     */
    function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {
        (bool success, bytes memory returnData) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", data));
        assembly {
            if eq(success, 0) {
                revert(add(returnData, 0x20), returndatasize())
            }
        }
        return abi.decode(returnData, (bytes));
    }

    function delegateAndReturn() private returns (bytes memory) {
        (bool success, ) = implementation.delegatecall(msg.data);

        assembly {
            let free_mem_ptr := mload(0x40)
            returndatacopy(free_mem_ptr, 0, returndatasize())

            switch success
            case 0 { revert(free_mem_ptr, returndatasize()) }
            default { return(free_mem_ptr, returndatasize()) }
        }
    }

    /**
     * @notice Delegates execution to an implementation contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     */
    fallback() external payable{
        require(msg.value == 0,"StakingFundsDelegator:fallback: cannot send value to fallback");

        // delegate all other functions to current implementation
        delegateAndReturn();
    }

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"uint256","name":"_perFee","type":"uint256"},{"internalType":"address","name":"_feeTo","type":"address"},{"internalType":"uint256","name":"_voteAddMin","type":"uint256"},{"internalType":"uint256","name":"_voteSubMin","type":"uint256"},{"internalType":"uint256","name":"_candidateMax","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"candidate","type":"address"},{"indexed":false,"internalType":"uint256","name":"length","type":"uint256"}],"name":"BecomeCandidate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"candidate","type":"address"},{"indexed":false,"internalType":"bool","name":"oldLegal","type":"bool"},{"indexed":false,"internalType":"bool","name":"newLegal","type":"bool"}],"name":"ResetCandidate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCandidateMax","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCandidateMax","type":"uint256"}],"name":"ResetCandidateMax","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldChairperson","type":"address"},{"indexed":true,"internalType":"address","name":"newChairperson","type":"address"}],"name":"ResetChairperson","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldFeeTo","type":"address"},{"indexed":false,"internalType":"address","name":"newFeeTo","type":"address"}],"name":"ResetFeeTo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"oldPaused","type":"bool"},{"indexed":false,"internalType":"bool","name":"newPaused","type":"bool"}],"name":"ResetPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldPerFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPerFee","type":"uint256"}],"name":"ResetPerFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldVoteAddMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVoteAddMin","type":"uint256"}],"name":"ResetVoteAddMin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldVoteSubMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVoteSubMin","type":"uint256"}],"name":"ResetVoteSubMin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"candidate","type":"address"},{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"Vote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"candidate","type":"address"},{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"perFee","type":"uint256"}],"name":"VoteSubTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawTotalFee","type":"event"},{"inputs":[{"internalType":"address","name":"_candidate","type":"address"}],"name":"becomeCandidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_candidate","type":"address"}],"name":"candidateInfo","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"candidateMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"candidatePidMapping","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"candidate","type":"address"},{"internalType":"address","name":"_voter","type":"address"}],"name":"candidateVoterInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"candidateVoterMapping","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"candidates","outputs":[{"internalType":"address","name":"candidate","type":"address"},{"internalType":"bool","name":"legal","type":"bool"},{"internalType":"uint256","name":"totalVote","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"candidatesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chairperson","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"perFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"perFeeMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_candidate","type":"address"},{"internalType":"bool","name":"_legal","type":"bool"}],"name":"resetCandidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_candidateMax","type":"uint256"}],"name":"resetCandidateMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newChairperson","type":"address"}],"name":"resetChairperson","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeTo","type":"address"}],"name":"resetFeeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"resetPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_perFee","type":"uint256"}],"name":"resetPerFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_voteAddMin","type":"uint256"}],"name":"resetVoteAddMin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_voteSubMin","type":"uint256"}],"name":"resetVoteSubMin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingUnderlyingBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"candidate","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"voteAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voteAddMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"candidate","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"voteSub","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voteSubMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"candidate","type":"address"},{"internalType":"address","name":"voter","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"voteSubTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"voter","type":"address"}],"name":"voterInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"voterMapping","outputs":[{"internalType":"uint256","name":"totalUnderlying","type":"uint256"},{"internalType":"uint256","name":"totalVote","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTotalFee","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052678ac7230489e8000060805234801561001c57600080fd5b50604051612046380380612046833981810160405260c081101561003f57600080fd5b508051602082015160408301516060840151608085015160a090950151600080546001600160a01b03199081163317909155600180546001600160a01b03978816908316179055600394909455600880549590931694909316939093179055600591909155600691909155600755608051611f7a6100cc6000398061066852806111715250611f7a6000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80636f307dc31161011a578063bb41e114116100ad578063e02bdeeb1161007c578063e02bdeeb14610594578063e965b7c91461059c578063ec7d67aa146105dd578063f1cea4c7146105fa578063f79427d41461060257610206565b8063bb41e114146104fd578063ca3410a71461052b578063cdf58d3514610548578063d99d56c71461056e57610206565b80638138f597116100e95780638138f5971461048257806395c4e2001461048a5780639c033264146104b0578063b2e5dcc9146104cf57610206565b80636f307dc3146104295780636f8e7fe114610431578063773b7f651461044e5780637d131c791461045657610206565b8063277077481161019d5780633ef8d74a1161016c5780633ef8d74a146103c757806359356c5c146103cf5780635b39a584146103d75780635c975abb146104055780636eee99791461042157610206565b8063277077481461031e5780632e4176cf146103445780633477ee2e1461034c5780633540626c1461039157610206565b80631715abb1116101d95780631715abb1146102b35780631ada91e6146102cd5780631df4ccfc146102f95780631e8d42211461030157610206565b8063017e7e581461020b57806306630f0c1461022f5780630dc968b81461024e578063140a297b1461028d575b600080fd5b61021361060a565b604080516001600160a01b039092168252519081900360200190f35b61024c6004803603602081101561024557600080fd5b5035610619565b005b6102746004803603602081101561026457600080fd5b50356001600160a01b031661070c565b6040805192835260208301919091528051918290030190f35b61024c600480360360208110156102a357600080fd5b50356001600160a01b0316610725565b6102bb61098d565b60408051918252519081900360200190f35b61024c600480360360408110156102e357600080fd5b506001600160a01b038135169060200135610993565b6102bb610b36565b61024c6004803603602081101561031757600080fd5b5035610b3c565b61024c6004803603602081101561033457600080fd5b50356001600160a01b0316610bd0565b610213610c6d565b6103696004803603602081101561036257600080fd5b5035610c7c565b604080516001600160a01b039094168452911515602084015282820152519081900360600190f35b61024c600480360360608110156103a757600080fd5b506001600160a01b03813581169160208101359091169060400135610cbf565b6102bb610ed8565b6102bb610ede565b6102bb600480360360408110156103ed57600080fd5b506001600160a01b0381358116916020013516610f5a565b61040d610f85565b604080519115158252519081900360200190f35b6102bb610f95565b610213610fb0565b61024c6004803603602081101561044757600080fd5b5035610fbf565b6102bb611053565b61024c6004803603604081101561046c57600080fd5b506001600160a01b038135169060200135611059565b6102bb61116f565b6102bb600480360360208110156104a057600080fd5b50356001600160a01b0316611193565b61024c600480360360208110156104c657600080fd5b503515156111a5565b61024c600480360360408110156104e557600080fd5b506001600160a01b03813516906020013515156112a3565b6102bb6004803603604081101561051357600080fd5b506001600160a01b038135811691602001351661142f565b61024c6004803603602081101561054157600080fd5b503561144c565b6102746004803603602081101561055e57600080fd5b50356001600160a01b03166114e0565b61024c6004803603602081101561058457600080fd5b50356001600160a01b0316611506565b6102bb6115b6565b6105c2600480360360208110156105b257600080fd5b50356001600160a01b03166115bc565b60408051921515835260208301919091528051918290030190f35b61024c600480360360208110156105f357600080fd5b503561162d565b6102bb611757565b6102bb61175d565b6008546001600160a01b031681565b6000546001600160a01b03163314610666576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000008111156106c55760405162461bcd60e51b8152600401808060200182810382526022815260200180611e3c6022913960400191505060405180910390fd5b6003805490829055604080518281526020810184905281517ff58ca9514b669366bb7bda50a3e45dcbb6fed140cec4b29ce41cc7b8e53abe2d929181900390910190a15050565b600b602052600090815260409020805460019091015482565b600154600160a01b900460ff1615610780576040805162461bcd60e51b8152602060048201526019602482015278159bdd1a5b99c81a185cc81899595b881cdd5cdc195b991959603a1b604482015290519081900360640190fd5b6000546001600160a01b031633146107cd576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b6007546107d8611053565b106108145760405162461bcd60e51b8152600401808060200182810382526032815260200180611f136032913960400191505060405180910390fd5b6001600160a01b0381166000908152600a60205260409020548015610880576040805162461bcd60e51b815260206004820152601860248201527f43616e64696461746520616c7265616479206578697374730000000000000000604482015290519081900360640190fd5b610888611dfb565b50604080516060810182526001600160a01b0384811680835260016020808501828152600086880181815260098054958601815580835288517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af6002909702968701805495516001600160a01b0319909616919099161760ff60a01b1916600160a01b941515949094029390931790965594517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0909301929092559054828452600a82529285902083905584519283529351929390927fdf2957703ce0c853479a261b142b3aa94874777566b3ed6317eebc78ad8e25679281900390910190a2505050565b60075481565b600154600160a01b900460ff16156109ee576040805162461bcd60e51b8152602060048201526019602482015278159bdd1a5b99c81a185cc81899595b881cdd5cdc195b991959603a1b604482015290519081900360640190fd5b6001600160a01b0382166000908152600a6020526040902054829080610a51576040805162461bcd60e51b815260206004820152601360248201527210d85b991a59185d19481b9bdd08195e1a5cdd606a1b604482015290519081900360640190fd5b60096001820381548110610a6157fe5b6000918252602090912060029091020154600160a01b900460ff16610acd576040805162461bcd60e51b815260206004820152601a60248201527f4e6f742061206c65676974696d6174652063616e646964617465000000000000604482015290519081900360640190fd5b600554831015610b24576040805162461bcd60e51b815260206004820152601a60248201527f4c657373207468616e20746865206d696e696d756d20766f7465000000000000604482015290519081900360640190fd5b610b3084846000611763565b50505050565b60045481565b6000546001600160a01b03163314610b89576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b6005805490829055604080518281526020810184905281517f36f1c8436db0773faa0cc7da87e26037027e2e1ac17769be29922a038a7c347f929181900390910190a15050565b6000546001600160a01b03163314610c1d576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917fbb06e82369afef12a7eb76b68b40014d14fb3cac9c5f9238b1f356a76cc47e2c9190a35050565b6000546001600160a01b031681565b60098181548110610c8c57600080fd5b6000918252602090912060029091020180546001909101546001600160a01b0382169250600160a01b90910460ff169083565b6000546001600160a01b03163314610d0c576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b6003548111610d4c5760405162461bcd60e51b8152600401808060200182810382526031815260200180611e846031913960400191505060405180910390fd5b6001600160a01b0383166000908152600a602052604090205480610dad576040805162461bcd60e51b815260206004820152601360248201527210d85b991a59185d19481b9bdd08195e1a5cdd606a1b604482015290519081900360640190fd5b6001600160a01b0383166000908152600b602052604090206001810154905411610e085760405162461bcd60e51b8152600401808060200182810382526034815260200180611eb56034913960400191505060405180910390fd5b6001600160a01b0383166000908152600b6020526040902054610e2b90836119c7565b6001600160a01b0384166000908152600b6020526040902055600354600454610e5391611a24565b600455600354610e7d908490610e6a9085906119c7565b6001546001600160a01b03169190611a85565b826001600160a01b0316846001600160a01b03167f0e58e3f33c6f39b12574dfcf8592de1704aa4246c90e869904aa6a11c197396184600354604051808381526020018281526020019250505060405180910390a350505050565b60055481565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610f2957600080fd5b505afa158015610f3d573d6000803e3d6000fd5b505050506040513d6020811015610f5357600080fd5b5051905090565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205490565b600154600160a01b900460ff1681565b6000610fab600454610fa5610ede565b906119c7565b905090565b6001546001600160a01b031681565b6000546001600160a01b0316331461100c576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b6007805490829055604080518281526020810184905281517f415213192f7c9c046278d34868d8126201804d22698a685338b392f7eec4201c929181900390910190a15050565b60095490565b6006548110156110b0576040805162461bcd60e51b815260206004820152601a60248201527f4c657373207468616e20746865206d696e696d756d20766f7465000000000000604482015290519081900360640190fd5b60035481116110fd576040805162461bcd60e51b81526020600482015260146024820152734c657373207468616e207468652070657246656560601b604482015290519081900360640190fd5b6001600160a01b0382166000908152600a60205260409020548061115e576040805162461bcd60e51b815260206004820152601360248201527210d85b991a59185d19481b9bdd08195e1a5cdd606a1b604482015290519081900360640190fd5b61116a83600084611763565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600a6020526000908152604090205481565b6000546001600160a01b031633146111f2576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b60015460ff600160a01b9091041615158115151415611246576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b6001805482158015600160a01b810260ff60a01b199093169290921790925560408051928352602083019190915280517fa3e1a8c61b5f988d98e2f79bd7db30f2a4bf72f91696993bdf471b4745f4c2f59281900390910190a150565b6000546001600160a01b031633146112f0576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b6001600160a01b0382166000908152600a602052604090205480611351576040805162461bcd60e51b815260206004820152601360248201527210d85b991a59185d19481b9bdd08195e1a5cdd606a1b604482015290519081900360640190fd5b60006009600183038154811061136357fe5b60009182526020909120600290910201805490915060ff600160a01b90910416151583151514156113c9576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b805483158015600160a01b810260ff60a01b1990931692909217835560408051918252602082019290925281516001600160a01b038716927f3d42bad054760bc26ed87028403cb01c36bd1c7b8024ff04016c936dab3d8590928290030190a250505050565b600c60209081526000928352604080842090915290825290205481565b6000546001600160a01b03163314611499576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b6006805490829055604080518281526020810184905281517f23b18096492eae56cd3b7cdcb3fdd4a95c0c5990981596af51b814c6d92aa04b929181900390910190a15050565b6001600160a01b0381166000908152600b6020526040902080546001909101545b915091565b6000546001600160a01b03163314611553576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517feb0e5031dfacf26b30964e1024ac4364c0d1f6101b5ece701ab6de1265555918929181900390910190a15050565b60065481565b6001600160a01b0381166000908152600a60205260408120548190806115e9576000809250925050611501565b6000600960018303815481106115fb57fe5b906000526020600020906002020190508060000160149054906101000a900460ff168160010154935093505050915091565b6000546001600160a01b0316331461167a576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b8015611686578061168a565b6004545b905060008111801561169e57506004548111155b6116e5576040805162461bcd60e51b81526020600482015260136024820152720a8dee8c2d88ccaca40dcdee840cadcdeeaced606b1b604482015290519081900360640190fd5b6004546116f290826119c7565b600455600854600154611712916001600160a01b03918216911683611a85565b6008546040805183815290516001600160a01b03909216917fb3cad649a5bca58053cb0f2da1e1d5375cc836b05e28b7d97cc6f6d0f7e28bb29181900360200190a250565b60025481565b60035481565b81158061176e575080155b6117ad576040805162461bcd60e51b81526020600482015260116024820152600080516020611e1c833981519152604482015290519081900360640190fd5b6001600160a01b0383166000908152600a60205260408120546009805491929160001984019081106117db57fe5b90600052602060002090600202019050836000146118d2576002546118009085611a24565b60025560018101546118129085611a24565b60018201556001600160a01b0385166000908152600c602090815260408083203384529091529020546118459085611a24565b6001600160a01b0386166000908152600c60209081526040808320338452825280832093909355600b9052205461187c9085611a24565b336000908152600b602052604090209081556001015461189c9085611a24565b336000818152600b6020526040902060019081019290925590546118cd916001600160a01b03909116903087611ad7565b611978565b8215611978576002546118e590846119c7565b60025560018101546118f790846119c7565b60018201556001600160a01b0385166000908152600c6020908152604080832033845290915290205461192a90846119c7565b6001600160a01b0386166000908152600c60209081526040808320338452825280832093909355600b9052206001015461196490846119c7565b336000908152600b60205260409020600101555b6040805185815260208101859052815133926001600160a01b038916927f6a92c4ce4cbb892528ab39f7d674be0f6b1579b54ed8e77d95ad506819fd72c8929081900390910190a35050505050565b600082821115611a1e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015611a7e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261116a908490611b2d565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610b309085905b6060611b82826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611bde9092919063ffffffff16565b80519091501561116a57808060200190516020811015611ba157600080fd5b505161116a5760405162461bcd60e51b815260040180806020018281038252602a815260200180611ee9602a913960400191505060405180910390fd5b6060611bed8484600085611bf5565b949350505050565b606082471015611c365760405162461bcd60e51b8152600401808060200182810382526026815260200180611e5e6026913960400191505060405180910390fd5b611c3f85611d51565b611c90576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611ccf5780518252601f199092019160209182019101611cb0565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611d31576040519150601f19603f3d011682016040523d82523d6000602084013e611d36565b606091505b5091509150611d46828286611d57565b979650505050505050565b3b151590565b60608315611d66575081611a7e565b825115611d765782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dc0578181015183820152602001611da8565b50505050905090810190601f168015611ded5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60408051606081018252600080825260208201819052918101919091529056fe496c6c6567616c206f7065726174696f6e000000000000000000000000000000506572466565206d757374206265206c657373207468616e207065724665654d6178416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c546865207472616e7366657220616d6f756e742073686f756c642062652067726561746572207468616e2070657246656554686520746f74616c556e6465726c79696e672073686f756c642062652067726561746572207468616e20746f74616c566f74655361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564546865206d6178696d756d206e756d626572206f662063616e6469646174657320686173206265656e206578636565646564a26469706673582212209164d6f2757ac2e17231e626833ae743601b99902270bcf4ec74801043670bf064736f6c63430007040033000000000000000000000000eae9c24b32aec44b810474a0e14387d21b41a6310000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000003ac38be76a80980cd64f84dfcacf035dc69091290000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000000000000000000001

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000eae9c24b32aec44b810474a0e14387d21b41a6310000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000003ac38be76a80980cd64f84dfcacf035dc69091290000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000000000000000000001
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000eae9c24b32aec44b810474a0e14387d21b41a631
Arg [1] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [2] : 0000000000000000000000003ac38be76a80980cd64f84dfcacf035dc6909129
Arg [3] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [4] : 000000000000000000000000000000000000000000000002b5e3af16b1880000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001


Deployed ByteCode Sourcemap

195:7896:9:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;577:20:11;;;:::i;:::-;;;;-1:-1:-1;;;;;577:20:11;;;;;;;;;;;;;;1951:258:9;;;;;;;;;;;;;;;;-1:-1:-1;1951:258:9;;:::i;:::-;;697:45:11;;;;;;;;;;;;;;;;-1:-1:-1;697:45:11;-1:-1:-1;;;;;697:45:11;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3511:619:9;;;;;;;;;;;;;;;;-1:-1:-1;3511:619:9;-1:-1:-1;;;;;3511:619:9;;:::i;547:24:11:-;;;:::i;:::-;;;;;;;;;;;;;;;;4136:215:9;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4136:215:9;;;;;;;;:::i;465:20:11:-;;;:::i;2400:218:9:-;;;;;;;;;;;;;;;;-1:-1:-1;2400:218:9;;:::i;1488:246::-;;;;;;;;;;;;;;;;-1:-1:-1;1488:246:9;-1:-1:-1;;;;;1488:246:9;;:::i;93:34:11:-;;;:::i;604:29::-;;;;;;;;;;;;;;;;-1:-1:-1;604:29:11;;:::i;:::-;;;;-1:-1:-1;;;;;604:29:11;;;;;;;;;;;;;;;;;;;;;;;;;5981:716:9;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5981:716:9;;;;;;;;;;;;;;;;;:::i;491:22:11:-;;;:::i;7058:130:9:-;;;:::i;7818:160::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;7818:160:9;;;;;;;;;;:::i;390:18:11:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;7194:127:9;;;:::i;359:25:11:-;;;:::i;2848:236:9:-;;;;;;;;;;;;;;;;-1:-1:-1;2848:236:9;;:::i;7984:105::-;;;:::i;4357:337::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4357:337:9;;;;;;;;:::i;313:39:11:-;;;:::i;640:51::-;;;;;;;;;;;;;;;;-1:-1:-1;640:51:11;-1:-1:-1;;;;;640:51:11;;:::i;1740:205:9:-;;;;;;;;;;;;;;;;-1:-1:-1;1740:205:9;;;;:::i;3090:415::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3090:415:9;;;;;;;;;;:::i;803:73:11:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;803:73:11;;;;;;;;;;:::i;2624:218:9:-;;;;;;;;;;;;;;;;-1:-1:-1;2624:218:9;;:::i;7648:164::-;;;;;;;;;;;;;;;;-1:-1:-1;7648:164:9;-1:-1:-1;;;;;7648:164:9;;:::i;2215:179::-;;;;;;;;;;;;;;;;-1:-1:-1;2215:179:9;-1:-1:-1;;;;;2215:179:9;;:::i;519:22:11:-;;;:::i;7327:315:9:-;;;;;;;;;;;;;;;;-1:-1:-1;7327:315:9;-1:-1:-1;;;;;7327:315:9;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;6703:349;;;;;;;;;;;;;;;;-1:-1:-1;6703:349:9;;:::i;414:21:11:-;;;:::i;441:18::-;;;:::i;577:20::-;;;-1:-1:-1;;;;;577:20:11;;:::o;1951:258:9:-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;2049:9:::1;2038:7;:20;;2030:66;;;;-1:-1:-1::0;;;2030:66:9::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2123:6;::::0;;2139:16;;;;2171:31:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;404:1;1951:258:::0;:::o;697:45:11:-;;;;;;;;;;;;;;;;;;;:::o;3511:619:9:-;697:6;;-1:-1:-1;;;697:6:9;;;;696:7;688:45;;;;;-1:-1:-1;;;688:45:9;;;;;;;;;;;;-1:-1:-1;;;688:45:9;;;;;;;;;;;;;;;361:11:::1;::::0;-1:-1:-1;;;;;361:11:9::1;347:10;:25;339:55;;;::::0;;-1:-1:-1;;;339:55:9;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;::::1;;3641:12:::2;;3620:18;:16;:18::i;:::-;:33;3612:96;;;;-1:-1:-1::0;;;3612:96:9::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;3730:31:9;::::2;3719:8;3730:31:::0;;;:19:::2;:31;::::0;;;;;3779:8;;3771:45:::2;;;::::0;;-1:-1:-1;;;3771:45:9;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;::::2;::::0;;;;;;;;;;;;;::::2;;3827:26;;:::i;:::-;-1:-1:-1::0;3856:107:9::2;::::0;;::::2;::::0;::::2;::::0;;-1:-1:-1;;;;;3856:107:9;;::::2;::::0;;;3922:4:::2;3856:107;::::0;;::::2;::::0;;;-1:-1:-1;3856:107:9;;;;;;3974:10:::2;:26:::0;;;;::::2;::::0;;;;;;;;::::2;::::0;;::::2;::::0;;::::2;::::0;;;;-1:-1:-1;;;;;;3974:26:9;;::::2;::::0;;;::::2;;-1:-1:-1::0;;;;3974:26:9::2;-1:-1:-1::0;;;3974:26:9;::::2;;::::0;;;::::2;::::0;;;::::2;::::0;;;;;;;;;;;;;4044:17;;4010:31;;;:19:::2;:31:::0;;;;;;:51;;;4077:46;;;;;;;3856:107;;;;4077:46:::2;::::0;;;;;;;;::::2;404:1;;3511:619:::0;:::o;547:24:11:-;;;;:::o;4136:215:9:-;697:6;;-1:-1:-1;;;697:6:9;;;;696:7;688:45;;;;;-1:-1:-1;;;688:45:9;;;;;;;;;;;;-1:-1:-1;;;688:45:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;481:30:9;::::1;470:8;481:30:::0;;;:19:::1;:30;::::0;;;;;4230:9;;529:8;521:40:::1;;;::::0;;-1:-1:-1;;;521:40:9;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;521:40:9;;;;;;;;;;;;;::::1;;579:10;594:1;590:3;:5;579:17;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;:23:::0;-1:-1:-1;;;579:23:9;::::1;;;571:61;;;::::0;;-1:-1:-1;;;571:61:9;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;4268:10:::2;;4258:6;:20;;4250:58;;;::::0;;-1:-1:-1;;;4250:58:9;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;::::2;::::0;;;;;;;;;;;;;::::2;;4318:26;4323:9;4334:6;4342:1;4318:4;:26::i;:::-;743:1:::1;;4136:215:::0;;:::o;465:20:11:-;;;;:::o;2400:218:9:-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;2508:10:::1;::::0;;2528:24;;;;2568:43:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;404:1;2400:218:::0;:::o;1488:246::-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;1590:22:::1;1615:11:::0;;-1:-1:-1;;;;;1636:28:9;;::::1;-1:-1:-1::0;;;;;;1636:28:9;::::1;::::0;::::1;::::0;;1679:48:::1;::::0;1615:11;;;::::1;::::0;;;1679:48:::1;::::0;1590:22;1679:48:::1;404:1;1488:246:::0;:::o;93:34:11:-;;;-1:-1:-1;;;;;93:34:11;;:::o;604:29::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;604:29:11;;;-1:-1:-1;;;;604:29:11;;;;;;;:::o;5981:716:9:-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;6115:6:::1;;6106;:15;6098:77;;;;-1:-1:-1::0;;;6098:77:9::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;6197:30:9;::::1;6186:8;6197:30:::0;;;:19:::1;:30;::::0;;;;;6245:8;6237:40:::1;;;::::0;;-1:-1:-1;;;6237:40:9;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6237:40:9;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;6333:19:9;::::1;;::::0;;;:12:::1;:19;::::0;;;;:29:::1;::::0;::::1;::::0;6295:35;;:67:::1;6287:132;;;;-1:-1:-1::0;;;6287:132:9::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;6468:19:9;::::1;;::::0;;;:12:::1;:19;::::0;;;;:35;:47:::1;::::0;6508:6;6468:39:::1;:47::i;:::-;-1:-1:-1::0;;;;;6430:19:9;::::1;;::::0;;;:12:::1;:19;::::0;;;;:85;6549:6:::1;::::0;6536:8:::1;::::0;:20:::1;::::0;:12:::1;:20::i;:::-;6525:8;:31:::0;6617:6:::1;::::0;6567:58:::1;::::0;6599:5;;6606:18:::1;::::0;:6;;:10:::1;:18::i;:::-;6574:10;::::0;-1:-1:-1;;;;;6574:10:9::1;::::0;6567:58;:31:::1;:58::i;:::-;6668:5;-1:-1:-1::0;;;;;6641:49:9::1;6657:9;-1:-1:-1::0;;;;;6641:49:9::1;;6675:6;6683;;6641:49;;;;;;;;;;;;;;;;;;;;;;;;404:1;5981:716:::0;;;:::o;491:22:11:-;;;;:::o;7058:130:9:-;7145:10;;7138:43;;;-1:-1:-1;;;7138:43:9;;7175:4;7138:43;;;;;;7116:4;;-1:-1:-1;;;;;7145:10:9;;7138:28;;:43;;;;;;;;;;;;;;7145:10;7138:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7138:43:9;;-1:-1:-1;7058:130:9;:::o;7818:160::-;-1:-1:-1;;;;;7931:32:9;;;7909:4;7931:32;;;:21;:32;;;;;;;;:40;;;;;;;;;;;;;7818:160::o;390:18:11:-;;;-1:-1:-1;;;390:18:11;;;;;:::o;7194:127:9:-;7259:4;7281:33;7305:8;;7281:19;:17;:19::i;:::-;:23;;:33::i;:::-;7274:40;;7194:127;:::o;359:25:11:-;;;-1:-1:-1;;;;;359:25:11;;:::o;2848:236:9:-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;2962:12:::1;::::0;;2984:28;;;;3028:49:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;404:1;2848:236:::0;:::o;7984:105::-;8065:10;:17;7984:105;:::o;4357:337::-;4451:10;;4441:6;:20;;4433:58;;;;;-1:-1:-1;;;4433:58:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;4518:6;;4509;:15;4501:48;;;;;-1:-1:-1;;;4501:48:9;;;;;;;;;;;;-1:-1:-1;;;4501:48:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;4570:30:9;;4559:8;4570:30;;;:19;:30;;;;;;4618:8;4610:40;;;;;-1:-1:-1;;;4610:40:9;;;;;;;;;;;;-1:-1:-1;;;4610:40:9;;;;;;;;;;;;;;;4661:26;4666:9;4677:1;4680:6;4661:4;:26::i;:::-;4357:337;;;:::o;313:39:11:-;;;:::o;640:51::-;;;;;;;;;;;;;:::o;1740:205:9:-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;1827:6:::1;::::0;::::1;-1:-1:-1::0;;;1827:6:9;;::::1;;:17;;::::0;::::1;;;;1819:47;;;::::0;;-1:-1:-1;;;1819:47:9;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;1819:47:9;;;;;;;;;;;;;::::1;;1876:6;:16:::0;;;::::1;::::0;::::1;-1:-1:-1::0;;;1876:16:9;::::1;-1:-1:-1::0;;;;1876:16:9;;::::1;::::0;;;::::1;::::0;;;1908:30:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;;;;;;;;::::1;1740:205:::0;:::o;3090:415::-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;3202:31:9;::::1;3191:8;3202:31:::0;;;:19:::1;:31;::::0;;;;;3251:8;3243:40:::1;;;::::0;;-1:-1:-1;;;3243:40:9;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;3243:40:9;;;;;;;;;;;;;::::1;;3293:27;3323:10;3338:1;3334:3;:5;3323:17;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;3358:15:::0;;3323:17;;-1:-1:-1;3358:15:9::1;-1:-1:-1::0;;;3358:15:9;;::::1;;:25;;::::0;::::1;;;;3350:55;;;::::0;;-1:-1:-1;;;3350:55:9;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;3350:55:9;;;;;;;;;;;;;::::1;;3416:24:::0;;;::::1;::::0;::::1;-1:-1:-1::0;;;3416:24:9;::::1;-1:-1:-1::0;;;;3416:24:9;;::::1;::::0;;;::::1;::::0;;3455:43:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;-1:-1:-1;;;;;3455:43:9;::::1;::::0;::::1;::::0;;;;;;::::1;404:1;;3090:415:::0;;:::o;803:73:11:-;;;;;;;;;;;;;;;;;;;;;;;;:::o;2624:218:9:-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;2732:10:::1;::::0;;2752:24;;;;2792:43:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;404:1;2624:218:::0;:::o;7648:164::-;-1:-1:-1;;;;;7739:19:9;;7711:4;7739:19;;;:12;:19;;;;;:35;;7775:29;;;;;7648:164;;;;:::o;2215:179::-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;2314:5:::1;::::0;;-1:-1:-1;;;;;2329:14:9;;::::1;-1:-1:-1::0;;;;;;2329:14:9;::::1;::::0;::::1;::::0;;;2359:28:::1;::::0;;2314:5;;;::::1;2359:28:::0;;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;;;;;;;;;::::1;404:1;2215:179:::0;:::o;519:22:11:-;;;;:::o;7327:315:9:-;-1:-1:-1;;;;;7430:31:9;;7399:4;7430:31;;;:19;:31;;;;;;7399:4;;7474:8;7471:53;;7505:5;7511:1;7497:16;;;;;;;7471:53;7533:27;7563:10;7578:1;7574:3;:5;7563:17;;;;;;;;;;;;;;;;;;7533:47;;7599:9;:15;;;;;;;;;;;;7615:9;:19;;;7591:44;;;;;;7327:315;;;:::o;6703:349::-;361:11;;-1:-1:-1;;;;;361:11:9;347:10;:25;339:55;;;;;-1:-1:-1;;;339:55:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;339:55:9;;;;;;;;;;;;;;;6795:11;;:31:::1;;6820:6;6795:31;;;6809:8;;6795:31;6786:40;;6853:1;6844:6;:10;:32;;;;;6868:8;;6858:6;:18;;6844:32;6836:64;;;::::0;;-1:-1:-1;;;6836:64:9;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6836:64:9;;;;;;;;;;;;;::::1;;6922:8;::::0;:20:::1;::::0;6935:6;6922:12:::1;:20::i;:::-;6911:8;:31:::0;6984:5:::1;::::0;;6959:10;6952:46:::1;::::0;-1:-1:-1;;;;;6959:10:9;;::::1;::::0;6984:5:::1;6991:6:::0;6952:31:::1;:46::i;:::-;7031:5;::::0;7014:31:::1;::::0;;;;;;;-1:-1:-1;;;;;7031:5:9;;::::1;::::0;7014:31:::1;::::0;;;;::::1;::::0;;::::1;6703:349:::0;:::o;414:21:11:-;;;;:::o;441:18::-;;;;:::o;4700:1275:9:-;4791:13;;;:31;;-1:-1:-1;4808:14:9;;4791:31;4783:60;;;;;-1:-1:-1;;;4783:60:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4783:60:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;4865:31:9;;4854:8;4865:31;;;:19;:31;;;;;;4936:10;:17;;4865:31;;4854:8;-1:-1:-1;;4947:5:9;;;4936:17;;;;;;;;;;;;;;;;4906:47;;4967:8;4979:1;4967:13;4964:940;;5007:9;;:23;;5021:8;5007:13;:23::i;:::-;4995:9;:35;5066:19;;;;:33;;5090:8;5066:23;:33::i;:::-;5044:19;;;:55;-1:-1:-1;;;;;5161:33:9;;;;;;:21;:33;;;;;;;;5195:10;5161:45;;;;;;;;:59;;5211:8;5161:49;:59::i;:::-;-1:-1:-1;;;;;5113:33:9;;;;;;:21;:33;;;;;;;;5147:10;5113:45;;;;;;;:107;;;;5277:12;:24;;;:40;:54;;5322:8;5277:44;:54::i;:::-;5247:10;5234:24;;;;:12;:24;;;;;:97;;;5382:34;;;:48;;5421:8;5382:38;:48::i;:::-;5358:10;5345:24;;;;:12;:24;;;;;:34;;;;:85;;;;5452:10;;5445:72;;-1:-1:-1;;;;;5452:10:9;;;;5501:4;5508:8;5445:35;:72::i;:::-;4964:940;;;5536:14;;5533:371;;5577:9;;:24;;5591:9;5577:13;:24::i;:::-;5565:9;:36;5637:19;;;;:34;;5661:9;5637:23;:34::i;:::-;5615:19;;;:56;-1:-1:-1;;;;;5733:33:9;;;;;;:21;:33;;;;;;;;5767:10;5733:45;;;;;;;;:60;;5783:9;5733:49;:60::i;:::-;-1:-1:-1;;;;;5685:33:9;;;;;;:21;:33;;;;;;;;5719:10;5685:45;;;;;;;:108;;;;5844:12;:24;;;:34;;;:49;;5883:9;5844:38;:49::i;:::-;5820:10;5807:24;;;;:12;:24;;;;;:34;;:86;5533:371;5919:49;;;;;;;;;;;;;;5936:10;;-1:-1:-1;;;;;5919:49:9;;;;;;;;;;;;;;4700:1275;;;;;:::o;3136:155:0:-;3194:7;3226:1;3221;:6;;3213:49;;;;;-1:-1:-1;;;3213:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3279:5:0;;;3136:155::o;2690:175::-;2748:7;2779:5;;;2802:6;;;;2794:46;;;;;-1:-1:-1;;;2794:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;2690:175;-1:-1:-1;;;2690:175:0:o;704::2:-;813:58;;;-1:-1:-1;;;;;813:58:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;813:58:2;-1:-1:-1;;;813:58:2;;;786:86;;806:5;;786:19;:86::i;885:203::-;1012:68;;;-1:-1:-1;;;;;1012:68:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1012:68:2;-1:-1:-1;;;1012:68:2;;;985:96;;1005:5;;2967:751;3386:23;3412:69;3440:4;3412:69;;;;;;;;;;;;;;;;;3420:5;-1:-1:-1;;;;;3412:27:2;;;:69;;;;;:::i;:::-;3495:17;;3386:95;;-1:-1:-1;3495:21:2;3491:221;;3635:10;3624:30;;;;;;;;;;;;;;;-1:-1:-1;3624:30:2;3616:85;;;;-1:-1:-1;;;3616:85:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3581:193:3;3684:12;3715:52;3737:6;3745:4;3751:1;3754:12;3715:21;:52::i;:::-;3708:59;3581:193;-1:-1:-1;;;;3581:193:3:o;4608:523::-;4735:12;4792:5;4767:21;:30;;4759:81;;;;-1:-1:-1;;;4759:81:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4858:18;4869:6;4858:10;:18::i;:::-;4850:60;;;;;-1:-1:-1;;;4850:60:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:12;4995:23;5022:6;-1:-1:-1;;;;;5022:11:3;5042:5;5050:4;5022:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5022:33:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4980:75;;;;5072:52;5090:7;5099:10;5111:12;5072:17;:52::i;:::-;5065:59;4608:523;-1:-1:-1;;;;;;;4608:523:3:o;726:413::-;1086:20;1124:8;;;726:413::o;7091:725::-;7206:12;7234:7;7230:580;;;-1:-1:-1;7264:10:3;7257:17;;7230:580;7375:17;;:21;7371:429;;7633:10;7627:17;7693:15;7680:10;7676:2;7672:19;7665:44;7582:145;7772:12;7765:20;;-1:-1:-1;;;7765:20:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

ipfs://9164d6f2757ac2e17231e626833ae743601b99902270bcf4ec74801043670bf0
Block Transaction Gas Used Reward
Age Block Fee Address Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading