ETH Price: $3,455.91 (+1.10%)

Contract

0xE703C7897bC8C93Ef2CAc73dc140824B3f012eEd
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...128579362021-07-19 15:45:001254 days ago1626709500IN
0xE703C789...B3f012eEd
0 ETH0.0010057635
Zap In128568962021-07-19 12:10:291254 days ago1626696629IN
0xE703C789...B3f012eEd
0.003 ETH0.0005942321
Zap In128497262021-07-18 9:10:271255 days ago1626599427IN
0xE703C789...B3f012eEd
0 ETH0.0005408319
Toggle Contract ...128419072021-07-17 3:19:221256 days ago1626491962IN
0xE703C789...B3f012eEd
0 ETH0.0005827522
Zap In128182402021-07-13 10:22:391260 days ago1626171759IN
0xE703C789...B3f012eEd
0.02 ETH0.0046211413
Zap In128182232021-07-13 10:19:471260 days ago1626171587IN
0xE703C789...B3f012eEd
0.005 ETH0.0020624813
Zap In128182092021-07-13 10:17:001260 days ago1626171420IN
0xE703C789...B3f012eEd
0.005 ETH0.0022192613
Zap In128178502021-07-13 8:57:401260 days ago1626166660IN
0xE703C789...B3f012eEd
0.01 ETH0.0033024619
Zap In128152932021-07-12 23:04:251260 days ago1626131065IN
0xE703C789...B3f012eEd
0.01 ETH0.0068972815
Zap In128144172021-07-12 19:46:041261 days ago1626119164IN
0xE703C789...B3f012eEd
0.01 ETH0.0036586621
Zap In128138052021-07-12 17:27:501261 days ago1626110870IN
0xE703C789...B3f012eEd
0 ETH0.0156177337
Zap In128136882021-07-12 17:03:311261 days ago1626109411IN
0xE703C789...B3f012eEd
0 ETH0.0227588147
Zap Out128135352021-07-12 16:32:361261 days ago1626107556IN
0xE703C789...B3f012eEd
0 ETH0.0202659655
Zap In128135242021-07-12 16:30:011261 days ago1626107401IN
0xE703C789...B3f012eEd
0 ETH0.0270319458
Zap In128134872021-07-12 16:21:281261 days ago1626106888IN
0xE703C789...B3f012eEd
0 ETH0.0242805757
Zap In128133722021-07-12 15:58:351261 days ago1626105515IN
0xE703C789...B3f012eEd
0 ETH0.0167524149
Zap In128131652021-07-12 15:13:081261 days ago1626102788IN
0xE703C789...B3f012eEd
5 ETH0.0118443135
Zap In128131222021-07-12 15:04:061261 days ago1626102246IN
0xE703C789...B3f012eEd
0.001 ETH0.0210144834
Zap In128130132021-07-12 14:36:531261 days ago1626100613IN
0xE703C789...B3f012eEd
0.01 ETH0.0179234229
Zap In128130112021-07-12 14:36:291261 days ago1626100589IN
0xE703C789...B3f012eEd
0.0001 ETH0.0142151223
Zap Out128130082021-07-12 14:36:161261 days ago1626100576IN
0xE703C789...B3f012eEd
0 ETH0.0072125524
Zap In128129672021-07-12 14:27:561261 days ago1626100076IN
0xE703C789...B3f012eEd
0.02 ETH0.0167356629
Zap In128129312021-07-12 14:20:511261 days ago1626099651IN
0xE703C789...B3f012eEd
0 ETH0.0128920636
Zap In128128522021-07-12 14:02:291261 days ago1626098549IN
0xE703C789...B3f012eEd
0 ETH0.0169877536
Zap In128127212021-07-12 13:35:511261 days ago1626096951IN
0xE703C789...B3f012eEd
0 ETH0.0129216440
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
128182402021-07-13 10:22:391260 days ago1626171759
0xE703C789...B3f012eEd
0.02 ETH
128182232021-07-13 10:19:471260 days ago1626171587
0xE703C789...B3f012eEd
0.005 ETH
128182092021-07-13 10:17:001260 days ago1626171420
0xE703C789...B3f012eEd
0.005 ETH
128178502021-07-13 8:57:401260 days ago1626166660
0xE703C789...B3f012eEd
0.01 ETH
128152932021-07-12 23:04:251260 days ago1626131065
0xE703C789...B3f012eEd
0.01 ETH
128144172021-07-12 19:46:041261 days ago1626119164
0xE703C789...B3f012eEd
0.01 ETH
128131652021-07-12 15:13:081261 days ago1626102788
0xE703C789...B3f012eEd
5 ETH
128131222021-07-12 15:04:061261 days ago1626102246
0xE703C789...B3f012eEd
0.001 ETH
128130132021-07-12 14:36:531261 days ago1626100613
0xE703C789...B3f012eEd
0.01 ETH
128130112021-07-12 14:36:291261 days ago1626100589
0xE703C789...B3f012eEd
0.0001 ETH
128129672021-07-12 14:27:561261 days ago1626100076
0xE703C789...B3f012eEd
0.02 ETH
128126742021-07-12 13:25:391261 days ago1626096339
0xE703C789...B3f012eEd
16.6 ETH
128125142021-07-12 12:45:001261 days ago1626093900
0xE703C789...B3f012eEd
0.01 ETH
128122312021-07-12 11:39:561261 days ago1626089996
0xE703C789...B3f012eEd
0.02 ETH
128120382021-07-12 10:56:241261 days ago1626087384
0xE703C789...B3f012eEd
0.2 ETH
128118472021-07-12 10:11:181261 days ago1626084678
0xE703C789...B3f012eEd
0.1 ETH
128117612021-07-12 9:50:491261 days ago1626083449
0xE703C789...B3f012eEd
5 ETH
128116122021-07-12 9:16:451261 days ago1626081405
0xE703C789...B3f012eEd
0.1 ETH
128114712021-07-12 8:44:391261 days ago1626079479
0xE703C789...B3f012eEd
0.01 ETH
128114682021-07-12 8:44:221261 days ago1626079462
0xE703C789...B3f012eEd
0.01 ETH
128114602021-07-12 8:42:491261 days ago1626079369
0xE703C789...B3f012eEd
0.00009 ETH
128114202021-07-12 8:33:221261 days ago1626078802
0xE703C789...B3f012eEd
5 ETH
128114192021-07-12 8:33:201261 days ago1626078800
0xE703C789...B3f012eEd
0.381199 ETH
128114172021-07-12 8:32:531261 days ago1626078773
0xE703C789...B3f012eEd
0.015 ETH
128114092021-07-12 8:31:501261 days ago1626078710
0xE703C789...B3f012eEd
0.0001 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Aave_Zap_V1_0_1

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv2 license
File 1 of 11 : Aave_Zap_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 deposits and withdraws assets to/from Aave
// SPDX-License-Identifier: GPL-2.0

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

interface IWETH {
    function deposit() external payable;

    function withdraw(uint256 wad) external;
}

contract Aave_Zap_V1_0_1 is ZapInBaseV3_1, ZapOutBaseV3_1 {
    using SafeERC20 for IERC20;

    uint256 private constant deadline =
        0xf000000000000000000000000000000000000000000000000000000000000000;

    uint256 private constant permitAllowance = 79228162514260000000000000000;

    address private constant wethTokenAddress =
        0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

    //@dev targets must be Zaps (not tokens!!!)
    constructor(
        address[] memory targets,
        uint256 _goodwill,
        uint256 _affiliateSplit
    ) ZapBaseV2_1(_goodwill, _affiliateSplit) {
        approvedTargets[0xDef1C0ded9bec7F1a1670819833240f027b25EfF] = true;
        for (uint256 i = 0; i < targets.length; i++) {
            approvedTargets[targets[i]] = true;
        }
    }

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

    /**
    @notice This function deposits assets into aave 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 aToken Address of the aToken
    @param minATokens The minimum acceptable quantity aTokens to receive. Reverts otherwise
    @param swapTarget Excecution target for the swap or zap
    @param swapData DEX or Zap data. Must swap to aToken underlying address
    @param affiliate Affiliate address
    @return aTokensRec Quantity of aTokens received
     */
    function ZapIn(
        address fromToken,
        uint256 amountIn,
        address aToken,
        uint256 minATokens,
        address swapTarget,
        bytes calldata swapData,
        address affiliate
    ) external payable stopInEmergency returns (uint256 aTokensRec) {
        uint256 toInvest = _pullTokens(fromToken, amountIn, affiliate, true);

        address toToken = getUnderlyingToken(aToken);

        uint256 tokensBought =
            _fillQuote(fromToken, toToken, toInvest, swapTarget, swapData);

        (aTokensRec) = enterAave(aToken, tokensBought);
        require(aTokensRec > minATokens, "High Slippage");

        IERC20(aToken).safeTransfer(msg.sender, aTokensRec);

        emit zapIn(msg.sender, aToken, aTokensRec);
    }

    function enterAave(address aToken, uint256 underlyingAmount)
        internal
        returns (uint256 aTokensRec)
    {
        ILendingPool lendingPool = getLendingPool(aToken);

        address underlyingToken = getUnderlyingToken(aToken);

        uint256 initialBalance = _getBalance(aToken);

        _approveToken(underlyingToken, address(lendingPool), underlyingAmount);

        lendingPool.deposit(
            underlyingToken,
            underlyingAmount,
            address(this),
            151
        );

        aTokensRec = _getBalance(aToken) - initialBalance;
    }

    /**
    @notice This function withdraws assets from aave, receiving tokens or ETH with permit
    @param fromToken The aToken being withdrawn
    @param amountIn The quantity of fromToken to withdraw
    @param toToken Address of the token to receive (0 address if ETH)
    @param minToTokens The minimum acceptable quantity tokens to receive. Reverts otherwise
    @param permitSig Signature for permit
    @param swapTarget Excecution target for the swap or zap
    @param swapData DEX or Zap data
    @param affiliate Affiliate address
    @return tokensRec Quantity of aTokens received
     */
    function ZapOutWithPermit(
        address fromToken,
        uint256 amountIn,
        address toToken,
        uint256 minToTokens,
        bytes calldata permitSig,
        address swapTarget,
        bytes calldata swapData,
        address affiliate
    ) external stopInEmergency returns (uint256) {
        _permit(fromToken, permitAllowance, permitSig);

        return (
            ZapOut(
                fromToken,
                amountIn,
                toToken,
                minToTokens,
                swapTarget,
                swapData,
                affiliate
            )
        );
    }

    function _permit(
        address aToken,
        uint256 amountIn,
        bytes memory permitSig
    ) internal {
        require(permitSig.length == 65, "Invalid signature length");

        bytes32 r;
        bytes32 s;
        uint8 v;
        assembly {
            r := mload(add(permitSig, 32))
            s := mload(add(permitSig, 64))
            v := byte(0, mload(add(permitSig, 96)))
        }
        IAToken(aToken).permit(
            msg.sender,
            address(this),
            amountIn,
            deadline,
            v,
            r,
            s
        );
    }

    /**
    @notice This function withdraws assets from aave, receiving tokens or ETH
    @param fromToken The aToken being withdrawn
    @param amountIn The quantity of fromToken to withdraw
    @param toToken Address of the token to receive (0 address if ETH)
    @param minToTokens The minimum acceptable quantity tokens to receive. Reverts otherwise
    @param swapTarget Excecution target for the swap or zap
    @param swapData DEX or Zap data
    @param affiliate Affiliate address
    @return tokensRec Quantity of aTokens received
     */
    function ZapOut(
        address fromToken,
        uint256 amountIn,
        address toToken,
        uint256 minToTokens,
        address swapTarget,
        bytes calldata swapData,
        address affiliate
    ) public stopInEmergency returns (uint256 tokensRec) {
        amountIn = _pullTokens(fromToken, amountIn);

        uint256 underlyingRec = exitAave(fromToken, amountIn);

        address underlyingToken = getUnderlyingToken(fromToken);

        tokensRec = _fillQuote(
            underlyingToken,
            toToken,
            underlyingRec,
            swapTarget,
            swapData
        );

        require(tokensRec >= minToTokens, "High Slippage");

        uint256 totalGoodwillPortion;

        if (toToken == address(0)) {
            totalGoodwillPortion = _subtractGoodwill(
                ETHAddress,
                tokensRec,
                affiliate,
                true
            );

            payable(msg.sender).transfer(tokensRec - totalGoodwillPortion);
        } else {
            totalGoodwillPortion = _subtractGoodwill(
                toToken,
                tokensRec,
                affiliate,
                true
            );

            IERC20(toToken).safeTransfer(
                msg.sender,
                tokensRec - totalGoodwillPortion
            );
        }

        tokensRec = tokensRec - totalGoodwillPortion;

        emit zapOut(msg.sender, toToken, tokensRec);
    }

    function exitAave(address aToken, uint256 aTokenAmount)
        internal
        returns (uint256 tokensRec)
    {
        address underlyingToken = getUnderlyingToken(aToken);

        ILendingPool lendingPool = getLendingPool(aToken);

        tokensRec = lendingPool.withdraw(
            underlyingToken,
            aTokenAmount,
            address(this)
        );
    }

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

    function getUnderlyingToken(address aToken) public returns (address) {
        return IAToken(aToken).UNDERLYING_ASSET_ADDRESS();
    }

    function getLendingPool(address aToken) internal returns (ILendingPool) {
        return ILendingPool(IAToken(aToken).POOL());
    }
}

File 2 of 11 : AaveInterface.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;

interface ILendingPool {
    /**
     * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.
     * - E.g. User deposits 100 USDC and gets in return 100 aUSDC
     * @param asset The address of the underlying asset to deposit
     * @param amount The amount to be deposited
     * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user
     *   wants to receive them on his own wallet, or a different address if the beneficiary of aTokens
     *   is a different wallet
     * @param referralCode Code used to register the integrator originating the operation, for potential rewards.
     *   0 if the action is executed directly by the user, without any middle-man
     **/
    function deposit(
        address asset,
        uint256 amount,
        address onBehalfOf,
        uint16 referralCode
    ) external;

    /**
     * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned
     * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC
     * @param asset The address of the underlying asset to withdraw
     * @param amount The underlying amount to be withdrawn
     *   - Send the value type(uint256).max in order to withdraw the whole aToken balance
     * @param to Address that will receive the underlying, same as msg.sender if the user
     *   wants to receive it on his own wallet, or a different address if the beneficiary is a
     *   different wallet
     * @return The final amount withdrawn
     **/
    function withdraw(
        address asset,
        uint256 amount,
        address to
    ) external returns (uint256);

    /**
     * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned
     * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address
     * @param asset The address of the borrowed underlying asset previously borrowed
     * @param amount The amount to repay
     * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`
     * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable
     * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the
     * user calling the function if he wants to reduce/remove his own debt, or the address of any other
     * other borrower whose debt should be removed
     * @return The final amount repaid
     **/
    function repay(
        address asset,
        uint256 amount,
        uint256 rateMode,
        address onBehalfOf
    ) external returns (uint256);
}

interface IAToken {
    function POOL() external returns (address);

    function UNDERLYING_ASSET_ADDRESS() external returns (address);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 3 of 11 : 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 4 of 11 : 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 5 of 11 : ZapOutBaseV3_1.sol
// SPDX-License-Identifier: GPL-2.0

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

abstract contract ZapOutBaseV3_1 is ZapBaseV2_1 {
    using SafeERC20 for IERC20;

    /**
    @dev Transfer tokens from msg.sender to this contract
    @param token The ERC20 token to transfer to this contract
    @return Quantity of tokens transferred to this contract
     */
    function _pullTokens(address token, uint256 amount)
        internal
        returns (uint256)
    {
        IERC20(token).safeTransferFrom(msg.sender, address(this), amount);

        return amount;
    }
}

File 6 of 11 : 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 7 of 11 : 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 8 of 11 : 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 9 of 11 : 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 10 of 11 : 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 11 of 11 : 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":"targets","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"}],"name":"zapIn","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"}],"name":"zapOut","type":"event"},{"inputs":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"aToken","type":"address"},{"internalType":"uint256","name":"minATokens","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":"aTokensRec","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"uint256","name":"minToTokens","type":"uint256"},{"internalType":"address","name":"swapTarget","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address","name":"affiliate","type":"address"}],"name":"ZapOut","outputs":[{"internalType":"uint256","name":"tokensRec","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"uint256","name":"minToTokens","type":"uint256"},{"internalType":"bytes","name":"permitSig","type":"bytes"},{"internalType":"address","name":"swapTarget","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address","name":"affiliate","type":"address"}],"name":"ZapOutWithPermit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"aToken","type":"address"}],"name":"getUnderlyingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","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"}]

60806040526000805460ff60a01b191690553480156200001e57600080fd5b50604051620029163803806200291683398101604081905262000041916200017a565b600080546001600160a01b03191633908117825560405184928492918291907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060029190915560035573def1c0ded9bec7f1a1670819833240f027b25eff600090815260076020527ff6019cd1944dc466e824190b288e5a63528dd4c9a6d8cbd707956fd30d2f1e0d805460ff191660011790555b835181101562000153576001600760008684815181106200010c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806200014a8162000261565b915050620000db565b505050506200029f565b80516001600160a01b03811681146200017557600080fd5b919050565b6000806000606084860312156200018f578283fd5b83516001600160401b0380821115620001a6578485fd5b818601915086601f830112620001ba578485fd5b8151602082821115620001d157620001d162000289565b8160051b604051601f19603f83011681018181108682111715620001f957620001f962000289565b604052838152828101945085830182870184018c10156200021857898afd5b8996505b84871015620002455762000230816200015d565b8652600196909601959483019483016200021c565b5091890151604090990151919a98995090979650505050505050565b60006000198214156200028257634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b61266780620002af6000396000f3fe6080604052600436106101395760003560e01c8063691bcc88116100ab5780639462f4281161006f5780639462f428146103dc5780639735a634146103fc5780639779d1a61461041c578063d408f6571461044c578063f2fde38b1461047c578063fbec27bf1461049c57600080fd5b8063691bcc881461033d57806369a7e57b14610375578063715018a61461038857806375f12b211461039d5780638da5cb5b146103be57600080fd5b80633ff428c7116100fd5780633ff428c71461026757806346d4b548146102875780634f51e294146102a7578063550bfa56146102e75780635de0398e146103075780635ecb16cd1461031d57600080fd5b806301e980d41461019a5780630dc9de85146101ba5780631385d24c146101da5780631781261f146101ef57806318b135e31461023a57600080fd5b3661019557333214156101935760405162461bcd60e51b815260206004820152601860248201527f446f206e6f742073656e6420455448206469726563746c79000000000000000060448201526064015b60405180910390fd5b005b600080fd5b3480156101a657600080fd5b506101936101b536600461246c565b6104bc565b3480156101c657600080fd5b506101936101d536600461238b565b610546565b3480156101e657600080fd5b506101936107a1565b3480156101fb57600080fd5b5061022761020a3660046121b8565b600560209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561024657600080fd5b50610227610255366004612180565b60066020526000908152604090205481565b34801561027357600080fd5b506101936102823660046121f0565b6107ec565b34801561029357600080fd5b506102276102a236600461221d565b610841565b3480156102b357600080fd5b506102d76102c2366004612180565b60046020526000908152604090205460ff1681565b6040519015158152602001610231565b3480156102f357600080fd5b5061019361030236600461246c565b610a1b565b34801561031357600080fd5b5061022760025481565b34801561032957600080fd5b5061019361033836600461238b565b610a9b565b34801561034957600080fd5b5061035d610358366004612180565b610d0c565b6040516001600160a01b039091168152602001610231565b61022761038336600461221d565b610d87565b34801561039457600080fd5b50610193610ebc565b3480156103a957600080fd5b506000546102d790600160a01b900460ff1681565b3480156103ca57600080fd5b506000546001600160a01b031661035d565b3480156103e857600080fd5b506102276103f73660046122bd565b610f30565b34801561040857600080fd5b506101936104173660046123cb565b610fc7565b34801561042857600080fd5b506102d7610437366004612180565b60076020526000908152604090205460ff1681565b34801561045857600080fd5b506102d7610467366004612180565b60016020526000908152604090205460ff1681565b34801561048857600080fd5b50610193610497366004612180565b6110f1565b3480156104a857600080fd5b506101936104b73660046121f0565b6111db565b6000546001600160a01b031633146104e65760405162461bcd60e51b815260040161018a9061250b565b60648111156105415760405162461bcd60e51b815260206004820152602160248201527f416666696c696174652053706c69742056616c7565206e6f7420616c6c6f77656044820152601960fa1b606482015260840161018a565b600355565b6000805b8281101561079b573360009081526005602052604081209085858481811061058257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105979190612180565b6001600160a01b031681526020808201929092526040908101600090812054338252600590935290812091935090818686858181106105e657634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105fb9190612180565b6001600160a01b03166001600160a01b0316815260200190815260200160002081905550816006600086868581811061064457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106599190612180565b6001600160a01b03166001600160a01b03168152602001908152602001600020546106849190612597565b600660008686858181106106a857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106bd9190612180565b6001600160a01b0316815260208101919091526040016000205573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee84848381811061070c57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107219190612180565b6001600160a01b0316141561073f5761073a3383611230565b610789565b610789338386868581811061076457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107799190612180565b6001600160a01b03169190611349565b80610793816125da565b91505061054a565b50505050565b6000546001600160a01b031633146107cb5760405162461bcd60e51b815260040161018a9061250b565b6000805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000546001600160a01b031633146108165760405162461bcd60e51b815260040161018a9061250b565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b60008054600160a01b900460ff161561086c5760405162461bcd60e51b815260040161018a906124eb565b61087689896113ac565b975060006108848a8a6113c9565b905060006108918b610d0c565b90506108d6818a848a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061147792505050565b9250878310156109185760405162461bcd60e51b815260206004820152600d60248201526c4869676820536c69707061676560981b604482015260640161018a565b60006001600160a01b038a166109875761094973eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8587600161178e565b9050336108fc6109598387612597565b6040518115909202916000818181858888f19350505050158015610981573d6000803e3d6000fd5b506109b5565b6109948a8587600161178e565b90506109b5336109a48387612597565b6001600160a01b038d169190611349565b6109bf8185612597565b604080513381526001600160a01b038d1660208201529081018290529094507fa51973a21dd19abaad8194f70440e180b7c5784c9828663e69dcbb57d7575bea906060015b60405180910390a150505098975050505050505050565b6000546001600160a01b03163314610a455760405162461bcd60e51b815260040161018a9061250b565b6064811115610a965760405162461bcd60e51b815260206004820152601a60248201527f476f6f6457696c6c2056616c7565206e6f7420616c6c6f776564000000000000604482015260640161018a565b600255565b6000546001600160a01b03163314610ac55760405162461bcd60e51b815260040161018a9061250b565b60005b81811015610d0757600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee848484818110610b0757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610b1c9190612180565b6001600160a01b03161415610baa5760066000858585818110610b4f57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610b649190612180565b6001600160a01b03168152602081019190915260400160002054610b889047612597565b9050610ba5610b9f6000546001600160a01b031690565b82611230565b610cf4565b60066000858585818110610bce57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610be39190612180565b6001600160a01b03166001600160a01b0316815260200190815260200160002054848484818110610c2457634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610c399190612180565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015610c7a57600080fd5b505afa158015610c8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb29190612484565b610cbc9190612597565b9050610cf4610cd36000546001600160a01b031690565b8286868681811061076457634e487b7160e01b600052603260045260246000fd5b5080610cff816125da565b915050610ac8565b505050565b6000816001600160a01b031663b16a19de6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d4957600080fd5b505af1158015610d5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d81919061219c565b92915050565b60008054600160a01b900460ff1615610db25760405162461bcd60e51b815260040161018a906124eb565b6000610dc18a8a8560016118b9565b90506000610dce89610d0c565b90506000610e158c83858b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061147792505050565b9050610e218a82611a00565b9350888411610e625760405162461bcd60e51b815260206004820152600d60248201526c4869676820536c69707061676560981b604482015260640161018a565b610e766001600160a01b038b163386611349565b604080513381526001600160a01b038c1660208201529081018590527f7f31d76771556dce5ab39ba5b60664743da2629a75c474e9445734b7ad34087d90606001610a04565b6000546001600160a01b03163314610ee65760405162461bcd60e51b815260040161018a9061250b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008054600160a01b900460ff1615610f5b5760405162461bcd60e51b815260040161018a906124eb565b610fa88b6bfffffffffff096fb4da2000089898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ac092505050565b610fb88b8b8b8b89898989610841565b9b9a5050505050505050505050565b6000546001600160a01b03163314610ff15760405162461bcd60e51b815260040161018a9061250b565b8281146110375760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c84092dce0eae840d8cadccee8d60631b604482015260640161018a565b60005b838110156110ea5782828281811061106257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906110779190612434565b6007600087878581811061109b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906110b09190612180565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806110e2816125da565b91505061103a565b5050505050565b6000546001600160a01b0316331461111b5760405162461bcd60e51b815260040161018a9061250b565b6001600160a01b0381166111805760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161018a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146112055760405162461bcd60e51b815260040161018a9061250b565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b804710156112805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161018a565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146112cd576040519150601f19603f3d011682016040523d82523d6000602084013e6112d2565b606091505b5050905080610d075760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161018a565b6040516001600160a01b038316602482015260448101829052610d0790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611bb5565b60006113c36001600160a01b038416333085611c87565b50919050565b6000806113d584610d0c565b905060006113e285611cbf565b604051631a4ca37b60e21b81526001600160a01b03848116600483015260248201879052306044830152919250908216906369328dec90606401602060405180830381600087803b15801561143657600080fd5b505af115801561144a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146e9190612484565b95945050505050565b6000846001600160a01b0316866001600160a01b0316141561149a57508261146e565b6001600160a01b0386161580156114cd57506001600160a01b03851673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2145b156115425773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561152157600080fd5b505af1158015611535573d6000803e3d6000fd5b505050505083905061146e565b6001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214801561157557506001600160a01b038516155b156115e757604051632e1a7d4d60e01b81526004810185905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b5050505083905061146e565b60006001600160a01b0387166115fe575083611608565b6116088785611cfc565b600061161387611da1565b6001600160a01b03861660009081526007602052604090205490915060ff166116765760405162461bcd60e51b815260206004820152601560248201527415185c99d95d081b9bdd08105d5d1a1bdc9a5e9959605a1b604482015260640161018a565b6000856001600160a01b03168386604051611691919061249c565b60006040518083038185875af1925050503d80600081146116ce576040519150601f19603f3d011682016040523d82523d6000602084013e6116d3565b606091505b505090508061171c5760405162461bcd60e51b81526020600482015260156024820152744572726f72205377617070696e6720546f6b656e7360581b604482015260640161018a565b8161172689611da1565b6117309190612597565b9350600084116117825760405162461bcd60e51b815260206004820152601f60248201527f5377617070656420546f20496e76616c696420496e7465726d65646961746500604482015260640161018a565b50505095945050505050565b3360009081526001602052604081205460ff168280156117ac575080155b80156117ba57506000600254115b156118b057612710600254866117d09190612578565b6117da9190612558565b6001600160a01b03851660009081526004602052604090205490925060ff16156118b0576001600160a01b0386166118245773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee95505b60006064600354846118369190612578565b6118409190612558565b6001600160a01b038087166000908152600560209081526040808320938c1683529290529081208054929350839290919061187c908490612540565b90915550506001600160a01b038716600090815260066020526040812080548392906118a9908490612540565b9091555050505b50949350505050565b6000806001600160a01b03861661193c57600034116119085760405162461bcd60e51b815260206004820152600b60248201526a139bc8195d1a081cd95b9d60aa1b604482015260640161018a565b61192873eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee34868661178e565b90506119348134612597565b9150506119f8565b600085116119835760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081d1bdad95b88185b5bdd5b9d60621b604482015260640161018a565b34156119c75760405162461bcd60e51b815260206004820152601360248201527222ba341039b2b73a103bb4ba34103a37b5b2b760691b604482015260640161018a565b6119dc6001600160a01b038716333088611c87565b6119e88686868661178e565b90506119f48186612597565b9150505b949350505050565b600080611a0c84611cbf565b90506000611a1985610d0c565b90506000611a2686611da1565b9050611a33828487611e2f565b60405163e8eda9df60e01b81526001600160a01b038381166004830152602482018790523060448301526097606483015284169063e8eda9df90608401600060405180830381600087803b158015611a8a57600080fd5b505af1158015611a9e573d6000803e3d6000fd5b5050505080611aac87611da1565b611ab69190612597565b9695505050505050565b8051604114611b115760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e6774680000000000000000604482015260640161018a565b60208101516040808301516060840151915163d505accf60e01b815233600482015230602482015260448101869052600f60fc1b606482015260009290921a6084830181905260a4830184905260c4830182905290916001600160a01b0387169063d505accf9060e401600060405180830381600087803b158015611b9557600080fd5b505af1158015611ba9573d6000803e3d6000fd5b50505050505050505050565b6000611c0a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e589092919063ffffffff16565b805190915015610d075780806020019051810190611c289190612450565b610d075760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161018a565b6040516001600160a01b038085166024830152831660448201526064810182905261079b9085906323b872dd60e01b90608401611375565b6000816001600160a01b0316637535d2466040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d4957600080fd5b604051636eb1769f60e11b81523060048201526001600160a01b038281166024830152839160009183169063dd62ed3e9060440160206040518083038186803b158015611d4857600080fd5b505afa158015611d5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d809190612484565b1115611d8b57505050565b610d076001600160a01b03821683600019611e71565b60006001600160a01b038216611db8575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611df757600080fd5b505afa158015611e0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d819190612484565b611e446001600160a01b038416836000611e71565b610d076001600160a01b0384168383611e71565b6060611e678484600085611f95565b90505b9392505050565b801580611efa5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611ec057600080fd5b505afa158015611ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef89190612484565b155b611f655760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161018a565b6040516001600160a01b038316602482015260448101829052610d0790849063095ea7b360e01b90606401611375565b606082471015611ff65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161018a565b843b6120445760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161018a565b600080866001600160a01b03168587604051612060919061249c565b60006040518083038185875af1925050503d806000811461209d576040519150601f19603f3d011682016040523d82523d6000602084013e6120a2565b606091505b50915091506120b28282866120bd565b979650505050505050565b606083156120cc575081611e6a565b8251156120dc5782518084602001fd5b8160405162461bcd60e51b815260040161018a91906124b8565b60008083601f840112612107578182fd5b50813567ffffffffffffffff81111561211e578182fd5b6020830191508360208260051b850101111561213957600080fd5b9250929050565b60008083601f840112612151578182fd5b50813567ffffffffffffffff811115612168578182fd5b60208301915083602082850101111561213957600080fd5b600060208284031215612191578081fd5b8135611e6a8161260b565b6000602082840312156121ad578081fd5b8151611e6a8161260b565b600080604083850312156121ca578081fd5b82356121d58161260b565b915060208301356121e58161260b565b809150509250929050565b60008060408385031215612202578182fd5b823561220d8161260b565b915060208301356121e581612623565b60008060008060008060008060e0898b031215612238578384fd5b88356122438161260b565b975060208901359650604089013561225a8161260b565b95506060890135945060808901356122718161260b565b935060a089013567ffffffffffffffff81111561228c578384fd5b6122988b828c01612140565b90945092505060c08901356122ac8161260b565b809150509295985092959890939650565b6000806000806000806000806000806101008b8d0312156122dc578182fd5b8a356122e78161260b565b995060208b0135985060408b01356122fe8161260b565b975060608b0135965060808b013567ffffffffffffffff80821115612321578384fd5b61232d8e838f01612140565b909850965060a08d013591506123428261260b565b90945060c08c01359080821115612357578384fd5b506123648d828e01612140565b90945092505060e08b01356123788161260b565b809150509295989b9194979a5092959850565b6000806020838503121561239d578182fd5b823567ffffffffffffffff8111156123b3578283fd5b6123bf858286016120f6565b90969095509350505050565b600080600080604085870312156123e0578384fd5b843567ffffffffffffffff808211156123f7578586fd5b612403888389016120f6565b9096509450602087013591508082111561241b578384fd5b50612428878288016120f6565b95989497509550505050565b600060208284031215612445578081fd5b8135611e6a81612623565b600060208284031215612461578081fd5b8151611e6a81612623565b60006020828403121561247d578081fd5b5035919050565b600060208284031215612495578081fd5b5051919050565b600082516124ae8184602087016125ae565b9190910192915050565b60208152600082518060208401526124d78160408501602087016125ae565b601f01601f19169190910160400192915050565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115612553576125536125f5565b500190565b60008261257357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612592576125926125f5565b500290565b6000828210156125a9576125a96125f5565b500390565b60005b838110156125c95781810151838201526020016125b1565b8381111561079b5750506000910152565b60006000198214156125ee576125ee6125f5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461262057600080fd5b50565b801515811461262057600080fdfea264697066735822122050591e75687fb926b5384c48223825d4c27989ff8b9b5614a20d9d55ddfb91ab64736f6c6343000804003300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006d9893fa101cd2b1f8d1a12de3189ff7b80fdc10000000000000000000000000647965b19280988a75c3a1369938c8927e6c8715

Deployed Bytecode

0x6080604052600436106101395760003560e01c8063691bcc88116100ab5780639462f4281161006f5780639462f428146103dc5780639735a634146103fc5780639779d1a61461041c578063d408f6571461044c578063f2fde38b1461047c578063fbec27bf1461049c57600080fd5b8063691bcc881461033d57806369a7e57b14610375578063715018a61461038857806375f12b211461039d5780638da5cb5b146103be57600080fd5b80633ff428c7116100fd5780633ff428c71461026757806346d4b548146102875780634f51e294146102a7578063550bfa56146102e75780635de0398e146103075780635ecb16cd1461031d57600080fd5b806301e980d41461019a5780630dc9de85146101ba5780631385d24c146101da5780631781261f146101ef57806318b135e31461023a57600080fd5b3661019557333214156101935760405162461bcd60e51b815260206004820152601860248201527f446f206e6f742073656e6420455448206469726563746c79000000000000000060448201526064015b60405180910390fd5b005b600080fd5b3480156101a657600080fd5b506101936101b536600461246c565b6104bc565b3480156101c657600080fd5b506101936101d536600461238b565b610546565b3480156101e657600080fd5b506101936107a1565b3480156101fb57600080fd5b5061022761020a3660046121b8565b600560209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561024657600080fd5b50610227610255366004612180565b60066020526000908152604090205481565b34801561027357600080fd5b506101936102823660046121f0565b6107ec565b34801561029357600080fd5b506102276102a236600461221d565b610841565b3480156102b357600080fd5b506102d76102c2366004612180565b60046020526000908152604090205460ff1681565b6040519015158152602001610231565b3480156102f357600080fd5b5061019361030236600461246c565b610a1b565b34801561031357600080fd5b5061022760025481565b34801561032957600080fd5b5061019361033836600461238b565b610a9b565b34801561034957600080fd5b5061035d610358366004612180565b610d0c565b6040516001600160a01b039091168152602001610231565b61022761038336600461221d565b610d87565b34801561039457600080fd5b50610193610ebc565b3480156103a957600080fd5b506000546102d790600160a01b900460ff1681565b3480156103ca57600080fd5b506000546001600160a01b031661035d565b3480156103e857600080fd5b506102276103f73660046122bd565b610f30565b34801561040857600080fd5b506101936104173660046123cb565b610fc7565b34801561042857600080fd5b506102d7610437366004612180565b60076020526000908152604090205460ff1681565b34801561045857600080fd5b506102d7610467366004612180565b60016020526000908152604090205460ff1681565b34801561048857600080fd5b50610193610497366004612180565b6110f1565b3480156104a857600080fd5b506101936104b73660046121f0565b6111db565b6000546001600160a01b031633146104e65760405162461bcd60e51b815260040161018a9061250b565b60648111156105415760405162461bcd60e51b815260206004820152602160248201527f416666696c696174652053706c69742056616c7565206e6f7420616c6c6f77656044820152601960fa1b606482015260840161018a565b600355565b6000805b8281101561079b573360009081526005602052604081209085858481811061058257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105979190612180565b6001600160a01b031681526020808201929092526040908101600090812054338252600590935290812091935090818686858181106105e657634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105fb9190612180565b6001600160a01b03166001600160a01b0316815260200190815260200160002081905550816006600086868581811061064457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106599190612180565b6001600160a01b03166001600160a01b03168152602001908152602001600020546106849190612597565b600660008686858181106106a857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106bd9190612180565b6001600160a01b0316815260208101919091526040016000205573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee84848381811061070c57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107219190612180565b6001600160a01b0316141561073f5761073a3383611230565b610789565b610789338386868581811061076457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107799190612180565b6001600160a01b03169190611349565b80610793816125da565b91505061054a565b50505050565b6000546001600160a01b031633146107cb5760405162461bcd60e51b815260040161018a9061250b565b6000805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000546001600160a01b031633146108165760405162461bcd60e51b815260040161018a9061250b565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b60008054600160a01b900460ff161561086c5760405162461bcd60e51b815260040161018a906124eb565b61087689896113ac565b975060006108848a8a6113c9565b905060006108918b610d0c565b90506108d6818a848a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061147792505050565b9250878310156109185760405162461bcd60e51b815260206004820152600d60248201526c4869676820536c69707061676560981b604482015260640161018a565b60006001600160a01b038a166109875761094973eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8587600161178e565b9050336108fc6109598387612597565b6040518115909202916000818181858888f19350505050158015610981573d6000803e3d6000fd5b506109b5565b6109948a8587600161178e565b90506109b5336109a48387612597565b6001600160a01b038d169190611349565b6109bf8185612597565b604080513381526001600160a01b038d1660208201529081018290529094507fa51973a21dd19abaad8194f70440e180b7c5784c9828663e69dcbb57d7575bea906060015b60405180910390a150505098975050505050505050565b6000546001600160a01b03163314610a455760405162461bcd60e51b815260040161018a9061250b565b6064811115610a965760405162461bcd60e51b815260206004820152601a60248201527f476f6f6457696c6c2056616c7565206e6f7420616c6c6f776564000000000000604482015260640161018a565b600255565b6000546001600160a01b03163314610ac55760405162461bcd60e51b815260040161018a9061250b565b60005b81811015610d0757600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee848484818110610b0757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610b1c9190612180565b6001600160a01b03161415610baa5760066000858585818110610b4f57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610b649190612180565b6001600160a01b03168152602081019190915260400160002054610b889047612597565b9050610ba5610b9f6000546001600160a01b031690565b82611230565b610cf4565b60066000858585818110610bce57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610be39190612180565b6001600160a01b03166001600160a01b0316815260200190815260200160002054848484818110610c2457634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610c399190612180565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015610c7a57600080fd5b505afa158015610c8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb29190612484565b610cbc9190612597565b9050610cf4610cd36000546001600160a01b031690565b8286868681811061076457634e487b7160e01b600052603260045260246000fd5b5080610cff816125da565b915050610ac8565b505050565b6000816001600160a01b031663b16a19de6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d4957600080fd5b505af1158015610d5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d81919061219c565b92915050565b60008054600160a01b900460ff1615610db25760405162461bcd60e51b815260040161018a906124eb565b6000610dc18a8a8560016118b9565b90506000610dce89610d0c565b90506000610e158c83858b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061147792505050565b9050610e218a82611a00565b9350888411610e625760405162461bcd60e51b815260206004820152600d60248201526c4869676820536c69707061676560981b604482015260640161018a565b610e766001600160a01b038b163386611349565b604080513381526001600160a01b038c1660208201529081018590527f7f31d76771556dce5ab39ba5b60664743da2629a75c474e9445734b7ad34087d90606001610a04565b6000546001600160a01b03163314610ee65760405162461bcd60e51b815260040161018a9061250b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008054600160a01b900460ff1615610f5b5760405162461bcd60e51b815260040161018a906124eb565b610fa88b6bfffffffffff096fb4da2000089898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ac092505050565b610fb88b8b8b8b89898989610841565b9b9a5050505050505050505050565b6000546001600160a01b03163314610ff15760405162461bcd60e51b815260040161018a9061250b565b8281146110375760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c84092dce0eae840d8cadccee8d60631b604482015260640161018a565b60005b838110156110ea5782828281811061106257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906110779190612434565b6007600087878581811061109b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906110b09190612180565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806110e2816125da565b91505061103a565b5050505050565b6000546001600160a01b0316331461111b5760405162461bcd60e51b815260040161018a9061250b565b6001600160a01b0381166111805760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161018a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146112055760405162461bcd60e51b815260040161018a9061250b565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b804710156112805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161018a565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146112cd576040519150601f19603f3d011682016040523d82523d6000602084013e6112d2565b606091505b5050905080610d075760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161018a565b6040516001600160a01b038316602482015260448101829052610d0790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611bb5565b60006113c36001600160a01b038416333085611c87565b50919050565b6000806113d584610d0c565b905060006113e285611cbf565b604051631a4ca37b60e21b81526001600160a01b03848116600483015260248201879052306044830152919250908216906369328dec90606401602060405180830381600087803b15801561143657600080fd5b505af115801561144a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146e9190612484565b95945050505050565b6000846001600160a01b0316866001600160a01b0316141561149a57508261146e565b6001600160a01b0386161580156114cd57506001600160a01b03851673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2145b156115425773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561152157600080fd5b505af1158015611535573d6000803e3d6000fd5b505050505083905061146e565b6001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214801561157557506001600160a01b038516155b156115e757604051632e1a7d4d60e01b81526004810185905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b5050505083905061146e565b60006001600160a01b0387166115fe575083611608565b6116088785611cfc565b600061161387611da1565b6001600160a01b03861660009081526007602052604090205490915060ff166116765760405162461bcd60e51b815260206004820152601560248201527415185c99d95d081b9bdd08105d5d1a1bdc9a5e9959605a1b604482015260640161018a565b6000856001600160a01b03168386604051611691919061249c565b60006040518083038185875af1925050503d80600081146116ce576040519150601f19603f3d011682016040523d82523d6000602084013e6116d3565b606091505b505090508061171c5760405162461bcd60e51b81526020600482015260156024820152744572726f72205377617070696e6720546f6b656e7360581b604482015260640161018a565b8161172689611da1565b6117309190612597565b9350600084116117825760405162461bcd60e51b815260206004820152601f60248201527f5377617070656420546f20496e76616c696420496e7465726d65646961746500604482015260640161018a565b50505095945050505050565b3360009081526001602052604081205460ff168280156117ac575080155b80156117ba57506000600254115b156118b057612710600254866117d09190612578565b6117da9190612558565b6001600160a01b03851660009081526004602052604090205490925060ff16156118b0576001600160a01b0386166118245773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee95505b60006064600354846118369190612578565b6118409190612558565b6001600160a01b038087166000908152600560209081526040808320938c1683529290529081208054929350839290919061187c908490612540565b90915550506001600160a01b038716600090815260066020526040812080548392906118a9908490612540565b9091555050505b50949350505050565b6000806001600160a01b03861661193c57600034116119085760405162461bcd60e51b815260206004820152600b60248201526a139bc8195d1a081cd95b9d60aa1b604482015260640161018a565b61192873eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee34868661178e565b90506119348134612597565b9150506119f8565b600085116119835760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081d1bdad95b88185b5bdd5b9d60621b604482015260640161018a565b34156119c75760405162461bcd60e51b815260206004820152601360248201527222ba341039b2b73a103bb4ba34103a37b5b2b760691b604482015260640161018a565b6119dc6001600160a01b038716333088611c87565b6119e88686868661178e565b90506119f48186612597565b9150505b949350505050565b600080611a0c84611cbf565b90506000611a1985610d0c565b90506000611a2686611da1565b9050611a33828487611e2f565b60405163e8eda9df60e01b81526001600160a01b038381166004830152602482018790523060448301526097606483015284169063e8eda9df90608401600060405180830381600087803b158015611a8a57600080fd5b505af1158015611a9e573d6000803e3d6000fd5b5050505080611aac87611da1565b611ab69190612597565b9695505050505050565b8051604114611b115760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e6774680000000000000000604482015260640161018a565b60208101516040808301516060840151915163d505accf60e01b815233600482015230602482015260448101869052600f60fc1b606482015260009290921a6084830181905260a4830184905260c4830182905290916001600160a01b0387169063d505accf9060e401600060405180830381600087803b158015611b9557600080fd5b505af1158015611ba9573d6000803e3d6000fd5b50505050505050505050565b6000611c0a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e589092919063ffffffff16565b805190915015610d075780806020019051810190611c289190612450565b610d075760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161018a565b6040516001600160a01b038085166024830152831660448201526064810182905261079b9085906323b872dd60e01b90608401611375565b6000816001600160a01b0316637535d2466040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d4957600080fd5b604051636eb1769f60e11b81523060048201526001600160a01b038281166024830152839160009183169063dd62ed3e9060440160206040518083038186803b158015611d4857600080fd5b505afa158015611d5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d809190612484565b1115611d8b57505050565b610d076001600160a01b03821683600019611e71565b60006001600160a01b038216611db8575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611df757600080fd5b505afa158015611e0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d819190612484565b611e446001600160a01b038416836000611e71565b610d076001600160a01b0384168383611e71565b6060611e678484600085611f95565b90505b9392505050565b801580611efa5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611ec057600080fd5b505afa158015611ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef89190612484565b155b611f655760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161018a565b6040516001600160a01b038316602482015260448101829052610d0790849063095ea7b360e01b90606401611375565b606082471015611ff65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161018a565b843b6120445760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161018a565b600080866001600160a01b03168587604051612060919061249c565b60006040518083038185875af1925050503d806000811461209d576040519150601f19603f3d011682016040523d82523d6000602084013e6120a2565b606091505b50915091506120b28282866120bd565b979650505050505050565b606083156120cc575081611e6a565b8251156120dc5782518084602001fd5b8160405162461bcd60e51b815260040161018a91906124b8565b60008083601f840112612107578182fd5b50813567ffffffffffffffff81111561211e578182fd5b6020830191508360208260051b850101111561213957600080fd5b9250929050565b60008083601f840112612151578182fd5b50813567ffffffffffffffff811115612168578182fd5b60208301915083602082850101111561213957600080fd5b600060208284031215612191578081fd5b8135611e6a8161260b565b6000602082840312156121ad578081fd5b8151611e6a8161260b565b600080604083850312156121ca578081fd5b82356121d58161260b565b915060208301356121e58161260b565b809150509250929050565b60008060408385031215612202578182fd5b823561220d8161260b565b915060208301356121e581612623565b60008060008060008060008060e0898b031215612238578384fd5b88356122438161260b565b975060208901359650604089013561225a8161260b565b95506060890135945060808901356122718161260b565b935060a089013567ffffffffffffffff81111561228c578384fd5b6122988b828c01612140565b90945092505060c08901356122ac8161260b565b809150509295985092959890939650565b6000806000806000806000806000806101008b8d0312156122dc578182fd5b8a356122e78161260b565b995060208b0135985060408b01356122fe8161260b565b975060608b0135965060808b013567ffffffffffffffff80821115612321578384fd5b61232d8e838f01612140565b909850965060a08d013591506123428261260b565b90945060c08c01359080821115612357578384fd5b506123648d828e01612140565b90945092505060e08b01356123788161260b565b809150509295989b9194979a5092959850565b6000806020838503121561239d578182fd5b823567ffffffffffffffff8111156123b3578283fd5b6123bf858286016120f6565b90969095509350505050565b600080600080604085870312156123e0578384fd5b843567ffffffffffffffff808211156123f7578586fd5b612403888389016120f6565b9096509450602087013591508082111561241b578384fd5b50612428878288016120f6565b95989497509550505050565b600060208284031215612445578081fd5b8135611e6a81612623565b600060208284031215612461578081fd5b8151611e6a81612623565b60006020828403121561247d578081fd5b5035919050565b600060208284031215612495578081fd5b5051919050565b600082516124ae8184602087016125ae565b9190910192915050565b60208152600082518060208401526124d78160408501602087016125ae565b601f01601f19169190910160400192915050565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115612553576125536125f5565b500190565b60008261257357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612592576125926125f5565b500290565b6000828210156125a9576125a96125f5565b500390565b60005b838110156125c95781810151838201526020016125b1565b8381111561079b5750506000910152565b60006000198214156125ee576125ee6125f5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461262057600080fd5b50565b801515811461262057600080fdfea264697066735822122050591e75687fb926b5384c48223825d4c27989ff8b9b5614a20d9d55ddfb91ab64736f6c63430008040033

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

00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006d9893fa101cd2b1f8d1a12de3189ff7b80fdc10000000000000000000000000647965b19280988a75c3a1369938c8927e6c8715

-----Decoded View---------------
Arg [0] : targets (address[]): 0x6D9893fa101CD2b1F8D1A12DE3189ff7b80FdC10,0x647965B19280988A75C3a1369938C8927E6c8715
Arg [1] : _goodwill (uint256): 0
Arg [2] : _affiliateSplit (uint256): 0

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [4] : 0000000000000000000000006d9893fa101cd2b1f8d1a12de3189ff7b80fdc10
Arg [5] : 000000000000000000000000647965b19280988a75c3a1369938c8927e6c8715


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.