Contract 0xB4CBf6E1F7489e773E28eDcc7CDE19f0175e16D9

 
Txn Hash Method
Block
From
To
Value
0x00823f9325099b92950259bda1bdfe58aa34e3320c91fcf5976cf19976d3df6eTransfer Ownersh...128578342021-07-19 15:26:2062 days 1 hr ago0xa0863436913b1b439ccaa6fbf89408116c1dde29 IN  0xb4cbf6e1f7489e773e28edcc7cde19f0175e16d90 Ether0.0011476840
0x6d20abfc291238bf25132b804a8450a361b2eac776dcd85bd9fa94ee446d3bc90x60806040128418952021-07-17 3:15:5164 days 13 hrs ago0xa0863436913b1b439ccaa6fbf89408116c1dde29 IN  Create: Convex_ZapIn_V10 Ether0.0435146220
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Convex_ZapIn_V1

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv2 license
File 1 of 9 : Convex_ZapIn_V1.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 allows minting and staking of cvxCRV and cvxCurveLP tokens
// SPDX-License-Identifier: GPL-2.0

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

interface IWETH {
    function deposit() external payable;

    function withdraw(uint256 wad) external;
}

interface IConvexCrvDepositor {
    function deposit(uint256 _amount, bool _lock) external;
}

interface IConvexBooster {
    function deposit(
        uint256 _pid,
        uint256 _amount,
        bool _stake
    ) external returns (bool);

    function poolInfo(uint256 _pid)
        external
        view
        returns (
            address lptoken,
            address token,
            address gauge,
            address crvRewards,
            address stash,
            bool shutdown
        );
}

interface IConvexRewards {
    function stakeFor(address _for, uint256 _amount) external returns (bool);

    function balanceOf(address _user) external view returns (uint256);
}

contract Convex_ZapIn_V1 is ZapInBaseV3_1 {
    using SafeERC20 for IERC20;

    address private constant wethTokenAddress =
        0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
    address private constant crvTokenAddress =
        0xD533a949740bb3306d119CC777fa900bA034cd52;
    address private constant cvxCrvTokenAddress =
        0x62B9c7356A2Dc64a1969e19C23e4f579F9810Aa7;

    IConvexCrvDepositor depositor =
        IConvexCrvDepositor(0x8014595F2AB54cD7c604B00E9fb932176fDc86Ae);
    IConvexBooster booster =
        IConvexBooster(0xF403C135812408BFbE8713b5A23a04b3D48AAE31);

    constructor(
        address _curveZapIn,
        uint256 _goodwill,
        uint256 _affiliateSplit
    ) ZapBaseV2_1(_goodwill, _affiliateSplit) {
        approvedTargets[0xDef1C0ded9bec7F1a1670819833240f027b25EfF] = true;
        approvedTargets[_curveZapIn] = true;
    }

    event zapIn(
        address sender,
        address token,
        uint256 tokensRec,
        address affiliate
    );

    /**
    @notice This function adds and stakes liquidity into Convex pools with ETH or ERC20 tokens
    @param fromToken The token used for entry (address(0) if ether)
    @param amountIn The amount of fromTokenAddress to invest
    @param pid The ID of the Convex pool to enter
    @param minLPTokens The minimum acceptable quantity of Curve LP to receive. Reverts otherwise
    @param swapTarget Excecution target for the first swap
    @param swapData DEX quote data
    @param affiliate Affiliate address
    @return crvLPReceived Quantity of Curve LP tokens received
    */
    function ZapIn(
        address fromToken,
        uint256 amountIn,
        uint256 pid,
        uint256 minLPTokens,
        address swapTarget,
        bytes calldata swapData,
        address affiliate
    ) external payable stopInEmergency returns (uint256 crvLPReceived) {
        uint256 toInvest = _pullTokens(fromToken, amountIn, affiliate, true);

        (address crvLpToken, address cvxToken, , address rewardContract, , ) =
            booster.poolInfo(pid);

        crvLPReceived = _fillQuote(
            fromToken,
            crvLpToken,
            toInvest,
            swapTarget,
            swapData
        );
        require(crvLPReceived >= minLPTokens, "High Slippage");

        _approveToken(crvLpToken, address(booster), crvLPReceived);
        booster.deposit(pid, crvLPReceived, false);

        _approveToken(cvxToken, rewardContract, crvLPReceived);
        IConvexRewards(rewardContract).stakeFor(msg.sender, crvLPReceived);

        emit zapIn(msg.sender, crvLpToken, crvLPReceived, affiliate);
    }

    /**
    @notice This function mints and deposits cvxCRV tokens with ETH or ERC20 tokens
    @param fromToken The token used for entry (address(0) if ether)
    @param amountIn The amount of fromTokenAddress to invest
    @param minCRVTokens The minimum acceptable quantity of Curve tokens receive. Reverts otherwise
    @param swapTarget Excecution target for the first swap
    @param swapData DEX quote data
    @param affiliate Affiliate address
    @return cvxCrvReceived Quantity of cvxCRV tokens received
    */
    function ZapInCvxCRV(
        address fromToken,
        uint256 amountIn,
        uint256 minCRVTokens,
        address swapTarget,
        bytes calldata swapData,
        address affiliate
    ) external payable stopInEmergency returns (uint256 cvxCrvReceived) {
        uint256 toInvest = _pullTokens(fromToken, amountIn, affiliate, true);

        uint256 crvBought =
            _fillQuote(
                fromToken,
                crvTokenAddress,
                toInvest,
                swapTarget,
                swapData
            );
        require(crvBought >= minCRVTokens, "High Slippage");

        _approveToken(crvTokenAddress, address(depositor), crvBought);
        depositor.deposit(crvBought, false);

        IERC20(cvxCrvTokenAddress).safeTransfer(msg.sender, crvBought);

        emit zapIn(msg.sender, crvTokenAddress, crvBought, affiliate);

        return crvBought;
    }

    function _fillQuote(
        address fromToken,
        address toToken,
        uint256 _amount,
        address swapTarget,
        bytes memory swapData
    ) internal returns (uint256 amountBought) {
        if (fromToken == toToken) {
            return _amount;
        }

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

        if (fromToken == wethTokenAddress && toToken == address(0)) {
            IWETH(wethTokenAddress).withdraw(_amount);
            return _amount;
        }

        uint256 valueToSend;
        if (fromToken == address(0)) {
            valueToSend = _amount;
        } else {
            _approveToken(fromToken, swapTarget);
        }

        uint256 initialBalance = _getBalance(toToken);

        require(approvedTargets[swapTarget], "Target not Authorized");
        (bool success, ) = swapTarget.call{ value: valueToSend }(swapData);
        require(success, "Error Swapping Tokens");

        amountBought = _getBalance(toToken) - initialBalance;

        require(amountBought > 0, "Swapped To Invalid Intermediate");
    }
}

File 2 of 9 : ZapBaseV2_1.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";
import "../oz/0.8.0/token/ERC20/extensions/IERC20Metadata.sol";

abstract contract ZapBaseV2_1 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;

    address internal constant ZapperAdmin =
        0x3CE37278de6388532C3949ce4e886F365B14fB56;

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

    // circuit breaker modifiers
    modifier stopInEmergency {
        if (stopped) {
            revert("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];
        }
    }

    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;
            }
        }
    }

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

File 3 of 9 : ZapInBaseV3_1.sol
// SPDX-License-Identifier: GPL-2.0

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

abstract contract ZapInBaseV3_1 is ZapBaseV2_1 {
    using SafeERC20 for IERC20;

    /**
    @dev Transfer tokens (including ETH) from msg.sender to this contract
    @param token The ERC20 token to transfer to this contract (0 address if ETH)
    @return Quantity of tokens transferred to this contract
     */
    function _pullTokens(
        address token,
        uint256 amount,
        address affiliate,
        bool enableGoodwill
    ) internal returns (uint256) {
        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

        IERC20(token).safeTransferFrom(msg.sender, address(this), amount);

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

        return amount - totalGoodwillPortion;
    }
}

File 4 of 9 : 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 9 : 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 9 : 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 7 of 9 : 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 8 of 9 : 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 9 of 9 : 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":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokensRec","type":"uint256"},{"indexed":false,"internalType":"address","name":"affiliate","type":"address"}],"name":"zapIn","type":"event"},{"inputs":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"minLPTokens","type":"uint256"},{"internalType":"address","name":"swapTarget","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address","name":"affiliate","type":"address"}],"name":"ZapIn","outputs":[{"internalType":"uint256","name":"crvLPReceived","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minCRVTokens","type":"uint256"},{"internalType":"address","name":"swapTarget","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address","name":"affiliate","type":"address"}],"name":"ZapInCvxCRV","outputs":[{"internalType":"uint256","name":"cvxCrvReceived","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"}]

60806040526000805460ff60a01b19169055600880546001600160a01b0319908116738014595f2ab54cd7c604b00e9fb932176fdc86ae179091556009805490911673f403c135812408bfbe8713b5a23a04b3d48aae3117905534801561006557600080fd5b50604051620025a9380380620025a98339810160408190526100869161012d565b600080546001600160a01b03191633908117825560405184928492918291907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600291909155600355505060076020527ff6019cd1944dc466e824190b288e5a63528dd4c9a6d8cbd707956fd30d2f1e0d8054600160ff1991821681179092556001600160a01b0392909216600090815260409020805490921617905561016e565b600080600060608486031215610141578283fd5b83516001600160a01b0381168114610157578384fd5b602085015160409095015190969495509392505050565b61242b806200017e6000396000f3fe6080604052600436106101235760003560e01c8063715018a6116100a05780639779d1a6116100645780639779d1a614610398578063d408f657146103c8578063f2fde38b146103f8578063fadc181e14610418578063fbec27bf1461042b57600080fd5b8063715018a61461030757806375f12b211461031c5780638a864f8c1461033d5780638da5cb5b146103505780639735a6341461037857600080fd5b80633ff428c7116100e75780633ff428c7146102515780634f51e29414610271578063550bfa56146102b15780635de0398e146102d15780635ecb16cd146102e757600080fd5b806301e980d4146101845780630dc9de85146101a45780631385d24c146101c45780631781261f146101d957806318b135e31461022457600080fd5b3661017f573332141561017d5760405162461bcd60e51b815260206004820152601860248201527f446f206e6f742073656e6420455448206469726563746c79000000000000000060448201526064015b60405180910390fd5b005b600080fd5b34801561019057600080fd5b5061017d61019f366004612250565b61044b565b3480156101b057600080fd5b5061017d6101bf36600461216f565b6104d5565b3480156101d057600080fd5b5061017d610730565b3480156101e557600080fd5b506102116101f4366004611f5f565b600560209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561023057600080fd5b5061021161023f366004611f43565b60066020526000908152604090205481565b34801561025d57600080fd5b5061017d61026c36600461201d565b61077b565b34801561027d57600080fd5b506102a161028c366004611f43565b60046020526000908152604090205460ff1681565b604051901515815260200161021b565b3480156102bd57600080fd5b5061017d6102cc366004612250565b6107d0565b3480156102dd57600080fd5b5061021160025481565b3480156102f357600080fd5b5061017d61030236600461216f565b610850565b34801561031357600080fd5b5061017d610ac1565b34801561032857600080fd5b506000546102a190600160a01b900460ff1681565b61021161034b36600461204a565b610b35565b34801561035c57600080fd5b506000546040516001600160a01b03909116815260200161021b565b34801561038457600080fd5b5061017d6103933660046121af565b610d48565b3480156103a457600080fd5b506102a16103b3366004611f43565b60076020526000908152604090205460ff1681565b3480156103d457600080fd5b506102a16103e3366004611f43565b60016020526000908152604090205460ff1681565b34801561040457600080fd5b5061017d610413366004611f43565b610e72565b6102116104263660046120d8565b610f5c565b34801561043757600080fd5b5061017d61044636600461201d565b611254565b6000546001600160a01b031633146104755760405162461bcd60e51b8152600401610174906122cf565b60648111156104d05760405162461bcd60e51b815260206004820152602160248201527f416666696c696174652053706c69742056616c7565206e6f7420616c6c6f77656044820152601960fa1b6064820152608401610174565b600355565b6000805b8281101561072a573360009081526005602052604081209085858481811061051157634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105269190611f43565b6001600160a01b0316815260208082019290925260409081016000908120543382526005909352908120919350908186868581811061057557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061058a9190611f43565b6001600160a01b03166001600160a01b031681526020019081526020016000208190555081600660008686858181106105d357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105e89190611f43565b6001600160a01b03166001600160a01b0316815260200190815260200160002054610613919061235b565b6006600086868581811061063757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061064c9190611f43565b6001600160a01b0316815260208101919091526040016000205573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee84848381811061069b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106b09190611f43565b6001600160a01b031614156106ce576106c933836112a9565b610718565b61071833838686858181106106f357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107089190611f43565b6001600160a01b031691906113c2565b806107228161239e565b9150506104d9565b50505050565b6000546001600160a01b0316331461075a5760405162461bcd60e51b8152600401610174906122cf565b6000805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000546001600160a01b031633146107a55760405162461bcd60e51b8152600401610174906122cf565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146107fa5760405162461bcd60e51b8152600401610174906122cf565b606481111561084b5760405162461bcd60e51b815260206004820152601a60248201527f476f6f6457696c6c2056616c7565206e6f7420616c6c6f7765640000000000006044820152606401610174565b600255565b6000546001600160a01b0316331461087a5760405162461bcd60e51b8152600401610174906122cf565b60005b81811015610abc57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8484848181106108bc57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108d19190611f43565b6001600160a01b0316141561095f576006600085858581811061090457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906109199190611f43565b6001600160a01b0316815260208101919091526040016000205461093d904761235b565b905061095a6109546000546001600160a01b031690565b826112a9565b610aa9565b6006600085858581811061098357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906109989190611f43565b6001600160a01b03166001600160a01b03168152602001908152602001600020548484848181106109d957634e487b7160e01b600052603260045260246000fd5b90506020020160208101906109ee9190611f43565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a679190612268565b610a71919061235b565b9050610aa9610a886000546001600160a01b031690565b828686868181106106f357634e487b7160e01b600052603260045260246000fd5b5080610ab48161239e565b91505061087d565b505050565b6000546001600160a01b03163314610aeb5760405162461bcd60e51b8152600401610174906122cf565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008054600160a01b900460ff1615610b795760405162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b6044820152606401610174565b6000610b888989856001611425565b90506000610be38a73d533a949740bb3306d119cc777fa900ba034cd52848a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061156c92505050565b905087811015610c255760405162461bcd60e51b815260206004820152600d60248201526c4869676820536c69707061676560981b6044820152606401610174565b600854610c519073d533a949740bb3306d119cc777fa900ba034cd52906001600160a01b031683611884565b600854604051639a40832160e01b815260048101839052600060248201526001600160a01b0390911690639a40832190604401600060405180830381600087803b158015610c9e57600080fd5b505af1158015610cb2573d6000803e3d6000fd5b50610cd892507362b9c7356a2dc64a1969e19c23e4f579f9810aa79150339050836113c2565b6040805133815273d533a949740bb3306d119cc777fa900ba034cd5260208201529081018290526001600160a01b03851660608201527ff480202ff227dd85b3cfff5a145fbc783babc42398ff0122cb6dcde4a7ce15419060800160405180910390a19998505050505050505050565b6000546001600160a01b03163314610d725760405162461bcd60e51b8152600401610174906122cf565b828114610db85760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c84092dce0eae840d8cadccee8d60631b6044820152606401610174565b60005b83811015610e6b57828282818110610de357634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610df89190612218565b60076000878785818110610e1c57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610e319190611f43565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610e638161239e565b915050610dbb565b5050505050565b6000546001600160a01b03163314610e9c5760405162461bcd60e51b8152600401610174906122cf565b6001600160a01b038116610f015760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610174565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054600160a01b900460ff1615610fa05760405162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b6044820152606401610174565b6000610faf8a8a856001611425565b600954604051631526fe2760e01b8152600481018b9052919250600091829182916001600160a01b0390911690631526fe279060240160c06040518083038186803b158015610ffd57600080fd5b505afa158015611011573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110359190611f97565b5050935050925092506110818d84868c8c8c8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061156c92505050565b9450898510156110c35760405162461bcd60e51b815260206004820152600d60248201526c4869676820536c69707061676560981b6044820152606401610174565b6009546110db9084906001600160a01b031687611884565b6009546040516321d0683360e11b8152600481018d905260248101879052600060448201526001600160a01b03909116906343a0d06690606401602060405180830381600087803b15801561112f57600080fd5b505af1158015611143573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111679190612234565b50611173828287611884565b6040516305dc812160e31b8152336004820152602481018690526001600160a01b03821690632ee4090890604401602060405180830381600087803b1580156111bb57600080fd5b505af11580156111cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f39190612234565b50604080513381526001600160a01b0385811660208301528183018890528816606082015290517ff480202ff227dd85b3cfff5a145fbc783babc42398ff0122cb6dcde4a7ce15419181900360800190a15050505098975050505050505050565b6000546001600160a01b0316331461127e5760405162461bcd60e51b8152600401610174906122cf565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b804710156112f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610174565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611346576040519150601f19603f3d011682016040523d82523d6000602084013e61134b565b606091505b5050905080610abc5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610174565b6040516001600160a01b038316602482015260448101829052610abc90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526118ad565b6000806001600160a01b0386166114a857600034116114745760405162461bcd60e51b815260206004820152600b60248201526a139bc8195d1a081cd95b9d60aa1b6044820152606401610174565b61149473eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee34868661197f565b90506114a0813461235b565b915050611564565b600085116114ef5760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081d1bdad95b88185b5bdd5b9d60621b6044820152606401610174565b34156115335760405162461bcd60e51b815260206004820152601360248201527222ba341039b2b73a103bb4ba34103a37b5b2b760691b6044820152606401610174565b6115486001600160a01b038716333088611aaa565b6115548686868661197f565b9050611560818661235b565b9150505b949350505050565b6000846001600160a01b0316866001600160a01b0316141561158f57508261187b565b6001600160a01b0386161580156115c257506001600160a01b03851673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2145b156116375773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561161657600080fd5b505af115801561162a573d6000803e3d6000fd5b505050505083905061187b565b6001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214801561166a57506001600160a01b038516155b156116dc57604051632e1a7d4d60e01b81526004810185905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b1580156116bc57600080fd5b505af11580156116d0573d6000803e3d6000fd5b5050505083905061187b565b60006001600160a01b0387166116f35750836116fd565b6116fd8785611ae2565b600061170887611b87565b6001600160a01b03861660009081526007602052604090205490915060ff1661176b5760405162461bcd60e51b815260206004820152601560248201527415185c99d95d081b9bdd08105d5d1a1bdc9a5e9959605a1b6044820152606401610174565b6000856001600160a01b031683866040516117869190612280565b60006040518083038185875af1925050503d80600081146117c3576040519150601f19603f3d011682016040523d82523d6000602084013e6117c8565b606091505b50509050806118115760405162461bcd60e51b81526020600482015260156024820152744572726f72205377617070696e6720546f6b656e7360581b6044820152606401610174565b8161181b89611b87565b611825919061235b565b9350600084116118775760405162461bcd60e51b815260206004820152601f60248201527f5377617070656420546f20496e76616c696420496e7465726d656469617465006044820152606401610174565b5050505b95945050505050565b6118996001600160a01b038416836000611c1b565b610abc6001600160a01b0384168383611c1b565b6000611902826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d3f9092919063ffffffff16565b805190915015610abc57808060200190518101906119209190612234565b610abc5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610174565b3360009081526001602052604081205460ff1682801561199d575080155b80156119ab57506000600254115b15611aa157612710600254866119c1919061233c565b6119cb919061231c565b6001600160a01b03851660009081526004602052604090205490925060ff1615611aa1576001600160a01b038616611a155773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee95505b6000606460035484611a27919061233c565b611a31919061231c565b6001600160a01b038087166000908152600560209081526040808320938c16835292905290812080549293508392909190611a6d908490612304565b90915550506001600160a01b03871660009081526006602052604081208054839290611a9a908490612304565b9091555050505b50949350505050565b6040516001600160a01b038085166024830152831660448201526064810182905261072a9085906323b872dd60e01b906084016113ee565b604051636eb1769f60e11b81523060048201526001600160a01b038281166024830152839160009183169063dd62ed3e9060440160206040518083038186803b158015611b2e57600080fd5b505afa158015611b42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b669190612268565b1115611b7157505050565b610abc6001600160a01b03821683600019611c1b565b60006001600160a01b038216611b9e575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611bdd57600080fd5b505afa158015611bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c159190612268565b92915050565b801580611ca45750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611c6a57600080fd5b505afa158015611c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca29190612268565b155b611d0f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610174565b6040516001600160a01b038316602482015260448101829052610abc90849063095ea7b360e01b906064016113ee565b6060611d4e8484600085611d58565b90505b9392505050565b606082471015611db95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610174565b843b611e075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610174565b600080866001600160a01b03168587604051611e239190612280565b60006040518083038185875af1925050503d8060008114611e60576040519150601f19603f3d011682016040523d82523d6000602084013e611e65565b606091505b5091509150611e75828286611e80565b979650505050505050565b60608315611e8f575081611d51565b825115611e9f5782518084602001fd5b8160405162461bcd60e51b8152600401610174919061229c565b60008083601f840112611eca578182fd5b50813567ffffffffffffffff811115611ee1578182fd5b6020830191508360208260051b8501011115611efc57600080fd5b9250929050565b60008083601f840112611f14578182fd5b50813567ffffffffffffffff811115611f2b578182fd5b602083019150836020828501011115611efc57600080fd5b600060208284031215611f54578081fd5b8135611d51816123cf565b60008060408385031215611f71578081fd5b8235611f7c816123cf565b91506020830135611f8c816123cf565b809150509250929050565b60008060008060008060c08789031215611faf578182fd5b8651611fba816123cf565b6020880151909650611fcb816123cf565b6040880151909550611fdc816123cf565b6060880151909450611fed816123cf565b6080880151909350611ffe816123cf565b60a088015190925061200f816123e7565b809150509295509295509295565b6000806040838503121561202f578182fd5b823561203a816123cf565b91506020830135611f8c816123e7565b600080600080600080600060c0888a031215612064578081fd5b873561206f816123cf565b96506020880135955060408801359450606088013561208d816123cf565b9350608088013567ffffffffffffffff8111156120a8578182fd5b6120b48a828b01611f03565b90945092505060a08801356120c8816123cf565b8091505092959891949750929550565b60008060008060008060008060e0898b0312156120f3578081fd5b88356120fe816123cf565b97506020890135965060408901359550606089013594506080890135612123816123cf565b935060a089013567ffffffffffffffff81111561213e578182fd5b61214a8b828c01611f03565b90945092505060c089013561215e816123cf565b809150509295985092959890939650565b60008060208385031215612181578182fd5b823567ffffffffffffffff811115612197578283fd5b6121a385828601611eb9565b90969095509350505050565b600080600080604085870312156121c4578384fd5b843567ffffffffffffffff808211156121db578586fd5b6121e788838901611eb9565b909650945060208701359150808211156121ff578384fd5b5061220c87828801611eb9565b95989497509550505050565b600060208284031215612229578081fd5b8135611d51816123e7565b600060208284031215612245578081fd5b8151611d51816123e7565b600060208284031215612261578081fd5b5035919050565b600060208284031215612279578081fd5b5051919050565b60008251612292818460208701612372565b9190910192915050565b60208152600082518060208401526122bb816040850160208701612372565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115612317576123176123b9565b500190565b60008261233757634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612356576123566123b9565b500290565b60008282101561236d5761236d6123b9565b500390565b60005b8381101561238d578181015183820152602001612375565b8381111561072a5750506000910152565b60006000198214156123b2576123b26123b9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146123e457600080fd5b50565b80151581146123e457600080fdfea264697066735822122026e7974018b66867a2b8ab4c3c7cf997195a8ad096ed764e1253d34772e472f364736f6c634300080400330000000000000000000000007a0a6906de7714d27413f5092ed1a0636a3fbc9a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

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
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.