Sonic Blaze Testnet

Contract

0x8c8C11Fab1b8f9cdc253fD7fcA1719C3833E13A6

Overview

S Balance

Sonic Blaze LogoSonic Blaze LogoSonic Blaze Logo0 S

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SmartPoolManager

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : SmartPoolManager.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;

// Needed to pass in structs
pragma experimental ABIEncoderV2;

// Imports

import "../interfaces/IERC20.sol";
import "../interfaces/IConfigurableRightsPool.sol";
import "../interfaces/IBFactory.sol"; // unused
import "./DesynSafeMath.sol";
import "./SafeMath.sol";
// import "./SafeApprove.sol";
import "../libraries/SafeERC20.sol";

/**
 * @author Desyn Labs
 * @title Factor out the weight updates
 */
library SmartPoolManager {
    // using SafeApprove for IERC20;
    using DesynSafeMath for uint;
    using SafeMath for uint;
    using SafeERC20 for IERC20;

    //kol pool params
    struct levelParams {
        uint level;
        uint ratio;
    }

    struct feeParams {
        levelParams firstLevel;
        levelParams secondLevel;
        levelParams thirdLevel;
        levelParams fourLevel;
    }
    
    struct KolPoolParams {
        feeParams managerFee;
        feeParams issueFee;
        feeParams redeemFee;
        feeParams perfermanceFee;
    }

    // Type declarations
    enum Etypes {
        OPENED,
        CLOSED
    }

    enum Period {
        DAY90,
        DAY180,
        DAY360,
        DAY1,
        DAY3,
        DAY7,
        DAY14,
        DAY30
    }

    struct Fund {
        uint etfAmount;
        uint fundAmount;
        uint snapshotTime;
        address[] tokens;
        uint[] tokensAmount;
    }

    // updateWeight and pokeWeights are unavoidably long
    /* solhint-disable function-max-lines */
    struct Status {
        uint collectPeriod;
        uint collectEndTime;
        uint closurePeriod;
        uint closureEndTime;
        uint upperCap;
        uint floorCap;
        uint managerFee;
        uint redeemFee;
        uint issueFee;
        uint perfermanceFee;
        uint startClaimFeeTime;
    }

    struct PoolParams {
        // Desyn Pool Token (representing shares of the pool)
        string poolTokenSymbol;
        string poolTokenName;
        // Tokens inside the Pool
        address[] constituentTokens;
        uint[] tokenBalances;
        uint[] tokenWeights;
        uint managerFee;
        uint redeemFee;
        uint issueFee;
        uint perfermanceFee;
        Etypes etype;
    }

    struct PoolTokenRange {
        uint bspFloor;
        uint bspCap;
    }

    function initRequire(
        uint managerFee,
        uint issueFee,
        uint redeemFee,
        uint perfermanceFee,
        uint tokenBalancesLength,
        uint tokenWeightsLength,
        uint constituentTokensLength,
        bool initBool
    ) external pure {
        // We don't have a pool yet; check now or it will fail later (in order of likelihood to fail)
        // (and be unrecoverable if they don't have permission set to change it)
        // Most likely to fail, so check first
        require(!initBool, "Init fail");
        require(managerFee >= DesynConstants.MANAGER_MIN_FEE, "ERR_INVALID_MANAGER_FEE");
        require(managerFee <= DesynConstants.MANAGER_MAX_FEE, "ERR_INVALID_MANAGER_FEE");
        require(issueFee >= DesynConstants.ISSUE_MIN_FEE, "ERR_INVALID_ISSUE_MIN_FEE");
        require(issueFee <= DesynConstants.ISSUE_MAX_FEE, "ERR_INVALID_ISSUE_MAX_FEE");
        require(redeemFee >= DesynConstants.REDEEM_MIN_FEE, "ERR_INVALID_REDEEM_MIN_FEE");
        require(redeemFee <= DesynConstants.REDEEM_MAX_FEE, "ERR_INVALID_REDEEM_MAX_FEE");
        require(perfermanceFee >= DesynConstants.PERFERMANCE_MIN_FEE, "ERR_INVALID_PERFERMANCE_MIN_FEE");
        require(perfermanceFee <= DesynConstants.PERFERMANCE_MAX_FEE, "ERR_INVALID_PERFERMANCE_MAX_FEE");

        // Arrays must be parallel
        require(tokenBalancesLength == constituentTokensLength, "ERR_START_BALANCES_MISMATCH");
        require(tokenWeightsLength == constituentTokensLength, "ERR_START_WEIGHTS_MISMATCH");
        // Cannot have too many or too few - technically redundant, since BPool.bind() would fail later
        // But if we don't check now, we could have a useless contract with no way to create a pool

        require(constituentTokensLength >= DesynConstants.MIN_ASSET_LIMIT, "ERR_TOO_FEW_TOKENS");
        require(constituentTokensLength <= DesynConstants.MAX_ASSET_LIMIT, "ERR_TOO_MANY_TOKENS");
        // There are further possible checks (e.g., if they use the same token twice), but
        // we can let bind() catch things like that (i.e., not things that might reasonably work)
    }

    /**
     * @notice Non ERC20-conforming tokens are problematic; don't allow them in pools
     * @dev Will revert if invalid
     * @param token - The prospective token to verify
     */
    function verifyTokenCompliance(address token) external {
        verifyTokenComplianceInternal(token);
    }

    /**
     * @notice Non ERC20-conforming tokens are problematic; don't allow them in pools
     * @dev Will revert if invalid - overloaded to save space in the main contract
     * @param tokens - The prospective tokens to verify
     */
    function verifyTokenCompliance(address[] calldata tokens) external {
        for (uint i = 0; i < tokens.length; i++) {
            verifyTokenComplianceInternal(tokens[i]);
        }
    }

    function createPoolInternalHandle(IBPool bPool, uint initialSupply) external view {
        require(initialSupply >= DesynConstants.MIN_POOL_SUPPLY, "ERR_INIT_SUPPLY_MIN");
        require(initialSupply <= DesynConstants.MAX_POOL_SUPPLY, "ERR_INIT_SUPPLY_MAX");
        require(bPool.EXIT_FEE() == 0, "ERR_NONZERO_EXIT_FEE");
        // EXIT_FEE must always be zero, or ConfigurableRightsPool._pushUnderlying will fail
        require(DesynConstants.EXIT_FEE == 0, "ERR_NONZERO_EXIT_FEE");
    }

    function createPoolHandle(
        uint collectPeriod,
        uint upperCap,
        uint initialSupply
    ) external pure {
        require(collectPeriod <= DesynConstants.MAX_COLLECT_PERIOD, "ERR_EXCEEDS_FUND_RAISING_PERIOD");
        require(upperCap >= initialSupply, "ERR_CAP_BIGGER_THAN_INITSUPPLY");
    }

    function exitPoolHandleA(
        IConfigurableRightsPool self,
        IBPool bPool,
        address poolToken,
        uint _tokenAmountOut,
        uint redeemFee
    )
        external
        returns (
            uint redeemAndPerformanceFeeReceived,
            uint finalAmountOut,
            uint redeemFeeReceived
        )
    {
        // redeem fee
        redeemFeeReceived = DesynSafeMath.bmul(_tokenAmountOut, redeemFee);

        // performance fee
        uint performanceFeeReceived = 0;
        
        // redeem fee and performance fee
        redeemAndPerformanceFeeReceived = DesynSafeMath.badd(performanceFeeReceived, redeemFeeReceived);

        // final amount the user got
        finalAmountOut = DesynSafeMath.bsub(_tokenAmountOut, redeemAndPerformanceFeeReceived);

        _pushUnderlying(bPool, poolToken, msg.sender, finalAmountOut);

        if (redeemFee != 0) {
            _pushUnderlying(bPool, poolToken, address(this), redeemAndPerformanceFeeReceived);
            IERC20(poolToken).safeApprove(self.vaultAddress(), 0);
            IERC20(poolToken).safeApprove(self.vaultAddress(), redeemAndPerformanceFeeReceived);
        }
    }

    function exitPoolHandleB(
        IConfigurableRightsPool self,
        bool bools,
        bool isCompletedCollect,
        uint closureEndTime,
        uint collectEndTime,
        // uint _etfAmount,
        // uint _fundAmount,
        uint poolAmountIn
    ) external view returns (uint actualPoolAmountIn) {
        actualPoolAmountIn = poolAmountIn;
        if (bools) {
            bool isCloseEtfCollectEndWithFailure = isCompletedCollect == false && block.timestamp >= collectEndTime;
            bool isCloseEtfClosureEnd = block.timestamp >= closureEndTime;
            require(isCloseEtfCollectEndWithFailure || isCloseEtfClosureEnd, "ERR_CLOSURE_TIME_NOT_ARRIVED!");

            actualPoolAmountIn = self.balanceOf(msg.sender);
        }
        // fundAmount = _fundAmount;
        // etfAmount = _etfAmount;
    }

    function joinPoolHandle(
        bool canWhitelistLPs,
        bool isList,
        bool bools,
        uint collectEndTime
    ) external view {
        require(!canWhitelistLPs || isList, "ERR_NOT_ON_WHITELIST");

        if (bools) {
            require(block.timestamp <= collectEndTime, "ERR_COLLECT_PERIOD_FINISHED!");
        }
    }

    /**
     * @notice Join a pool
     * @param self - ConfigurableRightsPool instance calling the library
     * @param bPool - Core BPool the CRP is wrapping
     * @param poolAmountOut - number of pool tokens to receive
     * @param maxAmountsIn - Max amount of asset tokens to spend
     * @return actualAmountsIn - calculated values of the tokens to pull in
     */
    function joinPool(
        IConfigurableRightsPool self,
        IBPool bPool,
        uint poolAmountOut,
        uint[] calldata maxAmountsIn,
        uint issueFee
    ) external view returns (uint[] memory actualAmountsIn) {
        address[] memory tokens = bPool.getCurrentTokens();

        require(maxAmountsIn.length == tokens.length, "ERR_AMOUNTS_MISMATCH");

        uint poolTotal = self.totalSupply();
        // Subtract  1 to ensure any rounding errors favor the pool
        uint ratio = DesynSafeMath.bdiv(poolAmountOut, DesynSafeMath.bsub(poolTotal, 1));

        require(ratio != 0, "ERR_MATH_APPROX");

        // We know the length of the array; initialize it, and fill it below
        // Cannot do "push" in memory
        actualAmountsIn = new uint[](tokens.length);

        // This loop contains external calls
        // External calls are to math libraries or the underlying pool, so low risk
        uint issueFeeRate = issueFee.bmul(1000);
        for (uint i = 0; i < tokens.length; i++) {
            address t = tokens[i];
            uint bal = bPool.getBalance(t);
            // Add 1 to ensure any rounding errors favor the pool
            uint base = bal.badd(1).bmul(poolAmountOut * uint(1000));
            uint tokenAmountIn = base.bdiv(poolTotal.bsub(1) * (uint(1000).bsub(issueFeeRate)));

            require(tokenAmountIn != 0, "ERR_MATH_APPROX");
            require(tokenAmountIn <= maxAmountsIn[i], "ERR_LIMIT_IN");

            actualAmountsIn[i] = tokenAmountIn;
        }
    }

    /**
     * @notice Exit a pool - redeem pool tokens for underlying assets
     * @param self - ConfigurableRightsPool instance calling the library
     * @param bPool - Core BPool the CRP is wrapping
     * @param poolAmountIn - amount of pool tokens to redeem
     * @param minAmountsOut - minimum amount of asset tokens to receive
     * @return actualAmountsOut - calculated amounts of each token to pull
     */
    function exitPool(
        IConfigurableRightsPool self,
        IBPool bPool,
        uint poolAmountIn,
        uint[] calldata minAmountsOut
    ) external view returns (uint[] memory actualAmountsOut) {
        address[] memory tokens = bPool.getCurrentTokens();

        require(minAmountsOut.length == tokens.length, "ERR_AMOUNTS_MISMATCH");

        uint poolTotal = self.totalSupply();

        uint ratio = DesynSafeMath.bdiv(poolAmountIn, DesynSafeMath.badd(poolTotal, 1));

        require(ratio != 0, "ERR_MATH_APPROX");

        actualAmountsOut = new uint[](tokens.length);

        // This loop contains external calls
        // External calls are to math libraries or the underlying pool, so low risk
        for (uint i = 0; i < tokens.length; i++) {
            address t = tokens[i];
            uint bal = bPool.getBalance(t);
            // Subtract 1 to ensure any rounding errors favor the pool
            uint tokenAmountOut = DesynSafeMath.bmul(ratio, DesynSafeMath.bsub(bal, 1));

            require(tokenAmountOut != 0, "ERR_MATH_APPROX");
            require(tokenAmountOut >= minAmountsOut[i], "ERR_LIMIT_OUT");

            actualAmountsOut[i] = tokenAmountOut;
        }
    }

    // Internal functions
    // Check for zero transfer, and make sure it returns true to returnValue
    function verifyTokenComplianceInternal(address token) internal {
        IERC20(token).safeTransfer(msg.sender, 0);
    }

    function handleTransferInTokens(
        IConfigurableRightsPool self,
        IBPool bPool,
        address poolToken,
        uint actualAmountIn,
        uint _actualIssueFee
    ) external returns (uint issueFeeReceived) {
        issueFeeReceived = DesynSafeMath.bmul(actualAmountIn, _actualIssueFee);
        uint amount = DesynSafeMath.bsub(actualAmountIn, issueFeeReceived);

        _pullUnderlying(bPool, poolToken, msg.sender, amount);

        if (_actualIssueFee != 0) {
            IERC20(poolToken).safeTransferFrom(msg.sender, address(this), issueFeeReceived);
            IERC20(poolToken).safeApprove(self.vaultAddress(), 0);
            IERC20(poolToken).safeApprove(self.vaultAddress(), issueFeeReceived);
        }
    }

    function handleClaim(
        IConfigurableRightsPool self,
        IBPool bPool,
        address[] calldata poolTokens,
        uint managerFee,
        uint timeElapsed,
        uint claimPeriod
    ) external returns (uint[] memory) {
        uint[] memory tokensAmount = new uint[](poolTokens.length);
        
        for (uint i = 0; i < poolTokens.length; i++) {
            address t = poolTokens[i];
            uint tokenBalance = bPool.getBalance(t);
            uint tokenAmountOut = tokenBalance.bmul(managerFee).mul(timeElapsed).div(claimPeriod).div(12);    
            _pushUnderlying(bPool, t, address(this), tokenAmountOut);
            IERC20(t).safeApprove(self.vaultAddress(), 0);
            IERC20(t).safeApprove(self.vaultAddress(), tokenAmountOut);
            tokensAmount[i] = tokenAmountOut;
        }
        
        return tokensAmount;
    }

    function handleFeeClaim(
        IConfigurableRightsPool self,
        IBPool bPool,
        address[] calldata poolTokens,
        uint feeRatio,
        bool isPerfermance
    ) external {
        if (feeRatio != 0) {
            uint[] memory tokensAmount = new uint[](poolTokens.length);

            for (uint i = 0; i < poolTokens.length; i++) {
                address t = poolTokens[i];
                uint currentAmount = bPool.getBalance(t);
                uint currentAmountFee = DesynSafeMath.bmul(currentAmount, feeRatio);

                _pushUnderlying(bPool, t, address(this), currentAmountFee);
                tokensAmount[i] = currentAmountFee;
                IERC20(t).safeApprove(self.vaultAddress(), 0);
                IERC20(t).safeApprove(self.vaultAddress(), currentAmountFee);
            }

            if(isPerfermance) {
                IVault(self.vaultAddress()).depositIssueRedeemPToken(poolTokens, tokensAmount, new uint[](poolTokens.length), isPerfermance);
            } else {
                IVault(self.vaultAddress()).depositIssueRedeemPToken(poolTokens, tokensAmount, tokensAmount, isPerfermance);
            }
            
        }
    }

    function WhitelistHandle(
        bool bool1,
        bool bool2,
        address adr
    ) external pure {
        require(bool1, "ERR_CANNOT_WHITELIST_LPS");
        require(bool2, "ERR_LP_NOT_WHITELISTED");
        require(adr != address(0), "ERR_INVALID_ADDRESS");
    }

    function _pullUnderlying(
        IBPool bPool,
        address erc20,
        address from,
        uint amount
    ) internal {
        uint tokenBalance = bPool.getBalance(erc20);
        uint tokenWeight = bPool.getDenormalizedWeight(erc20);

        IERC20(erc20).safeTransferFrom(from, address(this), amount);
        bPool.rebind(erc20, DesynSafeMath.badd(tokenBalance, amount), tokenWeight);
    }

    function _pushUnderlying(
        IBPool bPool,
        address erc20,
        address to,
        uint amount
    ) internal {
        uint tokenBalance = bPool.getBalance(erc20);
        uint tokenWeight = bPool.getDenormalizedWeight(erc20);
        bPool.rebind(erc20, DesynSafeMath.bsub(tokenBalance, amount), tokenWeight);
        IERC20(erc20).safeTransfer(to, amount);
    }
}

File 2 of 9 : IConfigurableRightsPool.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;

// Interface declarations

// Introduce to avoid circularity (otherwise, the CRP and SmartPoolManager include each other)
// Removing circularity allows flattener tools to work, which enables Etherscan verification
interface IConfigurableRightsPool {
    function mintPoolShareFromLib(uint amount) external;

    function pushPoolShareFromLib(address to, uint amount) external;

    function pullPoolShareFromLib(address from, uint amount) external;

    function burnPoolShareFromLib(uint amount) external;

    function balanceOf(address account) external view returns (uint);

    function totalSupply() external view returns (uint);

    function adminList(address) external view returns (bool);

    function getController() external view returns (address);

    function vaultAddress() external view returns (address);
}

File 3 of 9 : IERC20.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;

// Interface declarations

/* solhint-disable func-order */

interface IERC20 {
    // 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, uint value);

    // 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, uint value);

    // Returns the amount of tokens in existence
    function totalSupply() external view returns (uint);

    // Returns the amount of tokens owned by account
    function balanceOf(address account) external view returns (uint);

    // Returns the decimals of tokens
    function decimals() external view returns (uint8);

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

    // 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 (uint);

    // Sets amount as the allowance of spender over the caller’s tokens
    // Returns a boolean value indicating whether the operation succeeded
    // Emits an Approval event.
    function approve(address spender, uint amount) external returns (bool);

    // 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, uint amount) external returns (bool);

    // 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,
        uint amount
    ) external returns (bool);
}

File 4 of 9 : IBFactory.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

interface IBPool {
    function rebind(
        address token,
        uint balance,
        uint denorm
    ) external;

    function execute(
        address _target,
        uint _value,
        bytes calldata _data
    ) external returns (bytes memory _returnValue);

    function bind(
        address token,
        uint balance,
        uint denorm
    ) external;

    function unbind(address token) external;

    function unbindPure(address token) external;

    function isBound(address token) external view returns (bool);

    function getBalance(address token) external view returns (uint);

    function totalSupply() external view returns (uint);

    function isPublicSwap() external view returns (bool);

    function getDenormalizedWeight(address token) external view returns (uint);

    function getTotalDenormalizedWeight() external view returns (uint);

    function EXIT_FEE() external view returns (uint);

    function getCurrentTokens() external view returns (address[] memory tokens);

    function setController(address owner) external;
}

interface IBFactory {
    function newLiquidityPool() external returns (IBPool);

    function setBLabs(address b) external;

    function collect(IBPool pool) external;

    function isBPool(address b) external view returns (bool);

    function getBLabs() external view returns (address);

    function getVault() external view returns (address);

    function getUserVault() external view returns (address);

    function getVaultAddress() external view returns (address);

    function getOracleAddress() external view returns (address);

    function isTokenWhitelistedForVerify(uint sort, address token) external view returns (bool);

    function isTokenWhitelistedForVerify(address token) external view returns (bool);

    function getModuleStatus(address etf, address module) external view returns (bool);

    function isPaused() external view returns (bool);
}

interface IVault {
    function depositManagerToken(address[] calldata poolTokens, uint[] calldata tokensAmount) external;

    function depositIssueRedeemPToken(
        address[] calldata poolTokens,
        uint[] calldata tokensAmount,
        uint[] calldata tokensAmountP,
        bool isPerfermance
    ) external;

    function managerClaim(address pool) external;

    function getManagerClaimBool(address pool) external view returns (bool);
}

interface IUserVault {
    function recordTokenInfo(
        address kol,
        address user,
        address[] calldata poolTokens,
        uint[] calldata tokensAmount
    ) external;
}

interface Oracles {
    function getPrice(address tokenAddress) external returns (uint price);

    function getAllPrice(address[] calldata poolTokens, uint[] calldata tokensAmount) external returns (uint);
}

File 5 of 9 : SafeMath.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.12;

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

File 6 of 9 : DesynSafeMath.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;

// Imports

import "./DesynConstants.sol";

/**
 * @author Desyn Labs
 * @title SafeMath - wrap Solidity operators to prevent underflow/overflow
 * @dev badd and bsub are basically identical to OpenZeppelin SafeMath; mul/div have extra checks
 */
library DesynSafeMath {
    /**
     * @notice Safe addition
     * @param a - first operand
     * @param b - second operand
     * @dev if we are adding b to a, the resulting sum must be greater than a
     * @return - sum of operands; throws if overflow
     */
    function badd(uint a, uint b) internal pure returns (uint) {
        uint c = a + b;
        require(c >= a, "ERR_ADD_OVERFLOW");
        return c;
    }

    /**
     * @notice Safe unsigned subtraction
     * @param a - first operand
     * @param b - second operand
     * @dev Do a signed subtraction, and check that it produces a positive value
     *      (i.e., a - b is valid if b <= a)
     * @return - a - b; throws if underflow
     */
    function bsub(uint a, uint b) internal pure returns (uint) {
        (uint c, bool negativeResult) = bsubSign(a, b);
        require(!negativeResult, "ERR_SUB_UNDERFLOW");
        return c;
    }

    /**
     * @notice Safe signed subtraction
     * @param a - first operand
     * @param b - second operand
     * @dev Do a signed subtraction
     * @return - difference between a and b, and a flag indicating a negative result
     *           (i.e., a - b if a is greater than or equal to b; otherwise b - a)
     */
    function bsubSign(uint a, uint b) internal pure returns (uint, bool) {
        if (b <= a) {
            return (a - b, false);
        } else {
            return (b - a, true);
        }
    }

    /**
     * @notice Safe multiplication
     * @param a - first operand
     * @param b - second operand
     * @dev Multiply safely (and efficiently), rounding down
     * @return - product of operands; throws if overflow or rounding error
     */
    function bmul(uint a, uint b) internal pure returns (uint) {
        // Gas optimization (see github.com/OpenZeppelin/openzeppelin-contracts/pull/522)
        if (a == 0) {
            return 0;
        }

        // Standard overflow check: a/a*b=b
        uint c0 = a * b;
        require(c0 / a == b, "ERR_MUL_OVERFLOW");

        // Round to 0 if x*y < BONE/2?
        uint c1 = c0 + (DesynConstants.BONE / 2);
        require(c1 >= c0, "ERR_MUL_OVERFLOW");
        uint c2 = c1 / DesynConstants.BONE;
        return c2;
    }

    /**
     * @notice Safe division
     * @param dividend - first operand
     * @param divisor - second operand
     * @dev Divide safely (and efficiently), rounding down
     * @return - quotient; throws if overflow or rounding error
     */
    function bdiv(uint dividend, uint divisor) internal pure returns (uint) {
        require(divisor != 0, "ERR_DIV_ZERO");

        // Gas optimization
        if (dividend == 0) {
            return 0;
        }

        uint c0 = dividend * DesynConstants.BONE;
        require(c0 / dividend == DesynConstants.BONE, "ERR_DIV_INTERNAL"); // bmul overflow

        uint c1 = c0 + (divisor / 2);
        require(c1 >= c0, "ERR_DIV_INTERNAL"); //  badd require

        uint c2 = c1 / divisor;
        return c2;
    }

    /**
     * @notice Safe unsigned integer modulo
     * @dev Returns the remainder of dividing two unsigned integers.
     *      Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * @param dividend - first operand
     * @param divisor - second operand -- cannot be zero
     * @return - quotient; throws if overflow or rounding error
     */
    function bmod(uint dividend, uint divisor) internal pure returns (uint) {
        require(divisor != 0, "ERR_MODULO_BY_ZERO");

        return dividend % divisor;
    }

    /**
     * @notice Safe unsigned integer max
     * @dev Returns the greater of the two input values
     *
     * @param a - first operand
     * @param b - second operand
     * @return - the maximum of a and b
     */
    function bmax(uint a, uint b) internal pure returns (uint) {
        return a >= b ? a : b;
    }

    /**
     * @notice Safe unsigned integer min
     * @dev returns b, if b < a; otherwise returns a
     *
     * @param a - first operand
     * @param b - second operand
     * @return - the lesser of the two input values
     */
    function bmin(uint a, uint b) internal pure returns (uint) {
        return a < b ? a : b;
    }

    /**
     * @notice Safe unsigned integer average
     * @dev Guard against (a+b) overflow by dividing each operand separately
     *
     * @param a - first operand
     * @param b - second operand
     * @return - the average of the two values
     */
    function baverage(uint a, uint b) internal pure returns (uint) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + (((a % 2) + (b % 2)) / 2);
    }

    /**
     * @notice Babylonian square root implementation
     * @dev (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
     * @param y - operand
     * @return z - the square root result
     */
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 7 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import {IERC20} from "../interfaces/IERC20.sol";
import {SafeMath} from "./SafeMath.sol";
import {Address} from "./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 uint;
    using Address for address;

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

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

    function safeApprove(
        IERC20 token,
        address spender,
        uint value
    ) internal {
        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 callOptionalReturn(IERC20 token, bytes memory data) private {
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "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 8 of 9 : DesynConstants.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;

/**
 * @author Desyn Labs
 * @title Put all the constants in one place
 */

library DesynConstants {
    // State variables (must be constant in a library)

    // where numeric 1 = 10 ** 18
    uint public constant BONE = 10**18;
    uint public constant MIN_WEIGHT = BONE;
    uint public constant MAX_WEIGHT = BONE * 50;
    uint public constant MAX_TOTAL_WEIGHT = BONE * 50;
    uint public constant MIN_BALANCE = 0;
    uint public constant MAX_BALANCE = BONE * 10**12;
    uint public constant MIN_POOL_SUPPLY = BONE * 100;
    uint public constant MAX_POOL_SUPPLY = BONE * 10**9;
    uint public constant MIN_FEE = BONE / 10**6;
    uint public constant MAX_FEE = BONE / 10;
    //Fee Set
    uint public constant MANAGER_MIN_FEE = 0;
    uint public constant MANAGER_MAX_FEE = BONE / 10;
    uint public constant ISSUE_MIN_FEE = 0;
    uint public constant ISSUE_MAX_FEE = BONE / 10;
    uint public constant REDEEM_MIN_FEE = 0;
    uint public constant REDEEM_MAX_FEE = BONE / 10;
    uint public constant PERFERMANCE_MIN_FEE = 0;
    uint public constant PERFERMANCE_MAX_FEE = BONE / 2;
    // EXIT_FEE must always be zero, or ConfigurableRightsPool._pushUnderlying will fail
    uint public constant EXIT_FEE = 0;
    uint public constant MAX_IN_RATIO = BONE / 2;
    uint public constant MAX_OUT_RATIO = (BONE / 3) + 1 wei;
    // Must match BConst.MIN_BOUND_TOKENS and BConst.MAX_BOUND_TOKENS
    uint public constant MIN_ASSET_LIMIT = 1;
    uint public constant MAX_ASSET_LIMIT = 16;
    uint public constant MAX_UINT = uint(-1);
    uint public constant MAX_COLLECT_PERIOD = 60 days;
}

File 9 of 9 : Address.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.12;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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, uint 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");
    }

    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    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,
        uint 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,
        uint value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        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);
            }
        }
    }
}

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

Contract ABI

API
[{"inputs":[{"internalType":"bool","name":"bool1","type":"bool"},{"internalType":"bool","name":"bool2","type":"bool"},{"internalType":"address","name":"adr","type":"address"}],"name":"WhitelistHandle","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectPeriod","type":"uint256"},{"internalType":"uint256","name":"upperCap","type":"uint256"},{"internalType":"uint256","name":"initialSupply","type":"uint256"}],"name":"createPoolHandle","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract IBPool","name":"bPool","type":"IBPool"},{"internalType":"uint256","name":"initialSupply","type":"uint256"}],"name":"createPoolInternalHandle","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IConfigurableRightsPool","name":"self","type":"IConfigurableRightsPool"},{"internalType":"contract IBPool","name":"bPool","type":"IBPool"},{"internalType":"uint256","name":"poolAmountIn","type":"uint256"},{"internalType":"uint256[]","name":"minAmountsOut","type":"uint256[]"}],"name":"exitPool","outputs":[{"internalType":"uint256[]","name":"actualAmountsOut","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IConfigurableRightsPool","name":"self","type":"IConfigurableRightsPool"},{"internalType":"bool","name":"bools","type":"bool"},{"internalType":"bool","name":"isCompletedCollect","type":"bool"},{"internalType":"uint256","name":"closureEndTime","type":"uint256"},{"internalType":"uint256","name":"collectEndTime","type":"uint256"},{"internalType":"uint256","name":"poolAmountIn","type":"uint256"}],"name":"exitPoolHandleB","outputs":[{"internalType":"uint256","name":"actualPoolAmountIn","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"managerFee","type":"uint256"},{"internalType":"uint256","name":"issueFee","type":"uint256"},{"internalType":"uint256","name":"redeemFee","type":"uint256"},{"internalType":"uint256","name":"perfermanceFee","type":"uint256"},{"internalType":"uint256","name":"tokenBalancesLength","type":"uint256"},{"internalType":"uint256","name":"tokenWeightsLength","type":"uint256"},{"internalType":"uint256","name":"constituentTokensLength","type":"uint256"},{"internalType":"bool","name":"initBool","type":"bool"}],"name":"initRequire","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract IConfigurableRightsPool","name":"self","type":"IConfigurableRightsPool"},{"internalType":"contract IBPool","name":"bPool","type":"IBPool"},{"internalType":"uint256","name":"poolAmountOut","type":"uint256"},{"internalType":"uint256[]","name":"maxAmountsIn","type":"uint256[]"},{"internalType":"uint256","name":"issueFee","type":"uint256"}],"name":"joinPool","outputs":[{"internalType":"uint256[]","name":"actualAmountsIn","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"canWhitelistLPs","type":"bool"},{"internalType":"bool","name":"isList","type":"bool"},{"internalType":"bool","name":"bools","type":"bool"},{"internalType":"uint256","name":"collectEndTime","type":"uint256"}],"name":"joinPoolHandle","outputs":[],"stateMutability":"view","type":"function"}]

612bc6610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100c45760003560e01c80631c1af136146100c95780632c948f6f146100eb578063357934d2146101235780633e9fc0bd1461015057806344e3696f146101635780635471c3e41461017657806377d44349146101895780637f717d85146101a9578063b78e0bc9146101c9578063d03f2a0f146101dc578063d378778c146101ef578063d3aa47101461020f578063dba4989a14610222578063ea8e866214610235575b600080fd5b8180156100d557600080fd5b506100e96100e4366004611d49565b610255565b005b8180156100f757600080fd5b5061010b610106366004611fa2565b610261565b60405161011a93929190612b05565b60405180910390f35b81801561012f57600080fd5b5061014361013e36600461207e565b6103c1565b60405161011a91906123f1565b6100e961015e3660046121fb565b61062e565b6100e9610171366004612226565b61067f565b6101436101843660046120fb565b6107c7565b81801561019557600080fd5b506100e96101a4366004611d81565b610a8b565b6101bc6101b7366004611f3e565b610ac7565b60405161011a9190612afc565b6101436101d736600461216b565b610b94565b6100e96101ea366004611f13565b610e95565b8180156101fb57600080fd5b506101bc61020a366004611fa2565b610f7b565b6100e961021d366004611e79565b6110d3565b6100e9610230366004611ec3565b611133565b81801561024157600080fd5b506100e9610250366004611ffc565b611185565b61025e81611539565b50565b6000806000610270858561154e565b9050600061027e81836115cd565b935061028a86856115f9565b925061029888883386611632565b84156103b5576102aa88883087611632565b610330896001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102e657600080fd5b505afa1580156102fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031e9190611d65565b6001600160a01b0389169060006117b3565b6103b5896001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561036c57600080fd5b505afa158015610380573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a49190611d65565b6001600160a01b03891690866117b3565b50955095509592505050565b606080856001600160401b03811180156103da57600080fd5b50604051908082528060200260200182016040528015610404578160200160208202803683370190505b50905060005b8681101561062157600088888381811061042057fe5b90506020020160208101906104359190611d49565b905060008a6001600160a01b031663f8b2cb4f836040518263ffffffff1660e01b815260040161046591906122e5565b60206040518083038186803b15801561047d57600080fd5b505afa158015610491573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b591906121e3565b905060006104e5600c6104df896104df8c6104d98f8961154e90919063ffffffff16565b906118ad565b906118e7565b90506104f38c843084611632565b6105798d6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561052f57600080fd5b505afa158015610543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105679190611d65565b6001600160a01b0385169060006117b3565b6105fe8d6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105b557600080fd5b505afa1580156105c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ed9190611d65565b6001600160a01b03851690836117b3565b8085858151811061060b57fe5b602090810291909101015250505060010161040a565b5098975050505050505050565b624f1a0083111561065a5760405162461bcd60e51b81526004016106519061289f565b60405180910390fd5b8082101561067a5760405162461bcd60e51b815260040161065190612524565b505050565b801561069d5760405162461bcd60e51b81526004016106519061261f565b67016345785d8a00008811156106c55760405162461bcd60e51b815260040161065190612468565b67016345785d8a00008711156106ed5760405162461bcd60e51b815260040161065190612780565b67016345785d8a00008611156107155760405162461bcd60e51b8152600401610651906129c7565b6706f05b59d3b2000085111561073d5760405162461bcd60e51b8152600401610651906126f9565b81841461075c5760405162461bcd60e51b815260040161065190612697565b81831461077b5760405162461bcd60e51b815260040161065190612499565b600182101561079c5760405162461bcd60e51b8152600401610651906128d6565b60108211156107bd5760405162461bcd60e51b81526004016106519061299a565b5050505050505050565b606080856001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b15801561080357600080fd5b505afa158015610817573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261083f9190810190611dc0565b805190915083146108625760405162461bcd60e51b815260040161065190612642565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561089d57600080fd5b505afa1580156108b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d591906121e3565b905060006108ed876108e88460016115cd565b611926565b90508061090c5760405162461bcd60e51b8152600401610651906124cd565b82516001600160401b038111801561092357600080fd5b5060405190808252806020026020018201604052801561094d578160200160208202803683370190505b50935060005b8351811015610a7e57600084828151811061096a57fe5b6020026020010151905060008a6001600160a01b031663f8b2cb4f836040518263ffffffff1660e01b81526004016109a291906122e5565b60206040518083038186803b1580156109ba57600080fd5b505afa1580156109ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f291906121e3565b90506000610a0a85610a058460016115f9565b61154e565b905080610a295760405162461bcd60e51b8152600401610651906124cd565b898985818110610a3557fe5b90506020020135811015610a5b5760405162461bcd60e51b815260040161065190612670565b80888581518110610a6857fe5b6020908102919091010152505050600101610953565b5050505095945050505050565b60005b8181101561067a57610abf838383818110610aa557fe5b9050602002016020810190610aba9190611d49565b611539565b600101610a8e565b808515610b8a57600085158015610ade5750834210155b9050428511158180610aed5750805b610b095760405162461bcd60e51b815260040161065190612938565b6040516370a0823160e01b81526001600160a01b038a16906370a0823190610b359033906004016122e5565b60206040518083038186803b158015610b4d57600080fd5b505afa158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8591906121e3565b925050505b9695505050505050565b606080866001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b158015610bd057600080fd5b505afa158015610be4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c0c9190810190611dc0565b80519091508414610c2f5760405162461bcd60e51b815260040161065190612642565b6000886001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c6a57600080fd5b505afa158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca291906121e3565b90506000610cb5886108e88460016115f9565b905080610cd45760405162461bcd60e51b8152600401610651906124cd565b82516001600160401b0381118015610ceb57600080fd5b50604051908082528060200260200182016040528015610d15578160200160208202803683370190505b5093506000610d26866103e861154e565b905060005b8451811015610e86576000858281518110610d4257fe5b6020026020010151905060008c6001600160a01b031663f8b2cb4f836040518263ffffffff1660e01b8152600401610d7a91906122e5565b60206040518083038186803b158015610d9257600080fd5b505afa158015610da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dca91906121e3565b90506000610de76103e88e02610de18460016115cd565b9061154e565b90506000610e0d610dfa6103e8886115f9565b610e058a60016115f9565b849102611926565b905080610e2c5760405162461bcd60e51b8152600401610651906124cd565b8c8c86818110610e3857fe5b90506020020135811115610e5e5760405162461bcd60e51b81526004016106519061275a565b808a8681518110610e6b57fe5b6020908102919091010152505060019092019150610d2b9050565b50505050509695505050505050565b68056bc75e2d63100000811015610ebe5760405162461bcd60e51b8152600401610651906126cc565b676765c793fa10079d601b1b811115610ee95760405162461bcd60e51b81526004016106519061255b565b816001600160a01b031663c6580d126040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a91906121e3565b15610f775760405162461bcd60e51b815260040161065190612871565b5050565b6000610f87838361154e565b90506000610f9584836115f9565b9050610fa3868633846119b7565b82156110c957610fbe6001600160a01b038616333085611b40565b611044876001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ffa57600080fd5b505afa15801561100e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110329190611d65565b6001600160a01b0387169060006117b3565b6110c9876001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561108057600080fd5b505afa158015611094573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b89190611d65565b6001600160a01b03871690846117b3565b5095945050505050565b826110f05760405162461bcd60e51b8152600401610651906125bd565b8161110d5760405162461bcd60e51b8152600401610651906125ef565b6001600160a01b03811661067a5760405162461bcd60e51b8152600401610651906127f4565b83158061113d5750825b6111595760405162461bcd60e51b8152600401610651906124f6565b811561117f578042111561117f5760405162461bcd60e51b815260040161065190612902565b50505050565b8115611531576060836001600160401b03811180156111a357600080fd5b506040519080825280602002602001820160405280156111cd578160200160208202803683370190505b50905060005b848110156113365760008686838181106111e957fe5b90506020020160208101906111fe9190611d49565b90506000886001600160a01b031663f8b2cb4f836040518263ffffffff1660e01b815260040161122e91906122e5565b60206040518083038186803b15801561124657600080fd5b505afa15801561125a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127e91906121e3565b9050600061128c828861154e565b905061129a8a843084611632565b808585815181106112a757fe5b6020026020010181815250506112ef8b6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561052f57600080fd5b61132b8b6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105b557600080fd5b5050506001016111d3565b50811561145857866001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561137657600080fd5b505afa15801561138a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ae9190611d65565b6001600160a01b0316631483d99d868684816001600160401b03811180156113d557600080fd5b506040519080825280602002602001820160405280156113ff578160200160208202803683370190505b50876040518663ffffffff1660e01b8152600401611421959493929190612371565b600060405180830381600087803b15801561143b57600080fd5b505af115801561144f573d6000803e3d6000fd5b5050505061152f565b866001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611d65565b6001600160a01b0316631483d99d86868485876040518663ffffffff1660e01b81526004016114fc959493929190612371565b600060405180830381600087803b15801561151657600080fd5b505af115801561152a573d6000803e3d6000fd5b505050505b505b505050505050565b61025e6001600160a01b038216336000611b61565b60008261155d575060006115c7565b8282028284828161156a57fe5b04146115885760405162461bcd60e51b815260040161065190612821565b6706f05b59d3b200008101818110156115b35760405162461bcd60e51b815260040161065190612821565b6000670de0b6b3a7640000825b0493505050505b92915050565b6000828201838110156115f25760405162461bcd60e51b8152600401610651906129fb565b9392505050565b60008060006116088585611b80565b91509150801561162a5760405162461bcd60e51b81526004016106519061296f565b509392505050565b60405163f8b2cb4f60e01b81526000906001600160a01b0386169063f8b2cb4f906116619087906004016122e5565b60206040518083038186803b15801561167957600080fd5b505afa15801561168d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b191906121e3565b90506000856001600160a01b031663948d8ce6866040518263ffffffff1660e01b81526004016116e191906122e5565b60206040518083038186803b1580156116f957600080fd5b505afa15801561170d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173191906121e3565b9050856001600160a01b0316633fdddaa28661174d85876115f9565b846040518463ffffffff1660e01b815260040161176c93929190612350565b600060405180830381600087803b15801561178657600080fd5b505af115801561179a573d6000803e3d6000fd5b50611531925050506001600160a01b0386168585611b61565b80158061183b5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906117e990309086906004016122f9565b60206040518083038186803b15801561180157600080fd5b505afa158015611815573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183991906121e3565b155b6118575760405162461bcd60e51b815260040161065190612a6f565b61067a8363095ea7b360e01b8484604051602401611876929190612337565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611ba5565b6000826118bc575060006115c7565b828202828482816118c957fe5b04146115f25760405162461bcd60e51b8152600401610651906127b3565b60006115f283836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250611c8a565b6000816119455760405162461bcd60e51b81526004016106519061284b565b82611952575060006115c7565b670de0b6b3a76400008381029084828161196857fe5b04146119865760405162461bcd60e51b815260040161065190612730565b600283048101818110156119ac5760405162461bcd60e51b815260040161065190612730565b60008482816115c057fe5b60405163f8b2cb4f60e01b81526000906001600160a01b0386169063f8b2cb4f906119e69087906004016122e5565b60206040518083038186803b1580156119fe57600080fd5b505afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3691906121e3565b90506000856001600160a01b031663948d8ce6866040518263ffffffff1660e01b8152600401611a6691906122e5565b60206040518083038186803b158015611a7e57600080fd5b505afa158015611a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab691906121e3565b9050611acd6001600160a01b038616853086611b40565b856001600160a01b0316633fdddaa286611ae785876115cd565b846040518463ffffffff1660e01b8152600401611b0693929190612350565b600060405180830381600087803b158015611b2057600080fd5b505af1158015611b34573d6000803e3d6000fd5b50505050505050505050565b61117f846323b872dd60e01b85858560405160240161187693929190612313565b61067a8363a9059cbb60e01b8484604051602401611876929190612337565b600080838311611b965750508082036000611b9e565b505081810360015b9250929050565b611bb7826001600160a01b0316611cc1565b611bd35760405162461bcd60e51b815260040161065190612ac5565b60006060836001600160a01b031683604051611bef91906122c9565b6000604051808303816000865af19150503d8060008114611c2c576040519150601f19603f3d011682016040523d82523d6000602084013e611c31565b606091505b509150915081611c535760405162461bcd60e51b815260040161065190612588565b80511561117f5780806020019051810190611c6e9190611e5d565b61117f5760405162461bcd60e51b815260040161065190612a25565b60008183611cab5760405162461bcd60e51b81526004016106519190612435565b506000838581611cb757fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611cf557508115155b949350505050565b80516115c781612b6d565b60008083601f840112611d19578182fd5b5081356001600160401b03811115611d2f578182fd5b6020830191508360208083028501011115611b9e57600080fd5b600060208284031215611d5a578081fd5b81356115f281612b6d565b600060208284031215611d76578081fd5b81516115f281612b6d565b60008060208385031215611d93578081fd5b82356001600160401b03811115611da8578182fd5b611db485828601611d08565b90969095509350505050565b60006020808385031215611dd2578182fd5b82516001600160401b0380821115611de8578384fd5b818501915085601f830112611dfb578384fd5b815181811115611e09578485fd5b8381029150611e19848301612b1b565b8181528481019084860184860187018a1015611e33578788fd5b8795505b8386101561062157611e498a82611cfd565b835260019590950194918601918601611e37565b600060208284031215611e6e578081fd5b81516115f281612b82565b600080600060608486031215611e8d578081fd5b8335611e9881612b82565b92506020840135611ea881612b82565b91506040840135611eb881612b6d565b809150509250925092565b60008060008060808587031215611ed8578081fd5b8435611ee381612b82565b93506020850135611ef381612b82565b92506040850135611f0381612b82565b9396929550929360600135925050565b60008060408385031215611f25578182fd5b8235611f3081612b6d565b946020939093013593505050565b60008060008060008060c08789031215611f56578182fd5b8635611f6181612b6d565b95506020870135611f7181612b82565b94506040870135611f8181612b82565b959894975094956060810135955060808101359460a0909101359350915050565b600080600080600060a08688031215611fb9578081fd5b8535611fc481612b6d565b94506020860135611fd481612b6d565b93506040860135611fe481612b6d565b94979396509394606081013594506080013592915050565b60008060008060008060a08789031215612014578182fd5b863561201f81612b6d565b9550602087013561202f81612b6d565b945060408701356001600160401b03811115612049578283fd5b61205589828a01611d08565b90955093505060608701359150608087013561207081612b82565b809150509295509295509295565b600080600080600080600060c0888a031215612098578485fd5b87356120a381612b6d565b965060208801356120b381612b6d565b955060408801356001600160401b038111156120cd578586fd5b6120d98a828b01611d08565b989b979a50986060810135976080820135975060a09091013595509350505050565b600080600080600060808688031215612112578283fd5b853561211d81612b6d565b9450602086013561212d81612b6d565b93506040860135925060608601356001600160401b0381111561214e578182fd5b61215a88828901611d08565b969995985093965092949392505050565b60008060008060008060a08789031215612183578384fd5b863561218e81612b6d565b9550602087013561219e81612b6d565b94506040870135935060608701356001600160401b038111156121bf578283fd5b6121cb89828a01611d08565b979a9699509497949695608090950135949350505050565b6000602082840312156121f4578081fd5b5051919050565b60008060006060848603121561220f578081fd5b505081359360208301359350604090920135919050565b600080600080600080600080610100898b031215612242578182fd5b883597506020890135965060408901359550606089013594506080890135935060a0890135925060c0890135915060e089013561227e81612b82565b809150509295985092959890939650565b6000815180845260208085019450808401835b838110156122be578151875295820195908201906001016122a2565b509495945050505050565b600082516122db818460208701612b41565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b6080808252810185905260008660a08301825b888110156123b4576020833561239981612b6d565b6001600160a01b031683529283019290910190600101612384565b5083810360208501526123c7818861228f565b91505082810360408401526123dc818661228f565b91505082151560608301529695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156124295783518352928401929184019160010161240d565b50909695505050505050565b6000602082528251806020840152612454816040850160208701612b41565b601f01601f19169190910160400192915050565b6020808252601790820152764552525f494e56414c49445f4d414e414745525f46454560481b604082015260600190565b6020808252601a908201527908aa4a4bea6a882a4a8beae8a928e90a8a6be9a92a69a82a886960331b604082015260600190565b6020808252600f908201526e08aa4a4be9a82a890be82a0a0a49eb608b1b604082015260600190565b60208082526014908201527311549497d393d517d3d397d5d2125511531254d560621b604082015260600190565b6020808252601e908201527f4552525f4341505f4249474745525f5448414e5f494e4954535550504c590000604082015260600190565b60208082526013908201527208aa4a4be929c92a8bea6aaa0a098b2be9a82b606b1b604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252601890820152774552525f43414e4e4f545f57484954454c4953545f4c505360401b604082015260600190565b60208082526016908201527511549497d31417d393d517d5d2125511531254d5115160521b604082015260600190565b602080825260099082015268125b9a5d0819985a5b60ba1b604082015260600190565b60208082526014908201527308aa4a4be829a9eaa9ca8a6be9a92a69a82a886960631b604082015260600190565b6020808252600d908201526c11549497d31253525517d3d555609a1b604082015260600190565b6020808252601b908201527a08aa4a4bea6a882a4a8be848298829c868aa6be9a92a69a82a8869602b1b604082015260600190565b60208082526013908201527222a9292fa4a724aa2fa9aaa828262cafa6a4a760691b604082015260600190565b6020808252601f908201527f4552525f494e56414c49445f5045524645524d414e43455f4d41585f46454500604082015260600190565b60208082526010908201526f11549497d1125597d25395115493905360821b604082015260600190565b6020808252600c908201526b22a9292fa624a6a4aa2fa4a760a11b604082015260600190565b6020808252601990820152784552525f494e56414c49445f49535355455f4d41585f46454560381b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252601390820152724552525f494e56414c49445f4144445245535360681b604082015260600190565b60208082526010908201526f4552525f4d554c5f4f564552464c4f5760801b604082015260600190565b6020808252600c908201526b4552525f4449565f5a45524f60a01b604082015260600190565b6020808252601490820152734552525f4e4f4e5a45524f5f455849545f46454560601b604082015260600190565b6020808252601f908201527f4552525f455843454544535f46554e445f52414953494e475f504552494f4400604082015260600190565b6020808252601290820152714552525f544f4f5f4645575f544f4b454e5360701b604082015260600190565b6020808252601c908201527b4552525f434f4c4c4543545f504552494f445f46494e49534845442160201b604082015260600190565b6020808252601d908201527f4552525f434c4f535552455f54494d455f4e4f545f4152524956454421000000604082015260600190565b6020808252601190820152704552525f5355425f554e444552464c4f5760781b604082015260600190565b6020808252601390820152724552525f544f4f5f4d414e595f544f4b454e5360681b604082015260600190565b6020808252601a90820152794552525f494e56414c49445f52454445454d5f4d41585f46454560301b604082015260600190565b60208082526010908201526f4552525f4144445f4f564552464c4f5760801b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252601f908201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604082015260600190565b90815260200190565b9283526020830191909152604082015260600190565b6040518181016001600160401b0381118282101715612b3957600080fd5b604052919050565b60005b83811015612b5c578181015183820152602001612b44565b8381111561117f5750506000910152565b6001600160a01b038116811461025e57600080fd5b801515811461025e57600080fdfea2646970667358221220daaa2d3ec332d2871b5b1151b0bac5757ad7b18820d9c544e1414ad4632bcad264736f6c634300060c0033

Deployed Bytecode

0x738c8c11fab1b8f9cdc253fd7fca1719c3833e13a630146080604052600436106100c45760003560e01c80631c1af136146100c95780632c948f6f146100eb578063357934d2146101235780633e9fc0bd1461015057806344e3696f146101635780635471c3e41461017657806377d44349146101895780637f717d85146101a9578063b78e0bc9146101c9578063d03f2a0f146101dc578063d378778c146101ef578063d3aa47101461020f578063dba4989a14610222578063ea8e866214610235575b600080fd5b8180156100d557600080fd5b506100e96100e4366004611d49565b610255565b005b8180156100f757600080fd5b5061010b610106366004611fa2565b610261565b60405161011a93929190612b05565b60405180910390f35b81801561012f57600080fd5b5061014361013e36600461207e565b6103c1565b60405161011a91906123f1565b6100e961015e3660046121fb565b61062e565b6100e9610171366004612226565b61067f565b6101436101843660046120fb565b6107c7565b81801561019557600080fd5b506100e96101a4366004611d81565b610a8b565b6101bc6101b7366004611f3e565b610ac7565b60405161011a9190612afc565b6101436101d736600461216b565b610b94565b6100e96101ea366004611f13565b610e95565b8180156101fb57600080fd5b506101bc61020a366004611fa2565b610f7b565b6100e961021d366004611e79565b6110d3565b6100e9610230366004611ec3565b611133565b81801561024157600080fd5b506100e9610250366004611ffc565b611185565b61025e81611539565b50565b6000806000610270858561154e565b9050600061027e81836115cd565b935061028a86856115f9565b925061029888883386611632565b84156103b5576102aa88883087611632565b610330896001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102e657600080fd5b505afa1580156102fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031e9190611d65565b6001600160a01b0389169060006117b3565b6103b5896001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561036c57600080fd5b505afa158015610380573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a49190611d65565b6001600160a01b03891690866117b3565b50955095509592505050565b606080856001600160401b03811180156103da57600080fd5b50604051908082528060200260200182016040528015610404578160200160208202803683370190505b50905060005b8681101561062157600088888381811061042057fe5b90506020020160208101906104359190611d49565b905060008a6001600160a01b031663f8b2cb4f836040518263ffffffff1660e01b815260040161046591906122e5565b60206040518083038186803b15801561047d57600080fd5b505afa158015610491573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b591906121e3565b905060006104e5600c6104df896104df8c6104d98f8961154e90919063ffffffff16565b906118ad565b906118e7565b90506104f38c843084611632565b6105798d6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561052f57600080fd5b505afa158015610543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105679190611d65565b6001600160a01b0385169060006117b3565b6105fe8d6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105b557600080fd5b505afa1580156105c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ed9190611d65565b6001600160a01b03851690836117b3565b8085858151811061060b57fe5b602090810291909101015250505060010161040a565b5098975050505050505050565b624f1a0083111561065a5760405162461bcd60e51b81526004016106519061289f565b60405180910390fd5b8082101561067a5760405162461bcd60e51b815260040161065190612524565b505050565b801561069d5760405162461bcd60e51b81526004016106519061261f565b67016345785d8a00008811156106c55760405162461bcd60e51b815260040161065190612468565b67016345785d8a00008711156106ed5760405162461bcd60e51b815260040161065190612780565b67016345785d8a00008611156107155760405162461bcd60e51b8152600401610651906129c7565b6706f05b59d3b2000085111561073d5760405162461bcd60e51b8152600401610651906126f9565b81841461075c5760405162461bcd60e51b815260040161065190612697565b81831461077b5760405162461bcd60e51b815260040161065190612499565b600182101561079c5760405162461bcd60e51b8152600401610651906128d6565b60108211156107bd5760405162461bcd60e51b81526004016106519061299a565b5050505050505050565b606080856001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b15801561080357600080fd5b505afa158015610817573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261083f9190810190611dc0565b805190915083146108625760405162461bcd60e51b815260040161065190612642565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561089d57600080fd5b505afa1580156108b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d591906121e3565b905060006108ed876108e88460016115cd565b611926565b90508061090c5760405162461bcd60e51b8152600401610651906124cd565b82516001600160401b038111801561092357600080fd5b5060405190808252806020026020018201604052801561094d578160200160208202803683370190505b50935060005b8351811015610a7e57600084828151811061096a57fe5b6020026020010151905060008a6001600160a01b031663f8b2cb4f836040518263ffffffff1660e01b81526004016109a291906122e5565b60206040518083038186803b1580156109ba57600080fd5b505afa1580156109ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f291906121e3565b90506000610a0a85610a058460016115f9565b61154e565b905080610a295760405162461bcd60e51b8152600401610651906124cd565b898985818110610a3557fe5b90506020020135811015610a5b5760405162461bcd60e51b815260040161065190612670565b80888581518110610a6857fe5b6020908102919091010152505050600101610953565b5050505095945050505050565b60005b8181101561067a57610abf838383818110610aa557fe5b9050602002016020810190610aba9190611d49565b611539565b600101610a8e565b808515610b8a57600085158015610ade5750834210155b9050428511158180610aed5750805b610b095760405162461bcd60e51b815260040161065190612938565b6040516370a0823160e01b81526001600160a01b038a16906370a0823190610b359033906004016122e5565b60206040518083038186803b158015610b4d57600080fd5b505afa158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8591906121e3565b925050505b9695505050505050565b606080866001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b158015610bd057600080fd5b505afa158015610be4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c0c9190810190611dc0565b80519091508414610c2f5760405162461bcd60e51b815260040161065190612642565b6000886001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c6a57600080fd5b505afa158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca291906121e3565b90506000610cb5886108e88460016115f9565b905080610cd45760405162461bcd60e51b8152600401610651906124cd565b82516001600160401b0381118015610ceb57600080fd5b50604051908082528060200260200182016040528015610d15578160200160208202803683370190505b5093506000610d26866103e861154e565b905060005b8451811015610e86576000858281518110610d4257fe5b6020026020010151905060008c6001600160a01b031663f8b2cb4f836040518263ffffffff1660e01b8152600401610d7a91906122e5565b60206040518083038186803b158015610d9257600080fd5b505afa158015610da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dca91906121e3565b90506000610de76103e88e02610de18460016115cd565b9061154e565b90506000610e0d610dfa6103e8886115f9565b610e058a60016115f9565b849102611926565b905080610e2c5760405162461bcd60e51b8152600401610651906124cd565b8c8c86818110610e3857fe5b90506020020135811115610e5e5760405162461bcd60e51b81526004016106519061275a565b808a8681518110610e6b57fe5b6020908102919091010152505060019092019150610d2b9050565b50505050509695505050505050565b68056bc75e2d63100000811015610ebe5760405162461bcd60e51b8152600401610651906126cc565b676765c793fa10079d601b1b811115610ee95760405162461bcd60e51b81526004016106519061255b565b816001600160a01b031663c6580d126040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a91906121e3565b15610f775760405162461bcd60e51b815260040161065190612871565b5050565b6000610f87838361154e565b90506000610f9584836115f9565b9050610fa3868633846119b7565b82156110c957610fbe6001600160a01b038616333085611b40565b611044876001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ffa57600080fd5b505afa15801561100e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110329190611d65565b6001600160a01b0387169060006117b3565b6110c9876001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561108057600080fd5b505afa158015611094573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b89190611d65565b6001600160a01b03871690846117b3565b5095945050505050565b826110f05760405162461bcd60e51b8152600401610651906125bd565b8161110d5760405162461bcd60e51b8152600401610651906125ef565b6001600160a01b03811661067a5760405162461bcd60e51b8152600401610651906127f4565b83158061113d5750825b6111595760405162461bcd60e51b8152600401610651906124f6565b811561117f578042111561117f5760405162461bcd60e51b815260040161065190612902565b50505050565b8115611531576060836001600160401b03811180156111a357600080fd5b506040519080825280602002602001820160405280156111cd578160200160208202803683370190505b50905060005b848110156113365760008686838181106111e957fe5b90506020020160208101906111fe9190611d49565b90506000886001600160a01b031663f8b2cb4f836040518263ffffffff1660e01b815260040161122e91906122e5565b60206040518083038186803b15801561124657600080fd5b505afa15801561125a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127e91906121e3565b9050600061128c828861154e565b905061129a8a843084611632565b808585815181106112a757fe5b6020026020010181815250506112ef8b6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561052f57600080fd5b61132b8b6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105b557600080fd5b5050506001016111d3565b50811561145857866001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561137657600080fd5b505afa15801561138a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ae9190611d65565b6001600160a01b0316631483d99d868684816001600160401b03811180156113d557600080fd5b506040519080825280602002602001820160405280156113ff578160200160208202803683370190505b50876040518663ffffffff1660e01b8152600401611421959493929190612371565b600060405180830381600087803b15801561143b57600080fd5b505af115801561144f573d6000803e3d6000fd5b5050505061152f565b866001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561149157600080fd5b505afa1580156114a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c99190611d65565b6001600160a01b0316631483d99d86868485876040518663ffffffff1660e01b81526004016114fc959493929190612371565b600060405180830381600087803b15801561151657600080fd5b505af115801561152a573d6000803e3d6000fd5b505050505b505b505050505050565b61025e6001600160a01b038216336000611b61565b60008261155d575060006115c7565b8282028284828161156a57fe5b04146115885760405162461bcd60e51b815260040161065190612821565b6706f05b59d3b200008101818110156115b35760405162461bcd60e51b815260040161065190612821565b6000670de0b6b3a7640000825b0493505050505b92915050565b6000828201838110156115f25760405162461bcd60e51b8152600401610651906129fb565b9392505050565b60008060006116088585611b80565b91509150801561162a5760405162461bcd60e51b81526004016106519061296f565b509392505050565b60405163f8b2cb4f60e01b81526000906001600160a01b0386169063f8b2cb4f906116619087906004016122e5565b60206040518083038186803b15801561167957600080fd5b505afa15801561168d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b191906121e3565b90506000856001600160a01b031663948d8ce6866040518263ffffffff1660e01b81526004016116e191906122e5565b60206040518083038186803b1580156116f957600080fd5b505afa15801561170d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173191906121e3565b9050856001600160a01b0316633fdddaa28661174d85876115f9565b846040518463ffffffff1660e01b815260040161176c93929190612350565b600060405180830381600087803b15801561178657600080fd5b505af115801561179a573d6000803e3d6000fd5b50611531925050506001600160a01b0386168585611b61565b80158061183b5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906117e990309086906004016122f9565b60206040518083038186803b15801561180157600080fd5b505afa158015611815573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183991906121e3565b155b6118575760405162461bcd60e51b815260040161065190612a6f565b61067a8363095ea7b360e01b8484604051602401611876929190612337565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611ba5565b6000826118bc575060006115c7565b828202828482816118c957fe5b04146115f25760405162461bcd60e51b8152600401610651906127b3565b60006115f283836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250611c8a565b6000816119455760405162461bcd60e51b81526004016106519061284b565b82611952575060006115c7565b670de0b6b3a76400008381029084828161196857fe5b04146119865760405162461bcd60e51b815260040161065190612730565b600283048101818110156119ac5760405162461bcd60e51b815260040161065190612730565b60008482816115c057fe5b60405163f8b2cb4f60e01b81526000906001600160a01b0386169063f8b2cb4f906119e69087906004016122e5565b60206040518083038186803b1580156119fe57600080fd5b505afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3691906121e3565b90506000856001600160a01b031663948d8ce6866040518263ffffffff1660e01b8152600401611a6691906122e5565b60206040518083038186803b158015611a7e57600080fd5b505afa158015611a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab691906121e3565b9050611acd6001600160a01b038616853086611b40565b856001600160a01b0316633fdddaa286611ae785876115cd565b846040518463ffffffff1660e01b8152600401611b0693929190612350565b600060405180830381600087803b158015611b2057600080fd5b505af1158015611b34573d6000803e3d6000fd5b50505050505050505050565b61117f846323b872dd60e01b85858560405160240161187693929190612313565b61067a8363a9059cbb60e01b8484604051602401611876929190612337565b600080838311611b965750508082036000611b9e565b505081810360015b9250929050565b611bb7826001600160a01b0316611cc1565b611bd35760405162461bcd60e51b815260040161065190612ac5565b60006060836001600160a01b031683604051611bef91906122c9565b6000604051808303816000865af19150503d8060008114611c2c576040519150601f19603f3d011682016040523d82523d6000602084013e611c31565b606091505b509150915081611c535760405162461bcd60e51b815260040161065190612588565b80511561117f5780806020019051810190611c6e9190611e5d565b61117f5760405162461bcd60e51b815260040161065190612a25565b60008183611cab5760405162461bcd60e51b81526004016106519190612435565b506000838581611cb757fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611cf557508115155b949350505050565b80516115c781612b6d565b60008083601f840112611d19578182fd5b5081356001600160401b03811115611d2f578182fd5b6020830191508360208083028501011115611b9e57600080fd5b600060208284031215611d5a578081fd5b81356115f281612b6d565b600060208284031215611d76578081fd5b81516115f281612b6d565b60008060208385031215611d93578081fd5b82356001600160401b03811115611da8578182fd5b611db485828601611d08565b90969095509350505050565b60006020808385031215611dd2578182fd5b82516001600160401b0380821115611de8578384fd5b818501915085601f830112611dfb578384fd5b815181811115611e09578485fd5b8381029150611e19848301612b1b565b8181528481019084860184860187018a1015611e33578788fd5b8795505b8386101561062157611e498a82611cfd565b835260019590950194918601918601611e37565b600060208284031215611e6e578081fd5b81516115f281612b82565b600080600060608486031215611e8d578081fd5b8335611e9881612b82565b92506020840135611ea881612b82565b91506040840135611eb881612b6d565b809150509250925092565b60008060008060808587031215611ed8578081fd5b8435611ee381612b82565b93506020850135611ef381612b82565b92506040850135611f0381612b82565b9396929550929360600135925050565b60008060408385031215611f25578182fd5b8235611f3081612b6d565b946020939093013593505050565b60008060008060008060c08789031215611f56578182fd5b8635611f6181612b6d565b95506020870135611f7181612b82565b94506040870135611f8181612b82565b959894975094956060810135955060808101359460a0909101359350915050565b600080600080600060a08688031215611fb9578081fd5b8535611fc481612b6d565b94506020860135611fd481612b6d565b93506040860135611fe481612b6d565b94979396509394606081013594506080013592915050565b60008060008060008060a08789031215612014578182fd5b863561201f81612b6d565b9550602087013561202f81612b6d565b945060408701356001600160401b03811115612049578283fd5b61205589828a01611d08565b90955093505060608701359150608087013561207081612b82565b809150509295509295509295565b600080600080600080600060c0888a031215612098578485fd5b87356120a381612b6d565b965060208801356120b381612b6d565b955060408801356001600160401b038111156120cd578586fd5b6120d98a828b01611d08565b989b979a50986060810135976080820135975060a09091013595509350505050565b600080600080600060808688031215612112578283fd5b853561211d81612b6d565b9450602086013561212d81612b6d565b93506040860135925060608601356001600160401b0381111561214e578182fd5b61215a88828901611d08565b969995985093965092949392505050565b60008060008060008060a08789031215612183578384fd5b863561218e81612b6d565b9550602087013561219e81612b6d565b94506040870135935060608701356001600160401b038111156121bf578283fd5b6121cb89828a01611d08565b979a9699509497949695608090950135949350505050565b6000602082840312156121f4578081fd5b5051919050565b60008060006060848603121561220f578081fd5b505081359360208301359350604090920135919050565b600080600080600080600080610100898b031215612242578182fd5b883597506020890135965060408901359550606089013594506080890135935060a0890135925060c0890135915060e089013561227e81612b82565b809150509295985092959890939650565b6000815180845260208085019450808401835b838110156122be578151875295820195908201906001016122a2565b509495945050505050565b600082516122db818460208701612b41565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b6080808252810185905260008660a08301825b888110156123b4576020833561239981612b6d565b6001600160a01b031683529283019290910190600101612384565b5083810360208501526123c7818861228f565b91505082810360408401526123dc818661228f565b91505082151560608301529695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156124295783518352928401929184019160010161240d565b50909695505050505050565b6000602082528251806020840152612454816040850160208701612b41565b601f01601f19169190910160400192915050565b6020808252601790820152764552525f494e56414c49445f4d414e414745525f46454560481b604082015260600190565b6020808252601a908201527908aa4a4bea6a882a4a8beae8a928e90a8a6be9a92a69a82a886960331b604082015260600190565b6020808252600f908201526e08aa4a4be9a82a890be82a0a0a49eb608b1b604082015260600190565b60208082526014908201527311549497d393d517d3d397d5d2125511531254d560621b604082015260600190565b6020808252601e908201527f4552525f4341505f4249474745525f5448414e5f494e4954535550504c590000604082015260600190565b60208082526013908201527208aa4a4be929c92a8bea6aaa0a098b2be9a82b606b1b604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252601890820152774552525f43414e4e4f545f57484954454c4953545f4c505360401b604082015260600190565b60208082526016908201527511549497d31417d393d517d5d2125511531254d5115160521b604082015260600190565b602080825260099082015268125b9a5d0819985a5b60ba1b604082015260600190565b60208082526014908201527308aa4a4be829a9eaa9ca8a6be9a92a69a82a886960631b604082015260600190565b6020808252600d908201526c11549497d31253525517d3d555609a1b604082015260600190565b6020808252601b908201527a08aa4a4bea6a882a4a8be848298829c868aa6be9a92a69a82a8869602b1b604082015260600190565b60208082526013908201527222a9292fa4a724aa2fa9aaa828262cafa6a4a760691b604082015260600190565b6020808252601f908201527f4552525f494e56414c49445f5045524645524d414e43455f4d41585f46454500604082015260600190565b60208082526010908201526f11549497d1125597d25395115493905360821b604082015260600190565b6020808252600c908201526b22a9292fa624a6a4aa2fa4a760a11b604082015260600190565b6020808252601990820152784552525f494e56414c49445f49535355455f4d41585f46454560381b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252601390820152724552525f494e56414c49445f4144445245535360681b604082015260600190565b60208082526010908201526f4552525f4d554c5f4f564552464c4f5760801b604082015260600190565b6020808252600c908201526b4552525f4449565f5a45524f60a01b604082015260600190565b6020808252601490820152734552525f4e4f4e5a45524f5f455849545f46454560601b604082015260600190565b6020808252601f908201527f4552525f455843454544535f46554e445f52414953494e475f504552494f4400604082015260600190565b6020808252601290820152714552525f544f4f5f4645575f544f4b454e5360701b604082015260600190565b6020808252601c908201527b4552525f434f4c4c4543545f504552494f445f46494e49534845442160201b604082015260600190565b6020808252601d908201527f4552525f434c4f535552455f54494d455f4e4f545f4152524956454421000000604082015260600190565b6020808252601190820152704552525f5355425f554e444552464c4f5760781b604082015260600190565b6020808252601390820152724552525f544f4f5f4d414e595f544f4b454e5360681b604082015260600190565b6020808252601a90820152794552525f494e56414c49445f52454445454d5f4d41585f46454560301b604082015260600190565b60208082526010908201526f4552525f4144445f4f564552464c4f5760801b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252601f908201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604082015260600190565b90815260200190565b9283526020830191909152604082015260600190565b6040518181016001600160401b0381118282101715612b3957600080fd5b604052919050565b60005b83811015612b5c578181015183820152602001612b44565b8381111561117f5750506000910152565b6001600160a01b038116811461025e57600080fd5b801515811461025e57600080fdfea2646970667358221220daaa2d3ec332d2871b5b1151b0bac5757ad7b18820d9c544e1414ad4632bcad264736f6c634300060c0033

Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.