ETH Price: $3,350.96 (+2.92%)
 
Transaction Hash
Method
Block
From
To
Zap In204527182024-08-04 4:12:35180 days ago1722744755IN
Zapper.Fi: Yearn yVault Zap In
0.02 ETH0.000099571
Zap In204086652024-07-29 0:33:59186 days ago1722213239IN
Zapper.Fi: Yearn yVault Zap In
0.00104113 ETH0.000160781
Zap In153885822022-08-22 5:58:34893 days ago1661147914IN
Zapper.Fi: Yearn yVault Zap In
0.005 ETH0.000299782
Zap In152471112022-07-31 0:48:01915 days ago1659228481IN
Zapper.Fi: Yearn yVault Zap In
0 ETH0.00024953
Zap In143637982022-03-11 5:50:281057 days ago1646977828IN
Zapper.Fi: Yearn yVault Zap In
0.00001 ETH0.0022480915
Zap In143632822022-03-11 3:49:071057 days ago1646970547IN
Zapper.Fi: Yearn yVault Zap In
0.00001 ETH0.0021734714.50211117
Zap In143545882022-03-09 19:57:101058 days ago1646855830IN
Zapper.Fi: Yearn yVault Zap In
4.1 ETH0.0146578742.33518117
Zap In143545852022-03-09 19:56:031058 days ago1646855763IN
Zapper.Fi: Yearn yVault Zap In
0.001 ETH0.006244941.66266616
Zap In143533182022-03-09 15:15:401058 days ago1646838940IN
Zapper.Fi: Yearn yVault Zap In
0.13 ETH0.0052225734.83991278
Zap In143530012022-03-09 13:58:551059 days ago1646834335IN
Zapper.Fi: Yearn yVault Zap In
0 ETH0.0134952218.19185318
Zap In143528342022-03-09 13:23:141059 days ago1646832194IN
Zapper.Fi: Yearn yVault Zap In
0 ETH0.0127801224.41527022
Zap In143526602022-03-09 12:48:511059 days ago1646830131IN
Zapper.Fi: Yearn yVault Zap In
0 ETH0.0264668623.81463343
Zap In143526192022-03-09 12:38:541059 days ago1646829534IN
Zapper.Fi: Yearn yVault Zap In
0 ETH0.0229207422.19288363
Zap In143526152022-03-09 12:37:511059 days ago1646829471IN
Zapper.Fi: Yearn yVault Zap In
0 ETH0.0174936517.90076848
Zap In143525902022-03-09 12:32:491059 days ago1646829169IN
Zapper.Fi: Yearn yVault Zap In
0.001 ETH0.0029828619.90009483
Zap In143525342022-03-09 12:21:401059 days ago1646828500IN
Zapper.Fi: Yearn yVault Zap In
0.001 ETH0.0026561417.7204052
Zap In143522642022-03-09 11:24:191059 days ago1646825059IN
Zapper.Fi: Yearn yVault Zap In
0.308 ETH0.0081096623.42250582
Zap In143521752022-03-09 11:02:031059 days ago1646823723IN
Zapper.Fi: Yearn yVault Zap In
0.0002 ETH0.002688917.9412107
Zap In143521692022-03-09 11:01:071059 days ago1646823667IN
Zapper.Fi: Yearn yVault Zap In
0.0001 ETH0.0029974620
Zap In143519022022-03-09 10:00:311059 days ago1646820031IN
Zapper.Fi: Yearn yVault Zap In
0.0001 ETH0.0041158627.46235975
Zap In143517482022-03-09 9:22:251059 days ago1646817745IN
Zapper.Fi: Yearn yVault Zap In
10.4 ETH0.0088726225.62786433
Zap In143515632022-03-09 8:35:491059 days ago1646814949IN
Zapper.Fi: Yearn yVault Zap In
0.1 ETH0.0057317338.23654935
Zap In143508722022-03-09 5:55:501059 days ago1646805350IN
Zapper.Fi: Yearn yVault Zap In
0 ETH0.033158932.63286756
Zap In143498362022-03-09 2:06:491059 days ago1646791609IN
Zapper.Fi: Yearn yVault Zap In
3 ETH0.0125130938.01822521
Zap In143498002022-03-09 2:00:181059 days ago1646791218IN
Zapper.Fi: Yearn yVault Zap In
0.1 ETH0.0067535449.57750193
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
204527182024-08-04 4:12:35180 days ago1722744755
Zapper.Fi: Yearn yVault Zap In
0.02 ETH
204086652024-07-29 0:33:59186 days ago1722213239
Zapper.Fi: Yearn yVault Zap In
0.00104113 ETH
153885822022-08-22 5:58:34893 days ago1661147914
Zapper.Fi: Yearn yVault Zap In
0.005 ETH
143637982022-03-11 5:50:281057 days ago1646977828
Zapper.Fi: Yearn yVault Zap In
0.00001 ETH
143632822022-03-11 3:49:071057 days ago1646970547
Zapper.Fi: Yearn yVault Zap In
0.00001 ETH
143545882022-03-09 19:57:101058 days ago1646855830
Zapper.Fi: Yearn yVault Zap In
4.1 ETH
143545852022-03-09 19:56:031058 days ago1646855763
Zapper.Fi: Yearn yVault Zap In
0.001 ETH
143533182022-03-09 15:15:401058 days ago1646838940
Zapper.Fi: Yearn yVault Zap In
0.13 ETH
143525902022-03-09 12:32:491059 days ago1646829169
Zapper.Fi: Yearn yVault Zap In
0.001 ETH
143525342022-03-09 12:21:401059 days ago1646828500
Zapper.Fi: Yearn yVault Zap In
0.001 ETH
143522642022-03-09 11:24:191059 days ago1646825059
Zapper.Fi: Yearn yVault Zap In
0.308 ETH
143521752022-03-09 11:02:031059 days ago1646823723
Zapper.Fi: Yearn yVault Zap In
0.0002 ETH
143521692022-03-09 11:01:071059 days ago1646823667
Zapper.Fi: Yearn yVault Zap In
0.0001 ETH
143519022022-03-09 10:00:311059 days ago1646820031
Zapper.Fi: Yearn yVault Zap In
0.0001 ETH
143517482022-03-09 9:22:251059 days ago1646817745
Zapper.Fi: Yearn yVault Zap In
10.4 ETH
143515632022-03-09 8:35:491059 days ago1646814949
Zapper.Fi: Yearn yVault Zap In
0.1 ETH
143498362022-03-09 2:06:491059 days ago1646791609
Zapper.Fi: Yearn yVault Zap In
3 ETH
143498002022-03-09 2:00:181059 days ago1646791218
Zapper.Fi: Yearn yVault Zap In
0.1 ETH
143495472022-03-09 1:08:301059 days ago1646788110
Zapper.Fi: Yearn yVault Zap In
11 ETH
143493182022-03-09 0:14:551059 days ago1646784895
Zapper.Fi: Yearn yVault Zap In
0.0001 ETH
143492682022-03-09 0:05:491059 days ago1646784349
Zapper.Fi: Yearn yVault Zap In
55 ETH
143492532022-03-09 0:03:331059 days ago1646784213
Zapper.Fi: Yearn yVault Zap In
19.3 ETH
143491872022-03-08 23:47:251059 days ago1646783245
Zapper.Fi: Yearn yVault Zap In
0.00001 ETH
143485852022-03-08 21:30:461059 days ago1646775046
Zapper.Fi: Yearn yVault Zap In
1.9 ETH
143484602022-03-08 21:04:341059 days ago1646773474
Zapper.Fi: Yearn yVault Zap In
0.07 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
yVault_ZapIn_V4

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv2 license
File 1 of 8 : yVault_ZapIn_V4.sol
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗
// ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║
// ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║
// ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║
// ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║
// ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝
// Copyright (C) 2021 zapper

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//

///@author Zapper
///@notice This contract adds liquidity to Yearn Vaults using ETH or ERC20 Tokens.
// SPDX-License-Identifier: GPL-2.0

pragma solidity ^0.8.0;
import "../_base/ZapInBaseV3.sol";

interface IWETH {
    function deposit() external payable;

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

    function withdraw(uint256) external;
}

interface IYVault {
    function deposit(uint256) external;

    function withdraw(uint256) external;

    function getPricePerFullShare() external view returns (uint256);

    function token() external view returns (address);

    // V2
    function pricePerShare() external view returns (uint256);
}

// -- Aave --
interface IAaveLendingPoolAddressesProvider {
    function getLendingPool() external view returns (address);

    function getLendingPoolCore() external view returns (address payable);
}

interface IAaveLendingPoolCore {
    function getReserveATokenAddress(address _reserve)
        external
        view
        returns (address);
}

interface IAaveLendingPool {
    function deposit(
        address _reserve,
        uint256 _amount,
        uint16 _referralCode
    ) external payable;
}

contract yVault_ZapIn_V4 is ZapInBaseV3 {
    using SafeERC20 for IERC20;

    IAaveLendingPoolAddressesProvider
        private constant lendingPoolAddressProvider =
        IAaveLendingPoolAddressesProvider(
            0x24a42fD28C976A61Df5D00D0599C34c4f90748c8
        );

    address private constant wethTokenAddress =
        0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

    event zapIn(address sender, address pool, uint256 tokensRec);

    constructor(
        address _curveZapIn,
        uint256 _goodwill,
        uint256 _affiliateSplit
    ) ZapBaseV2(_goodwill, _affiliateSplit) {
        // Curve ZapIn
        approvedTargets[_curveZapIn] = true;
        // 0x exchange
        approvedTargets[0xDef1C0ded9bec7F1a1670819833240f027b25EfF] = true;
    }

    /**
        @notice This function adds liquidity to a Yearn vaults with ETH or ERC20 tokens
        @param fromToken The token used for entry (address(0) if ether)
        @param amountIn The amount of fromToken to invest
        @param toVault Yearn vault address
        @param superVault Super vault to depoist toVault tokens into (address(0) if none)
        @param isAaveUnderlying True if vault contains aave token
        @param minYVTokens The minimum acceptable quantity vault tokens to receive. Reverts otherwise
        @param intermediateToken Token to swap fromToken to before entering vault
        @param swapTarget Excecution target for the swap or Zap
        @param swapData DEX quote or Zap data
        @param affiliate Affiliate address
        @param shouldSellEntireBalance If True transfers entrire allowable amount from another contract
        @return tokensReceived Quantity of Vault tokens received
     */
    function ZapIn(
        address fromToken,
        uint256 amountIn,
        address toVault,
        address superVault,
        bool isAaveUnderlying,
        uint256 minYVTokens,
        address intermediateToken,
        address swapTarget,
        bytes calldata swapData,
        address affiliate,
        bool shouldSellEntireBalance
    ) external payable stopInEmergency returns (uint256 tokensReceived) {
        // get incoming tokens
        uint256 toInvest =
            _pullTokens(
                fromToken,
                amountIn,
                affiliate,
                true,
                shouldSellEntireBalance
            );

        // get intermediate token
        uint256 intermediateAmt =
            _fillQuote(
                fromToken,
                intermediateToken,
                toInvest,
                swapTarget,
                swapData
            );

        // get 'aIntermediateToken'
        if (isAaveUnderlying) {
            address aaveLendingPoolCore =
                lendingPoolAddressProvider.getLendingPoolCore();
            _approveToken(intermediateToken, aaveLendingPoolCore);

            IAaveLendingPool(lendingPoolAddressProvider.getLendingPool())
                .deposit(intermediateToken, intermediateAmt, 0);

            intermediateToken = IAaveLendingPoolCore(aaveLendingPoolCore)
                .getReserveATokenAddress(intermediateToken);
        }

        return
            _zapIn(
                toVault,
                superVault,
                minYVTokens,
                intermediateToken,
                intermediateAmt
            );
    }

    function _zapIn(
        address toVault,
        address superVault,
        uint256 minYVTokens,
        address intermediateToken,
        uint256 intermediateAmt
    ) internal returns (uint256 tokensReceived) {
        // Deposit to Vault
        if (superVault == address(0)) {
            tokensReceived = _vaultDeposit(
                intermediateToken,
                intermediateAmt,
                toVault,
                minYVTokens,
                true
            );
        } else {
            uint256 intermediateYVTokens =
                _vaultDeposit(
                    intermediateToken,
                    intermediateAmt,
                    toVault,
                    0,
                    false
                );
            // deposit to super vault
            tokensReceived = _vaultDeposit(
                IYVault(superVault).token(),
                intermediateYVTokens,
                superVault,
                minYVTokens,
                true
            );
        }
    }

    function _vaultDeposit(
        address underlyingVaultToken,
        uint256 amount,
        address toVault,
        uint256 minTokensRec,
        bool shouldTransfer
    ) internal returns (uint256 tokensReceived) {
        _approveToken(underlyingVaultToken, toVault);

        uint256 iniYVaultBal = IERC20(toVault).balanceOf(address(this));
        IYVault(toVault).deposit(amount);
        tokensReceived =
            IERC20(toVault).balanceOf(address(this)) -
            iniYVaultBal;
        require(tokensReceived >= minTokensRec, "Err: High Slippage");

        if (shouldTransfer) {
            IERC20(toVault).safeTransfer(msg.sender, tokensReceived);
            emit zapIn(msg.sender, toVault, tokensReceived);
        }
    }

    function _fillQuote(
        address _fromTokenAddress,
        address toToken,
        uint256 _amount,
        address _swapTarget,
        bytes memory swapData
    ) internal returns (uint256 amtBought) {
        if (_fromTokenAddress == toToken) {
            return _amount;
        }

        if (_fromTokenAddress == address(0) && toToken == wethTokenAddress) {
            IWETH(wethTokenAddress).deposit{ value: _amount }();
            return _amount;
        }

        uint256 valueToSend;
        if (_fromTokenAddress == address(0)) {
            valueToSend = _amount;
        } else {
            _approveToken(_fromTokenAddress, _swapTarget);
        }

        uint256 iniBal = _getBalance(toToken);
        require(approvedTargets[_swapTarget], "Target not Authorized");
        (bool success, ) = _swapTarget.call{ value: valueToSend }(swapData);
        require(success, "Error Swapping Tokens 1");
        uint256 finalBal = _getBalance(toToken);

        amtBought = finalBal - iniBal;
    }
}

File 2 of 8 : ZapBaseV2.sol
// SPDX-License-Identifier: GPL-2.0
pragma solidity ^0.8.0;

import "../oz/0.8.0/access/Ownable.sol";
import "../oz/0.8.0/token/ERC20/utils/SafeERC20.sol";

abstract contract ZapBaseV2 is Ownable {
    using SafeERC20 for IERC20;
    bool public stopped = false;

    // if true, goodwill is not deducted
    mapping(address => bool) public feeWhitelist;

    uint256 public goodwill;
    // % share of goodwill (0-100 %)
    uint256 affiliateSplit;
    // restrict affiliates
    mapping(address => bool) public affiliates;
    // affiliate => token => amount
    mapping(address => mapping(address => uint256)) public affiliateBalance;
    // token => amount
    mapping(address => uint256) public totalAffiliateBalance;
    // swapTarget => approval status
    mapping(address => bool) public approvedTargets;

    address internal constant ETHAddress =
        0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    constructor(uint256 _goodwill, uint256 _affiliateSplit) {
        goodwill = _goodwill;
        affiliateSplit = _affiliateSplit;
    }

    // circuit breaker modifiers
    modifier stopInEmergency {
        if (stopped) {
            revert("Temporarily Paused");
        } else {
            _;
        }
    }

    function _getBalance(address token)
        internal
        view
        returns (uint256 balance)
    {
        if (token == address(0)) {
            balance = address(this).balance;
        } else {
            balance = IERC20(token).balanceOf(address(this));
        }
    }

    function _approveToken(address token, address spender) internal {
        IERC20 _token = IERC20(token);
        if (_token.allowance(address(this), spender) > 0) return;
        else {
            _token.safeApprove(spender, type(uint256).max);
        }
    }

    function _approveToken(
        address token,
        address spender,
        uint256 amount
    ) internal {
        IERC20(token).safeApprove(spender, 0);
        IERC20(token).safeApprove(spender, amount);
    }

    // - to Pause the contract
    function toggleContractActive() public onlyOwner {
        stopped = !stopped;
    }

    function set_feeWhitelist(address zapAddress, bool status)
        external
        onlyOwner
    {
        feeWhitelist[zapAddress] = status;
    }

    function set_new_goodwill(uint256 _new_goodwill) public onlyOwner {
        require(
            _new_goodwill >= 0 && _new_goodwill <= 100,
            "GoodWill Value not allowed"
        );
        goodwill = _new_goodwill;
    }

    function set_new_affiliateSplit(uint256 _new_affiliateSplit)
        external
        onlyOwner
    {
        require(
            _new_affiliateSplit <= 100,
            "Affiliate Split Value not allowed"
        );
        affiliateSplit = _new_affiliateSplit;
    }

    function set_affiliate(address _affiliate, bool _status)
        external
        onlyOwner
    {
        affiliates[_affiliate] = _status;
    }

    ///@notice Withdraw goodwill share, retaining affilliate share
    function withdrawTokens(address[] calldata tokens) external onlyOwner {
        for (uint256 i = 0; i < tokens.length; i++) {
            uint256 qty;

            if (tokens[i] == ETHAddress) {
                qty = address(this).balance - totalAffiliateBalance[tokens[i]];

                Address.sendValue(payable(owner()), qty);
            } else {
                qty =
                    IERC20(tokens[i]).balanceOf(address(this)) -
                    totalAffiliateBalance[tokens[i]];
                IERC20(tokens[i]).safeTransfer(owner(), qty);
            }
        }
    }

    ///@notice Withdraw affilliate share, retaining goodwill share
    function affilliateWithdraw(address[] calldata tokens) external {
        uint256 tokenBal;
        for (uint256 i = 0; i < tokens.length; i++) {
            tokenBal = affiliateBalance[msg.sender][tokens[i]];
            affiliateBalance[msg.sender][tokens[i]] = 0;
            totalAffiliateBalance[tokens[i]] =
                totalAffiliateBalance[tokens[i]] -
                tokenBal;

            if (tokens[i] == ETHAddress) {
                Address.sendValue(payable(msg.sender), tokenBal);
            } else {
                IERC20(tokens[i]).safeTransfer(msg.sender, tokenBal);
            }
        }
    }

    function setApprovedTargets(
        address[] calldata targets,
        bool[] calldata isApproved
    ) external onlyOwner {
        require(targets.length == isApproved.length, "Invalid Input length");

        for (uint256 i = 0; i < targets.length; i++) {
            approvedTargets[targets[i]] = isApproved[i];
        }
    }

    receive() external payable {
        require(msg.sender != tx.origin, "Do not send ETH directly");
    }
}

File 3 of 8 : ZapInBaseV3.sol
// SPDX-License-Identifier: GPL-2.0

pragma solidity ^0.8.0;
import "./ZapBaseV2.sol";

abstract contract ZapInBaseV3 is ZapBaseV2 {
    using SafeERC20 for IERC20;

    function _pullTokens(
        address token,
        uint256 amount,
        address affiliate,
        bool enableGoodwill,
        bool shouldSellEntireBalance
    ) internal returns (uint256 value) {
        uint256 totalGoodwillPortion;

        if (token == address(0)) {
            require(msg.value > 0, "No eth sent");

            // subtract goodwill
            totalGoodwillPortion = _subtractGoodwill(
                ETHAddress,
                msg.value,
                affiliate,
                enableGoodwill
            );

            return msg.value - totalGoodwillPortion;
        }
        require(amount > 0, "Invalid token amount");
        require(msg.value == 0, "Eth sent with token");

        //transfer token
        if (shouldSellEntireBalance) {
            require(
                Address.isContract(msg.sender),
                "ERR: shouldSellEntireBalance is true for EOA"
            );
            amount = IERC20(token).allowance(msg.sender, address(this));
        }
        IERC20(token).safeTransferFrom(msg.sender, address(this), amount);

        // subtract goodwill
        totalGoodwillPortion = _subtractGoodwill(
            token,
            amount,
            affiliate,
            enableGoodwill
        );

        return amount - totalGoodwillPortion;
    }

    function _subtractGoodwill(
        address token,
        uint256 amount,
        address affiliate,
        bool enableGoodwill
    ) internal returns (uint256 totalGoodwillPortion) {
        bool whitelisted = feeWhitelist[msg.sender];
        if (enableGoodwill && !whitelisted && goodwill > 0) {
            totalGoodwillPortion = (amount * goodwill) / 10000;

            if (affiliates[affiliate]) {
                if (token == address(0)) {
                    token = ETHAddress;
                }

                uint256 affiliatePortion =
                    (totalGoodwillPortion * affiliateSplit) / 100;
                affiliateBalance[affiliate][token] += affiliatePortion;
                totalAffiliateBalance[token] += affiliatePortion;
            }
        }
    }
}

File 4 of 8 : 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() {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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"
        );
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 5 of 8 : 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 6 of 8 : 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'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.approve.selector, spender, value)
        );
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + 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
            // solhint-disable-next-line max-line-length
            require(
                abi.decode(returndata, (bool)),
                "SafeERC20: ERC20 operation did not succeed"
            );
        }
    }
}

File 7 of 8 : 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;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 8 : 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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_curveZapIn","type":"address"},{"internalType":"uint256","name":"_goodwill","type":"uint256"},{"internalType":"uint256","name":"_affiliateSplit","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokensRec","type":"uint256"}],"name":"zapIn","type":"event"},{"inputs":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"toVault","type":"address"},{"internalType":"address","name":"superVault","type":"address"},{"internalType":"bool","name":"isAaveUnderlying","type":"bool"},{"internalType":"uint256","name":"minYVTokens","type":"uint256"},{"internalType":"address","name":"intermediateToken","type":"address"},{"internalType":"address","name":"swapTarget","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address","name":"affiliate","type":"address"},{"internalType":"bool","name":"shouldSellEntireBalance","type":"bool"}],"name":"ZapIn","outputs":[{"internalType":"uint256","name":"tokensReceived","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"affiliateBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"affiliates","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"affilliateWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedTargets","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feeWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"goodwill","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":"address[]","name":"targets","type":"address[]"},{"internalType":"bool[]","name":"isApproved","type":"bool[]"}],"name":"setApprovedTargets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_affiliate","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"set_affiliate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"zapAddress","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"set_feeWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_new_affiliateSplit","type":"uint256"}],"name":"set_new_affiliateSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_new_goodwill","type":"uint256"}],"name":"set_new_goodwill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleContractActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalAffiliateBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526000805460ff60a01b1916905534801561001d57600080fd5b50604051620025323803806200253283398101604081905261003e916100fa565b600080546001600160a01b03191633908117825560405184928492918291907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060029190915560035550506001600160a01b031660009081526007602052604081208054600160ff19918216811790925573def1c0ded9bec7f1a1670819833240f027b25eff9092527ff6019cd1944dc466e824190b288e5a63528dd4c9a6d8cbd707956fd30d2f1e0d805490921617905561013b565b60008060006060848603121561010e578283fd5b83516001600160a01b0381168114610124578384fd5b602085015160409095015190969495509392505050565b6123e7806200014b6000396000f3fe6080604052600436106101185760003560e01c80635de0398e116100a05780639735a634116100645780639735a6341461036d5780639779d1a61461038d578063d408f657146103bd578063f2fde38b146103ed578063fbec27bf1461040d57600080fd5b80635de0398e146102d95780635ecb16cd146102ef578063715018a61461030f57806375f12b21146103245780638da5cb5b1461034557600080fd5b806318b135e3116100e757806318b135e31461021957806338b32e68146102465780633ff428c7146102595780634f51e29414610279578063550bfa56146102b957600080fd5b806301e980d4146101795780630dc9de85146101995780631385d24c146101b95780631781261f146101ce57600080fd5b3661017457333214156101725760405162461bcd60e51b815260206004820152601860248201527f446f206e6f742073656e6420455448206469726563746c79000000000000000060448201526064015b60405180910390fd5b005b600080fd5b34801561018557600080fd5b5061017261019436600461220c565b61042d565b3480156101a557600080fd5b506101726101b436600461212b565b6104b7565b3480156101c557600080fd5b50610172610712565b3480156101da57600080fd5b506102066101e9366004611fdf565b600560209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561022557600080fd5b50610206610234366004611fa7565b60066020526000908152604090205481565b610206610254366004612044565b61075d565b34801561026557600080fd5b50610172610274366004612017565b610a2c565b34801561028557600080fd5b506102a9610294366004611fa7565b60046020526000908152604090205460ff1681565b6040519015158152602001610210565b3480156102c557600080fd5b506101726102d436600461220c565b610a81565b3480156102e557600080fd5b5061020660025481565b3480156102fb57600080fd5b5061017261030a36600461212b565b610b01565b34801561031b57600080fd5b50610172610d72565b34801561033057600080fd5b506000546102a990600160a01b900460ff1681565b34801561035157600080fd5b506000546040516001600160a01b039091168152602001610210565b34801561037957600080fd5b5061017261038836600461216b565b610de6565b34801561039957600080fd5b506102a96103a8366004611fa7565b60076020526000908152604090205460ff1681565b3480156103c957600080fd5b506102a96103d8366004611fa7565b60016020526000908152604090205460ff1681565b3480156103f957600080fd5b50610172610408366004611fa7565b610f10565b34801561041957600080fd5b50610172610428366004612017565b610ffa565b6000546001600160a01b031633146104575760405162461bcd60e51b81526004016101699061228b565b60648111156104b25760405162461bcd60e51b815260206004820152602160248201527f416666696c696174652053706c69742056616c7565206e6f7420616c6c6f77656044820152601960fa1b6064820152608401610169565b600355565b6000805b8281101561070c57336000908152600560205260408120908585848181106104f357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105089190611fa7565b6001600160a01b0316815260208082019290925260409081016000908120543382526005909352908120919350908186868581811061055757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061056c9190611fa7565b6001600160a01b03166001600160a01b031681526020019081526020016000208190555081600660008686858181106105b557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105ca9190611fa7565b6001600160a01b03166001600160a01b03168152602001908152602001600020546105f59190612317565b6006600086868581811061061957634e487b7160e01b600052603260045260246000fd5b905060200201602081019061062e9190611fa7565b6001600160a01b0316815260208101919091526040016000205573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee84848381811061067d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106929190611fa7565b6001600160a01b031614156106b0576106ab338361104f565b6106fa565b6106fa33838686858181106106d557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106ea9190611fa7565b6001600160a01b03169190611168565b806107048161235a565b9150506104bb565b50505050565b6000546001600160a01b0316331461073c5760405162461bcd60e51b81526004016101699061228b565b6000805460ff60a01b198116600160a01b9182900460ff1615909102179055565b60008054600160a01b900460ff16156107ad5760405162461bcd60e51b815260206004820152601260248201527115195b5c1bdc985c9a5b1e4814185d5cd95960721b6044820152606401610169565b60006107bd8e8e866001876111cb565b905060006108048f8a848b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113fc92505050565b90508a15610a0c5760007324a42fd28c976a61df5d00d0599c34c4f90748c86001600160a01b031663ed6ff7606040518163ffffffff1660e01b815260040160206040518083038186803b15801561085b57600080fd5b505afa15801561086f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108939190611fc3565b905061089f8a82611629565b7324a42fd28c976a61df5d00d0599c34c4f90748c86001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108ec57600080fd5b505afa158015610900573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109249190611fc3565b604051636968703360e11b81526001600160a01b038c811660048301526024820185905260006044830152919091169063d2d0e06690606401600060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b5050604051631a59df7760e11b81526001600160a01b038d81166004830152841692506334b3beee915060240160206040518083038186803b1580156109d057600080fd5b505afa1580156109e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a089190611fc3565b9950505b610a198d8d8c8c856116ce565b9f9e505050505050505050505050505050565b6000546001600160a01b03163314610a565760405162461bcd60e51b81526004016101699061228b565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610aab5760405162461bcd60e51b81526004016101699061228b565b6064811115610afc5760405162461bcd60e51b815260206004820152601a60248201527f476f6f6457696c6c2056616c7565206e6f7420616c6c6f7765640000000000006044820152606401610169565b600255565b6000546001600160a01b03163314610b2b5760405162461bcd60e51b81526004016101699061228b565b60005b81811015610d6d57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee848484818110610b6d57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610b829190611fa7565b6001600160a01b03161415610c105760066000858585818110610bb557634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610bca9190611fa7565b6001600160a01b03168152602081019190915260400160002054610bee9047612317565b9050610c0b610c056000546001600160a01b031690565b8261104f565b610d5a565b60066000858585818110610c3457634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610c499190611fa7565b6001600160a01b03166001600160a01b0316815260200190815260200160002054848484818110610c8a57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610c9f9190611fa7565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015610ce057600080fd5b505afa158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d189190612224565b610d229190612317565b9050610d5a610d396000546001600160a01b031690565b828686868181106106d557634e487b7160e01b600052603260045260246000fd5b5080610d658161235a565b915050610b2e565b505050565b6000546001600160a01b03163314610d9c5760405162461bcd60e51b81526004016101699061228b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610e105760405162461bcd60e51b81526004016101699061228b565b828114610e565760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c84092dce0eae840d8cadccee8d60631b6044820152606401610169565b60005b83811015610f0957828282818110610e8157634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610e9691906121d4565b60076000878785818110610eba57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610ecf9190611fa7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610f018161235a565b915050610e59565b5050505050565b6000546001600160a01b03163314610f3a5760405162461bcd60e51b81526004016101699061228b565b6001600160a01b038116610f9f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610169565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146110245760405162461bcd60e51b81526004016101699061228b565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b8047101561109f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610169565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146110ec576040519150601f19603f3d011682016040523d82523d6000602084013e6110f1565b606091505b5050905080610d6d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610169565b6040516001600160a01b038316602482015260448101829052610d6d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611783565b6000806001600160a01b03871661124e576000341161121a5760405162461bcd60e51b815260206004820152600b60248201526a139bc8195d1a081cd95b9d60aa1b6044820152606401610169565b61123a73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee348787611855565b90506112468134612317565b9150506113f3565b600086116112955760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081d1bdad95b88185b5bdd5b9d60621b6044820152606401610169565b34156112d95760405162461bcd60e51b815260206004820152601360248201527222ba341039b2b73a103bb4ba34103a37b5b2b760691b6044820152606401610169565b82156113c257333b6113425760405162461bcd60e51b815260206004820152602c60248201527f4552523a2073686f756c6453656c6c456e7469726542616c616e63652069732060448201526b7472756520666f7220454f4160a01b6064820152608401610169565b604051636eb1769f60e11b81523360048201523060248201526001600160a01b0388169063dd62ed3e9060440160206040518083038186803b15801561138757600080fd5b505afa15801561139b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bf9190612224565b95505b6113d76001600160a01b038816333089611980565b6113e387878787611855565b90506113ef8187612317565b9150505b95945050505050565b6000846001600160a01b0316866001600160a01b0316141561141f5750826113f3565b6001600160a01b03861615801561145257506001600160a01b03851673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2145b156114c75773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156114a657600080fd5b505af11580156114ba573d6000803e3d6000fd5b50505050508390506113f3565b60006001600160a01b0387166114de5750836114e8565b6114e88785611629565b60006114f3876119b8565b6001600160a01b03861660009081526007602052604090205490915060ff166115565760405162461bcd60e51b815260206004820152601560248201527415185c99d95d081b9bdd08105d5d1a1bdc9a5e9959605a1b6044820152606401610169565b6000856001600160a01b03168386604051611571919061223c565b60006040518083038185875af1925050503d80600081146115ae576040519150601f19603f3d011682016040523d82523d6000602084013e6115b3565b606091505b50509050806116045760405162461bcd60e51b815260206004820152601760248201527f4572726f72205377617070696e6720546f6b656e7320310000000000000000006044820152606401610169565b600061160f896119b8565b905061161b8382612317565b9a9950505050505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038281166024830152839160009183169063dd62ed3e9060440160206040518083038186803b15801561167557600080fd5b505afa158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad9190612224565b11156116b857505050565b610d6d6001600160a01b03821683600019611a4e565b60006001600160a01b0385166116f3576116ec838388876001611b72565b90506113f3565b6000611703848489600080611b72565b90506113ef866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561174157600080fd5b505afa158015611755573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117799190611fc3565b8288886001611b72565b60006117d8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d8d9092919063ffffffff16565b805190915015610d6d57808060200190518101906117f691906121f0565b610d6d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610169565b3360009081526001602052604081205460ff16828015611873575080155b801561188157506000600254115b15611977576127106002548661189791906122f8565b6118a191906122d8565b6001600160a01b03851660009081526004602052604090205490925060ff1615611977576001600160a01b0386166118eb5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee95505b60006064600354846118fd91906122f8565b61190791906122d8565b6001600160a01b038087166000908152600560209081526040808320938c168352929052908120805492935083929091906119439084906122c0565b90915550506001600160a01b038716600090815260066020526040812080548392906119709084906122c0565b9091555050505b50949350505050565b6040516001600160a01b038085166024830152831660448201526064810182905261070c9085906323b872dd60e01b90608401611194565b60006001600160a01b0382166119cf575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611a0e57600080fd5b505afa158015611a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a469190612224565b90505b919050565b801580611ad75750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611a9d57600080fd5b505afa158015611ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad59190612224565b155b611b425760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610169565b6040516001600160a01b038316602482015260448101829052610d6d90849063095ea7b360e01b90606401611194565b6000611b7e8685611629565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a082319060240160206040518083038186803b158015611bc057600080fd5b505afa158015611bd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf89190612224565b60405163b6b55f2560e01b8152600481018890529091506001600160a01b0386169063b6b55f2590602401600060405180830381600087803b158015611c3d57600080fd5b505af1158015611c51573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201528392506001600160a01b03881691506370a082319060240160206040518083038186803b158015611c9657600080fd5b505afa158015611caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cce9190612224565b611cd89190612317565b915083821015611d1f5760405162461bcd60e51b81526020600482015260126024820152714572723a204869676820536c69707061676560701b6044820152606401610169565b8215611d8357611d396001600160a01b0386163384611168565b604080513381526001600160a01b03871660208201529081018390527f7f31d76771556dce5ab39ba5b60664743da2629a75c474e9445734b7ad34087d9060600160405180910390a15b5095945050505050565b6060611d9c8484600085611da6565b90505b9392505050565b606082471015611e075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610169565b843b611e555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b600080866001600160a01b03168587604051611e71919061223c565b60006040518083038185875af1925050503d8060008114611eae576040519150601f19603f3d011682016040523d82523d6000602084013e611eb3565b606091505b5091509150611ec3828286611ece565b979650505050505050565b60608315611edd575081611d9f565b825115611eed5782518084602001fd5b8160405162461bcd60e51b81526004016101699190612258565b8035611a498161238b565b60008083601f840112611f23578182fd5b50813567ffffffffffffffff811115611f3a578182fd5b6020830191508360208260051b8501011115611f5557600080fd5b9250929050565b8035611a49816123a3565b60008083601f840112611f78578182fd5b50813567ffffffffffffffff811115611f8f578182fd5b602083019150836020828501011115611f5557600080fd5b600060208284031215611fb8578081fd5b8135611d9f8161238b565b600060208284031215611fd4578081fd5b8151611d9f8161238b565b60008060408385031215611ff1578081fd5b8235611ffc8161238b565b9150602083013561200c8161238b565b809150509250929050565b60008060408385031215612029578182fd5b82356120348161238b565b9150602083013561200c816123a3565b6000806000806000806000806000806000806101608d8f031215612066578788fd5b6120708d3561238b565b8c359b5060208d01359a5061208860408e013561238b565b60408d0135995061209b60608e01611f07565b98506120a960808e01611f5c565b975060a08d013596506120be60c08e01611f07565b95506120cc60e08e01611f07565b945067ffffffffffffffff6101008e013511156120e7578384fd5b6120f88e6101008f01358f01611f67565b909450925061210a6101208e01611f07565b91506121196101408e01611f5c565b90509295989b509295989b509295989b565b6000806020838503121561213d578182fd5b823567ffffffffffffffff811115612153578283fd5b61215f85828601611f12565b90969095509350505050565b60008060008060408587031215612180578384fd5b843567ffffffffffffffff80821115612197578586fd5b6121a388838901611f12565b909650945060208701359150808211156121bb578384fd5b506121c887828801611f12565b95989497509550505050565b6000602082840312156121e5578081fd5b8135611d9f816123a3565b600060208284031215612201578081fd5b8151611d9f816123a3565b60006020828403121561221d578081fd5b5035919050565b600060208284031215612235578081fd5b5051919050565b6000825161224e81846020870161232e565b9190910192915050565b602081526000825180602084015261227781604085016020870161232e565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082198211156122d3576122d3612375565b500190565b6000826122f357634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561231257612312612375565b500290565b60008282101561232957612329612375565b500390565b60005b83811015612349578181015183820152602001612331565b8381111561070c5750506000910152565b600060001982141561236e5761236e612375565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146123a057600080fd5b50565b80151581146123a057600080fdfea264697066735822122032ac51f326f7ffe75d3d344854dc71e2e0c0fa37b8629e1f1cec267219854e3c64736f6c634300080400330000000000000000000000007a0a6906de7714d27413f5092ed1a0636a3fbc9a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101185760003560e01c80635de0398e116100a05780639735a634116100645780639735a6341461036d5780639779d1a61461038d578063d408f657146103bd578063f2fde38b146103ed578063fbec27bf1461040d57600080fd5b80635de0398e146102d95780635ecb16cd146102ef578063715018a61461030f57806375f12b21146103245780638da5cb5b1461034557600080fd5b806318b135e3116100e757806318b135e31461021957806338b32e68146102465780633ff428c7146102595780634f51e29414610279578063550bfa56146102b957600080fd5b806301e980d4146101795780630dc9de85146101995780631385d24c146101b95780631781261f146101ce57600080fd5b3661017457333214156101725760405162461bcd60e51b815260206004820152601860248201527f446f206e6f742073656e6420455448206469726563746c79000000000000000060448201526064015b60405180910390fd5b005b600080fd5b34801561018557600080fd5b5061017261019436600461220c565b61042d565b3480156101a557600080fd5b506101726101b436600461212b565b6104b7565b3480156101c557600080fd5b50610172610712565b3480156101da57600080fd5b506102066101e9366004611fdf565b600560209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561022557600080fd5b50610206610234366004611fa7565b60066020526000908152604090205481565b610206610254366004612044565b61075d565b34801561026557600080fd5b50610172610274366004612017565b610a2c565b34801561028557600080fd5b506102a9610294366004611fa7565b60046020526000908152604090205460ff1681565b6040519015158152602001610210565b3480156102c557600080fd5b506101726102d436600461220c565b610a81565b3480156102e557600080fd5b5061020660025481565b3480156102fb57600080fd5b5061017261030a36600461212b565b610b01565b34801561031b57600080fd5b50610172610d72565b34801561033057600080fd5b506000546102a990600160a01b900460ff1681565b34801561035157600080fd5b506000546040516001600160a01b039091168152602001610210565b34801561037957600080fd5b5061017261038836600461216b565b610de6565b34801561039957600080fd5b506102a96103a8366004611fa7565b60076020526000908152604090205460ff1681565b3480156103c957600080fd5b506102a96103d8366004611fa7565b60016020526000908152604090205460ff1681565b3480156103f957600080fd5b50610172610408366004611fa7565b610f10565b34801561041957600080fd5b50610172610428366004612017565b610ffa565b6000546001600160a01b031633146104575760405162461bcd60e51b81526004016101699061228b565b60648111156104b25760405162461bcd60e51b815260206004820152602160248201527f416666696c696174652053706c69742056616c7565206e6f7420616c6c6f77656044820152601960fa1b6064820152608401610169565b600355565b6000805b8281101561070c57336000908152600560205260408120908585848181106104f357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105089190611fa7565b6001600160a01b0316815260208082019290925260409081016000908120543382526005909352908120919350908186868581811061055757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061056c9190611fa7565b6001600160a01b03166001600160a01b031681526020019081526020016000208190555081600660008686858181106105b557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105ca9190611fa7565b6001600160a01b03166001600160a01b03168152602001908152602001600020546105f59190612317565b6006600086868581811061061957634e487b7160e01b600052603260045260246000fd5b905060200201602081019061062e9190611fa7565b6001600160a01b0316815260208101919091526040016000205573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee84848381811061067d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106929190611fa7565b6001600160a01b031614156106b0576106ab338361104f565b6106fa565b6106fa33838686858181106106d557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106ea9190611fa7565b6001600160a01b03169190611168565b806107048161235a565b9150506104bb565b50505050565b6000546001600160a01b0316331461073c5760405162461bcd60e51b81526004016101699061228b565b6000805460ff60a01b198116600160a01b9182900460ff1615909102179055565b60008054600160a01b900460ff16156107ad5760405162461bcd60e51b815260206004820152601260248201527115195b5c1bdc985c9a5b1e4814185d5cd95960721b6044820152606401610169565b60006107bd8e8e866001876111cb565b905060006108048f8a848b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113fc92505050565b90508a15610a0c5760007324a42fd28c976a61df5d00d0599c34c4f90748c86001600160a01b031663ed6ff7606040518163ffffffff1660e01b815260040160206040518083038186803b15801561085b57600080fd5b505afa15801561086f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108939190611fc3565b905061089f8a82611629565b7324a42fd28c976a61df5d00d0599c34c4f90748c86001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108ec57600080fd5b505afa158015610900573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109249190611fc3565b604051636968703360e11b81526001600160a01b038c811660048301526024820185905260006044830152919091169063d2d0e06690606401600060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b5050604051631a59df7760e11b81526001600160a01b038d81166004830152841692506334b3beee915060240160206040518083038186803b1580156109d057600080fd5b505afa1580156109e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a089190611fc3565b9950505b610a198d8d8c8c856116ce565b9f9e505050505050505050505050505050565b6000546001600160a01b03163314610a565760405162461bcd60e51b81526004016101699061228b565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610aab5760405162461bcd60e51b81526004016101699061228b565b6064811115610afc5760405162461bcd60e51b815260206004820152601a60248201527f476f6f6457696c6c2056616c7565206e6f7420616c6c6f7765640000000000006044820152606401610169565b600255565b6000546001600160a01b03163314610b2b5760405162461bcd60e51b81526004016101699061228b565b60005b81811015610d6d57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee848484818110610b6d57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610b829190611fa7565b6001600160a01b03161415610c105760066000858585818110610bb557634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610bca9190611fa7565b6001600160a01b03168152602081019190915260400160002054610bee9047612317565b9050610c0b610c056000546001600160a01b031690565b8261104f565b610d5a565b60066000858585818110610c3457634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610c499190611fa7565b6001600160a01b03166001600160a01b0316815260200190815260200160002054848484818110610c8a57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610c9f9190611fa7565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015610ce057600080fd5b505afa158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d189190612224565b610d229190612317565b9050610d5a610d396000546001600160a01b031690565b828686868181106106d557634e487b7160e01b600052603260045260246000fd5b5080610d658161235a565b915050610b2e565b505050565b6000546001600160a01b03163314610d9c5760405162461bcd60e51b81526004016101699061228b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610e105760405162461bcd60e51b81526004016101699061228b565b828114610e565760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c84092dce0eae840d8cadccee8d60631b6044820152606401610169565b60005b83811015610f0957828282818110610e8157634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610e9691906121d4565b60076000878785818110610eba57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610ecf9190611fa7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610f018161235a565b915050610e59565b5050505050565b6000546001600160a01b03163314610f3a5760405162461bcd60e51b81526004016101699061228b565b6001600160a01b038116610f9f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610169565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146110245760405162461bcd60e51b81526004016101699061228b565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b8047101561109f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610169565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146110ec576040519150601f19603f3d011682016040523d82523d6000602084013e6110f1565b606091505b5050905080610d6d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610169565b6040516001600160a01b038316602482015260448101829052610d6d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611783565b6000806001600160a01b03871661124e576000341161121a5760405162461bcd60e51b815260206004820152600b60248201526a139bc8195d1a081cd95b9d60aa1b6044820152606401610169565b61123a73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee348787611855565b90506112468134612317565b9150506113f3565b600086116112955760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081d1bdad95b88185b5bdd5b9d60621b6044820152606401610169565b34156112d95760405162461bcd60e51b815260206004820152601360248201527222ba341039b2b73a103bb4ba34103a37b5b2b760691b6044820152606401610169565b82156113c257333b6113425760405162461bcd60e51b815260206004820152602c60248201527f4552523a2073686f756c6453656c6c456e7469726542616c616e63652069732060448201526b7472756520666f7220454f4160a01b6064820152608401610169565b604051636eb1769f60e11b81523360048201523060248201526001600160a01b0388169063dd62ed3e9060440160206040518083038186803b15801561138757600080fd5b505afa15801561139b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bf9190612224565b95505b6113d76001600160a01b038816333089611980565b6113e387878787611855565b90506113ef8187612317565b9150505b95945050505050565b6000846001600160a01b0316866001600160a01b0316141561141f5750826113f3565b6001600160a01b03861615801561145257506001600160a01b03851673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2145b156114c75773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156114a657600080fd5b505af11580156114ba573d6000803e3d6000fd5b50505050508390506113f3565b60006001600160a01b0387166114de5750836114e8565b6114e88785611629565b60006114f3876119b8565b6001600160a01b03861660009081526007602052604090205490915060ff166115565760405162461bcd60e51b815260206004820152601560248201527415185c99d95d081b9bdd08105d5d1a1bdc9a5e9959605a1b6044820152606401610169565b6000856001600160a01b03168386604051611571919061223c565b60006040518083038185875af1925050503d80600081146115ae576040519150601f19603f3d011682016040523d82523d6000602084013e6115b3565b606091505b50509050806116045760405162461bcd60e51b815260206004820152601760248201527f4572726f72205377617070696e6720546f6b656e7320310000000000000000006044820152606401610169565b600061160f896119b8565b905061161b8382612317565b9a9950505050505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038281166024830152839160009183169063dd62ed3e9060440160206040518083038186803b15801561167557600080fd5b505afa158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad9190612224565b11156116b857505050565b610d6d6001600160a01b03821683600019611a4e565b60006001600160a01b0385166116f3576116ec838388876001611b72565b90506113f3565b6000611703848489600080611b72565b90506113ef866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561174157600080fd5b505afa158015611755573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117799190611fc3565b8288886001611b72565b60006117d8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d8d9092919063ffffffff16565b805190915015610d6d57808060200190518101906117f691906121f0565b610d6d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610169565b3360009081526001602052604081205460ff16828015611873575080155b801561188157506000600254115b15611977576127106002548661189791906122f8565b6118a191906122d8565b6001600160a01b03851660009081526004602052604090205490925060ff1615611977576001600160a01b0386166118eb5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee95505b60006064600354846118fd91906122f8565b61190791906122d8565b6001600160a01b038087166000908152600560209081526040808320938c168352929052908120805492935083929091906119439084906122c0565b90915550506001600160a01b038716600090815260066020526040812080548392906119709084906122c0565b9091555050505b50949350505050565b6040516001600160a01b038085166024830152831660448201526064810182905261070c9085906323b872dd60e01b90608401611194565b60006001600160a01b0382166119cf575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611a0e57600080fd5b505afa158015611a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a469190612224565b90505b919050565b801580611ad75750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611a9d57600080fd5b505afa158015611ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad59190612224565b155b611b425760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610169565b6040516001600160a01b038316602482015260448101829052610d6d90849063095ea7b360e01b90606401611194565b6000611b7e8685611629565b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a082319060240160206040518083038186803b158015611bc057600080fd5b505afa158015611bd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf89190612224565b60405163b6b55f2560e01b8152600481018890529091506001600160a01b0386169063b6b55f2590602401600060405180830381600087803b158015611c3d57600080fd5b505af1158015611c51573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201528392506001600160a01b03881691506370a082319060240160206040518083038186803b158015611c9657600080fd5b505afa158015611caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cce9190612224565b611cd89190612317565b915083821015611d1f5760405162461bcd60e51b81526020600482015260126024820152714572723a204869676820536c69707061676560701b6044820152606401610169565b8215611d8357611d396001600160a01b0386163384611168565b604080513381526001600160a01b03871660208201529081018390527f7f31d76771556dce5ab39ba5b60664743da2629a75c474e9445734b7ad34087d9060600160405180910390a15b5095945050505050565b6060611d9c8484600085611da6565b90505b9392505050565b606082471015611e075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610169565b843b611e555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b600080866001600160a01b03168587604051611e71919061223c565b60006040518083038185875af1925050503d8060008114611eae576040519150601f19603f3d011682016040523d82523d6000602084013e611eb3565b606091505b5091509150611ec3828286611ece565b979650505050505050565b60608315611edd575081611d9f565b825115611eed5782518084602001fd5b8160405162461bcd60e51b81526004016101699190612258565b8035611a498161238b565b60008083601f840112611f23578182fd5b50813567ffffffffffffffff811115611f3a578182fd5b6020830191508360208260051b8501011115611f5557600080fd5b9250929050565b8035611a49816123a3565b60008083601f840112611f78578182fd5b50813567ffffffffffffffff811115611f8f578182fd5b602083019150836020828501011115611f5557600080fd5b600060208284031215611fb8578081fd5b8135611d9f8161238b565b600060208284031215611fd4578081fd5b8151611d9f8161238b565b60008060408385031215611ff1578081fd5b8235611ffc8161238b565b9150602083013561200c8161238b565b809150509250929050565b60008060408385031215612029578182fd5b82356120348161238b565b9150602083013561200c816123a3565b6000806000806000806000806000806000806101608d8f031215612066578788fd5b6120708d3561238b565b8c359b5060208d01359a5061208860408e013561238b565b60408d0135995061209b60608e01611f07565b98506120a960808e01611f5c565b975060a08d013596506120be60c08e01611f07565b95506120cc60e08e01611f07565b945067ffffffffffffffff6101008e013511156120e7578384fd5b6120f88e6101008f01358f01611f67565b909450925061210a6101208e01611f07565b91506121196101408e01611f5c565b90509295989b509295989b509295989b565b6000806020838503121561213d578182fd5b823567ffffffffffffffff811115612153578283fd5b61215f85828601611f12565b90969095509350505050565b60008060008060408587031215612180578384fd5b843567ffffffffffffffff80821115612197578586fd5b6121a388838901611f12565b909650945060208701359150808211156121bb578384fd5b506121c887828801611f12565b95989497509550505050565b6000602082840312156121e5578081fd5b8135611d9f816123a3565b600060208284031215612201578081fd5b8151611d9f816123a3565b60006020828403121561221d578081fd5b5035919050565b600060208284031215612235578081fd5b5051919050565b6000825161224e81846020870161232e565b9190910192915050565b602081526000825180602084015261227781604085016020870161232e565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082198211156122d3576122d3612375565b500190565b6000826122f357634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561231257612312612375565b500290565b60008282101561232957612329612375565b500390565b60005b83811015612349578181015183820152602001612331565b8381111561070c5750506000910152565b600060001982141561236e5761236e612375565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146123a057600080fd5b50565b80151581146123a057600080fdfea264697066735822122032ac51f326f7ffe75d3d344854dc71e2e0c0fa37b8629e1f1cec267219854e3c64736f6c63430008040033

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

0000000000000000000000007a0a6906de7714d27413f5092ed1a0636a3fbc9a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _curveZapIn (address): 0x7A0a6906De7714d27413f5092ED1a0636A3FBc9A
Arg [1] : _goodwill (uint256): 0
Arg [2] : _affiliateSplit (uint256): 0

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000007a0a6906de7714d27413f5092ed1a0636a3fbc9a
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000


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  ]
[ 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.