ETH Price: $3,159.66 (+0.52%)
Gas: 2 Gwei

Contract

0x0d3c6f80B703961e97f245E5c46c4EFb17C9e7A5
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...150650242022-07-02 19:37:18741 days ago1656790638IN
0x0d3c6f80...b17C9e7A5
0 ETH0.0004146714.52748501
0x60006101136050912021-11-13 2:38:47973 days ago1636771127IN
 Create: AaveStrategyMainnet
0 ETH0.4327339121.58578747

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AaveStrategyMainnet

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 99999 runs

Other Settings:
default evmVersion, GNU GPLv3 license
File 1 of 19 : AaveStrategyMainnet.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.7;

import "./AaveStrategy.sol";

interface IStkAave {
    function stakersCooldowns(address staker) external view returns(uint256);
    function cooldown() external;
    function COOLDOWN_SECONDS() external returns(uint256);
    function UNSTAKE_WINDOW() external returns(uint256);
    function redeem(address to, uint256 amount) external;
    function claimRewards(address to, uint256 amount) external;
}

contract AaveStrategyMainnet is AaveStrategy {

    IStkAave private immutable stkAave;
    uint256 private immutable COOLDOWN_SECONDS; // 10 days
    uint256 private immutable UNSTAKE_WINDOW; // 2 days

    constructor(
        IStkAave _stkAave,
        ILendingPool aaveLendingPool,
        IAaveIncentivesController incentiveController,
        BaseStrategy.ConstructorParams memory params
    ) AaveStrategy(aaveLendingPool, incentiveController, params) {
        stkAave = _stkAave;
        COOLDOWN_SECONDS = _stkAave.COOLDOWN_SECONDS();
        UNSTAKE_WINDOW = _stkAave.UNSTAKE_WINDOW();
    }

    function _harvestRewards() internal override {
        if (address(stkAave) == address(0)) return;
        
        address[] memory rewardTokens = new address[](1);
        rewardTokens[0] = address(aToken);

        // We can pass type(uint256).max to receive all of the rewards.
        // We receive stkAAVE tokens.
        incentiveController.claimRewards(rewardTokens, type(uint256).max, address(this));
        
        // Now we try to unstake the stkAAVE tokens.
        uint256 cooldown = stkAave.stakersCooldowns(address(this));

        if (cooldown == 0) {
            
            // We initiate unstaking for the stkAAVE tokens.
            stkAave.cooldown();

        } else if (cooldown + COOLDOWN_SECONDS < block.timestamp) {

            if (block.timestamp < cooldown + COOLDOWN_SECONDS + UNSTAKE_WINDOW) {

                // We claim any AAVE rewards we have from staking AAVE.
                stkAave.claimRewards(address(this), type(uint256).max);
                // We unstake stkAAVE and receive AAVE tokens.
                // Our cooldown timestamp resets to 0.
                stkAave.redeem(address(this), type(uint256).max);

            } else {
            
                // We missed the unstake window - we have to reset the cooldown timestamp.
                stkAave.cooldown();

            }
        }
    }
}

File 2 of 19 : BaseStrategy.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.8;

import "./interfaces/IStrategy.sol";
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/IBentoBoxMinimal.sol";
import "./libraries/UniswapV2Library.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

/// @title Abstrat contract to simplify BentoBox strategy development.
/// @dev Extend the contract and implement _skim, _harvest, _withdraw, _exit and _harvestRewards methods.
/// @dev Ownership should be transfered to the Sushi ops multisig.
abstract contract BaseStrategy is IStrategy, Ownable {

    using SafeERC20 for IERC20;

    /// @dev invested token.
    IERC20 public immutable strategyToken;
    
    /// @dev BentoBox address.
    IBentoBoxMinimal private immutable bentoBox;
    
    /// @dev Legacy Sushiswap AMM factory address.
    address private immutable factory;

    /// @dev Path are for the original sushiswap AMM.
    /// @dev Set variable visibility to private since we don't want the child contract to modify it.
    address[][] private _allowedSwapPaths = new address[][](0);

    /// @dev After bentobox 'exits' the strategy harvest, skim and withdraw functions can no loner be called.
    bool public exited;
    
    /// @dev Slippage protection when calling harvest.
    uint256 public maxBentoBoxBalance;
    
    /// @dev EOAs that can execute safeHarvest.
    mapping(address => bool) public strategyExecutors;

    event LogSetStrategyExecutor(address indexed executor, bool allowed);
    event LogSetAllowedPath(uint256 indexed pathId, bool allowed);

    error StrategyExited();
    error StrategyNotExited();
    error OnlyBentoBox();
    error OnlyExecutor();
    error NoFactory();
    error SlippageProtection();

    struct ConstructorParams {
        IERC20 strategyToken;
        IBentoBoxMinimal bentoBox;
        address strategyExecutor;
        address factory;
        address[] allowedSwapPath;
    }

    /** @param params a ConstructorParam struct whith the following fields:
        strategyToken - Address of the underlying token the strategy invests.
        bentoBox - BentoBox address.
        factory - legacy SushiSwap factory.
        strategyExecutor - an EOA that will execute the safeHarvest function.
        allowedSwapPath - Path the contract can use when swapping a reward token to the strategy token.
        @dev factory can be set to address(0) if we don't expect rewards we would need to swap.
        @dev allowedPaths can be set to [] if we don't expect rewards we would need to swap. */
    constructor(ConstructorParams memory params) {
        
        strategyToken = params.strategyToken;
        bentoBox = params.bentoBox;
        factory = params.factory;
        
        if (params.allowedSwapPath.length != 0) {
            _allowedSwapPaths.push(params.allowedSwapPath);
            emit LogSetAllowedPath(0, true);
        }

        if (params.strategyExecutor != address(0)) {
            strategyExecutors[params.strategyExecutor] = true;
            emit LogSetStrategyExecutor(params.strategyExecutor, true);
        }
    }

    //** Strategy implementation (override the following functions) */

    /// @notice Invests the underlying asset.
    /// @param amount The amount of tokens to invest.
    /// @dev Assume the contract's balance is greater than the amount
    function _skim(uint256 amount) internal virtual;

    /// @notice Harvest any profits made and transfer them to address(this) or report a loss
    /// @param balance The amount of tokens that have been invested.
    /// @return amountAdded The delta (+profit or -loss) that occured in contrast to `balance`.
    /// @dev amountAdded can be left at 0 when reporting profits (gas savings).
    /// amountAdded should not reflect any rewards or tokens the strategy received.
    /// Calcualte the amount added based on what the current deposit is worth.
    /// (The Base Strategy harvest function accounts for rewards).
    function _harvest(uint256 balance) internal virtual returns (int256 amountAdded);

    /// @dev Withdraw the requested amount of the underlying tokens to address(this).
    /// @param amount The requested amount we want to withdraw.
    function _withdraw(uint256 amount) internal virtual;

    /// @notice Withdraw the maximum available amount of the invested assets to address(this).
    /// @dev This shouldn't revert (use try catch).
    function _exit() internal virtual;

    /// @notice Claim any rewards reward tokens and optionally sell them for the underlying token.
    /// @dev Doesn't need to be implemented if we don't expect any rewards.
    function _harvestRewards() internal virtual {}

    //** End strategy implementation */

    modifier isActive() {
        if (exited) {
            revert StrategyExited();
        }
        _;
    }

    modifier onlyBentoBox() {
        if (msg.sender != address(bentoBox)) {
            revert OnlyBentoBox();
        }
        _;
    }

    modifier onlyExecutor() {
        if (!strategyExecutors[msg.sender]) {
            revert OnlyExecutor();
        }
        _;
    }

    function setStrategyExecutor(address executor, bool value) external onlyOwner {
        strategyExecutors[executor] = value;
        emit LogSetStrategyExecutor(executor, value);
    }

    /// @inheritdoc IStrategy
    function skim(uint256 amount) external override {
        _skim(amount);
    }

    /// @notice Harvest profits while preventing a sandwich attack exploit.
    /// @param maxBalance The maximum balance of the underlying token that is allowed to be in BentoBox.
    /// @param rebalance Whether BentoBox should rebalance the strategy assets to acheive it's target allocation.
    /// @param maxChangeAmount When rebalancing - the maximum amount that will be deposited to or withdrawn from a strategy to BentoBox.
    /// @param harvestRewards If we want to claim any accrued reward tokens
    /// @dev maxBalance can be set to 0 to keep the previous value.
    /// @dev maxChangeAmount can be set to 0 to allow for full rebalancing.
    function safeHarvest(
        uint256 maxBalance,
        bool rebalance,
        uint256 maxChangeAmount,
        bool harvestRewards
    ) external onlyExecutor {
        if (harvestRewards) {
            _harvestRewards();
        }

        if (maxBalance > 0) {
            maxBentoBoxBalance = maxBalance;
        }

        bentoBox.harvest(address(strategyToken), rebalance, maxChangeAmount);
    }

    /** @inheritdoc IStrategy
    @dev Only BentoBox can call harvest on this strategy.
    @dev Ensures that (1) the caller was this contract (called through the safeHarvest function)
        and (2) that we are not being frontrun by a large BentoBox deposit when harvesting profits. */
    function harvest(uint256 balance, address sender) external override isActive onlyBentoBox returns (int256) {
        /** @dev Don't revert if conditions aren't met in order to allow
            BentoBox to continiue execution as it might need to do a rebalance. */

        if (
            sender == address(this) &&
            bentoBox.totals(address(strategyToken)).elastic <= maxBentoBoxBalance &&
            balance > 0
        ) {
            
            int256 amount = _harvest(balance);

            /** @dev Since harvesting of rewards is accounted for seperately we might also have
            some underlying tokens in the contract that the _harvest call doesn't report. 
            E.g. reward tokens that have been sold into the underlying tokens which are now sitting in the contract.
            Meaning the amount returned by the internal _harvest function isn't necessary the final profit/loss amount */

            uint256 contractBalance = strategyToken.balanceOf(address(this));

            if (amount >= 0) { // _harvest reported a profit

                if (contractBalance > 0) {
                    strategyToken.safeTransfer(address(bentoBox), contractBalance);
                }

                return int256(contractBalance);

            } else if (contractBalance > 0) { // _harvest reported a loss but we have some tokens sitting in the contract

                int256 diff = amount + int256(contractBalance);

                if (diff > 0) { // we still made some profit

                    /// @dev send the profit to BentoBox and reinvest the rest
                    strategyToken.safeTransfer(address(bentoBox), uint256(diff));
                    _skim(uint256(-amount));

                } else { // we made a loss but we have some tokens we can reinvest

                    _skim(contractBalance);

                }

                return diff;

            } else { // we made a loss

                return amount;

            }

        }

        return int256(0);
    }

    /// @inheritdoc IStrategy
    function withdraw(uint256 amount) external override isActive onlyBentoBox returns (uint256 actualAmount) {
        _withdraw(amount);
        /// @dev Make sure we send and report the exact same amount of tokens by using balanceOf.
        actualAmount = strategyToken.balanceOf(address(this));
        strategyToken.safeTransfer(address(bentoBox), actualAmount);
    }

    /// @inheritdoc IStrategy
    /// @dev do not use isActive modifier here; allow bentobox to call strategy.exit() multiple times
    function exit(uint256 balance) external override onlyBentoBox returns (int256 amountAdded) {
        _exit();
        /// @dev Check balance of token on the contract.
        uint256 actualBalance = strategyToken.balanceOf(address(this));
        /// @dev Calculate tokens added (or lost).
        amountAdded = int256(actualBalance) - int256(balance);
        /// @dev Transfer all tokens to bentoBox.
        strategyToken.safeTransfer(address(bentoBox), actualBalance);
        /// @dev Flag as exited, allowing the owner to manually deal with any amounts available later.
        exited = true;
    }

    /** @dev After exited, the owner can perform ANY call. This is to rescue any funds that didn't
        get released during exit or got earned afterwards due to vesting or airdrops, etc. */
    function afterExit(
        address to,
        uint256 value,
        bytes memory data
    ) public onlyOwner returns (bool success) {
        if (!exited) {
            revert StrategyNotExited();
        }
        (success, ) = to.call{value: value}(data);
    }

    function getAllowedPath(uint256 pathIndex) external view returns(address[] memory path) {
        path = _allowedSwapPaths[pathIndex];
    }

    function setAllowedPath(address[] calldata path) external onlyOwner {
        _allowedSwapPaths.push(path);
        emit LogSetAllowedPath(_allowedSwapPaths.length, true);
    }

    function disallowPath(uint256 pathIndex) external onlyOwner {
        require(pathIndex < _allowedSwapPaths.length, "Out of bounds");
        _allowedSwapPaths[pathIndex] = new address[](0);
        emit LogSetAllowedPath(pathIndex, false);
    }

    /// @notice Swap some tokens in the contract for the underlying and deposits them to address(this)
    /// @param amountOutMin minimum amount of output tokens we should get (slippage protection).
    /// @param pathIndex Index of the predetermined path we will use for the swap.
    function swapExactTokensForUnderlying(uint256 amountOutMin, uint256 pathIndex) public onlyExecutor returns (uint256 amountOut) {

        if (factory == address(0)) {
            revert NoFactory();
        }

        address[] memory path = _allowedSwapPaths[pathIndex];

        uint256 amountIn = IERC20(path[0]).balanceOf(address(this));

        uint256[] memory amounts = UniswapV2Library.getAmountsOut(factory, amountIn, path);

        amountOut = amounts[amounts.length - 1];

        if (amountOut < amountOutMin) {
            revert SlippageProtection();
        }

        IERC20(path[0]).safeTransfer(UniswapV2Library.pairFor(factory, path[0], path[1]), amounts[0]);

        _swap(amounts, path, address(this));
    }

    /// @dev requires the initial amount to have already been sent to the first pair
    function _swap(
        uint256[] memory amounts,
        address[] memory path,
        address _to
    ) internal {
        for (uint256 i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            address token0 = input < output ? input : output;
            uint256 amountOut = amounts[i + 1];
            (uint256 amount0Out, uint256 amount1Out) = input == token0 ? (uint256(0), amountOut) : (amountOut, uint256(0));
            address to = i < path.length - 2 ? UniswapV2Library.pairFor(factory, output, path[i + 2]) : _to;
            IUniswapV2Pair(UniswapV2Library.pairFor(factory, input, output)).swap(amount0Out, amount1Out, to, new bytes(0));
        }
    }

}

File 3 of 19 : IStrategy.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.7;

interface IStrategy {
    /// @notice Send the assets to the Strategy and call skim to invest them.
    /// @param amount The amount of tokens to invest.
    function skim(uint256 amount) external;

    /// @notice Harvest any profits made converted to the asset and pass them to the caller.
    /// @param balance The amount of tokens the caller thinks it has invested.
    /// @param sender The address of the initiator of this transaction. Can be used for reimbursements, etc.
    /// @return amountAdded The delta (+profit or -loss) that occured in contrast to `balance`.
    function harvest(uint256 balance, address sender) external returns (int256 amountAdded);

    /// @notice Withdraw assets. The returned amount can differ from the requested amount due to rounding.
    /// @dev The `actualAmount` should be very close to the amount.
    /// The difference should NOT be used to report a loss. That's what harvest is for.
    /// @param amount The requested amount the caller wants to withdraw.
    /// @return actualAmount The real amount that is withdrawn.
    function withdraw(uint256 amount) external returns (uint256 actualAmount);

    /// @notice Withdraw all assets in the safest way possible. This shouldn't fail.
    /// @param balance The amount of tokens the caller thinks it has invested.
    /// @return amountAdded The delta (+profit or -loss) that occured in contrast to `balance`.
    function exit(uint256 balance) external returns (int256 amountAdded);
}

File 4 of 19 : IUniswapV2Pair.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.7;

interface IUniswapV2Pair {
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}

File 5 of 19 : IBentoBoxMinimal.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

/// @notice Minimal interface for BentoBox token vault interactions - `token` is aliased as `address` from `IERC20` for code simplicity.
interface IBentoBoxMinimal {

    struct Rebase {
        uint128 elastic;
        uint128 base;
    }

    struct StrategyData {
        uint64 strategyStartDate;
        uint64 targetPercentage;
        uint128 balance; // the balance of the strategy that BentoBox thinks is in there
    }

    function strategyData(address token) external view returns (StrategyData memory);

    /// @notice Balance per ERC-20 token per account in shares.
    function balanceOf(address, address) external view returns (uint256);

    /// @notice Deposit an amount of `token` represented in either `amount` or `share`.
    /// @param token_ The ERC-20 token to deposit.
    /// @param from which account to pull the tokens.
    /// @param to which account to push the tokens.
    /// @param amount Token amount in native representation to deposit.
    /// @param share Token amount represented in shares to deposit. Takes precedence over `amount`.
    /// @return amountOut The amount deposited.
    /// @return shareOut The deposited amount repesented in shares.
    function deposit(
        address token_,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external payable returns (uint256 amountOut, uint256 shareOut);

    /// @notice Withdraws an amount of `token` from a user account.
    /// @param token_ The ERC-20 token to withdraw.
    /// @param from which user to pull the tokens.
    /// @param to which user to push the tokens.
    /// @param amount of tokens. Either one of `amount` or `share` needs to be supplied.
    /// @param share Like above, but `share` takes precedence over `amount`.
    function withdraw(
        address token_,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external returns (uint256 amountOut, uint256 shareOut);

    /// @notice Transfer shares from a user account to another one.
    /// @param token The ERC-20 token to transfer.
    /// @param from which user to pull the tokens.
    /// @param to which user to push the tokens.
    /// @param share The amount of `token` in shares.
    function transfer(
        address token,
        address from,
        address to,
        uint256 share
    ) external;

    /// @dev Helper function to represent an `amount` of `token` in shares.
    /// @param token The ERC-20 token.
    /// @param amount The `token` amount.
    /// @param roundUp If the result `share` should be rounded up.
    /// @return share The token amount represented in shares.
    function toShare(
        address token,
        uint256 amount,
        bool roundUp
    ) external view returns (uint256 share);

    /// @dev Helper function to represent shares back into the `token` amount.
    /// @param token The ERC-20 token.
    /// @param share The amount of shares.
    /// @param roundUp If the result should be rounded up.
    /// @return amount The share amount back into native representation.
    function toAmount(
        address token,
        uint256 share,
        bool roundUp
    ) external view returns (uint256 amount);

    /// @notice Registers this contract so that users can approve it for the BentoBox.
    function registerProtocol() external;

    function totals(address token) external view returns (Rebase memory);

    function harvest(
        address token,
        bool balance,
        uint256 maxChangeAmount
    ) external;
}

File 6 of 19 : UniswapV2Library.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.7;

import '../interfaces/IUniswapV2Pair.sol';

/* 
The following library is modified from @sushiswap/core/contracts/uniswapv2/libraries/UniswapV2Library.sol

changes: 
    - remove SafeMathUniswap library and replace all usage of it with basic operations
    - change casting from uint to bytes20 in pair address calculation and shift by 96 bits before casting
 */

library UniswapV2Library {

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
        require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(bytes20(keccak256(abi.encodePacked(
                hex'ff',
                factory,
                keccak256(abi.encodePacked(token0, token1)),
                hex'e18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303' // init code hash
            )) << 96));
    }

    // fetches and sorts the reserves for a pair
    function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
        (address token0,) = sortTokens(tokenA, tokenB);
        (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
        (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
    }

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
        require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
        require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        amountB = amountA * reserveB / reserveA;
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
        require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint amountInWithFee = amountIn * 997;
        uint numerator = amountInWithFee * reserveOut;
        uint denominator = (reserveIn * 1000) + amountInWithFee;
        amountOut = numerator / denominator;
    }

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
        require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint numerator = reserveIn * amountOut * 1000;
        uint denominator = (reserveOut - amountOut) * 997;
        amountIn = (numerator / denominator) + 1;
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[0] = amountIn;
        for (uint i; i < path.length - 1; i++) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint i = path.length - 1; i > 0; i--) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}

File 7 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 8 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^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 9 of 19 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.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 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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

File 11 of 19 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^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;
        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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 19 : SushiStrategy.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.7;

import "../BaseStrategy.sol";

interface ISushiBar is IERC20 {
    function enter(uint256 _amount) external;

    function leave(uint256 _share) external;
}

contract SushiStrategy is BaseStrategy {
    ISushiBar public immutable sushiBar;

    constructor(
        address _sushiBar,
        BaseStrategy.ConstructorParams memory baseStrategyParams
    ) BaseStrategy(baseStrategyParams) {
        baseStrategyParams.strategyToken.approve(_sushiBar, type(uint256).max);
        sushiBar = ISushiBar(_sushiBar);
    }

    function _skim(uint256 amount) internal override {
        sushiBar.enter(amount);
    }

    function _harvest(uint256 balance) internal override returns (int256) {
        uint256 keep = toShare(balance);
        uint256 total = sushiBar.balanceOf(address(this));
        if (total > keep) sushiBar.leave(total - keep);
        // xSUSHI can't report a loss so no need to check for keep < total case
        // we can return 0 when reporting profits (BaseContract checks balanceOf)
        return int256(0);
    }

    function _withdraw(uint256 amount) internal override {
        uint256 requested = toShare(amount);
        uint256 actual = sushiBar.balanceOf(address(this));
        sushiBar.leave(requested > actual ? actual : requested);
    }

    function _exit() internal override {
        sushiBar.leave(sushiBar.balanceOf(address(this)));
    }

    function toShare(uint256 amount) internal view returns (uint256) {
        uint256 totalShares = sushiBar.totalSupply();
        uint256 totalSushi = IERC20(strategyToken).balanceOf(address(sushiBar));
        return amount * totalShares / totalSushi;
    }
}

File 13 of 19 : AaveStrategy.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.7;

import "../BaseStrategy.sol";

library DataTypes {
    struct ReserveData {
        ReserveConfigurationMap configuration;
        uint128 liquidityIndex;
        uint128 variableBorrowIndex;
        uint128 currentLiquidityRate;
        uint128 currentVariableBorrowRate;
        uint128 currentStableBorrowRate;
        uint40 lastUpdateTimestamp;
        address aTokenAddress;
        address stableDebtTokenAddress;
        address variableDebtTokenAddress;
        address interestRateStrategyAddress;
        uint8 id;
    }
    struct ReserveConfigurationMap {
        uint256 data;
    }
}

interface ILendingPool {
    function deposit(
        address asset,
        uint256 amount,
        address onBehalfOf,
        uint16 referralCode
    ) external;

    function withdraw(
        address asset,
        uint256 amount,
        address to
    ) external returns (uint256);

    function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);
}

interface IAaveIncentivesController {
    function getRewardsBalance(address[] calldata assets, address user) external view returns (uint256);

    function claimRewards(
        address[] calldata assets,
        uint256 amount,
        address to
    ) external returns (uint256);
}

contract AaveStrategy is BaseStrategy {

    using SafeERC20 for IERC20;

    ILendingPool internal immutable aaveLendingPool;
    IAaveIncentivesController internal immutable incentiveController;
    IERC20 public immutable aToken;

    constructor(
        ILendingPool _aaveLendingPool,
        IAaveIncentivesController _incentiveController,
        BaseStrategy.ConstructorParams memory params
    ) BaseStrategy(params)  {
        aaveLendingPool = _aaveLendingPool;
        incentiveController = _incentiveController;
        aToken = IERC20(_aaveLendingPool.getReserveData(address(params.strategyToken)).aTokenAddress);
        params.strategyToken.safeApprove(address(_aaveLendingPool), type(uint256).max);
    }

    function _skim(uint256 amount) internal override {
        aaveLendingPool.deposit(address(strategyToken), amount, address(this), 0);
    }

    function _harvest(uint256 balance) internal override returns (int256 amountAdded) {
        uint256 currentBalance = aToken.balanceOf(address(this));
        amountAdded = int256(currentBalance) - int256(balance);
        if (amountAdded > 0) aaveLendingPool.withdraw(address(strategyToken), uint256(amountAdded), address(this));
    }

    function _withdraw(uint256 amount) internal override {
        aaveLendingPool.withdraw(address(strategyToken), amount, address(this));
    }

    function _exit() internal override {
        uint256 tokenBalance = aToken.balanceOf(address(this));
        uint256 available = IERC20(strategyToken).balanceOf(address(aToken));
        if (tokenBalance <= available) {
            /// @dev If there are more tokens available than our full position, take all based on aToken balance (continue if unsuccessful).
            try aaveLendingPool.withdraw(address(strategyToken), tokenBalance, address(this)) {} catch {}
        } else {
            /// @dev Otherwise redeem all available and take a loss on the missing amount (continue if unsuccessful).
            try aaveLendingPool.withdraw(address(strategyToken), available, address(this)) {} catch {}
        }
    }

    function _harvestRewards() internal virtual override {
        address[] memory rewardTokens = new address[](1);
        rewardTokens[0] = address(aToken);
        uint256 reward = incentiveController.getRewardsBalance(rewardTokens, address(this));
        incentiveController.claimRewards(rewardTokens, reward, address(this));
    }
}

File 14 of 19 : ExampleImplementation.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.7;

import "./BaseStrategy.sol";

/*  Example implementation stub to simplify strategy development.
    Please refer to the BaseStrategy contract natspec comments for
    further tips and clarifications. Also see the SushiStrategy and the
    AavePolygonStrategy for reference implementations. */
contract ExampleImplementation is BaseStrategy {

    // BaseStrategy initializes a immutable storage variable 'strategyToken' we can use

    constructor(
        address investmentContract,
        BaseStrategy.ConstructorParams memory baseStrategyParams
    ) BaseStrategy(baseStrategyParams) {
        baseStrategyParams.strategyToken.approve(investmentContract, type(uint256).max);
    }

    function _skim(uint256 amount) internal override {
        // assume IERC20(strategyToken).balanceOf(address(this)) >= amount
        // invest the token
    }

    function _harvest(uint256 investedAmount) internal override returns (int256 delta) {
        // calculate the current amount we get if we withdraw the principal (not accounting for any received rewards)
        // if profitable, withdraw the surplus
        // return the difference between invested and current amount
    }

    function _harvestRewards() internal override {
        // implement the logic for claiming rewards and transfering them to address(this)
        // does not need to report the profits
        // skip if we expect no rewards
    }

    function _withdraw(uint256 amount) internal override {
        // withdraw the requested amount of tokens from the investment to address(this)
    }

    function _exit() internal override {
        // see what the available amount of tokens to withdraw is
        // withdraw as much tokens as possible from the investment to address(this)
        // should not revert
    }
}

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

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 16 of 19 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 17 of 19 : Harvester.sol
// SPDX-License-Identifier: GPL-v3

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

pragma solidity 0.8.7;

interface ISafeStrategy {
	function safeHarvest(
		uint256 maxBalance,
		bool rebalance,
		uint256 maxChangeAmount,
		bool harvestRewards
	) external;

    function swapExactTokensForUnderlying(uint256 amountOutMin, uint256 pathIndex) external;
    function strategyToken() external view returns(address);
}

// 🚜🚜🚜
contract CombineHarvester is Ownable {

    IBentoBoxMinimal immutable public bentoBox;

    constructor(address _bentoBox) {
        bentoBox = IBentoBoxMinimal(_bentoBox);
    }

    function executeSafeHarvestsManual(
        ISafeStrategy[] calldata strategies,
        uint256[] calldata maxBalances, // strategy sandwich protection
        bool[] calldata rebalances,
        uint256[] calldata maxChangeAmounts, // can be set to 0 to allow for full withdrawals / deposits from / to strategy
        bool[] calldata harvestRewards,
        uint256[] calldata minOutAmounts
    ) external onlyOwner {
        for (uint256 i = 0; i < strategies.length; i++) {

            strategies[i].safeHarvest(maxBalances[i], rebalances[i], maxChangeAmounts[i], harvestRewards[i]);

            if (minOutAmounts[i] != 0) {
                strategies[i].swapExactTokensForUnderlying(minOutAmounts[i], 0);
            }
        }
    }

    function executeSafeHarvests(
        ISafeStrategy[] calldata strategies,
        uint256[] calldata maxChangeAmounts, // can be set to 0 to allow for full withdrawals / deposits from / to strategy
        bool[] calldata harvestRewards,
        uint256[] calldata minOutAmounts
    ) external onlyOwner {
        for (uint256 i = 0; i < strategies.length; i++) {

            strategies[i].safeHarvest(0, _rebalanceNecessairy(strategies[i]), maxChangeAmounts[i], harvestRewards[i]);

            if (minOutAmounts[i] != 0) {
                strategies[i].swapExactTokensForUnderlying(minOutAmounts[i], 0);
            }
        }
    }

    // returns true if strategy balance differs more than -+1% from the strategy target balance
    function _rebalanceNecessairy(ISafeStrategy strategy) public view returns (bool) {
        
        address token = strategy.strategyToken();
        
        IBentoBoxMinimal.StrategyData memory data = bentoBox.strategyData(token);
        
        uint256 targetStrategyBalance = bentoBox.totals(token).elastic * data.targetPercentage / 100; // targetPercentage ∈ [0, 100]

        if (data.balance == 0) return targetStrategyBalance != 0;
        
        uint256 ratio = targetStrategyBalance * 100 / data.balance;
        
        return ratio >= 101 || ratio <= 99;
    }
}

File 18 of 19 : ERC20.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

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

contract ERC20Mock is ERC20 {
    constructor() ERC20("","") {
        _mint(msg.sender, 1e20);
    }
}

File 19 of 19 : stkAAVE.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

import "./ERC20.sol";

contract stkAAVE is ERC20Mock {
    function stakersCooldowns(address) external pure returns(uint256) {
        return 0;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IStkAave","name":"_stkAave","type":"address"},{"internalType":"contract ILendingPool","name":"aaveLendingPool","type":"address"},{"internalType":"contract IAaveIncentivesController","name":"incentiveController","type":"address"},{"components":[{"internalType":"contract IERC20","name":"strategyToken","type":"address"},{"internalType":"contract IBentoBoxMinimal","name":"bentoBox","type":"address"},{"internalType":"address","name":"strategyExecutor","type":"address"},{"internalType":"address","name":"factory","type":"address"},{"internalType":"address[]","name":"allowedSwapPath","type":"address[]"}],"internalType":"struct BaseStrategy.ConstructorParams","name":"params","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NoFactory","type":"error"},{"inputs":[],"name":"OnlyBentoBox","type":"error"},{"inputs":[],"name":"OnlyExecutor","type":"error"},{"inputs":[],"name":"SlippageProtection","type":"error"},{"inputs":[],"name":"StrategyExited","type":"error"},{"inputs":[],"name":"StrategyNotExited","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pathId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"LogSetAllowedPath","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"LogSetStrategyExecutor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"aToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"afterExit","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pathIndex","type":"uint256"}],"name":"disallowPath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"exit","outputs":[{"internalType":"int256","name":"amountAdded","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exited","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pathIndex","type":"uint256"}],"name":"getAllowedPath","outputs":[{"internalType":"address[]","name":"path","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"address","name":"sender","type":"address"}],"name":"harvest","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxBentoBoxBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxBalance","type":"uint256"},{"internalType":"bool","name":"rebalance","type":"bool"},{"internalType":"uint256","name":"maxChangeAmount","type":"uint256"},{"internalType":"bool","name":"harvestRewards","type":"bool"}],"name":"safeHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"path","type":"address[]"}],"name":"setAllowedPath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"executor","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setStrategyExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"skim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"strategyExecutors","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategyToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"pathIndex","type":"uint256"}],"name":"swapExactTokensForUnderlying","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"actualAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60006101a08181526101c0604052906200002a565b6060815260200190600190039081620000145790505b5080516200004191600191602090910190620007d1565b503480156200004f57600080fd5b50604051620049f8380380620049f88339810160408190526200007291620009b1565b828282806200008133620003b4565b80516001600160601b0319606091821b811660809081526020840151831b821660a0528284015190921b1660c05281015151156200013c576080810151600180548082018255600091909152815162000103927fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6909201916020019062000835565b50604051600181526000907f0d8ff5e1bdfaad5eb3007004b76c2f7b74cd72bd5e5bf925918cbc6717b2424f9060200160405180910390a25b60408101516001600160a01b031615620001b657604081810180516001600160a01b0390811660009081526004602090815290849020805460ff19166001908117909155925193519283529216917fb08a78f53a7fe017d5ca8c8fcdbf06ffa2c31f2ab668378a17700d9fc558717e910160405180910390a25b506001600160601b0319606084811b821660e05283901b166101005280516040516335ea6a7560e01b81526001600160a01b039182166004820152908416906335ea6a75906024016101806040518083038186803b1580156200021857600080fd5b505afa1580156200022d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000253919062000b3e565b60e0015160601b6001600160601b0319166101205280516200028e906001600160a01b03168460001962000404602090811b6200164f17901c565b505050836001600160a01b0316610140816001600160a01b031660601b81525050836001600160a01b03166372b49d636040518163ffffffff1660e01b8152600401602060405180830381600087803b158015620002eb57600080fd5b505af115801562000300573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000326919062000c46565b6101608181525050836001600160a01b031663359c4a966040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156200036a57600080fd5b505af11580156200037f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003a5919062000c46565b610180525062000d9692505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b801580620004925750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156200045557600080fd5b505afa1580156200046a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000490919062000c46565b155b6200050a5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620005629185916200056716565b505050565b6000620005c3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200064560201b62001863179092919060201c565b805190915015620005625780806020019051810190620005e491906200098d565b620005625760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000501565b606062000656848460008562000660565b90505b9392505050565b606082471015620006c35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000501565b843b620007135760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000501565b600080866001600160a01b0316858760405162000731919062000c60565b60006040518083038185875af1925050503d806000811462000770576040519150601f19603f3d011682016040523d82523d6000602084013e62000775565b606091505b5090925090506200078882828662000793565b979650505050505050565b60608315620007a457508162000659565b825115620007b55782518084602001fd5b8160405162461bcd60e51b815260040162000501919062000c7e565b82805482825590600052602060002090810192821562000823579160200282015b828111156200082357825180516200081291849160209091019062000835565b5091602001919060010190620007f2565b50620008319291506200089b565b5090565b8280548282559060005260206000209081019282156200088d579160200282015b828111156200088d57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000856565b5062000831929150620008bc565b8082111562000831576000620008b28282620008d3565b506001016200089b565b5b80821115620008315760008155600101620008bd565b5080546000825590600052602060002090810190620008f39190620008bc565b50565b8051620009038162000d80565b919050565b6000602082840312156200091b57600080fd5b604051602081016001600160401b038111828210171562000940576200094062000d6a565b6040529151825250919050565b80516001600160801b03811681146200090357600080fd5b805164ffffffffff811681146200090357600080fd5b805160ff811681146200090357600080fd5b600060208284031215620009a057600080fd5b815180151581146200065957600080fd5b60008060008060808587031215620009c857600080fd5b8451620009d58162000d80565b80945050602080860151620009ea8162000d80565b6040870151909450620009fd8162000d80565b60608701519093506001600160401b038082111562000a1b57600080fd5b9087019060a0828a03121562000a3057600080fd5b62000a3a62000cb3565b825162000a478162000d80565b81528284015162000a588162000d80565b81850152604083015162000a6c8162000d80565b6040820152606083015162000a818162000d80565b606082015260808301518281111562000a9957600080fd5b80840193505089601f84011262000aaf57600080fd5b82518281111562000ac45762000ac462000d6a565b8060051b925062000ad785840162000d04565b8181528581019085870185870188018e101562000af357600080fd5b600096505b8387101562000b26578051955062000b108662000d80565b8583526001969096019591870191870162000af8565b50608084015250979a96995094975093955050505050565b6000610180828403121562000b5257600080fd5b62000b5c62000cde565b62000b68848462000908565b815262000b78602084016200094d565b602082015262000b8b604084016200094d565b604082015262000b9e606084016200094d565b606082015262000bb1608084016200094d565b608082015262000bc460a084016200094d565b60a082015262000bd760c0840162000965565b60c082015262000bea60e08401620008f6565b60e082015261010062000bff818501620008f6565b9082015261012062000c13848201620008f6565b9082015261014062000c27848201620008f6565b9082015261016062000c3b8482016200097b565b908201529392505050565b60006020828403121562000c5957600080fd5b5051919050565b6000825162000c7481846020870162000d37565b9190910192915050565b602081526000825180602084015262000c9f81604085016020870162000d37565b601f01601f19169190910160400192915050565b60405160a081016001600160401b038111828210171562000cd85762000cd862000d6a565b60405290565b60405161018081016001600160401b038111828210171562000cd85762000cd862000d6a565b604051601f8201601f191681016001600160401b038111828210171562000d2f5762000d2f62000d6a565b604052919050565b60005b8381101562000d5457818101518382015260200162000d3a565b8381111562000d64576000848401525b50505050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620008f357600080fd5b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c6101405160601c6101605161018051613abd62000f3b600039600061285a01526000818161282d015261287e0152600081816125520152818161270d015281816127a501528181612908015281816129cb0152612a280152600081816102a7015281816118c401528181612225015281816122f101526125b10152600061262e0152600081816119c701528181611b1a01528181611beb015281816124140152612521015260008181610aa701528181610c6001528181610cf30152818161205a015261209d015260008181610501015281816105df0152818161079901528181610820015281816108d801528181610a3201528181610f7b015281816110e30152611210015260008181610217015281816105b7015281816106d301528181610777015281816107fe0152818161096501528181610a100152818161100a015281816110c1015281816111d90152818161199201528181611ade01528181611bb60152818161231f015281816123df01526124ec0152613abd6000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806374ceb267116100cd578063c848915711610081578063e8bd73a511610066578063e8bd73a514610302578063f2fde38b1461030b578063f53b15241461031e57600080fd5b8063c8489157146102dc578063d9253c2d146102ef57600080fd5b80638da5cb5b116100b25780638da5cb5b14610284578063a0c1f15e146102a2578063ba6275ab146102c957600080fd5b806374ceb2671461025e5780637f8661a11461027157600080fd5b80635ce6c327116101245780636939aaf5116101095780636939aaf5146101f7578063715018a61461020a578063747efea11461021257600080fd5b80635ce6c327146101d7578063654bbef2146101e457600080fd5b806312eb72681461015657806318fccc761461016b5780632e1a7d4d146101915780635066ebdd146101a4575b600080fd5b610169610164366004613545565b61033e565b005b61017e610179366004613577565b6104a9565b6040519081526020015b60405180910390f35b61017e61019f366004613545565b610880565b6101c76101b23660046132e9565b60046020526000908152604090205460ff1681565b6040519015158152602001610188565b6002546101c79060ff1681565b61017e6101f23660046135ed565b610a5c565b610169610205366004613545565b610dbc565b610169610dc8565b6102397f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610188565b61016961026c366004613304565b610e55565b61017e61027f366004613545565b610f61565b60005473ffffffffffffffffffffffffffffffffffffffff16610239565b6102397f000000000000000000000000000000000000000000000000000000000000000081565b6101696102d73660046135a3565b611139565b6101696102ea366004613408565b611272565b6101c76102fd36600461333b565b611365565b61017e60035481565b6101696103193660046132e9565b611496565b61033161032c366004613545565b6115c3565b60405161018891906136c6565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600154811061042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4f7574206f6620626f756e64730000000000000000000000000000000000000060448201526064016103bb565b604080516000815260208101909152600180548390811061045257610452613a1b565b90600052602060002001908051906020019061046f929190613170565b506040516000815281907f0d8ff5e1bdfaad5eb3007004b76c2f7b74cd72bd5e5bf925918cbc6717b2424f9060200160405180910390a250565b60025460009060ff16156104e9576040517f6b99cb1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610557576040517eed755600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82163014801561066e57506003546040517f4ffe34db00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000001690634ffe34db90602401604080518083038186803b15801561062057600080fd5b505afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610658919061349a565b516fffffffffffffffffffffffffffffffff1611155b801561067a5750600083115b1561087657600061068a8461187c565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561071557600080fd5b505afa158015610729573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074d919061355e565b9050600082126107c75780156107be576107be73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083611a4b565b915061087a9050565b801561086e5760006107d982846137bf565b9050600081131561085b5761084573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083611a4b565b610856610851846139b3565b611aa1565b610864565b61086482611aa1565b925061087a915050565b50905061087a565b5060005b92915050565b60025460009060ff16156108c0576040517f6b99cb1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461092e576040517eed755600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61093782611b79565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b1580156109bc57600080fd5b505afa1580156109d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f4919061355e565b9050610a5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083611a4b565b919050565b3360009081526004602052604081205460ff16610aa5576040517f7fb6be0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610b12576040517f1404239200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018381548110610b2757610b27613a1b565b90600052602060002001805480602002602001604051908101604052809291908181526020018280548015610b9257602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610b67575b50505050509050600081600081518110610bae57610bae613a1b565b60209081029190910101516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a082319060240160206040518083038186803b158015610c1f57600080fd5b505afa158015610c33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c57919061355e565b90506000610c867f00000000000000000000000000000000000000000000000000000000000000008385611c6b565b90508060018251610c979190613937565b81518110610ca757610ca7613a1b565b6020026020010151935085841015610ceb576040517f17d431f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610da8610d4d7f000000000000000000000000000000000000000000000000000000000000000085600081518110610d2557610d25613a1b565b602002602001015186600181518110610d4057610d40613a1b565b6020026020010151611e10565b82600081518110610d6057610d60613a1b565b602002602001015185600081518110610d7b57610d7b613a1b565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16611a4b9092919063ffffffff16565b610db3818430611f2d565b50505092915050565b610dc581611aa1565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b610e53600061217f565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ed6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b73ffffffffffffffffffffffffffffffffffffffff821660008181526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527fb08a78f53a7fe017d5ca8c8fcdbf06ffa2c31f2ab668378a17700d9fc558717e91015b60405180910390a25050565b60003373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610fd1576040517eed755600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fd96121f4565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561106157600080fd5b505afa158015611075573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611099919061355e565b90506110a583826138c3565b915061110873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083611a4b565b50600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055919050565b3360009081526004602052604090205460ff16611182576040517f7fb6be0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561119057611190612550565b831561119c5760038490555b6040517f66c6bb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301528415156024830152604482018490527f000000000000000000000000000000000000000000000000000000000000000016906366c6bb0b90606401600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b60018054808201825560009190915261132f907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60183836131fa565b5060018054604051918252907f0d8ff5e1bdfaad5eb3007004b76c2f7b74cd72bd5e5bf925918cbc6717b2424f90602001610f55565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146113e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b60025460ff16611423576040517f84f9b0cc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff16838360405161144991906136aa565b60006040518083038185875af1925050503d8060008114611486576040519150601f19603f3d011682016040523d82523d6000602084013e61148b565b606091505b509095945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b73ffffffffffffffffffffffffffffffffffffffff81166115ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103bb565b610dc58161217f565b6060600182815481106115d8576115d8613a1b565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561164357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611618575b50505050509050919050565b8015806116fe57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156116c457600080fd5b505afa1580156116d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fc919061355e565b155b61178a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016103bb565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261185e9084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612a8e565b505050565b60606118728484600085612b9a565b90505b9392505050565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561190657600080fd5b505afa15801561191a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193e919061355e565b905061194a83826138c3565b91506000821315611a45576040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018490523060448301527f000000000000000000000000000000000000000000000000000000000000000016906369328dec90606401602060405180830381600087803b158015611a0b57600080fd5b505af1158015611a1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a43919061355e565b505b50919050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261185e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016117dc565b6040517fe8eda9df00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201839052306044830152600060648301527f0000000000000000000000000000000000000000000000000000000000000000169063e8eda9df90608401600060405180830381600087803b158015611b5e57600080fd5b505af1158015611b72573d6000803e3d6000fd5b5050505050565b6040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390523060448301527f000000000000000000000000000000000000000000000000000000000000000016906369328dec90606401602060405180830381600087803b158015611c2f57600080fd5b505af1158015611c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c67919061355e565b5050565b6060600282511015611cd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a20494e56414c49445f50415448000060448201526064016103bb565b815167ffffffffffffffff811115611cf357611cf3613a4a565b604051908082528060200260200182016040528015611d1c578160200160208202803683370190505b5090508281600081518110611d3357611d33613a1b565b60200260200101818152505060005b60018351611d509190613937565b811015611e0857600080611da387868581518110611d7057611d70613a1b565b602002602001015187866001611d869190613833565b81518110611d9657611d96613a1b565b6020026020010151612d1a565b91509150611dcb848481518110611dbc57611dbc613a1b565b60200260200101518383612e28565b84611dd7856001613833565b81518110611de757611de7613a1b565b60200260200101818152505050508080611e009061397a565b915050611d42565b509392505050565b6000806000611e1f8585612f98565b604051606083811b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000908116602084015283821b166034830152929450909250879060480160405160208183030381529060405280519060200120604051602001611f079291907fff00000000000000000000000000000000000000000000000000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600183015260158201527fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303603582015260550190565b60405160208183030381529060405280519060200120901b60601c925050509392505050565b60005b60018351611f3e9190613937565b81101561217957600080848381518110611f5a57611f5a613a1b565b602002602001015185846001611f709190613833565b81518110611f8057611f80613a1b565b60200260200101519150915060008173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1610611fc75781611fc9565b825b9050600087611fd9866001613833565b81518110611fe957611fe9613a1b565b602002602001015190506000808373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461203157826000612035565b6000835b91509150600060028a516120499190613937565b88106120555788612096565b6120967f0000000000000000000000000000000000000000000000000000000000000000878c6120868c6002613833565b81518110610d4057610d40613a1b565b90506120c37f00000000000000000000000000000000000000000000000000000000000000008888611e10565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f84848460006040519080825280601f01601f19166020018201604052801561210d576020820181803683370190505b506040518563ffffffff1660e01b815260040161212d949392919061372b565b600060405180830381600087803b15801561214757600080fd5b505af115801561215b573d6000803e3d6000fd5b505050505050505050505080806121719061397a565b915050611f30565b50505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561227c57600080fd5b505afa158015612290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b4919061355e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000917f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561236157600080fd5b505afa158015612375573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612399919061355e565b90508082116124af576040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018490523060448301527f000000000000000000000000000000000000000000000000000000000000000016906369328dec906064015b602060405180830381600087803b15801561245957600080fd5b505af19250505080156124a7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526124a49181019061355e565b60015b61185e575050565b6040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390523060448301527f000000000000000000000000000000000000000000000000000000000000000016906369328dec9060640161243f565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661258d57565b604080516001808252818301909252600091602080830190803683370190505090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106125e3576125e3613a1b565b73ffffffffffffffffffffffffffffffffffffffff92831660209182029290920101526040517f3111e7b30000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000090911690633111e7b3906126899084907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9030906004016136d9565b602060405180830381600087803b1580156126a357600080fd5b505af11580156126b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126db919061355e565b506040517f091030c30000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063091030c39060240160206040518083038186803b15801561276457600080fd5b505afa158015612778573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061279c919061355e565b905080612827577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663787a08a66040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561280b57600080fd5b505af115801561281f573d6000803e3d6000fd5b505050505050565b426128527f000000000000000000000000000000000000000000000000000000000000000083613833565b1015611c67577f00000000000000000000000000000000000000000000000000000000000000006128a37f000000000000000000000000000000000000000000000000000000000000000083613833565b6128ad9190613833565b421015612a26576040517f9a99b4f00000000000000000000000000000000000000000000000000000000081523060048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690639a99b4f090604401600060405180830381600087803b15801561296157600080fd5b505af1158015612975573d6000803e3d6000fd5b50506040517f1e9a69500000000000000000000000000000000000000000000000000000000081523060048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169250631e9a69509150604401600060405180830381600087803b15801561280b57600080fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663787a08a66040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561280b57600080fd5b6000612af0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166118639092919063ffffffff16565b80519091501561185e5780806020019051810190612b0e919061347d565b61185e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103bb565b606082471015612c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103bb565b843b612c94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103bb565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612cbd91906136aa565b60006040518083038185875af1925050503d8060008114612cfa576040519150601f19603f3d011682016040523d82523d6000602084013e612cff565b606091505b5091509150612d0f82828661311d565b979650505050505050565b6000806000612d298585612f98565b509050600080612d3a888888611e10565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015612d7f57600080fd5b505afa158015612d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612db791906134f5565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e16578082612e19565b81815b90999098509650505050505050565b6000808411612eb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201527f4e5055545f414d4f554e5400000000000000000000000000000000000000000060648201526084016103bb565b600083118015612ec95750600082115b612f55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c60448201527f495155494449545900000000000000000000000000000000000000000000000060648201526084016103bb565b6000612f63856103e5613886565b90506000612f718483613886565b9050600082612f82876103e8613886565b612f8c9190613833565b9050612d0f818361384b565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415613057576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f556e697377617056324c6962726172793a204944454e544943414c5f4144445260448201527f455353455300000000000000000000000000000000000000000000000000000060648201526084016103bb565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610613091578284613094565b83835b909250905073ffffffffffffffffffffffffffffffffffffffff8216613116576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f41444452455353000060448201526064016103bb565b9250929050565b6060831561312c575081611875565b82511561313c5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103bb9190613718565b8280548282559060005260206000209081019282156131ea579160200282015b828111156131ea57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613190565b506131f6929150613272565b5090565b8280548282559060005260206000209081019282156131ea579160200282015b828111156131ea5781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84351617825560209092019160019091019061321a565b5b808211156131f65760008155600101613273565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a5757600080fd5b80516dffffffffffffffffffffffffffff81168114610a5757600080fd5b80516fffffffffffffffffffffffffffffffff81168114610a5757600080fd5b6000602082840312156132fb57600080fd5b61187582613287565b6000806040838503121561331757600080fd5b61332083613287565b9150602083013561333081613a79565b809150509250929050565b60008060006060848603121561335057600080fd5b61335984613287565b92506020808501359250604085013567ffffffffffffffff8082111561337e57600080fd5b818701915087601f83011261339257600080fd5b8135818111156133a4576133a4613a4a565b6133d4847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613770565b915080825288848285010111156133ea57600080fd5b80848401858401376000848284010152508093505050509250925092565b6000806020838503121561341b57600080fd5b823567ffffffffffffffff8082111561343357600080fd5b818501915085601f83011261344757600080fd5b81358181111561345657600080fd5b8660208260051b850101111561346b57600080fd5b60209290920196919550909350505050565b60006020828403121561348f57600080fd5b815161187581613a79565b6000604082840312156134ac57600080fd5b6040516040810181811067ffffffffffffffff821117156134cf576134cf613a4a565b6040526134db836132c9565b81526134e9602084016132c9565b60208201529392505050565b60008060006060848603121561350a57600080fd5b613513846132ab565b9250613521602085016132ab565b9150604084015163ffffffff8116811461353a57600080fd5b809150509250925092565b60006020828403121561355757600080fd5b5035919050565b60006020828403121561357057600080fd5b5051919050565b6000806040838503121561358a57600080fd5b8235915061359a60208401613287565b90509250929050565b600080600080608085870312156135b957600080fd5b8435935060208501356135cb81613a79565b92506040850135915060608501356135e281613a79565b939692955090935050565b6000806040838503121561360057600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561365557815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613623565b509495945050505050565b6000815180845261367881602086016020860161394e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516136bc81846020870161394e565b9190910192915050565b602081526000611875602083018461360f565b6060815260006136ec606083018661360f565b905083602083015273ffffffffffffffffffffffffffffffffffffffff83166040830152949350505050565b6020815260006118756020830184613660565b84815283602082015273ffffffffffffffffffffffffffffffffffffffff831660408201526080606082015260006137666080830184613660565b9695505050505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156137b7576137b7613a4a565b604052919050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156137f9576137f96139ec565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561382d5761382d6139ec565b50500190565b60008219821115613846576138466139ec565b500190565b600082613881577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156138be576138be6139ec565b500290565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156138fd576138fd6139ec565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018313811615613931576139316139ec565b50500390565b600082821015613949576139496139ec565b500390565b60005b83811015613969578181015183820152602001613951565b838111156121795750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156139ac576139ac6139ec565b5060010190565b60007f80000000000000000000000000000000000000000000000000000000000000008214156139e5576139e56139ec565b5060000390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114610dc557600080fdfea264697066735822122084f8759e9d4403599196bee3a8b6d688d13a4699d96d5cd180da9a1cf1a7007b64736f6c634300080700330000000000000000000000004da27a545c0c5b758a6ba100e3a049001de870f50000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9000000000000000000000000d784927ff2f95ba542bfc824c8a8a98f3495f6b500000000000000000000000000000000000000000000000000000000000000800000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966000000000000000000000000866151f295ee4279fcf3ae2fb483a803400ca491000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000030000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae9000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101515760003560e01c806374ceb267116100cd578063c848915711610081578063e8bd73a511610066578063e8bd73a514610302578063f2fde38b1461030b578063f53b15241461031e57600080fd5b8063c8489157146102dc578063d9253c2d146102ef57600080fd5b80638da5cb5b116100b25780638da5cb5b14610284578063a0c1f15e146102a2578063ba6275ab146102c957600080fd5b806374ceb2671461025e5780637f8661a11461027157600080fd5b80635ce6c327116101245780636939aaf5116101095780636939aaf5146101f7578063715018a61461020a578063747efea11461021257600080fd5b80635ce6c327146101d7578063654bbef2146101e457600080fd5b806312eb72681461015657806318fccc761461016b5780632e1a7d4d146101915780635066ebdd146101a4575b600080fd5b610169610164366004613545565b61033e565b005b61017e610179366004613577565b6104a9565b6040519081526020015b60405180910390f35b61017e61019f366004613545565b610880565b6101c76101b23660046132e9565b60046020526000908152604090205460ff1681565b6040519015158152602001610188565b6002546101c79060ff1681565b61017e6101f23660046135ed565b610a5c565b610169610205366004613545565b610dbc565b610169610dc8565b6102397f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59981565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610188565b61016961026c366004613304565b610e55565b61017e61027f366004613545565b610f61565b60005473ffffffffffffffffffffffffffffffffffffffff16610239565b6102397f0000000000000000000000009ff58f4ffb29fa2266ab25e75e2a8b350331165681565b6101696102d73660046135a3565b611139565b6101696102ea366004613408565b611272565b6101c76102fd36600461333b565b611365565b61017e60035481565b6101696103193660046132e9565b611496565b61033161032c366004613545565b6115c3565b60405161018891906136c6565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600154811061042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4f7574206f6620626f756e64730000000000000000000000000000000000000060448201526064016103bb565b604080516000815260208101909152600180548390811061045257610452613a1b565b90600052602060002001908051906020019061046f929190613170565b506040516000815281907f0d8ff5e1bdfaad5eb3007004b76c2f7b74cd72bd5e5bf925918cbc6717b2424f9060200160405180910390a250565b60025460009060ff16156104e9576040517f6b99cb1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439661614610557576040517eed755600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82163014801561066e57506003546040517f4ffe34db00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599811660048301527f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439661690634ffe34db90602401604080518083038186803b15801561062057600080fd5b505afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610658919061349a565b516fffffffffffffffffffffffffffffffff1611155b801561067a5750600083115b1561087657600061068a8461187c565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59916906370a082319060240160206040518083038186803b15801561071557600080fd5b505afa158015610729573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074d919061355e565b9050600082126107c75780156107be576107be73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599167f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd64396683611a4b565b915061087a9050565b801561086e5760006107d982846137bf565b9050600081131561085b5761084573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599167f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd64396683611a4b565b610856610851846139b3565b611aa1565b610864565b61086482611aa1565b925061087a915050565b50905061087a565b5060005b92915050565b60025460009060ff16156108c0576040517f6b99cb1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966161461092e576040517eed755600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61093782611b79565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59973ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b1580156109bc57600080fd5b505afa1580156109d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f4919061355e565b9050610a5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599167f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd64396683611a4b565b919050565b3360009081526004602052604081205460ff16610aa5576040517f7fb6be0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac73ffffffffffffffffffffffffffffffffffffffff16610b12576040517f1404239200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018381548110610b2757610b27613a1b565b90600052602060002001805480602002602001604051908101604052809291908181526020018280548015610b9257602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610b67575b50505050509050600081600081518110610bae57610bae613a1b565b60209081029190910101516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a082319060240160206040518083038186803b158015610c1f57600080fd5b505afa158015610c33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c57919061355e565b90506000610c867f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac8385611c6b565b90508060018251610c979190613937565b81518110610ca757610ca7613a1b565b6020026020010151935085841015610ceb576040517f17d431f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610da8610d4d7f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac85600081518110610d2557610d25613a1b565b602002602001015186600181518110610d4057610d40613a1b565b6020026020010151611e10565b82600081518110610d6057610d60613a1b565b602002602001015185600081518110610d7b57610d7b613a1b565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16611a4b9092919063ffffffff16565b610db3818430611f2d565b50505092915050565b610dc581611aa1565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b610e53600061217f565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ed6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b73ffffffffffffffffffffffffffffffffffffffff821660008181526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527fb08a78f53a7fe017d5ca8c8fcdbf06ffa2c31f2ab668378a17700d9fc558717e91015b60405180910390a25050565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439661614610fd1576040517eed755600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fd96121f4565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59973ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561106157600080fd5b505afa158015611075573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611099919061355e565b90506110a583826138c3565b915061110873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599167f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd64396683611a4b565b50600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055919050565b3360009081526004602052604090205460ff16611182576040517f7fb6be0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561119057611190612550565b831561119c5760038490555b6040517f66c6bb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599811660048301528415156024830152604482018490527f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd64396616906366c6bb0b90606401600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b60018054808201825560009190915261132f907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60183836131fa565b5060018054604051918252907f0d8ff5e1bdfaad5eb3007004b76c2f7b74cd72bd5e5bf925918cbc6717b2424f90602001610f55565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146113e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b60025460ff16611423576040517f84f9b0cc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff16838360405161144991906136aa565b60006040518083038185875af1925050503d8060008114611486576040519150601f19603f3d011682016040523d82523d6000602084013e61148b565b606091505b509095945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bb565b73ffffffffffffffffffffffffffffffffffffffff81166115ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103bb565b610dc58161217f565b6060600182815481106115d8576115d8613a1b565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561164357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611618575b50505050509050919050565b8015806116fe57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156116c457600080fd5b505afa1580156116d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fc919061355e565b155b61178a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016103bb565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261185e9084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612a8e565b505050565b60606118728484600085612b9a565b90505b9392505050565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000009ff58f4ffb29fa2266ab25e75e2a8b350331165616906370a082319060240160206040518083038186803b15801561190657600080fd5b505afa15801561191a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193e919061355e565b905061194a83826138c3565b91506000821315611a45576040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59981166004830152602482018490523060448301527f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a916906369328dec90606401602060405180830381600087803b158015611a0b57600080fd5b505af1158015611a1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a43919061355e565b505b50919050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261185e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016117dc565b6040517fe8eda9df00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5998116600483015260248201839052306044830152600060648301527f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9169063e8eda9df90608401600060405180830381600087803b158015611b5e57600080fd5b505af1158015611b72573d6000803e3d6000fd5b5050505050565b6040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59981166004830152602482018390523060448301527f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a916906369328dec90606401602060405180830381600087803b158015611c2f57600080fd5b505af1158015611c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c67919061355e565b5050565b6060600282511015611cd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a20494e56414c49445f50415448000060448201526064016103bb565b815167ffffffffffffffff811115611cf357611cf3613a4a565b604051908082528060200260200182016040528015611d1c578160200160208202803683370190505b5090508281600081518110611d3357611d33613a1b565b60200260200101818152505060005b60018351611d509190613937565b811015611e0857600080611da387868581518110611d7057611d70613a1b565b602002602001015187866001611d869190613833565b81518110611d9657611d96613a1b565b6020026020010151612d1a565b91509150611dcb848481518110611dbc57611dbc613a1b565b60200260200101518383612e28565b84611dd7856001613833565b81518110611de757611de7613a1b565b60200260200101818152505050508080611e009061397a565b915050611d42565b509392505050565b6000806000611e1f8585612f98565b604051606083811b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000908116602084015283821b166034830152929450909250879060480160405160208183030381529060405280519060200120604051602001611f079291907fff00000000000000000000000000000000000000000000000000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600183015260158201527fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303603582015260550190565b60405160208183030381529060405280519060200120901b60601c925050509392505050565b60005b60018351611f3e9190613937565b81101561217957600080848381518110611f5a57611f5a613a1b565b602002602001015185846001611f709190613833565b81518110611f8057611f80613a1b565b60200260200101519150915060008173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1610611fc75781611fc9565b825b9050600087611fd9866001613833565b81518110611fe957611fe9613a1b565b602002602001015190506000808373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461203157826000612035565b6000835b91509150600060028a516120499190613937565b88106120555788612096565b6120967f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac878c6120868c6002613833565b81518110610d4057610d40613a1b565b90506120c37f000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac8888611e10565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f84848460006040519080825280601f01601f19166020018201604052801561210d576020820181803683370190505b506040518563ffffffff1660e01b815260040161212d949392919061372b565b600060405180830381600087803b15801561214757600080fd5b505af115801561215b573d6000803e3d6000fd5b505050505050505050505080806121719061397a565b915050611f30565b50505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f0000000000000000000000009ff58f4ffb29fa2266ab25e75e2a8b350331165673ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561227c57600080fd5b505afa158015612290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b4919061355e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000009ff58f4ffb29fa2266ab25e75e2a8b3503311656811660048301529192506000917f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59916906370a082319060240160206040518083038186803b15801561236157600080fd5b505afa158015612375573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612399919061355e565b90508082116124af576040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59981166004830152602482018490523060448301527f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a916906369328dec906064015b602060405180830381600087803b15801561245957600080fd5b505af19250505080156124a7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526124a49181019061355e565b60015b61185e575050565b6040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59981166004830152602482018390523060448301527f0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a916906369328dec9060640161243f565b7f0000000000000000000000004da27a545c0c5b758a6ba100e3a049001de870f573ffffffffffffffffffffffffffffffffffffffff1661258d57565b604080516001808252818301909252600091602080830190803683370190505090507f0000000000000000000000009ff58f4ffb29fa2266ab25e75e2a8b3503311656816000815181106125e3576125e3613a1b565b73ffffffffffffffffffffffffffffffffffffffff92831660209182029290920101526040517f3111e7b30000000000000000000000000000000000000000000000000000000081527f000000000000000000000000d784927ff2f95ba542bfc824c8a8a98f3495f6b590911690633111e7b3906126899084907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9030906004016136d9565b602060405180830381600087803b1580156126a357600080fd5b505af11580156126b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126db919061355e565b506040517f091030c30000000000000000000000000000000000000000000000000000000081523060048201526000907f0000000000000000000000004da27a545c0c5b758a6ba100e3a049001de870f573ffffffffffffffffffffffffffffffffffffffff169063091030c39060240160206040518083038186803b15801561276457600080fd5b505afa158015612778573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061279c919061355e565b905080612827577f0000000000000000000000004da27a545c0c5b758a6ba100e3a049001de870f573ffffffffffffffffffffffffffffffffffffffff1663787a08a66040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561280b57600080fd5b505af115801561281f573d6000803e3d6000fd5b505050505050565b426128527f00000000000000000000000000000000000000000000000000000000000d2f0083613833565b1015611c67577f000000000000000000000000000000000000000000000000000000000002a3006128a37f00000000000000000000000000000000000000000000000000000000000d2f0083613833565b6128ad9190613833565b421015612a26576040517f9a99b4f00000000000000000000000000000000000000000000000000000000081523060048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201527f0000000000000000000000004da27a545c0c5b758a6ba100e3a049001de870f573ffffffffffffffffffffffffffffffffffffffff1690639a99b4f090604401600060405180830381600087803b15801561296157600080fd5b505af1158015612975573d6000803e3d6000fd5b50506040517f1e9a69500000000000000000000000000000000000000000000000000000000081523060048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201527f0000000000000000000000004da27a545c0c5b758a6ba100e3a049001de870f573ffffffffffffffffffffffffffffffffffffffff169250631e9a69509150604401600060405180830381600087803b15801561280b57600080fd5b7f0000000000000000000000004da27a545c0c5b758a6ba100e3a049001de870f573ffffffffffffffffffffffffffffffffffffffff1663787a08a66040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561280b57600080fd5b6000612af0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166118639092919063ffffffff16565b80519091501561185e5780806020019051810190612b0e919061347d565b61185e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103bb565b606082471015612c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103bb565b843b612c94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103bb565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612cbd91906136aa565b60006040518083038185875af1925050503d8060008114612cfa576040519150601f19603f3d011682016040523d82523d6000602084013e612cff565b606091505b5091509150612d0f82828661311d565b979650505050505050565b6000806000612d298585612f98565b509050600080612d3a888888611e10565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015612d7f57600080fd5b505afa158015612d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612db791906134f5565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e16578082612e19565b81815b90999098509650505050505050565b6000808411612eb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201527f4e5055545f414d4f554e5400000000000000000000000000000000000000000060648201526084016103bb565b600083118015612ec95750600082115b612f55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c60448201527f495155494449545900000000000000000000000000000000000000000000000060648201526084016103bb565b6000612f63856103e5613886565b90506000612f718483613886565b9050600082612f82876103e8613886565b612f8c9190613833565b9050612d0f818361384b565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415613057576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f556e697377617056324c6962726172793a204944454e544943414c5f4144445260448201527f455353455300000000000000000000000000000000000000000000000000000060648201526084016103bb565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610613091578284613094565b83835b909250905073ffffffffffffffffffffffffffffffffffffffff8216613116576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f41444452455353000060448201526064016103bb565b9250929050565b6060831561312c575081611875565b82511561313c5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103bb9190613718565b8280548282559060005260206000209081019282156131ea579160200282015b828111156131ea57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613190565b506131f6929150613272565b5090565b8280548282559060005260206000209081019282156131ea579160200282015b828111156131ea5781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84351617825560209092019160019091019061321a565b5b808211156131f65760008155600101613273565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a5757600080fd5b80516dffffffffffffffffffffffffffff81168114610a5757600080fd5b80516fffffffffffffffffffffffffffffffff81168114610a5757600080fd5b6000602082840312156132fb57600080fd5b61187582613287565b6000806040838503121561331757600080fd5b61332083613287565b9150602083013561333081613a79565b809150509250929050565b60008060006060848603121561335057600080fd5b61335984613287565b92506020808501359250604085013567ffffffffffffffff8082111561337e57600080fd5b818701915087601f83011261339257600080fd5b8135818111156133a4576133a4613a4a565b6133d4847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613770565b915080825288848285010111156133ea57600080fd5b80848401858401376000848284010152508093505050509250925092565b6000806020838503121561341b57600080fd5b823567ffffffffffffffff8082111561343357600080fd5b818501915085601f83011261344757600080fd5b81358181111561345657600080fd5b8660208260051b850101111561346b57600080fd5b60209290920196919550909350505050565b60006020828403121561348f57600080fd5b815161187581613a79565b6000604082840312156134ac57600080fd5b6040516040810181811067ffffffffffffffff821117156134cf576134cf613a4a565b6040526134db836132c9565b81526134e9602084016132c9565b60208201529392505050565b60008060006060848603121561350a57600080fd5b613513846132ab565b9250613521602085016132ab565b9150604084015163ffffffff8116811461353a57600080fd5b809150509250925092565b60006020828403121561355757600080fd5b5035919050565b60006020828403121561357057600080fd5b5051919050565b6000806040838503121561358a57600080fd5b8235915061359a60208401613287565b90509250929050565b600080600080608085870312156135b957600080fd5b8435935060208501356135cb81613a79565b92506040850135915060608501356135e281613a79565b939692955090935050565b6000806040838503121561360057600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561365557815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613623565b509495945050505050565b6000815180845261367881602086016020860161394e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516136bc81846020870161394e565b9190910192915050565b602081526000611875602083018461360f565b6060815260006136ec606083018661360f565b905083602083015273ffffffffffffffffffffffffffffffffffffffff83166040830152949350505050565b6020815260006118756020830184613660565b84815283602082015273ffffffffffffffffffffffffffffffffffffffff831660408201526080606082015260006137666080830184613660565b9695505050505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156137b7576137b7613a4a565b604052919050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156137f9576137f96139ec565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561382d5761382d6139ec565b50500190565b60008219821115613846576138466139ec565b500190565b600082613881577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156138be576138be6139ec565b500290565b6000808312837f8000000000000000000000000000000000000000000000000000000000000000018312811516156138fd576138fd6139ec565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018313811615613931576139316139ec565b50500390565b600082821015613949576139496139ec565b500390565b60005b83811015613969578181015183820152602001613951565b838111156121795750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156139ac576139ac6139ec565b5060010190565b60007f80000000000000000000000000000000000000000000000000000000000000008214156139e5576139e56139ec565b5060000390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114610dc557600080fdfea264697066735822122084f8759e9d4403599196bee3a8b6d688d13a4699d96d5cd180da9a1cf1a7007b64736f6c63430008070033

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

0000000000000000000000004da27a545c0c5b758a6ba100e3a049001de870f50000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9000000000000000000000000d784927ff2f95ba542bfc824c8a8a98f3495f6b500000000000000000000000000000000000000000000000000000000000000800000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966000000000000000000000000866151f295ee4279fcf3ae2fb483a803400ca491000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000030000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae9000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599

-----Decoded View---------------
Arg [0] : _stkAave (address): 0x4da27a545c0c5B758a6BA100e3a049001de870f5
Arg [1] : aaveLendingPool (address): 0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9
Arg [2] : incentiveController (address): 0xd784927Ff2f95ba542BfC824c8a8a98F3495f6b5
Arg [3] : params (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 0000000000000000000000004da27a545c0c5b758a6ba100e3a049001de870f5
Arg [1] : 0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9
Arg [2] : 000000000000000000000000d784927ff2f95ba542bfc824c8a8a98f3495f6b5
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [4] : 0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599
Arg [5] : 000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966
Arg [6] : 000000000000000000000000866151f295ee4279fcf3ae2fb483a803400ca491
Arg [7] : 000000000000000000000000c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac
Arg [8] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [10] : 0000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae9
Arg [11] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [12] : 0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599


Deployed Bytecode Sourcemap

474:1959:17:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10872:246:7;;;;;;:::i;:::-;;:::i;:::-;;6898:2027;;;;;;:::i;:::-;;:::i;:::-;;;11008:25:19;;;10996:2;10981:18;6898:2027:7;;;;;;;;8961:369;;;;;;:::i;:::-;;:::i;1509:49::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;10592:14:19;;10585:22;10567:41;;10555:2;10540:18;1509:49:7;10427:187:19;1333:18:7;;;;;;;;;11407:732;;;;;;:::i;:::-;;:::i;5462:78::-;;;;;;:::i;:::-;;:::i;1605:92:0:-;;;:::i;779:37:7:-;;;;;;;;7734:42:19;7722:55;;;7704:74;;7692:2;7677:18;779:37:7;7558:226:19;5242:184:7;;;;;;:::i;:::-;;:::i;9468:604::-;;;;;;:::i;:::-;;:::i;973:85:0:-;1019:7;1045:6;;;973:85;;1548:30:16;;;;;6198:406:7;;;;;;:::i;:::-;;:::i;10689:177::-;;;;;;:::i;:::-;;:::i;10271:266::-;;;;;;:::i;:::-;;:::i;1417:33::-;;;;;;1846:189:0;;;;;;:::i;:::-;;:::i;10543:140:7:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;10872:246::-;1019:7:0;1045:6;1185:23;1045:6;666:10:6;1185:23:0;1177:68;;;;;;;13458:2:19;1177:68:0;;;13440:21:19;;;13477:18;;;13470:30;13536:34;13516:18;;;13509:62;13588:18;;1177:68:0;;;;;;;;;10962:17:7::1;:24:::0;10950:36;::::1;10942:62;;;::::0;::::1;::::0;;13819:2:19;10942:62:7::1;::::0;::::1;13801:21:19::0;13858:2;13838:18;;;13831:30;13897:15;13877:18;;;13870:43;13930:18;;10942:62:7::1;13617:337:19::0;10942:62:7::1;11045:16;::::0;;11059:1:::1;11045:16:::0;;::::1;::::0;::::1;::::0;;;11014:17:::1;:28:::0;;11032:9;;11014:28;::::1;;;;;:::i;:::-;;;;;;;;:47;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;11076:35:7::1;::::0;11105:5:::1;10567:41:19::0;;11094:9:7;;11076:35:::1;::::0;10555:2:19;10540:18;11076:35:7::1;;;;;;;10872:246:::0;:::o;6898:2027::-;4884:6;;6997;;4884;;4880:60;;;4913:16;;;;;;;;;;;;;;4880:60;5001:10:::1;:31;5023:8;5001:31;;4997:83;;5055:14;;;;;;;;;;;;;;4997:83;7189:23:::2;::::0;::::2;7207:4;7189:23;:108:::0;::::2;;;-1:-1:-1::0;7279:18:7::2;::::0;7228:39:::2;::::0;;;;:15:::2;7252:13;7722:55:19::0;;7228:39:7::2;::::0;::::2;7704:74:19::0;7228:8:7::2;:15;::::0;::::2;::::0;7677:18:19;;7228:39:7::2;::::0;::::2;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:47:::0;:69:::2;;;;7189:108;:135;;;;;7323:1;7313:7;:11;7189:135;7172:1720;;;7362:13;7378:17;7387:7;7378:8;:17::i;:::-;7863:38;::::0;;;;7895:4:::2;7863:38;::::0;::::2;7704:74:19::0;7362:33:7;;-1:-1:-1;7837:23:7::2;::::0;7863::::2;:13;:23;::::0;::::2;::::0;7677:18:19;;7863:38:7::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7837:64;;7930:1;7920:6;:11;7916:965;;7986:19:::0;;7982:128:::2;;8029:62;:26;:13;:26;8064:8;8075:15:::0;8029:26:::2;:62::i;:::-;8142:15:::0;-1:-1:-1;8128:30:7::2;::::0;-1:-1:-1;8128:30:7::2;7916:965;8184:19:::0;;8180:701:::2;;8300:11;8314:32;8330:15:::0;8314:6;:32:::2;:::i;:::-;8300:46;;8376:1;8369:4;:8;8365:399;;;8510:60;:26;:13;:26;8545:8;8564:4:::0;8510:26:::2;:60::i;:::-;8592:23;8606:7;8607:6:::0;8606:7:::2;:::i;:::-;8592:5;:23::i;:::-;8365:399;;;8722:22;8728:15;8722:5;:22::i;:::-;8789:4:::0;-1:-1:-1;8782:11:7::2;::::0;-1:-1:-1;;8782:11:7::2;8180:701;-1:-1:-1::0;8859:6:7;-1:-1:-1;8852:13:7::2;;7172:1720;-1:-1:-1::0;8916:1:7::2;5089;6898:2027:::0;;;;:::o;8961:369::-;4884:6;;9044:20;;4884:6;;4880:60;;;4913:16;;;;;;;;;;;;;;4880:60;5001:10:::1;:31;5023:8;5001:31;;4997:83;;5055:14;;;;;;;;;;;;;;4997:83;9076:17:::2;9086:6;9076:9;:17::i;:::-;9216:38;::::0;;;;9248:4:::2;9216:38;::::0;::::2;7704:74:19::0;9216:13:7::2;:23;;::::0;::::2;::::0;7677:18:19;;9216:38:7::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9201:53:::0;-1:-1:-1;9264:59:7::2;:26;:13;:26;9299:8;9201:53:::0;9264:26:::2;:59::i;:::-;8961:369:::0;;;:::o;11407:732::-;5160:10;11515:17;5142:29;;;:17;:29;;;;;;;;5137:82;;5194:14;;;;;;;;;;;;;;5137:82;11549:7:::1;:21;;11545:70;;11593:11;;;;;;;;;;;;;;11545:70;11625:21;11649:17;11667:9;11649:28;;;;;;;;:::i;:::-;;;;;;;;11625:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;;::::0;;;;;::::1;::::0;::::1;;::::0;;::::1;;;;;;;;;;;11688:16;11714:4;11719:1;11714:7;;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;;;;11707:40:::1;::::0;;;;11741:4:::1;11707:40;::::0;::::1;7704:74:19::0;11707:25:7::1;::::0;;::::1;::::0;::::1;::::0;7677:18:19;;11707:40:7::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;11688:59;;11758:24;11785:55;11816:7;11825:8;11835:4;11785:30;:55::i;:::-;11758:82;;11863:7;11888:1;11871:7;:14;:18;;;;:::i;:::-;11863:27;;;;;;;;:::i;:::-;;;;;;;11851:39;;11917:12;11905:9;:24;11901:82;;;11952:20;;;;;;;;;;;;;;11901:82;11993:93;12022:51;12047:7;12056:4;12061:1;12056:7;;;;;;;;:::i;:::-;;;;;;;12065:4;12070:1;12065:7;;;;;;;;:::i;:::-;;;;;;;12022:24;:51::i;:::-;12075:7;12083:1;12075:10;;;;;;;;:::i;:::-;;;;;;;12000:4;12005:1;12000:7;;;;;;;;:::i;:::-;;;;;;;11993:28;;;;:93;;;;;:::i;:::-;12097:35;12103:7;12112:4;12126;12097:5;:35::i;:::-;11534:605;;;11407:732:::0;;;;:::o;5462:78::-;5520:13;5526:6;5520:5;:13::i;:::-;5462:78;:::o;1605:92:0:-;1019:7;1045:6;1185:23;1045:6;666:10:6;1185:23:0;1177:68;;;;;;;13458:2:19;1177:68:0;;;13440:21:19;;;13477:18;;;13470:30;13536:34;13516:18;;;13509:62;13588:18;;1177:68:0;13256:356:19;1177:68:0;1669:21:::1;1687:1;1669:9;:21::i;:::-;1605:92::o:0;5242:184:7:-;1019:7:0;1045:6;1185:23;1045:6;666:10:6;1185:23:0;1177:68;;;;;;;13458:2:19;1177:68:0;;;13440:21:19;;;13477:18;;;13470:30;13536:34;13516:18;;;13509:62;13588:18;;1177:68:0;13256:356:19;1177:68:0;5330:27:7::1;::::0;::::1;;::::0;;;:17:::1;:27;::::0;;;;;;;;:35;;;::::1;::::0;::::1;;::::0;;::::1;::::0;;;5380:39;;10567:41:19;;;5380:39:7::1;::::0;10540:18:19;5380:39:7::1;;;;;;;;5242:184:::0;;:::o;9468:604::-;9539:18;5001:10;:31;5023:8;5001:31;;4997:83;;5055:14;;;;;;;;;;;;;;4997:83;9569:7:::1;:5;:7::i;:::-;9667:38;::::0;;;;9699:4:::1;9667:38;::::0;::::1;7704:74:19::0;9643:21:7::1;::::0;9667:13:::1;:23;;::::0;::::1;::::0;7677:18:19;;9667:38:7::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9643:62:::0;-1:-1:-1;9780:39:7::1;9811:7:::0;9643:62;9780:39:::1;:::i;:::-;9766:53:::0;-1:-1:-1;9879:60:7::1;:26;:13;:26;9914:8;9925:13:::0;9879:26:::1;:60::i;:::-;-1:-1:-1::0;10052:6:7::1;:13:::0;;;::::1;10061:4;10052:13;::::0;;9468:604;;-1:-1:-1;9468:604:7:o;6198:406::-;5160:10;5142:29;;;;:17;:29;;;;;;;;5137:82;;5194:14;;;;;;;;;;;;;;5137:82;6375:14:::1;6371:62;;;6405:17;:15;:17::i;:::-;6447:14:::0;;6443:76:::1;;6477:18;:31:::0;;;6443:76:::1;6529:68;::::0;;;;:16:::1;6554:13;8335:55:19::0;;6529:68:7::1;::::0;::::1;8317:74:19::0;8434:14;;8427:22;8407:18;;;8400:50;8466:18;;;8459:34;;;6529:8:7::1;:16;::::0;::::1;::::0;8290:18:19;;6529:68:7::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;6198:406:::0;;;;:::o;10689:177::-;1019:7:0;1045:6;1185:23;1045:6;666:10:6;1185:23:0;1177:68;;;;;;;13458:2:19;1177:68:0;;;13440:21:19;;;13477:18;;;13470:30;13536:34;13516:18;;;13509:62;13588:18;;1177:68:0;13256:356:19;1177:68:0;10767:17:7::1;:28:::0;;;;::::1;::::0;;-1:-1:-1;10767:28:7;;;;::::1;::::0;;::::1;10790:4:::0;;10767:28:::1;:::i;:::-;-1:-1:-1::0;10828:17:7::1;:24:::0;;10810:49:::1;::::0;10567:41:19;;;10828:24:7;10810:49:::1;::::0;10555:2:19;10540:18;10810:49:7::1;10427:187:19::0;10271:266:7;10392:12;1045:6:0;;1185:23;1045:6;666:10:6;1185:23:0;1177:68;;;;;;;13458:2:19;1177:68:0;;;13440:21:19;;;13477:18;;;13470:30;13536:34;13516:18;;;13509:62;13588:18;;1177:68:0;13256:356:19;1177:68:0;10421:6:7::1;::::0;::::1;;10416:64;;10450:19;;;;;;;;;;;;;;10416:64;10503:2;:7;;10518:5;10525:4;10503:27;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;10489:41:7;;10271:266;-1:-1:-1;;;;;10271:266:7:o;1846:189:0:-;1019:7;1045:6;1185:23;1045:6;666:10:6;1185:23:0;1177:68;;;;;;;13458:2:19;1177:68:0;;;13440:21:19;;;13477:18;;;13470:30;13536:34;13516:18;;;13509:62;13588:18;;1177:68:0;13256:356:19;1177:68:0;1934:22:::1;::::0;::::1;1926:73;;;::::0;::::1;::::0;;11470:2:19;1926:73:0::1;::::0;::::1;11452:21:19::0;11509:2;11489:18;;;11482:30;11548:34;11528:18;;;11521:62;11619:8;11599:18;;;11592:36;11645:19;;1926:73:0::1;11268:402:19::0;1926:73:0::1;2009:19;2019:8;2009:9;:19::i;10543:140:7:-:0;10608:21;10648:17;10666:9;10648:28;;;;;;;;:::i;:::-;;;;;;;;10641:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10543:140;;;:::o;1346:603:4:-;1701:10;;;1700:62;;-1:-1:-1;1717:39:4;;;;;1741:4;1717:39;;;8024:34:19;1717:15:4;8094::19;;;8074:18;;;8067:43;1717:15:4;;;;;7936:18:19;;1717:39:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:44;1700:62;1679:163;;;;;;;15701:2:19;1679:163:4;;;15683:21:19;15740:2;15720:18;;;15713:30;15779:34;15759:18;;;15752:62;15850:24;15830:18;;;15823:52;15892:19;;1679:163:4;15499:418:19;1679:163:4;1879:62;;8708:42:19;8696:55;;1879:62:4;;;8678:74:19;8768:18;;;8761:34;;;1852:90:4;;1872:5;;1902:22;;8651:18:19;;1879:62:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1852:19;:90::i;:::-;1346:603;;;:::o;3461:223:5:-;3594:12;3625:52;3647:6;3655:4;3661:1;3664:12;3625:21;:52::i;:::-;3618:59;;3461:223;;;;;;:::o;2219:335:16:-;2336:31;;;;;2361:4;2336:31;;;7704:74:19;2281:18:16;;;;2336:16;:6;:16;;;;7677:18:19;;2336:31:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2311:56;-1:-1:-1;2391:40:16;2423:7;2311:56;2391:40;:::i;:::-;2377:54;;2459:1;2445:11;:15;2441:106;;;2462:85;;;;;:24;2495:13;9087:15:19;;2462:85:16;;;9069:34:19;9119:18;;;9112:34;;;2541:4:16;9162:18:19;;;9155:43;2462:15:16;:24;;;;8981:18:19;;2462:85:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2441:106;2301:253;2219:335;;;:::o;634:205:4:-;773:58;;8708:42:19;8696:55;;773:58:4;;;8678:74:19;8768:18;;;8761:34;;;746:86:4;;766:5;;796:23;;8651:18:19;;773:58:4;8504:297:19;2074:139:16;2133:73;;;;;:23;2165:13;9526:15:19;;2133:73:16;;;9508:34:19;9558:18;;;9551:34;;;2197:4:16;9601:18:19;;;9594:43;-1:-1:-1;9653:18:19;;;9646:47;2133:15:16;:23;;;;9419:19:19;;2133:73:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:139;:::o;2560:141::-;2623:71;;;;;:24;2656:13;9087:15:19;;2623:71:16;;;9069:34:19;9119:18;;;9112:34;;;2688:4:16;9162:18:19;;;9155:43;2623:15:16;:24;;;;8981:18:19;;2623:71:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2560:141;:::o;3613:503:13:-;3714:21;3770:1;3755:4;:11;:16;;3747:59;;;;;;;12690:2:19;3747:59:13;;;12672:21:19;12729:2;12709:18;;;12702:30;12768:32;12748:18;;;12741:60;12818:18;;3747:59:13;12488:354:19;3747:59:13;3837:4;:11;3826:23;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3826:23:13;;3816:33;;3872:8;3859:7;3867:1;3859:10;;;;;;;;:::i;:::-;;;;;;:21;;;;;3895:6;3890:220;3921:1;3907:4;:11;:15;;;;:::i;:::-;3903:1;:19;3890:220;;;3944:14;3960:15;3979:42;3991:7;4000:4;4005:1;4000:7;;;;;;;;:::i;:::-;;;;;;;4009:4;4014:1;4018;4014:5;;;;:::i;:::-;4009:11;;;;;;;;:::i;:::-;;;;;;;3979;:42::i;:::-;3943:78;;;;4052:47;4065:7;4073:1;4065:10;;;;;;;;:::i;:::-;;;;;;;4077:9;4088:10;4052:12;:47::i;:::-;4035:7;4043:5;:1;4047;4043:5;:::i;:::-;4035:14;;;;;;;;:::i;:::-;;;;;;:64;;;;;3929:181;;3924:3;;;;;:::i;:::-;;;;3890:220;;;;3613:503;;;;;:::o;999:479::-;1088:12;1113:14;1129;1147:26;1158:6;1166;1147:10;:26::i;:::-;1310:32;;1467:2;6435:15:19;;;6344:66;6431:24;;;1310:32:13;;;6419:37:19;6490:15;;;6486:24;6472:12;;;6465:46;6435:15;;-1:-1:-1;6490:15:19;;-1:-1:-1;1275:7:13;;6527:12:19;;1310:32:13;;;;;;;;;;;;1300:43;;;;;;1216:246;;;;;;;;7200:66:19;7188:79;;7304:2;7300:15;;;;7317:66;7296:88;7292:1;7283:11;;7276:109;7410:2;7401:12;;7394:28;7452:66;7447:2;7438:12;;7431:88;7544:2;7535:12;;6829:724;1216:246:13;;;;;;;;;;;;;1206:257;;;;;;:263;;1190:281;;1183:288;;1102:376;;999:479;;;;;:::o;12230:723:7:-;12361:9;12356:591;12390:1;12376:4;:11;:15;;;;:::i;:::-;12372:1;:19;12356:591;;;12413:13;12428:14;12447:4;12452:1;12447:7;;;;;;;;:::i;:::-;;;;;;;12456:4;12461:1;12465;12461:5;;;;:::i;:::-;12456:11;;;;;;;;:::i;:::-;;;;;;;12412:56;;;;12482:14;12507:6;12499:14;;:5;:14;;;:31;;12524:6;12499:31;;;12516:5;12499:31;12482:48;-1:-1:-1;12544:17:7;12564:7;12572:5;:1;12576;12572:5;:::i;:::-;12564:14;;;;;;;;:::i;:::-;;;;;;;12544:34;;12593:18;12613;12644:6;12635:15;;:5;:15;;;:67;;12680:9;12699:1;12635:67;;;12662:1;12666:9;12635:67;12592:110;;;;12716:10;12747:1;12733:4;:11;:15;;;;:::i;:::-;12729:1;:19;:82;;12808:3;12729:82;;;12751:54;12776:7;12785:6;12793:4;12798:5;:1;12802;12798:5;:::i;:::-;12793:11;;;;;;;;:::i;12751:54::-;12716:95;;12840:48;12865:7;12874:5;12881:6;12840:24;:48::i;:::-;12825:69;;;12895:10;12907;12919:2;12933:1;12923:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12923:12:7;;12825:111;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12398:549;;;;;;;12393:3;;;;;:::i;:::-;;;;12356:591;;;;12230:723;;;:::o;2041:169:0:-;2096:16;2115:6;;;2131:17;;;;;;;;;;2163:40;;2115:6;;;;;;;2163:40;;2096:16;2163:40;2086:124;2041:169;:::o;2707:720:16:-;2775:31;;;;;2800:4;2775:31;;;7704:74:19;2752:20:16;;2775:6;:16;;;;;7677:18:19;;2775:31:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2836:48;;;;;:31;2876:6;7722:55:19;;2836:48:16;;;7704:74:19;2752:54:16;;-1:-1:-1;;;2843:13:16;2836:31;;;;7677:18:19;;2836:48:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2816:68;;2914:9;2898:12;:25;2894:527;;3084:77;;;;;:24;3117:13;9087:15:19;;3084:77:16;;;9069:34:19;9119:18;;;9112:34;;;3155:4:16;9162:18:19;;;9155:43;3084:15:16;:24;;;;8981:18:19;;3084:77:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3084:77:16;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;3080:93;;2623:71;2560:141;:::o;2894:527::-;3325:74;;;;;:24;3358:13;9087:15:19;;3325:74:16;;;9069:34:19;9119:18;;;9112:34;;;3393:4:16;9162:18:19;;;9155:43;3325:15:16;:24;;;;8981:18:19;;3325:74:16;8806:398:19;1082:1349:17;1149:7;1141:30;;1137:43;;1082:1349::o;1137:43::-;1230:16;;;1244:1;1230:16;;;;;;;;;1198:29;;1230:16;;;;;;;;;;;-1:-1:-1;1230:16:17;1198:48;;1282:6;1256:12;1269:1;1256:15;;;;;;;;:::i;:::-;:33;;;;:15;;;;;;;;;:33;1410:80;;;;;:19;:32;;;;;;:80;;1443:12;;1457:17;;1484:4;;1410:80;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;1581:39:17;;;;;1614:4;1581:39;;;7704:74:19;1562:16:17;;1581:7;:24;;;;;7677:18:19;;1581:39:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1562:58;-1:-1:-1;1635:13:17;1631:794;;1738:7;:16;;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2623:71:16;2560:141;:::o;1631:794:17:-;1808:15;1778:27;1789:16;1778:8;:27;:::i;:::-;:45;1774:651;;;1892:14;1862:27;1873:16;1862:8;:27;:::i;:::-;:44;;;;:::i;:::-;1844:15;:62;1840:575;;;1999:54;;;;;2028:4;1999:54;;;8678:74:19;2035:17:17;8768:18:19;;;8761:34;1999:7:17;:20;;;;;8651:18:19;;1999:54:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2189:48:17;;;;;2212:4;2189:48;;;8678:74:19;2219:17:17;8768:18:19;;;8761:34;2189:7:17;:14;;;-1:-1:-1;2189:14:17;;-1:-1:-1;8651:18:19;;2189:48:17;;;;;;;;;;;;;;;;;;;1840:575;2381:7;:16;;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3140:706:4;3559:23;3585:69;3613:4;3585:69;;;;;;;;;;;;;;;;;3593:5;3585:27;;;;:69;;;;;:::i;:::-;3668:17;;3559:95;;-1:-1:-1;3668:21:4;3664:176;;3763:10;3752:30;;;;;;;;;;;;:::i;:::-;3744:85;;;;;;;14878:2:19;3744:85:4;;;14860:21:19;14917:2;14897:18;;;14890:30;14956:34;14936:18;;;14929:62;15027:12;15007:18;;;15000:40;15057:19;;3744:85:4;14676:406:19;4548:499:5;4713:12;4770:5;4745:21;:30;;4737:81;;;;;;;12283:2:19;4737:81:5;;;12265:21:19;12322:2;12302:18;;;12295:30;12361:34;12341:18;;;12334:62;12432:8;12412:18;;;12405:36;12458:19;;4737:81:5;12081:402:19;4737:81:5;1034:20;;4828:60;;;;;;;14161:2:19;4828:60:5;;;14143:21:19;14200:2;14180:18;;;14173:30;14239:31;14219:18;;;14212:59;14288:18;;4828:60:5;13959:353:19;4828:60:5;4900:12;4914:23;4941:6;:11;;4960:5;4967:4;4941:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4899:73;;;;4989:51;5006:7;5015:10;5027:12;4989:16;:51::i;:::-;4982:58;4548:499;-1:-1:-1;;;;;;;4548:499:5:o;1533:387:13:-;1626:13;1641;1667:14;1686:26;1697:6;1705;1686:10;:26::i;:::-;1666:46;;;1723:13;1738;1771:32;1779:7;1788:6;1796;1771:7;:32::i;:::-;1756:60;;;:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1722:96;;;;;;;;;1861:6;1851:16;;:6;:16;;;:62;;1894:8;1904;1851:62;;;1871:8;1881;1851:62;1828:85;;;;-1:-1:-1;1533:387:13;-1:-1:-1;;;;;;;1533:387:13:o;2463:500::-;2556:14;2601:1;2590:8;:12;2582:68;;;;;;;15289:2:19;2582:68:13;;;15271:21:19;15328:2;15308:18;;;15301:30;15367:34;15347:18;;;15340:62;15438:13;15418:18;;;15411:41;15469:19;;2582:68:13;15087:407:19;2582:68:13;2680:1;2668:9;:13;:31;;;;;2698:1;2685:10;:14;2668:31;2660:84;;;;;;;13049:2:19;2660:84:13;;;13031:21:19;13088:2;13068:18;;;13061:30;13127:34;13107:18;;;13100:62;13198:10;13178:18;;;13171:38;13226:19;;2660:84:13;12847:404:19;2660:84:13;2754:20;2777:14;:8;2788:3;2777:14;:::i;:::-;2754:37;-1:-1:-1;2801:14:13;2818:28;2836:10;2754:37;2818:28;:::i;:::-;2801:45;-1:-1:-1;2856:16:13;2896:15;2876:16;:9;2888:4;2876:16;:::i;:::-;2875:36;;;;:::i;:::-;2856:55;-1:-1:-1;2933:23:13;2856:55;2933:9;:23;:::i;565:345::-;640:14;656;700:6;690:16;;:6;:16;;;;682:66;;;;;;;11877:2:19;682:66:13;;;11859:21:19;11916:2;11896:18;;;11889:30;11955:34;11935:18;;;11928:62;12026:7;12006:18;;;11999:35;12051:19;;682:66:13;11675:401:19;682:66:13;786:6;777:15;;:6;:15;;;:53;;815:6;823;777:53;;;796:6;804;777:53;758:72;;-1:-1:-1;758:72:13;-1:-1:-1;848:20:13;;;840:63;;;;;;;14519:2:19;840:63:13;;;14501:21:19;14558:2;14538:18;;;14531:30;14597:32;14577:18;;;14570:60;14647:18;;840:63:13;14317:354:19;840:63:13;565:345;;;;;:::o;7161:692:5:-;7307:12;7335:7;7331:516;;;-1:-1:-1;7365:10:5;7358:17;;7331:516;7476:17;;:21;7472:365;;7670:10;7664:17;7730:15;7717:10;7713:2;7709:19;7702:44;7472:365;7809:12;7802:20;;;;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14:196:19;82:20;;142:42;131:54;;121:65;;111:93;;200:1;197;190:12;215:188;294:13;;347:30;336:42;;326:53;;316:81;;393:1;390;383:12;408:192;487:13;;540:34;529:46;;519:57;;509:85;;590:1;587;580:12;605:186;664:6;717:2;705:9;696:7;692:23;688:32;685:52;;;733:1;730;723:12;685:52;756:29;775:9;756:29;:::i;796:315::-;861:6;869;922:2;910:9;901:7;897:23;893:32;890:52;;;938:1;935;928:12;890:52;961:29;980:9;961:29;:::i;:::-;951:39;;1040:2;1029:9;1025:18;1012:32;1053:28;1075:5;1053:28;:::i;:::-;1100:5;1090:15;;;796:315;;;;;:::o;1116:964::-;1202:6;1210;1218;1271:2;1259:9;1250:7;1246:23;1242:32;1239:52;;;1287:1;1284;1277:12;1239:52;1310:29;1329:9;1310:29;:::i;:::-;1300:39;;1358:2;1407;1396:9;1392:18;1379:32;1369:42;;1462:2;1451:9;1447:18;1434:32;1485:18;1526:2;1518:6;1515:14;1512:34;;;1542:1;1539;1532:12;1512:34;1580:6;1569:9;1565:22;1555:32;;1625:7;1618:4;1614:2;1610:13;1606:27;1596:55;;1647:1;1644;1637:12;1596:55;1683:2;1670:16;1705:2;1701;1698:10;1695:36;;;1711:18;;:::i;:::-;1753:112;1861:2;1792:66;1785:4;1781:2;1777:13;1773:86;1769:95;1753:112;:::i;:::-;1740:125;;1888:2;1881:5;1874:17;1928:7;1923:2;1918;1914;1910:11;1906:20;1903:33;1900:53;;;1949:1;1946;1939:12;1900:53;2004:2;1999;1995;1991:11;1986:2;1979:5;1975:14;1962:45;2048:1;2043:2;2038;2031:5;2027:14;2023:23;2016:34;;2069:5;2059:15;;;;;1116:964;;;;;:::o;2085:615::-;2171:6;2179;2232:2;2220:9;2211:7;2207:23;2203:32;2200:52;;;2248:1;2245;2238:12;2200:52;2288:9;2275:23;2317:18;2358:2;2350:6;2347:14;2344:34;;;2374:1;2371;2364:12;2344:34;2412:6;2401:9;2397:22;2387:32;;2457:7;2450:4;2446:2;2442:13;2438:27;2428:55;;2479:1;2476;2469:12;2428:55;2519:2;2506:16;2545:2;2537:6;2534:14;2531:34;;;2561:1;2558;2551:12;2531:34;2614:7;2609:2;2599:6;2596:1;2592:14;2588:2;2584:23;2580:32;2577:45;2574:65;;;2635:1;2632;2625:12;2574:65;2666:2;2658:11;;;;;2688:6;;-1:-1:-1;2085:615:19;;-1:-1:-1;;;;2085:615:19:o;2705:245::-;2772:6;2825:2;2813:9;2804:7;2800:23;2796:32;2793:52;;;2841:1;2838;2831:12;2793:52;2873:9;2867:16;2892:28;2914:5;2892:28;:::i;2955:548::-;3049:6;3102:2;3090:9;3081:7;3077:23;3073:32;3070:52;;;3118:1;3115;3108:12;3070:52;3151:2;3145:9;3193:2;3185:6;3181:15;3262:6;3250:10;3247:22;3226:18;3214:10;3211:34;3208:62;3205:88;;;3273:18;;:::i;:::-;3309:2;3302:22;3348:40;3378:9;3348:40;:::i;:::-;3340:6;3333:56;3422:49;3467:2;3456:9;3452:18;3422:49;:::i;:::-;3417:2;3405:15;;3398:74;3409:6;2955:548;-1:-1:-1;;;2955:548:19:o;3508:450::-;3595:6;3603;3611;3664:2;3652:9;3643:7;3639:23;3635:32;3632:52;;;3680:1;3677;3670:12;3632:52;3703:40;3733:9;3703:40;:::i;:::-;3693:50;;3762:49;3807:2;3796:9;3792:18;3762:49;:::i;:::-;3752:59;;3854:2;3843:9;3839:18;3833:25;3898:10;3891:5;3887:22;3880:5;3877:33;3867:61;;3924:1;3921;3914:12;3867:61;3947:5;3937:15;;;3508:450;;;;;:::o;3963:180::-;4022:6;4075:2;4063:9;4054:7;4050:23;4046:32;4043:52;;;4091:1;4088;4081:12;4043:52;-1:-1:-1;4114:23:19;;3963:180;-1:-1:-1;3963:180:19:o;4148:184::-;4218:6;4271:2;4259:9;4250:7;4246:23;4242:32;4239:52;;;4287:1;4284;4277:12;4239:52;-1:-1:-1;4310:16:19;;4148:184;-1:-1:-1;4148:184:19:o;4337:254::-;4405:6;4413;4466:2;4454:9;4445:7;4441:23;4437:32;4434:52;;;4482:1;4479;4472:12;4434:52;4518:9;4505:23;4495:33;;4547:38;4581:2;4570:9;4566:18;4547:38;:::i;:::-;4537:48;;4337:254;;;;;:::o;4596:513::-;4676:6;4684;4692;4700;4753:3;4741:9;4732:7;4728:23;4724:33;4721:53;;;4770:1;4767;4760:12;4721:53;4806:9;4793:23;4783:33;;4866:2;4855:9;4851:18;4838:32;4879:28;4901:5;4879:28;:::i;:::-;4926:5;-1:-1:-1;4978:2:19;4963:18;;4950:32;;-1:-1:-1;5034:2:19;5019:18;;5006:32;5047:30;5006:32;5047:30;:::i;:::-;4596:513;;;;-1:-1:-1;4596:513:19;;-1:-1:-1;;4596:513:19:o;5114:248::-;5182:6;5190;5243:2;5231:9;5222:7;5218:23;5214:32;5211:52;;;5259:1;5256;5249:12;5211:52;-1:-1:-1;;5282:23:19;;;5352:2;5337:18;;;5324:32;;-1:-1:-1;5114:248:19:o;5367:484::-;5420:3;5458:5;5452:12;5485:6;5480:3;5473:19;5511:4;5540:2;5535:3;5531:12;5524:19;;5577:2;5570:5;5566:14;5598:1;5608:218;5622:6;5619:1;5616:13;5608:218;;;5687:13;;5702:42;5683:62;5671:75;;5766:12;;;;5801:15;;;;5644:1;5637:9;5608:218;;;-1:-1:-1;5842:3:19;;5367:484;-1:-1:-1;;;;;5367:484:19:o;5856:316::-;5897:3;5935:5;5929:12;5962:6;5957:3;5950:19;5978:63;6034:6;6027:4;6022:3;6018:14;6011:4;6004:5;6000:16;5978:63;:::i;:::-;6086:2;6074:15;6091:66;6070:88;6061:98;;;;6161:4;6057:109;;5856:316;-1:-1:-1;;5856:316:19:o;6550:274::-;6679:3;6717:6;6711:13;6733:53;6779:6;6774:3;6767:4;6759:6;6755:17;6733:53;:::i;:::-;6802:16;;;;;6550:274;-1:-1:-1;;6550:274:19:o;9704:261::-;9883:2;9872:9;9865:21;9846:4;9903:56;9955:2;9944:9;9940:18;9932:6;9903:56;:::i;9970:452::-;10205:2;10194:9;10187:21;10168:4;10225:56;10277:2;10266:9;10262:18;10254:6;10225:56;:::i;:::-;10217:64;;10317:6;10312:2;10301:9;10297:18;10290:34;10372:42;10364:6;10360:55;10355:2;10344:9;10340:18;10333:83;9970:452;;;;;;:::o;11044:219::-;11193:2;11182:9;11175:21;11156:4;11213:44;11253:2;11242:9;11238:18;11230:6;11213:44;:::i;16104:481::-;16335:6;16324:9;16317:25;16378:6;16373:2;16362:9;16358:18;16351:34;16433:42;16425:6;16421:55;16416:2;16405:9;16401:18;16394:83;16513:3;16508:2;16497:9;16493:18;16486:31;16298:4;16534:45;16574:3;16563:9;16559:19;16551:6;16534:45;:::i;:::-;16526:53;16104:481;-1:-1:-1;;;;;;16104:481:19:o;16590:334::-;16661:2;16655:9;16717:2;16707:13;;16722:66;16703:86;16691:99;;16820:18;16805:34;;16841:22;;;16802:62;16799:88;;;16867:18;;:::i;:::-;16903:2;16896:22;16590:334;;-1:-1:-1;16590:334:19:o;16929:367::-;16968:3;17003:1;17000;16996:9;17112:1;17044:66;17040:74;17037:1;17033:82;17028:2;17021:10;17017:99;17014:125;;;17119:18;;:::i;:::-;17238:1;17170:66;17166:74;17163:1;17159:82;17155:2;17151:91;17148:117;;;17245:18;;:::i;:::-;-1:-1:-1;;17281:9:19;;16929:367::o;17301:128::-;17341:3;17372:1;17368:6;17365:1;17362:13;17359:39;;;17378:18;;:::i;:::-;-1:-1:-1;17414:9:19;;17301:128::o;17434:274::-;17474:1;17500;17490:189;;17535:77;17532:1;17525:88;17636:4;17633:1;17626:15;17664:4;17661:1;17654:15;17490:189;-1:-1:-1;17693:9:19;;17434:274::o;17713:228::-;17753:7;17879:1;17811:66;17807:74;17804:1;17801:81;17796:1;17789:9;17782:17;17778:105;17775:131;;;17886:18;;:::i;:::-;-1:-1:-1;17926:9:19;;17713:228::o;17946:369::-;17985:4;18021:1;18018;18014:9;18130:1;18062:66;18058:74;18055:1;18051:82;18046:2;18039:10;18035:99;18032:125;;;18137:18;;:::i;:::-;18256:1;18188:66;18184:74;18181:1;18177:82;18173:2;18169:91;18166:117;;;18263:18;;:::i;:::-;-1:-1:-1;;18300:9:19;;17946:369::o;18320:125::-;18360:4;18388:1;18385;18382:8;18379:34;;;18393:18;;:::i;:::-;-1:-1:-1;18430:9:19;;18320:125::o;18450:258::-;18522:1;18532:113;18546:6;18543:1;18540:13;18532:113;;;18622:11;;;18616:18;18603:11;;;18596:39;18568:2;18561:10;18532:113;;;18663:6;18660:1;18657:13;18654:48;;;-1:-1:-1;;18698:1:19;18680:16;;18673:27;18450:258::o;18713:195::-;18752:3;18783:66;18776:5;18773:77;18770:103;;;18853:18;;:::i;:::-;-1:-1:-1;18900:1:19;18889:13;;18713:195::o;18913:191::-;18948:3;18979:66;18972:5;18969:77;18966:103;;;19049:18;;:::i;:::-;-1:-1:-1;19089:1:19;19085:13;;18913:191::o;19109:184::-;19161:77;19158:1;19151:88;19258:4;19255:1;19248:15;19282:4;19279:1;19272:15;19298:184;19350:77;19347:1;19340:88;19447:4;19444:1;19437:15;19471:4;19468:1;19461:15;19487:184;19539:77;19536:1;19529:88;19636:4;19633:1;19626:15;19660:4;19657:1;19650:15;19676:118;19762:5;19755:13;19748:21;19741:5;19738:32;19728:60;;19784:1;19781;19774:12

Swarm Source

ipfs://84f8759e9d4403599196bee3a8b6d688d13a4699d96d5cd180da9a1cf1a7007b

Block Transaction Difficulty 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
Loading...
Loading
[ Download: CSV Export  ]

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.