ETH Price: $3,338.84 (-0.01%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NewTokenFacet

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 8 : NewTokenFacet.sol
// SPDX-License-Identifier: MIT
/*********************************************************************************************\
* Deployyyyer: https://deployyyyer.io
* Twitter: https://x.com/deployyyyer
* Telegram: https://t.me/Deployyyyer
/*********************************************************************************************/

pragma solidity ^0.8.23;
import {Modifiers, AppStorage} from "../libraries/LibAppStorage.sol"; 
import {LibDiamond} from "../libraries/LibDiamond.sol";
import {IUniswapV2Factory, IUniswapV2Router02} from "../interfaces/INewToken.sol";
import { INewToken } from "../interfaces/INewToken.sol";
import { IERC20 } from "../interfaces/IERC20.sol";
import { IHelper } from "../interfaces/IHelper.sol";
import { IPresale } from "../interfaces/IPresale.sol";
//import "hardhat/console.sol";


library SafeCall {
    /**
     * @notice Perform a low level call without copying any returndata
     *
     * @param _target   Address to call
     * @param _gas      Amount of gas to pass to the call
     * @param _value    Amount of value to pass to the call
     * @param _calldata Calldata to pass to the call
     */
    function call(
        address _target,
        uint256 _gas,
        uint256 _value,
        bytes memory _calldata
    ) internal returns (bool) {
        bool _success;
        assembly {
            _success := call(
                _gas, // gas
                _target, // recipient
                _value, // ether value
                add(_calldata, 0x20), // inloc
                mload(_calldata), // inlen
                0, // outloc
                0 // outlen
            )
        }
        return _success;
    }
}

/// @title NewTokenFacet 
/// @notice Contains methods related to ERC20, starting and ending presales and setting team
/// @dev 
contract NewTokenFacet is IERC20, Modifiers {
    event TradingEnabled(address pair, uint256 liq, uint256 lockPeriod, bool isBurnt, address router);
	event TaxMade(uint256 amount);
    event TaxGiven(uint256 amount);
    event IncreasedLimits(uint256 maxWallet, uint256 maxTx);
    event StakingMade(uint256 amount);
    event TeamSet(INewToken.TeamParams tparams);
    event PresaleAdded(address presaleId);
    event PresaleFinished(address presaleId);
    event PresaleRefunded(address presaleId);

    //reentrancy lock
    modifier lockTheSwap {
        s.inSwap = true;
        _;
        s.inSwap = false;
    }

    /// @notice Create liquidity pool and start trading for the token
    /// @dev
    function startTrading(uint256 lockPeriod, bool shouldBurn, address router) external payable onlyOwner {
        require(!s.tradingOpen && s.presaleSt != 1, "n1");
        require(address(this).balance >= s.minLiq, "n2");
        if(!shouldBurn) {
            require(lockPeriod >= 14);
        } else {
            s.cScore += 200;
        }
        
        s.cScore += 50; 
        s.tradingOpen = true;

        s.isExTxLimit[address(this)] = true;
        s.isExTxLimit[LibDiamond.contractOwner()] = true;
        s.isExTxLimit[address(s.uniswapV2Router)] = true;
        s.isExTxLimit[s.deployyyyerCa] = true;
        s.isExTxLimit[s.taxWallet] = true;

        s.isExWaLimit[address(this)] = true;
        s.isExWaLimit[LibDiamond.contractOwner()] = true;
        s.isExWaLimit[address(s.uniswapV2Router)] = true;
        s.isExWaLimit[s.deployyyyerCa] = true;
        s.isExWaLimit[s.taxWallet] = true;
        
        //0x000000000000000000000000000000000000dEaD or address(0)
        address liqOwner = address(this);
        if(shouldBurn) {
            liqOwner = address(0);
            s.isBurnt = true;
        } else {
            s.lockPeriod = lockPeriod;
            s.isBurnt = false;
        }

        uint256 liqBalance = s.balances[address(this)] - s.teamBalance;
        s.tradingOpened = block.timestamp;
        if(!s.isParent) {
            require(IHelper(s.deployyyyerCa).isValidRouter(router));
            s.uniswapV2Router = IUniswapV2Router02(router);
            s.allowances[address(this)][address(s.uniswapV2Router)] = s.tTotal;
        }


        s.uniswapV2Pair = IUniswapV2Factory(s.uniswapV2Router.factory()).createPair(address(this), s.uniswapV2Router.WETH());
        s.isExWaLimit[address(s.uniswapV2Pair)] = true;
        emit TradingEnabled(s.uniswapV2Pair, address(this).balance, lockPeriod, shouldBurn, router);
        require(IERC20(s.uniswapV2Pair).approve(address(s.uniswapV2Router), type(uint).max), "n3");
        //console.log(s.uniswapV2Router);
        s.uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),liqBalance,0,0,liqOwner,block.timestamp+60);
        if(!s.isParent)
            IHelper(s.deployyyyerCa).addScore(msg.sender, s.cScore);
        
        

    }

    /// @notice add a presale by calling setupPresale on presale contract launched by user
    /// @dev
    function addPresale(address presale, uint256 percent, IPresale.PresaleParams memory newdetails) external onlyOwner {
        require(s.presale == address(0) && !s.tradingOpen, "n4");
        //helperfacet isValidPresale if presale was launched by deployyyyer
        require(IHelper(s.deployyyyerCa).isValidPresale(presale), "n5");
        
        //check that the presale is not init with some other token
        IPresale.PresaleParams memory details = IPresale(presale).getPresaleDetails();
        require(details.owner == msg.sender, "n6");
        require(details.status == 0, "n7");
        require(details.token == address(this), "n77");
        s.presale = presale;
        s.presaleSt = 1;
        //transfer to presale contract.
        require(percent >= 100 && percent <= 2000, "n8");
        s.balances[presale] = s.tTotal*percent/10000;
        s.balances[address(this)] -= s.balances[presale];
        //add presale contract to txlimit
        //console.log(s.balances[presale]);
        s.isExTxLimit[presale] = true;
        s.isExWaLimit[presale] = true;

        //setup presale contract 
        newdetails.fee = 0;
        if(s.isFreeTier)  
            newdetails.fee = 5;

        newdetails.owner = msg.sender;
        newdetails.token = address(this);
        newdetails.softcap = s.balances[presale] * 25 / 100;
        newdetails.hardcap = s.balances[presale];
        
        require(newdetails.duration >= 1 && newdetails.duration <= 30, "n8");
        require(newdetails.liqPercent >= 80 &&  newdetails.liqPercent <= 100, "n9"); 
        require(newdetails.cliffPeriod >= 1 && newdetails.cliffPeriod <= 30, "n10");
        require(newdetails.vestingPeriod >= 7 && newdetails.vestingPeriod <= 30, "n11");
        newdetails.status = 1;
        newdetails.sold = 0;
        require(newdetails.maxEth > 0, "n12");
        require(newdetails.maxBag > 0 && newdetails.maxBag <= s.balances[presale]/10, "n13");
        


        emit Transfer(address(this), presale, s.balances[presale]);
        //we could emit extra details from presale instead of here
        emit PresaleAdded(presale);
        
        IPresale(presale).setupPresale(newdetails);

        

    }
    
    /// @notice finish presale
    /// @dev require caller to be its presale address
    function finPresale() external {
        require(msg.sender == s.presale, "n14");
        s.presaleSt = 2;

        emit PresaleFinished(s.presale);
    }

    /// @notice finish presale
    /// @dev require caller to be its presale address
    function refPresale() external {
        require(!s.tradingOpen, "n15");
        require(msg.sender == s.presale, "n16");
        emit PresaleRefunded(s.presale);
        //always reverts on error?
        require(address(this).balance > 0, "n17");
        payable(s.presale).transfer(address(this).balance);
    }

    /// @notice finish presale
    /// @dev require caller to be its presale address
    function addTeam(INewToken.TeamParams memory params) external onlyOwner {
        require(!s.tradingOpen && s.presaleSt == 0);
        if(s.cliffPeriod == 0 || params.cliffPeriod > 0) {
            require(params.cliffPeriod >= 0 && params.cliffPeriod <= 10000, "n19");
            s.cliffPeriod = params.cliffPeriod;
        }
        if(s.vestingPeriod == 0 || params.vestingPeriod > 0) {
            require(params.vestingPeriod >= 0 && params.vestingPeriod <= 10000, "n20");
            s.vestingPeriod = params.vestingPeriod;
        }
        //20% of supply
        if(params.isAdd) {
            s.teamShare[params.team1] += s.tTotal * params.team1p / 10000;
            s.teamBalance += s.tTotal * params.team1p / 10000;
            
        } else {
            //todo: what if sub goes below zero, crash or sets to zero
            s.teamShare[params.team1] -= s.tTotal * params.team1p / 10000;
            s.teamBalance -= s.tTotal * params.team1p / 10000;
        }
        require(s.teamBalance <= (s.tTotal*20/100), "n21");
        emit TeamSet(params);
        

    }

    /// @notice finish presale
    /// @dev require caller to be its presale address
    function increaseLimits(uint256 maxwallet, uint256 maxtx) external onlyOwner {
        require(s.walletLimited);
        require(s.tTotal * maxwallet / 100 >= s.maxWallet && maxwallet <= 100, "n23");
        require(s.tTotal * maxtx / 100 >= s.maxTx && maxtx <= 100, "n24");
        s.maxWallet =  s.tTotal * maxwallet / 100;   
        s.maxTx = s.tTotal * maxtx / 100;
        
        if (maxwallet == 100 && maxtx == 100) {
            s.walletLimited = false;
        }

        emit IncreasedLimits(maxwallet, maxtx);
    }

    ///@dev Returns the name of the token.
    function name() external view override returns (string memory) {
        return s.name;
    }

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

    ///@dev Returns the number of decimals used to get its user representation.
    function decimals() external view override returns (uint8) {
        return s.decimals;
    }

    ///@dev Returns the value of tokens in existence.
    function totalSupply() public view override returns (uint256) {
        return s.tTotal;
    }

    ///@dev Returns the value of tokens owned by account.
    function balanceOf(address account) public view override returns (uint256) {
        return s.balances[account];
    }

    ///@dev Moves a amount of tokens from the caller's account to receipient.
    function transfer(address recipient, uint256 amount) external override returns (bool) {
        _transfer(msg.sender, recipient, amount);
        return true;
    }

    ///@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
    function allowance(address owner, address spender) external view override returns (uint256) {
        return s.allowances[owner][spender];
    }

    /**
     * @dev Sets a `value` amount of tokens 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 override returns (bool) {
        _approve(msg.sender, spender, amount);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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) public override returns (bool) {
        require(amount <= s.allowances[sender][msg.sender], "n25");
        _approve(sender, msg.sender, s.allowances[sender][msg.sender] - amount);
        _transfer(sender, recipient, amount);
        return true;
    }
    
    function _approve(address owner, address spender, uint256 amount) private {
        require(owner != address(0));
        require(spender != address(0));
        s.allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /// @notice sets tax for the trade
    /// @dev 
    function _setTax(bool isBuy) private {
        uint256 maxTax;
        uint256 minTax;
        uint256 tax;
        if(isBuy) {
            maxTax = s.maxBuyTax;
            minTax = s.minBuyTax;
            tax = s.taxBuy;
        } else {
            maxTax = s.maxSellTax;
            minTax = s.minSellTax;
            tax = s.taxSell;
        }

        if(tax != minTax) {
            if(s.initTaxType == 0) {
                if (block.timestamp >= (s.tradingOpened + (s.initInterval))) {
                    tax = minTax; 
                }
                else if (block.timestamp >= (s.tradingOpened + (s.initInterval/2))) {
                    tax = minTax + (maxTax - minTax)/4;
                }
                else if (block.timestamp >= (s.tradingOpened + (s.initInterval/4))) {
                    //todo: verify multiply before divide
                    tax = minTax + ((maxTax - minTax)/2);
                }
                else {       
                    tax = maxTax; 
                }        
                  
            } else if(s.initTaxType == 1) {
                if (s.buyCount > (s.countInterval)) {
                    tax = minTax; 
                } else {       
                    tax = maxTax; 
                } 
                //this is forced after 2hrs
                if(block.timestamp >= (s.tradingOpened + 7200)) {
                    tax = minTax;
                }      

            } else if(s.initTaxType == 2){
                if (s.buyCount > (s.countInterval) || block.timestamp >= (s.tradingOpened + (s.initInterval))) {
                    tax = minTax; 
                }
                else if (s.buyCount > (s.countInterval/2) || block.timestamp >= (s.tradingOpened + (s.initInterval/2))) {
                    tax = minTax + (maxTax - minTax)/4;
                }
                else if (s.buyCount > (s.countInterval/4) || block.timestamp >= (s.tradingOpened + (s.initInterval/4))) {
                    //todo: verify multiply before divide
                    tax = minTax + ((maxTax - minTax)/2);
                }
                else {       
                    tax = maxTax; 
                }        
            // } else if(s.initTaxType == 3) { //check block number}        
                
            } else {
                tax = minTax; 
            }

            if(isBuy) {
                s.taxBuy = tax;
            } else {
                s.taxSell = tax;
            }
        }

    }

    /// @notice internal method of transfer
    /// @dev 
    function _transfer(address from, address to, uint256 amount) private {
        require(from != address(0));
        require(to != address(0));
        //require(amount > 0); //compliance erc20
        require(s.balances[from] >= amount, "n66");
        uint256 taxAmount=0;
        
        if (s.tradingOpen && s.walletLimited && !s.isExTxLimit[from] && !s.isExTxLimit[to])
            require(s.maxTx >= amount, "n30");
        if (s.tradingOpen && s.walletLimited && !s.isExWaLimit[to])
            require((s.balances[to] + amount) <= s.maxWallet, "n31");
         
        if (from != LibDiamond.contractOwner() && to != LibDiamond.contractOwner()) {
            if (from == s.uniswapV2Pair && to != address(s.uniswapV2Router)) {
            	//buy from uniswap, only if amount > 0
                s.buyCount++;
                _setTax(true);

            	taxAmount = amount * s.taxBuy / 100;
                //console.log("_setTaxDone");
                
                
            }
            if(to == s.uniswapV2Pair && from!= address(this)) {
            	//sell from uniswap
                //max trans for sell?
                _setTax(false);
                taxAmount = amount * s.taxSell / 100;    
            }
        }

        uint256 contractTokenBalance = balanceOf(address(this)) - s.teamBalance;
        bool swapped = false;
        if (!s.inSwap && to == s.uniswapV2Pair && from!= address(this) && contractTokenBalance > s.taxSwapThreshold && s.buyCount > s.preventSwap) {
                //we swap only on sell to uniswap pool
                swapTokensForEth(min(contractTokenBalance, s.maxTaxSwap));
                sendETHToFee(address(this).balance);
                swapped = true;
        }

        if(taxAmount > 0) {
          s.balances[address(this)] = s.balances[address(this)] + (taxAmount);
          emit Transfer(from, address(this), taxAmount);
        }

        //from can be taxWallet
        s.balances[from] = s.balances[from] - amount;
        s.balances[to] = s.balances[to] + amount - taxAmount;
        emit Transfer(from, to, amount - taxAmount);
        
        if(swapped) {
            //everything else is taken care, anything left is for token's tax wallet
            //this call needs to be safe from reverts, consuming all gas and return bombs
            bool ttax = SafeCall.call(s.taxWallet, 100000, address(this).balance, "");
            if(ttax)
                emit TaxMade(address(this).balance);
        }

    }

    /// @notice returns min of a and b
    function min(uint256 a, uint256 b) private pure returns (uint256){
      return (a>b)?b:a;
    }

    /// @notice swaps tokens from tax into eth
    /// @dev this is nonrentrant using lockTheSwap
    function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
        address[] memory path = new address[](2);
        //todo: will this work on pairs where 0 is weth?
        path[0] = address(this);
        path[1] = s.uniswapV2Router.WETH();
        
        if(s.lpTax > 0) { 
            s.halfLp = tokenAmount * s.lpTax / 200;  
            tokenAmount -= s.halfLp; 
            s.lastSwap = tokenAmount;
        }

        _approve(address(this), address(s.uniswapV2Router), tokenAmount);
        s.uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0,
            path,
            address(this),
            block.timestamp
        );
    }

    /// @notice sends the eth to respective tax wallets and adds lp if token has buyback tax 
    /// @dev 
    function sendETHToFee(uint256 amount) private {  
        uint256 da = 0;
        uint256 ethLpShare = 0;
        uint256 stakingShare = 0;
        uint256 halfLpTemp;
        if(s.isFreeTier && ((block.timestamp - s.tradingOpened) < (86400*90))) {     
            //we take tax only for 3 month
            //this charge is taken for recovery function too!
            da = amount * 10 / 100;
            emit TaxGiven(da);
            (bool stax, ) = s.deployyyyerCa.call{value: da}("");
            require(stax, "ns99");
        }
        if(s.lpTax > 0 && s.halfLp > 0) {
            //newly added liquidity is also locked
            //address liqOwner = address(this);
            
            //we should also be keeping half of lp in tokens, so that u add equal amount of eth and token to lp
            ethLpShare = s.halfLp * amount / s.lastSwap;
            halfLpTemp = s.halfLp;
            s.halfLp = 0;
            s.lastSwap = 0;
            _approve(address(this), address(s.uniswapV2Router), halfLpTemp);
            s.uniswapV2Router.addLiquidityETH{ value: ethLpShare }(
                address(this),
                halfLpTemp,
                0,
                0,
                address(this),
                block.timestamp + 60
            );

            
        }
        if(s.stakingContract != address(0)) {
            stakingShare = (amount - da - ethLpShare) * s.stakingShare / 100;
            //todo: is 2300 gas sufficient 
            //stakingContract is safe since its our own! 
            (bool sent, ) = s.stakingContract.call{value: stakingShare}("");
            require(sent, "ns9");
            emit StakingMade(stakingShare);
        }
        
    }

    /// @notice recovers eth to tax wallet if any
    /// @dev 
    function recoverEth() private {
        //blocked while trading is disabled
        if(!s.inSwap && s.tradingOpen) { 
            uint256 contractETHBalance = address(this).balance;
            if(contractETHBalance > 0) {
                sendETHToFee(contractETHBalance);
                (bool ttax, ) = s.taxWallet.call{value: address(this).balance}("");
                if(ttax)
                    emit TaxMade(address(this).balance);
            }
        }

    }

    /// @notice rescues any erc20 tokens sent to contract, also recovers eth to tax wallet if any
    /// @dev trying to rescue own token or own lp tokens will revert
    function rescueERC20(address _address) external {
        //block pulling out lp
        require(_address != s.uniswapV2Pair); 
        //block team token share
        require(_address != address(this));
        
        require(IERC20(_address).transfer(s.taxWallet, IERC20(_address).balanceOf(address(this))), "n32");
        recoverEth();
    }

}

File 2 of 8 : IDiamondCut.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
/******************************************************************************/

interface IDiamondCut {
    enum FacetCutAction {Add, Replace, Remove}
    // Add=0, Replace=1, Remove=2

    struct FacetCut {
        address facetAddress;
        FacetCutAction action;
        bytes4[] functionSelectors;
    }

    /// @notice Add/replace/remove any number of functions and optionally execute
    ///         a function with delegatecall
    /// @param _diamondCut Contains the facet addresses and function selectors
    /// @param _init The address of the contract or facet to execute _calldata
    /// @param _calldata A function call, including function selector and arguments
    ///                  _calldata is executed with delegatecall on _init
    function diamondCut(
        FacetCut[] calldata _diamondCut,
        address _init,
        bytes calldata _calldata
    ) external;

    event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);
}

File 3 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;


interface IERC20 {
    function name() external view returns (string memory);

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

    function decimals() external view returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address _owner) external view returns (uint256 balance);

    function transferFrom(
        address _from,
        address _to,
        uint256 _value
    ) external returns (bool success);

    function transfer(address _to, uint256 _value) external returns (bool success);

    function approve(address _spender, uint256 _value) external returns (bool success);

    function allowance(address _owner, address _spender) external view returns (uint256 remaining);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 8 : IHelper.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

interface IHelper {
	struct LauncherDetails {
	uint256 ethCost; 
	uint256 deployyyyerCost; 
	uint256 promoCostEth; 
	uint256 promoCostDeployyyyer; 
	uint256 minLiq; 
	address bridge;
	}
	function addScore(address owner, uint256 score) external;
	function transferScore(address owner, address newOwner, uint256 score) external;
	function punishScore(address owner, uint256 score) external;
	function isValidPresale(address presale) external view returns (bool);
	function isValidRouter(address router) external view returns (bool);
}

File 5 of 8 : INewToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import { IPresale} from "./IPresale.sol";

interface INewToken {
    struct InitParams {
        address owner;
        address taxWallet;
        address stakingFacet;
        address v2router;
        bool isFreeTier;
        uint256 minLiq; 
        uint256 supply;
        uint256 initTaxType; //0-time,1-buyCount,2-hybrid
        uint256 initInterval; //seconds 0-1 hour(if 1m: 1m, 3m, 6m, 10m)
        uint256 countInterval; //0-100 
        uint256  maxBuyTax; //40%
        uint256  minBuyTax; //0
        uint256  maxSellTax; //40%
        uint256  minSellTax; //0
        uint256  lpTax; //0-90 of buy or sell tax
        uint256 maxWallet;
        uint256 maxTx;
        uint256 preventSwap;
        uint256 maxSwap;
        uint256 taxSwapThreshold;
        string  name;
        string  symbol;
    }
    
    struct TeamParams {
        address team1;
        uint256 team1p; 
        uint256 cliffPeriod; 
        uint256 vestingPeriod;
        bool isAdd;
    }

	function rescueERC20(address _address) external;
	function increaseLimits(uint256 maxwallet, uint256 maxtx) external;
	function startTrading(uint256 lockPeriod, bool shouldBurn, address router) external;
    //require trading and presale not started
    function addPresale(address presale, uint256 percent, IPresale.PresaleParams memory newdetails) external;
    //require caller to be presale address
    function finPresale() external;
    function refPresale() external;
    //requires presale not started and trading not started
    function addTeam(TeamParams memory params) external;
    //what if we remove team out from init?
}

interface IUniswapV2Factory {
    function createPair(address tokenA, address tokenB) external returns (address pair);

}

interface IUniswapV2Router02 {
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function factory() external pure returns (address);
    function WETH() external pure returns (address);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}

File 6 of 8 : IPresale.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

interface IPresale {
    struct PresaleParams {
            address owner;
            address token;
            uint256 softcap;
            uint256 hardcap;
            uint256 startTs;
            uint256 finishTs;
            uint256 duration;
            uint256 liqPercent;
            uint256 cliffPeriod;
            uint256 vestingPeriod;
            uint256 status;
            uint256 sold;
            uint256 maxEth;
            uint256 maxBag;
            uint256 fee;
    }

    function transferOwnership(address _newOwner) external;
    function owner() external view returns (address);
    function rescueERC20(address _address) external;
    function setupPresale(PresaleParams memory params) external;
    function buyTokens(uint256 _amount) external payable;
    //should we offer or force token vesting??
    function claimTokens() external;
    function getRefund() external;
    function getPresaleDetails() external view returns(PresaleParams memory); 
    function finishPresale() external; 
    function claimEth() external;
    function getClaimableTokens(address user) external view returns(uint256,uint256,uint256,uint256);
    function refundPresale() external;
}

File 7 of 8 : LibAppStorage.sol
// SPDX-License-Identifier: MIT
/*********************************************************************************************\
* Deployyyyer: https://deployyyyer.io
* Twitter: https://x.com/deployyyyer
* Telegram: https://t.me/Deployyyyer
/*********************************************************************************************/
pragma solidity ^0.8.23;
import {LibDiamond} from "./LibDiamond.sol";
//import {LibMeta} from "./LibMeta.sol";
import {IUniswapV2Factory, IUniswapV2Router02} from "../interfaces/INewToken.sol";



struct AppStorage {
    mapping(address => bool) validRouters; //parentOnly
    mapping(address => bool) allowedTokens; //parentOnly
    //this should be bool too
    mapping(address => address) launchedTokens; //parentOnly
    mapping(address => address) launchedPresale; //parentOnly
    //cost of launch, cost of promo, cost of setting socials is 2xpromoCostEth
    uint256 ethCost; //parentOnly
    uint256 deployyyyerCost; //parentOnly
    uint256 promoCostEth; //parentOnly
    uint256 promoCostDeployyyyer; //parentOnly
    address bridge; //parentOnly

    //mapping of user address to score
    mapping(address => uint256) myScore; //parentOnly

    //+1 for launch, +5 for liquidity add, +50 for lp burn, -100 for lp retrieve
    uint256 cScore; //cScore is transferred with ownership, cScore is deducted on lp retrieve

    
    //address deployyyyer;
    bool isParent;
    uint256 minLiq;
    //this can be a map with share and clain in a structure
    mapping(address => uint256) teamShare;
    mapping(address => uint256) teamClaim;
    
    uint256 teamBalance;

    uint256 cliffPeriod; //min 30days
    uint256 vestingPeriod;//min 1day max 10000 days avg 30days.


    mapping(address => bool)  isExTxLimit; //is excluded from transaction limit
    mapping(address => bool)  isExWaLimit; //is excluded from wallet limit
    mapping (address => uint256)  balances; //ERC20 balance
    mapping (address => mapping (address => uint256))  allowances; //ERC20 balance

    address payable taxWallet; //tax wallet for the token
    address payable deployyyyerCa; //deployyyyer contract address
    address payable stakingContract; //address of staking contract for the token
    address stakingFacet; //facet address, used to launch a staking pool
    address presaleFacet; //facet address, used to launch a presale
    address tokenFacet; //facet address, used to launch a ERC20 token
    uint256 stakingShare; //share of tax sent to its staking pool
    
    
    // Reduction Rules
    uint256  buyCount; 

    uint256 initTaxType; //0-time,1-buyCount,2-hybrid,3-none
    //interval*1, lastIntEnd+(interval*2), lastIntEnd+(interval*3)
    uint256 initInterval; //seconds 0-1 hour(if 1m: 1m, 3m, 6m, 10m)
    uint256 countInterval; //0-100 

    //current taxes
    uint256  taxBuy; 
    uint256  maxBuyTax; //40%
    uint256  minBuyTax; //0

    uint256  taxSell; 
    uint256  maxSellTax; //40%
    uint256  minSellTax; //0
    
    


    uint256  tradingOpened;

    // Token Information
    uint8   decimals;
    uint256   tTotal;
    string   name;
    string   symbol;

    // Contract Swap Rules 
    uint256 preventSwap; //50            
    uint256  taxSwapThreshold; //0.1%
    uint256  maxTaxSwap; //1%
    uint256  maxWallet; //1%
    uint256  maxTx;

    IUniswapV2Router02  uniswapV2Router;
    address  uniswapV2Pair;
    
    bool  tradingOpen; //true if liquidity pool is created
    bool  inSwap;
    bool  walletLimited;
    bool isFreeTier;
    bool isBurnt;
    bool isRetrieved;
    uint256 lockPeriod;
    
    //buy back tax calculations
    uint256 lpTax; //0-50 percent of tax amount 
    uint256 halfLp;
    uint256 lastSwap;

    uint256 presaleTs;
    uint256 presaleSt;
    address presale;

}

/*
library LibAppStorage {
    function diamondStorage() internal pure returns (AppStorage storage ds) {
        assembly {
            ds.slot := 0
        }
    }

    function abs(int256 x) internal pure returns (uint256) {
        return uint256(x >= 0 ? x : -x);
    }
}
*/


contract Modifiers {
    AppStorage internal s;

    modifier onlyOwner() {
        LibDiamond.enforceIsContractOwner();
        _;
    }  
    
}

File 8 of 8 : LibDiamond.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

/*********************************************************************************************\
* Authors: Nick Mudge <[email protected]> (https://twitter.com/mudgen), 
* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
/*********************************************************************************************/
import { IDiamondCut } from "../interfaces/IDiamondCut.sol";

library LibDiamond {
    bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage");

    struct DiamondStorage {
        // maps function selectors to the facets that execute the functions.
        // and maps the selectors to their position in the selectorSlots array.
        // func selector => address facet, selector position
        mapping(bytes4 => bytes32) facets;
        // array of slots of function selectors.
        // each slot holds 8 function selectors.
        mapping(uint256 => bytes32) selectorSlots;
        // The number of function selectors in selectorSlots
        uint16 selectorCount;
        // Used to query if a contract implements an interface.
        // Used to implement ERC-165.
        mapping(bytes4 => bool) supportedInterfaces;
        // owner of the contract
        address contractOwner;
    }

    function diamondStorage() internal pure returns (DiamondStorage storage ds) {
        bytes32 position = DIAMOND_STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
    }

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

    function setContractOwner(address _newOwner) internal {
        DiamondStorage storage ds = diamondStorage();
        address previousOwner = ds.contractOwner;
        ds.contractOwner = _newOwner;
        emit OwnershipTransferred(previousOwner, _newOwner);
    }

    function contractOwner() internal view returns (address contractOwner_) {
        contractOwner_ = diamondStorage().contractOwner;
    }

    function enforceIsContractOwner() internal view {
        require(msg.sender == diamondStorage().contractOwner, "l0");
    }

    //event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);

    //bytes32 constant CLEAR_ADDRESS_MASK = bytes32(uint256(0xffffffffffffffffffffffff));
    bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224));

    // Internal function version of diamondCut
    // This code is almost the same as the external diamondCut,
    // except it is using 'Facet[] memory _diamondCut' instead of
    // 'Facet[] calldata _diamondCut'.
    // The code is duplicated to prevent copying calldata to memory which
    // causes an error for a two dimensional array.
    // also removed action on _calldata and _init is always address(0)
    // maintained same old signature
    function diamondCut(
        IDiamondCut.FacetCut[] memory _diamondCut,
        address _init,
        bytes memory _calldata
    ) internal {
        DiamondStorage storage ds = diamondStorage();
        uint256 originalSelectorCount = ds.selectorCount;
        uint256 selectorCount = originalSelectorCount;
        bytes32 selectorSlot;
        // Check if last selector slot is not full
        // "selectorCount & 7" is a gas efficient modulo by eight "selectorCount % 8" 
        if (selectorCount & 7 > 0) {
            // get last selectorSlot
            // "selectorSlot >> 3" is a gas efficient division by 8 "selectorSlot / 8"
            selectorSlot = ds.selectorSlots[selectorCount >> 3];
        }
        // loop through diamond cut
        for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {
            (selectorCount, selectorSlot) = addReplaceRemoveFacetSelectors(
                selectorCount,
                selectorSlot,
                _diamondCut[facetIndex].facetAddress,
                _diamondCut[facetIndex].action,
                _diamondCut[facetIndex].functionSelectors
            );
        }
        if (selectorCount != originalSelectorCount) {
            ds.selectorCount = uint16(selectorCount);
        }
        // If last selector slot is not full
        // "selectorCount & 7" is a gas efficient modulo by eight "selectorCount % 8" 
        if (selectorCount & 7 > 0) {
            // "selectorSlot >> 3" is a gas efficient division by 8 "selectorSlot / 8"
            ds.selectorSlots[selectorCount >> 3] = selectorSlot;
        }
        //emit DiamondCut(_diamondCut, _init, _calldata);
        //initializeDiamondCut(_init, _calldata);
        require(_init == address(0), "l1");
        require(_calldata.length == 0, "l2");
    }

    //supports only add, maintaining lib fn name
    function addReplaceRemoveFacetSelectors(
        uint256 _selectorCount,
        bytes32 _selectorSlot,
        address _newFacetAddress,
        IDiamondCut.FacetCutAction _action,
        bytes4[] memory _selectors
    ) internal returns (uint256, bytes32) {
        DiamondStorage storage ds = diamondStorage();
        require(_selectors.length > 0, "l3");
        if (_action == IDiamondCut.FacetCutAction.Add) {
            enforceHasContractCode(_newFacetAddress, "l4");
            for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
                bytes4 selector = _selectors[selectorIndex];
                bytes32 oldFacet = ds.facets[selector];
                require(address(bytes20(oldFacet)) == address(0), "l5");
                // add facet for selector
                ds.facets[selector] = bytes20(_newFacetAddress) | bytes32(_selectorCount);
                // "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8" 
                uint256 selectorInSlotPosition = (_selectorCount & 7) << 5;
                // clear selector position in slot and add selector
                _selectorSlot = (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) | (bytes32(selector) >> selectorInSlotPosition);
                // if slot is full then write it to storage
                if (selectorInSlotPosition == 224) {
                    // "_selectorSlot >> 3" is a gas efficient division by 8 "_selectorSlot / 8"
                    ds.selectorSlots[_selectorCount >> 3] = _selectorSlot;
                    _selectorSlot = 0;
                }
                _selectorCount++;
            }
        } 
        else {
            revert("l6");
        }
        return (_selectorCount, _selectorSlot);
    }

    function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
        uint256 contractSize;
        assembly {
            contractSize := extcodesize(_contract)
        }
        require(contractSize > 0, _errorMessage);
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxWallet","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxTx","type":"uint256"}],"name":"IncreasedLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"presaleId","type":"address"}],"name":"PresaleAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"presaleId","type":"address"}],"name":"PresaleFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"presaleId","type":"address"}],"name":"PresaleRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakingMade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TaxGiven","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TaxMade","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"team1","type":"address"},{"internalType":"uint256","name":"team1p","type":"uint256"},{"internalType":"uint256","name":"cliffPeriod","type":"uint256"},{"internalType":"uint256","name":"vestingPeriod","type":"uint256"},{"internalType":"bool","name":"isAdd","type":"bool"}],"indexed":false,"internalType":"struct INewToken.TeamParams","name":"tparams","type":"tuple"}],"name":"TeamSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"liq","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockPeriod","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isBurnt","type":"bool"},{"indexed":false,"internalType":"address","name":"router","type":"address"}],"name":"TradingEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"presale","type":"address"},{"internalType":"uint256","name":"percent","type":"uint256"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"softcap","type":"uint256"},{"internalType":"uint256","name":"hardcap","type":"uint256"},{"internalType":"uint256","name":"startTs","type":"uint256"},{"internalType":"uint256","name":"finishTs","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"liqPercent","type":"uint256"},{"internalType":"uint256","name":"cliffPeriod","type":"uint256"},{"internalType":"uint256","name":"vestingPeriod","type":"uint256"},{"internalType":"uint256","name":"status","type":"uint256"},{"internalType":"uint256","name":"sold","type":"uint256"},{"internalType":"uint256","name":"maxEth","type":"uint256"},{"internalType":"uint256","name":"maxBag","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"}],"internalType":"struct IPresale.PresaleParams","name":"newdetails","type":"tuple"}],"name":"addPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"team1","type":"address"},{"internalType":"uint256","name":"team1p","type":"uint256"},{"internalType":"uint256","name":"cliffPeriod","type":"uint256"},{"internalType":"uint256","name":"vestingPeriod","type":"uint256"},{"internalType":"bool","name":"isAdd","type":"bool"}],"internalType":"struct INewToken.TeamParams","name":"params","type":"tuple"}],"name":"addTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxwallet","type":"uint256"},{"internalType":"uint256","name":"maxtx","type":"uint256"}],"name":"increaseLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockPeriod","type":"uint256"},{"internalType":"bool","name":"shouldBurn","type":"bool"},{"internalType":"address","name":"router","type":"address"}],"name":"startTrading","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50612e5e806100206000396000f3fe6080604052600436106100f35760003560e01c806387fc38b01161008a578063b5660a1811610059578063b5660a1814610296578063ccec3716146102ab578063db7c4dda146102cb578063dd62ed3e146102de57600080fd5b806387fc38b01461022c57806395d89b4114610241578063a9059cbb14610256578063b39956361461027657600080fd5b806323b872dd116100c657806323b872dd14610194578063313ce567146101b457806370a08231146101d657806378f8484b1461020c57600080fd5b806306fdde03146100f8578063095ea7b31461012357806318160ddd146101535780631bbd3a2414610172575b600080fd5b34801561010457600080fd5b5061010d610324565b60405161011a919061270f565b60405180910390f35b34801561012f57600080fd5b5061014361013e366004612783565b6103b9565b604051901515815260200161011a565b34801561015f57600080fd5b506029545b60405190815260200161011a565b34801561017e57600080fd5b5061019261018d3660046127e7565b6103d0565b005b3480156101a057600080fd5b506101436101af3660046128ee565b610a43565b3480156101c057600080fd5b5060285460405160ff909116815260200161011a565b3480156101e257600080fd5b506101646101f136600461292f565b6001600160a01b031660009081526014602052604090205490565b34801561021857600080fd5b5061019261022736600461294c565b610aec565b34801561023857600080fd5b50610192610c65565b34801561024d57600080fd5b5061010d610cec565b34801561026257600080fd5b50610143610271366004612783565b610cfe565b34801561028257600080fd5b5061019261029136600461297c565b610d0b565b3480156102a257600080fd5b50610192610fc1565b3480156102b757600080fd5b506101926102c636600461292f565b6110f3565b6101926102d9366004612a09565b611243565b3480156102ea57600080fd5b506101646102f9366004612a4b565b6001600160a01b03918216600090815260156020908152604080832093909416825291909152205490565b60606000602a01805461033690612a84565b80601f016020809104026020016040519081016040528092919081815260200182805461036290612a84565b80156103af5780601f10610384576101008083540402835291602001916103af565b820191906000526020600020905b81548152906001019060200180831161039257829003601f168201915b5050505050905090565b60006103c6338484611912565b5060015b92915050565b6103d8611999565b6039546001600160a01b03161580156103fb5750603254600160a01b900460ff16155b6104315760405162461bcd60e51b81526020600482015260026024820152611b8d60f21b60448201526064015b60405180910390fd5b601754604051637ee100e960e01b81526001600160a01b03858116600483015290911690637ee100e990602401602060405180830381865afa15801561047b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049f9190612abe565b6104d05760405162461bcd60e51b81526020600482015260026024820152616e3560f01b6044820152606401610428565b6000836001600160a01b0316634729376b6040518163ffffffff1660e01b81526004016101e060405180830381865afa158015610511573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105359190612ae6565b80519091506001600160a01b031633146105765760405162461bcd60e51b8152602060048201526002602482015261371b60f11b6044820152606401610428565b610140810151156105ae5760405162461bcd60e51b81526020600482015260026024820152616e3760f01b6044820152606401610428565b60208101516001600160a01b031630146105f05760405162461bcd60e51b81526020600482015260036024820152626e373760e81b6044820152606401610428565b603980546001600160a01b0319166001600160a01b03861617905560016038556064831080159061062357506107d08311155b6106545760405162461bcd60e51b81526020600482015260026024820152610dc760f31b6044820152606401610428565b60295461271090610666908590612bc5565b6106709190612bdc565b6001600160a01b038516600090815260146020526040808220839055308252812080549091906106a1908490612bfe565b90915550506001600160a01b0384166000908152601260209081526040808320805460ff199081166001908117909255601390935290832080549092161790556101c0830152603254600160b81b900460ff16156107025760056101c08301525b338252306020808401919091526001600160a01b038516600090815260149091526040902054606490610736906019612bc5565b6107409190612bdc565b6040808401919091526001600160a01b038516600090815260146020522054606083015260c082015160011180159061077e5750601e8260c0015111155b6107af5760405162461bcd60e51b81526020600482015260026024820152610dc760f31b6044820152606401610428565b60508260e00151101580156107c9575060648260e0015111155b6107fa5760405162461bcd60e51b81526020600482015260026024820152616e3960f01b6044820152606401610428565b6001826101000151101580156108165750601e82610100015111155b6108485760405162461bcd60e51b815260206004820152600360248201526206e31360ec1b6044820152606401610428565b6007826101200151101580156108645750601e82610120015111155b6108965760405162461bcd60e51b81526020600482015260036024820152626e313160e81b6044820152606401610428565b600161014083015260006101608301526101808201516108de5760405162461bcd60e51b815260206004820152600360248201526237189960e91b6044820152606401610428565b6000826101a0015111801561091c57506001600160a01b03841660009081526014602052604090205461091390600a90612bdc565b826101a0015111155b61094e5760405162461bcd60e51b81526020600482015260036024820152626e313360e81b6044820152606401610428565b6001600160a01b0384166000818152601460205260409081902054905130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9161099b91815260200190565b60405180910390a36040516001600160a01b03851681527f57912ba8c0e6f4971c7cf7b1195d044de75b190048ffcbdb303b7e900e23889c9060200160405180910390a160405163b73f349760e01b81526001600160a01b0385169063b73f349790610a0b908590600401612c11565b600060405180830381600087803b158015610a2557600080fd5b505af1158015610a39573d6000803e3d6000fd5b5050505050505050565b6001600160a01b0383166000908152601560209081526040808320338452909152812054821115610a9c5760405162461bcd60e51b81526020600482015260036024820152626e323560e81b6044820152606401610428565b6001600160a01b038416600090815260156020908152604080832033808552925290912054610ad7918691610ad2908690612bfe565b611912565b610ae28484846119fc565b5060019392505050565b610af4611999565b603254600160b01b900460ff16610b0a57600080fd5b602f54602954606490610b1e908590612bc5565b610b289190612bdc565b10158015610b37575060648211155b610b695760405162461bcd60e51b81526020600482015260036024820152626e323360e81b6044820152606401610428565b603054602954606490610b7d908490612bc5565b610b879190612bdc565b10158015610b96575060648111155b610bc85760405162461bcd60e51b81526020600482015260036024820152621b8c8d60ea1b6044820152606401610428565b602954606490610bd9908490612bc5565b610be39190612bdc565b602f55602954606490610bf7908390612bc5565b610c019190612bdc565b603055606482148015610c145750806064145b15610c27576032805460ff60b01b191690555b60408051838152602081018390527f3e470cf1ec3767d0209f5128c840997ff9b70dfe0da263b3f94eb114a05d932791015b60405180910390a15050565b6039546001600160a01b03163314610ca55760405162461bcd60e51b81526020600482015260036024820152621b8c4d60ea1b6044820152606401610428565b60026038556039546040516001600160a01b0390911681527f8e68a21b7f745fc7c6141ba863b6fcc09ca597604dc2c97bf15b27f9cff5817b9060200160405180910390a1565b60606000602b01805461033690612a84565b60006103c63384846119fc565b610d13611999565b603254600160a01b900460ff16158015610d2d5750603854155b610d3657600080fd5b6010541580610d49575060008160400151115b15610d935761271081604001511115610d8a5760405162461bcd60e51b81526020600482015260036024820152626e313960e81b6044820152606401610428565b60408101516010555b6011541580610da6575060008160600151115b15610df05761271081606001511115610de75760405162461bcd60e51b815260206004820152600360248201526206e32360ec1b6044820152606401610428565b60608101516011555b806080015115610e8357602081015160295461271091610e0f91612bc5565b610e199190612bdc565b81516001600160a01b03166000908152600d602052604081208054909190610e42908490612cd4565b9091555050602081015160295461271091610e5c91612bc5565b610e669190612bdc565b600f8054600090610e78908490612cd4565b90915550610f079050565b602081015160295461271091610e9891612bc5565b610ea29190612bdc565b81516001600160a01b03166000908152600d602052604081208054909190610ecb908490612bfe565b9091555050602081015160295461271091610ee591612bc5565b610eef9190612bdc565b600f8054600090610f01908490612bfe565b90915550505b602954606490610f18906014612bc5565b610f229190612bdc565b600f541115610f595760405162461bcd60e51b81526020600482015260036024820152626e323160e81b6044820152606401610428565b6040805182516001600160a01b031681526020808401519082015282820151818301526060808401519082015260808084015115159082015290517f67e3b136f8d98329b3ac411e1cee90cd3f43d8b1ac139de04f25f5a202599e9e9181900360a00190a150565b603254600160a01b900460ff16156110015760405162461bcd60e51b81526020600482015260036024820152626e313560e81b6044820152606401610428565b6039546001600160a01b031633146110415760405162461bcd60e51b815260206004820152600360248201526237189b60e91b6044820152606401610428565b6039546040516001600160a01b0390911681527f01723ead07ad409cf076908fdee180e82cc6c5bee2723b13cbc68bdc80a6c2469060200160405180910390a1600047116110b75760405162461bcd60e51b81526020600482015260036024820152626e313760e81b6044820152606401610428565b6039546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156110f0573d6000803e3d6000fd5b50565b6032546001600160a01b039081169082160361110e57600080fd5b306001600160a01b0382160361112357600080fd5b6016546040516370a0823160e01b81523060048201526001600160a01b038381169263a9059cbb9291169083906370a0823190602401602060405180830381865afa158015611176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119a9190612ce7565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156111e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112099190612abe565b61123b5760405162461bcd60e51b815260206004820152600360248201526237199960e91b6044820152606401610428565b6110f0611f1f565b61124b611999565b603254600160a01b900460ff161580156112685750603854600114155b6112995760405162461bcd60e51b81526020600482015260026024820152616e3160f01b6044820152606401610428565b600c544710156112d05760405162461bcd60e51b8152602060048201526002602482015261371960f11b6044820152606401610428565b816112e857600e8310156112e357600080fd5b611304565b60c86000600a0160008282546112fe9190612cd4565b90915550505b60326000600a01600082825461131a9190612cd4565b90915550506032805460ff60a01b1916600160a01b1790553060009081526012602081905260408220805460ff191660019081179091559161135a611fe7565b6001600160a01b03908116825260208083019390935260409182016000908120805495151560ff19968716179055603154821681526012845282812080548616600190811790915560175483168252838220805487168217905560165490921681528281208054861683179055308152601393849052918220805490941681179093556113e5611fe7565b6001600160a01b03908116825260208083019390935260409182016000908120805495151560ff1996871617905560315482168152601390935281832080548516600190811790915560175482168452828420805486168217905560165490911683529120805490921617905530821561147457506032805460ff60c01b1916600160c01b1790556000611487565b60338490556032805460ff60c01b191690555b600f543060009081526014602052604081205490916114a591612bfe565b42602755600b5490915060ff1661156c5760175460405163a992664760e01b81526001600160a01b0385811660048301529091169063a992664790602401602060405180830381865afa158015611500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115249190612abe565b61152d57600080fd5b603180546001600160a01b0319166001600160a01b03851690811790915560295430600090815260156020908152604080832094835293905291909120555b6031546040805163c45a015560e01b815290516001600160a01b039092169163c45a0155916004808201926020929091908290030181865afa1580156115b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115da9190612d00565b6001600160a01b031663c9c6539630600060310160009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561163f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116639190612d00565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156116b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d49190612d00565b603280546001600160a01b0319166001600160a01b039283169081178255600090815260136020908152604091829020805460ff1916600117905591548151908416815247928101929092528101879052851515606082015290841660808201527f0157a1a09a393e0b2567e699c9fafaa987dd8440f4b66795e9667d8749d7239e9060a00160405180910390a160325460315460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156117b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117dc9190612abe565b61180d5760405162461bcd60e51b81526020600482015260026024820152616e3360f01b6044820152606401610428565b6031546001600160a01b031663f305d7194730846000808861183042603c612cd4565b6040518863ffffffff1660e01b815260040161185196959493929190612d1d565b60606040518083038185885af115801561186f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906118949190612d58565b5050600b5460ff16905061190b57601754600a5460405163344676d360e21b815233600482015260248101919091526001600160a01b039091169063d119db4c90604401600060405180830381600087803b1580156118f257600080fd5b505af1158015611906573d6000803e3d6000fd5b505050505b5050505050565b6001600160a01b03831661192557600080fd5b6001600160a01b03821661193857600080fd5b6001600160a01b0383811660008181526015602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c600401546001600160a01b031633146119fa5760405162461bcd60e51b815260206004820152600260248201526106c360f41b6044820152606401610428565b565b6001600160a01b038316611a0f57600080fd5b6001600160a01b038216611a2257600080fd5b6001600160a01b038316600090815260146020526040902054811115611a705760405162461bcd60e51b8152602060048201526003602482015262371b1b60e91b6044820152606401610428565b603254600090600160a01b900460ff168015611a955750603254600160b01b900460ff165b8015611aba57506001600160a01b03841660009081526012602052604090205460ff16155b8015611adf57506001600160a01b03831660009081526012602052604090205460ff16155b15611b1c57603054821115611b1c5760405162461bcd60e51b815260206004820152600360248201526206e33360ec1b6044820152606401610428565b603254600160a01b900460ff168015611b3e5750603254600160b01b900460ff165b8015611b6357506001600160a01b03831660009081526013602052604090205460ff16155b15611bc357602f546001600160a01b038416600090815260146020526040902054611b8f908490612cd4565b1115611bc35760405162461bcd60e51b81526020600482015260036024820152626e333160e81b6044820152606401610428565b611bcb611fe7565b6001600160a01b0316846001600160a01b031614158015611c055750611bef611fe7565b6001600160a01b0316836001600160a01b031614155b15611cc8576032546001600160a01b038581169116148015611c3557506031546001600160a01b03848116911614155b15611c7657601d8054906000611c4a83612d86565b9190505550611c596001612015565b602154606490611c699084612bc5565b611c739190612bdc565b90505b6032546001600160a01b038481169116148015611c9c57506001600160a01b0384163014155b15611cc857611cab6000612015565b602454606490611cbb9084612bc5565b611cc59190612bdc565b90505b600f54306000908152601460205260408120549091611ce691612bfe565b603254909150600090600160a81b900460ff16158015611d1357506032546001600160a01b038681169116145b8015611d2857506001600160a01b0386163014155b8015611d355750602d5482115b8015611d445750602c54601d54115b15611d6d57611d60611d5b836000602e0154612217565b61222f565b611d69476123ec565b5060015b8215611de85730600090815260146020526040902054611d8e908490612cd4565b30600081815260146020526040908190209290925590516001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611ddf9087815260200190565b60405180910390a35b6001600160a01b038616600090815260146020526040902054611e0c908590612bfe565b6001600160a01b0380881660009081526014602052604080822093909355908716815220548390611e3e908690612cd4565b611e489190612bfe565b6001600160a01b0380871660008181526014602052604090209290925587167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef611e928688612bfe565b60405190815260200160405180910390a38015611f17576016546040805160208101909152600080825291611ed9916001600160a01b0390911690620186a09047906126f5565b90508015611f15576040514781527f2488b4123934dca0dca56f8f7005a71c0a52e2c9158fe31ac31869efe776d6eb9060200160405180910390a15b505b505050505050565b603254600160a81b900460ff16158015611f425750603254600160a01b900460ff165b156119fa574780156110f057611f57816123ec565b6016546040516000916001600160a01b03169047908381818185875af1925050503d8060008114611fa4576040519150601f19603f3d011682016040523d82523d6000602084013e611fa9565b606091505b505090508015611fe3576040514781527f2488b4123934dca0dca56f8f7005a71c0a52e2c9158fe31ac31869efe776d6eb90602001610c59565b5050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c1320546001600160a01b031690565b6000806000831561203457505060225460235460215491925090612044565b5050602554602654602454919250905b81811461221157601e546000036120f157601f546027546120659190612cd4565b42106120725750806121fb565b601f5461208190600290612bdc565b60275461208e9190612cd4565b42106120bb5760046120a08385612bfe565b6120aa9190612bdc565b6120b49083612cd4565b90506121fb565b601f546120ca90600490612bdc565b6027546120d79190612cd4565b42106120e95760026120a08385612bfe565b50815b6121fb565b601e5460010361212d57602054601d54111561210e575080612111565b50815b60275461212090611c20612cd4565b42106120ec5750806121fb565b601e546002036121f857602054601d5411806121585750601f546027546121549190612cd4565b4210155b156121645750806121fb565b60205461217390600290612bdc565b601d54118061219d5750601f5461218c90600290612bdc565b6027546121999190612cd4565b4210155b156121ae5760046120a08385612bfe565b6020546121bd90600490612bdc565b601d5411806121e75750601f546121d690600490612bdc565b6027546121e39190612cd4565b4210155b156120e95760026120a08385612bfe565b50805b831561220b576021819055612211565b60248190555b50505050565b60008183116122265782612228565b815b9392505050565b6032805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061227757612277612d9f565b6001600160a01b03928316602091820292909201810191909152603154604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156122d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f49190612d00565b8160018151811061230757612307612d9f565b6001600160a01b0390921660209283029190910190910152603454156123585760345460c8906123379084612bc5565b6123419190612bdc565b60358190556123509083612bfe565b603681905591505b6031546123709030906001600160a01b031684611912565b60315460405163791ac94760e01b81526001600160a01b039091169063791ac947906123a9908590600090869030904290600401612db5565b600060405180830381600087803b1580156123c357600080fd5b505af11580156123d7573d6000803e3d6000fd5b50506032805460ff60a81b1916905550505050565b603254600090819081908190600160b81b900460ff16801561241d57506027546276a7009061241b9042612bfe565b105b1561250257606461242f86600a612bc5565b6124399190612bdc565b93507f27becf433f6eafb15520b27cdc27123fc4bb3ab578777db9f713bd54da1611a68460405161246c91815260200190565b60405180910390a16017546040516000916001600160a01b03169086908381818185875af1925050503d80600081146124c1576040519150601f19603f3d011682016040523d82523d6000602084013e6124c6565b606091505b50509050806125005760405162461bcd60e51b8152600401610428906020808252600490820152636e73393960e01b604082015260600190565b505b60345415801590612514575060355415155b156125ec5760365460355461252a908790612bc5565b6125349190612bdc565b6035805460009182905560369190915560315491945091506125619030906001600160a01b031683611912565b6031546001600160a01b031663f305d7198430846000808361258442603c612cd4565b6040518863ffffffff1660e01b81526004016125a596959493929190612d1d565b60606040518083038185885af11580156125c3573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906125e89190612d58565b5050505b6018546001600160a01b03161561190b57601c546064908461260e8789612bfe565b6126189190612bfe565b6126229190612bc5565b61262c9190612bdc565b6018546040519193506000916001600160a01b039091169084908381818185875af1925050503d806000811461267e576040519150601f19603f3d011682016040523d82523d6000602084013e612683565b606091505b50509050806126ba5760405162461bcd60e51b81526020600482015260036024820152626e733960e81b6044820152606401610428565b6040518381527f3392b75a0721e4605be82daf22af3b927da9086deccc7dbb947b37bf895d3deb9060200160405180910390a1505050505050565b600080600080845160208601878a8af19695505050505050565b60006020808352835180602085015260005b8181101561273d57858101830151858201604001528201612721565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146110f057600080fd5b803561277e8161275e565b919050565b6000806040838503121561279657600080fd5b82356127a18161275e565b946020939093013593505050565b6040516101e0810167ffffffffffffffff811182821017156127e157634e487b7160e01b600052604160045260246000fd5b60405290565b60008060008385036102208112156127fe57600080fd5b84356128098161275e565b9350602085013592506101e0603f19820181131561282657600080fd5b61282e6127af565b915061283c60408701612773565b825261284a60608701612773565b60208301526080860135604083015260a0860135606083015260c0860135608083015260e086013560a08301526101008087013560c08401526101208088013560e085015261014080890135838601526101609250828901358286015261018091508189013581860152506101a080890135838601526101c09250828901358286015283890135818601525050610200870135818401525050809150509250925092565b60008060006060848603121561290357600080fd5b833561290e8161275e565b9250602084013561291e8161275e565b929592945050506040919091013590565b60006020828403121561294157600080fd5b81356122288161275e565b6000806040838503121561295f57600080fd5b50508035926020909101359150565b80151581146110f057600080fd5b600060a0828403121561298e57600080fd5b60405160a0810181811067ffffffffffffffff821117156129bf57634e487b7160e01b600052604160045260246000fd5b60405282356129cd8161275e565b8082525060208301356020820152604083013560408201526060830135606082015260808301356129fd8161296e565b60808201529392505050565b600080600060608486031215612a1e57600080fd5b833592506020840135612a308161296e565b91506040840135612a408161275e565b809150509250925092565b60008060408385031215612a5e57600080fd5b8235612a698161275e565b91506020830135612a798161275e565b809150509250929050565b600181811c90821680612a9857607f821691505b602082108103612ab857634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612ad057600080fd5b81516122288161296e565b805161277e8161275e565b60006101e08284031215612af957600080fd5b612b016127af565b612b0a83612adb565b8152612b1860208401612adb565b602082015260408381015190820152606080840151908201526080808401519082015260a0808401519082015260c0808401519082015260e08084015190820152610100808401519082015261012080840151908201526101408084015190820152610160808401519082015261018080840151908201526101a080840151908201526101c0928301519281019290925250919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176103ca576103ca612baf565b600082612bf957634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156103ca576103ca612baf565b81516001600160a01b031681526101e081016020830151612c3d60208401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e083015160e08301526101008084015181840152506101208084015181840152506101408084015181840152506101608084015181840152506101808084015181840152506101a08084015181840152506101c080840151818401525092915050565b808201808211156103ca576103ca612baf565b600060208284031215612cf957600080fd5b5051919050565b600060208284031215612d1257600080fd5b81516122288161275e565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b600080600060608486031215612d6d57600080fd5b8351925060208401519150604084015190509250925092565b600060018201612d9857612d98612baf565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b81811015612e075784516001600160a01b031683529383019391830191600101612de2565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220150f63b34ab0007f805ae8bea6144dc031afae1bef0191267c7b5c954be9808064736f6c63430008170033

Deployed Bytecode

0x6080604052600436106100f35760003560e01c806387fc38b01161008a578063b5660a1811610059578063b5660a1814610296578063ccec3716146102ab578063db7c4dda146102cb578063dd62ed3e146102de57600080fd5b806387fc38b01461022c57806395d89b4114610241578063a9059cbb14610256578063b39956361461027657600080fd5b806323b872dd116100c657806323b872dd14610194578063313ce567146101b457806370a08231146101d657806378f8484b1461020c57600080fd5b806306fdde03146100f8578063095ea7b31461012357806318160ddd146101535780631bbd3a2414610172575b600080fd5b34801561010457600080fd5b5061010d610324565b60405161011a919061270f565b60405180910390f35b34801561012f57600080fd5b5061014361013e366004612783565b6103b9565b604051901515815260200161011a565b34801561015f57600080fd5b506029545b60405190815260200161011a565b34801561017e57600080fd5b5061019261018d3660046127e7565b6103d0565b005b3480156101a057600080fd5b506101436101af3660046128ee565b610a43565b3480156101c057600080fd5b5060285460405160ff909116815260200161011a565b3480156101e257600080fd5b506101646101f136600461292f565b6001600160a01b031660009081526014602052604090205490565b34801561021857600080fd5b5061019261022736600461294c565b610aec565b34801561023857600080fd5b50610192610c65565b34801561024d57600080fd5b5061010d610cec565b34801561026257600080fd5b50610143610271366004612783565b610cfe565b34801561028257600080fd5b5061019261029136600461297c565b610d0b565b3480156102a257600080fd5b50610192610fc1565b3480156102b757600080fd5b506101926102c636600461292f565b6110f3565b6101926102d9366004612a09565b611243565b3480156102ea57600080fd5b506101646102f9366004612a4b565b6001600160a01b03918216600090815260156020908152604080832093909416825291909152205490565b60606000602a01805461033690612a84565b80601f016020809104026020016040519081016040528092919081815260200182805461036290612a84565b80156103af5780601f10610384576101008083540402835291602001916103af565b820191906000526020600020905b81548152906001019060200180831161039257829003601f168201915b5050505050905090565b60006103c6338484611912565b5060015b92915050565b6103d8611999565b6039546001600160a01b03161580156103fb5750603254600160a01b900460ff16155b6104315760405162461bcd60e51b81526020600482015260026024820152611b8d60f21b60448201526064015b60405180910390fd5b601754604051637ee100e960e01b81526001600160a01b03858116600483015290911690637ee100e990602401602060405180830381865afa15801561047b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049f9190612abe565b6104d05760405162461bcd60e51b81526020600482015260026024820152616e3560f01b6044820152606401610428565b6000836001600160a01b0316634729376b6040518163ffffffff1660e01b81526004016101e060405180830381865afa158015610511573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105359190612ae6565b80519091506001600160a01b031633146105765760405162461bcd60e51b8152602060048201526002602482015261371b60f11b6044820152606401610428565b610140810151156105ae5760405162461bcd60e51b81526020600482015260026024820152616e3760f01b6044820152606401610428565b60208101516001600160a01b031630146105f05760405162461bcd60e51b81526020600482015260036024820152626e373760e81b6044820152606401610428565b603980546001600160a01b0319166001600160a01b03861617905560016038556064831080159061062357506107d08311155b6106545760405162461bcd60e51b81526020600482015260026024820152610dc760f31b6044820152606401610428565b60295461271090610666908590612bc5565b6106709190612bdc565b6001600160a01b038516600090815260146020526040808220839055308252812080549091906106a1908490612bfe565b90915550506001600160a01b0384166000908152601260209081526040808320805460ff199081166001908117909255601390935290832080549092161790556101c0830152603254600160b81b900460ff16156107025760056101c08301525b338252306020808401919091526001600160a01b038516600090815260149091526040902054606490610736906019612bc5565b6107409190612bdc565b6040808401919091526001600160a01b038516600090815260146020522054606083015260c082015160011180159061077e5750601e8260c0015111155b6107af5760405162461bcd60e51b81526020600482015260026024820152610dc760f31b6044820152606401610428565b60508260e00151101580156107c9575060648260e0015111155b6107fa5760405162461bcd60e51b81526020600482015260026024820152616e3960f01b6044820152606401610428565b6001826101000151101580156108165750601e82610100015111155b6108485760405162461bcd60e51b815260206004820152600360248201526206e31360ec1b6044820152606401610428565b6007826101200151101580156108645750601e82610120015111155b6108965760405162461bcd60e51b81526020600482015260036024820152626e313160e81b6044820152606401610428565b600161014083015260006101608301526101808201516108de5760405162461bcd60e51b815260206004820152600360248201526237189960e91b6044820152606401610428565b6000826101a0015111801561091c57506001600160a01b03841660009081526014602052604090205461091390600a90612bdc565b826101a0015111155b61094e5760405162461bcd60e51b81526020600482015260036024820152626e313360e81b6044820152606401610428565b6001600160a01b0384166000818152601460205260409081902054905130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9161099b91815260200190565b60405180910390a36040516001600160a01b03851681527f57912ba8c0e6f4971c7cf7b1195d044de75b190048ffcbdb303b7e900e23889c9060200160405180910390a160405163b73f349760e01b81526001600160a01b0385169063b73f349790610a0b908590600401612c11565b600060405180830381600087803b158015610a2557600080fd5b505af1158015610a39573d6000803e3d6000fd5b5050505050505050565b6001600160a01b0383166000908152601560209081526040808320338452909152812054821115610a9c5760405162461bcd60e51b81526020600482015260036024820152626e323560e81b6044820152606401610428565b6001600160a01b038416600090815260156020908152604080832033808552925290912054610ad7918691610ad2908690612bfe565b611912565b610ae28484846119fc565b5060019392505050565b610af4611999565b603254600160b01b900460ff16610b0a57600080fd5b602f54602954606490610b1e908590612bc5565b610b289190612bdc565b10158015610b37575060648211155b610b695760405162461bcd60e51b81526020600482015260036024820152626e323360e81b6044820152606401610428565b603054602954606490610b7d908490612bc5565b610b879190612bdc565b10158015610b96575060648111155b610bc85760405162461bcd60e51b81526020600482015260036024820152621b8c8d60ea1b6044820152606401610428565b602954606490610bd9908490612bc5565b610be39190612bdc565b602f55602954606490610bf7908390612bc5565b610c019190612bdc565b603055606482148015610c145750806064145b15610c27576032805460ff60b01b191690555b60408051838152602081018390527f3e470cf1ec3767d0209f5128c840997ff9b70dfe0da263b3f94eb114a05d932791015b60405180910390a15050565b6039546001600160a01b03163314610ca55760405162461bcd60e51b81526020600482015260036024820152621b8c4d60ea1b6044820152606401610428565b60026038556039546040516001600160a01b0390911681527f8e68a21b7f745fc7c6141ba863b6fcc09ca597604dc2c97bf15b27f9cff5817b9060200160405180910390a1565b60606000602b01805461033690612a84565b60006103c63384846119fc565b610d13611999565b603254600160a01b900460ff16158015610d2d5750603854155b610d3657600080fd5b6010541580610d49575060008160400151115b15610d935761271081604001511115610d8a5760405162461bcd60e51b81526020600482015260036024820152626e313960e81b6044820152606401610428565b60408101516010555b6011541580610da6575060008160600151115b15610df05761271081606001511115610de75760405162461bcd60e51b815260206004820152600360248201526206e32360ec1b6044820152606401610428565b60608101516011555b806080015115610e8357602081015160295461271091610e0f91612bc5565b610e199190612bdc565b81516001600160a01b03166000908152600d602052604081208054909190610e42908490612cd4565b9091555050602081015160295461271091610e5c91612bc5565b610e669190612bdc565b600f8054600090610e78908490612cd4565b90915550610f079050565b602081015160295461271091610e9891612bc5565b610ea29190612bdc565b81516001600160a01b03166000908152600d602052604081208054909190610ecb908490612bfe565b9091555050602081015160295461271091610ee591612bc5565b610eef9190612bdc565b600f8054600090610f01908490612bfe565b90915550505b602954606490610f18906014612bc5565b610f229190612bdc565b600f541115610f595760405162461bcd60e51b81526020600482015260036024820152626e323160e81b6044820152606401610428565b6040805182516001600160a01b031681526020808401519082015282820151818301526060808401519082015260808084015115159082015290517f67e3b136f8d98329b3ac411e1cee90cd3f43d8b1ac139de04f25f5a202599e9e9181900360a00190a150565b603254600160a01b900460ff16156110015760405162461bcd60e51b81526020600482015260036024820152626e313560e81b6044820152606401610428565b6039546001600160a01b031633146110415760405162461bcd60e51b815260206004820152600360248201526237189b60e91b6044820152606401610428565b6039546040516001600160a01b0390911681527f01723ead07ad409cf076908fdee180e82cc6c5bee2723b13cbc68bdc80a6c2469060200160405180910390a1600047116110b75760405162461bcd60e51b81526020600482015260036024820152626e313760e81b6044820152606401610428565b6039546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156110f0573d6000803e3d6000fd5b50565b6032546001600160a01b039081169082160361110e57600080fd5b306001600160a01b0382160361112357600080fd5b6016546040516370a0823160e01b81523060048201526001600160a01b038381169263a9059cbb9291169083906370a0823190602401602060405180830381865afa158015611176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119a9190612ce7565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156111e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112099190612abe565b61123b5760405162461bcd60e51b815260206004820152600360248201526237199960e91b6044820152606401610428565b6110f0611f1f565b61124b611999565b603254600160a01b900460ff161580156112685750603854600114155b6112995760405162461bcd60e51b81526020600482015260026024820152616e3160f01b6044820152606401610428565b600c544710156112d05760405162461bcd60e51b8152602060048201526002602482015261371960f11b6044820152606401610428565b816112e857600e8310156112e357600080fd5b611304565b60c86000600a0160008282546112fe9190612cd4565b90915550505b60326000600a01600082825461131a9190612cd4565b90915550506032805460ff60a01b1916600160a01b1790553060009081526012602081905260408220805460ff191660019081179091559161135a611fe7565b6001600160a01b03908116825260208083019390935260409182016000908120805495151560ff19968716179055603154821681526012845282812080548616600190811790915560175483168252838220805487168217905560165490921681528281208054861683179055308152601393849052918220805490941681179093556113e5611fe7565b6001600160a01b03908116825260208083019390935260409182016000908120805495151560ff1996871617905560315482168152601390935281832080548516600190811790915560175482168452828420805486168217905560165490911683529120805490921617905530821561147457506032805460ff60c01b1916600160c01b1790556000611487565b60338490556032805460ff60c01b191690555b600f543060009081526014602052604081205490916114a591612bfe565b42602755600b5490915060ff1661156c5760175460405163a992664760e01b81526001600160a01b0385811660048301529091169063a992664790602401602060405180830381865afa158015611500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115249190612abe565b61152d57600080fd5b603180546001600160a01b0319166001600160a01b03851690811790915560295430600090815260156020908152604080832094835293905291909120555b6031546040805163c45a015560e01b815290516001600160a01b039092169163c45a0155916004808201926020929091908290030181865afa1580156115b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115da9190612d00565b6001600160a01b031663c9c6539630600060310160009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561163f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116639190612d00565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156116b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d49190612d00565b603280546001600160a01b0319166001600160a01b039283169081178255600090815260136020908152604091829020805460ff1916600117905591548151908416815247928101929092528101879052851515606082015290841660808201527f0157a1a09a393e0b2567e699c9fafaa987dd8440f4b66795e9667d8749d7239e9060a00160405180910390a160325460315460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156117b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117dc9190612abe565b61180d5760405162461bcd60e51b81526020600482015260026024820152616e3360f01b6044820152606401610428565b6031546001600160a01b031663f305d7194730846000808861183042603c612cd4565b6040518863ffffffff1660e01b815260040161185196959493929190612d1d565b60606040518083038185885af115801561186f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906118949190612d58565b5050600b5460ff16905061190b57601754600a5460405163344676d360e21b815233600482015260248101919091526001600160a01b039091169063d119db4c90604401600060405180830381600087803b1580156118f257600080fd5b505af1158015611906573d6000803e3d6000fd5b505050505b5050505050565b6001600160a01b03831661192557600080fd5b6001600160a01b03821661193857600080fd5b6001600160a01b0383811660008181526015602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c600401546001600160a01b031633146119fa5760405162461bcd60e51b815260206004820152600260248201526106c360f41b6044820152606401610428565b565b6001600160a01b038316611a0f57600080fd5b6001600160a01b038216611a2257600080fd5b6001600160a01b038316600090815260146020526040902054811115611a705760405162461bcd60e51b8152602060048201526003602482015262371b1b60e91b6044820152606401610428565b603254600090600160a01b900460ff168015611a955750603254600160b01b900460ff165b8015611aba57506001600160a01b03841660009081526012602052604090205460ff16155b8015611adf57506001600160a01b03831660009081526012602052604090205460ff16155b15611b1c57603054821115611b1c5760405162461bcd60e51b815260206004820152600360248201526206e33360ec1b6044820152606401610428565b603254600160a01b900460ff168015611b3e5750603254600160b01b900460ff165b8015611b6357506001600160a01b03831660009081526013602052604090205460ff16155b15611bc357602f546001600160a01b038416600090815260146020526040902054611b8f908490612cd4565b1115611bc35760405162461bcd60e51b81526020600482015260036024820152626e333160e81b6044820152606401610428565b611bcb611fe7565b6001600160a01b0316846001600160a01b031614158015611c055750611bef611fe7565b6001600160a01b0316836001600160a01b031614155b15611cc8576032546001600160a01b038581169116148015611c3557506031546001600160a01b03848116911614155b15611c7657601d8054906000611c4a83612d86565b9190505550611c596001612015565b602154606490611c699084612bc5565b611c739190612bdc565b90505b6032546001600160a01b038481169116148015611c9c57506001600160a01b0384163014155b15611cc857611cab6000612015565b602454606490611cbb9084612bc5565b611cc59190612bdc565b90505b600f54306000908152601460205260408120549091611ce691612bfe565b603254909150600090600160a81b900460ff16158015611d1357506032546001600160a01b038681169116145b8015611d2857506001600160a01b0386163014155b8015611d355750602d5482115b8015611d445750602c54601d54115b15611d6d57611d60611d5b836000602e0154612217565b61222f565b611d69476123ec565b5060015b8215611de85730600090815260146020526040902054611d8e908490612cd4565b30600081815260146020526040908190209290925590516001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611ddf9087815260200190565b60405180910390a35b6001600160a01b038616600090815260146020526040902054611e0c908590612bfe565b6001600160a01b0380881660009081526014602052604080822093909355908716815220548390611e3e908690612cd4565b611e489190612bfe565b6001600160a01b0380871660008181526014602052604090209290925587167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef611e928688612bfe565b60405190815260200160405180910390a38015611f17576016546040805160208101909152600080825291611ed9916001600160a01b0390911690620186a09047906126f5565b90508015611f15576040514781527f2488b4123934dca0dca56f8f7005a71c0a52e2c9158fe31ac31869efe776d6eb9060200160405180910390a15b505b505050505050565b603254600160a81b900460ff16158015611f425750603254600160a01b900460ff165b156119fa574780156110f057611f57816123ec565b6016546040516000916001600160a01b03169047908381818185875af1925050503d8060008114611fa4576040519150601f19603f3d011682016040523d82523d6000602084013e611fa9565b606091505b505090508015611fe3576040514781527f2488b4123934dca0dca56f8f7005a71c0a52e2c9158fe31ac31869efe776d6eb90602001610c59565b5050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c1320546001600160a01b031690565b6000806000831561203457505060225460235460215491925090612044565b5050602554602654602454919250905b81811461221157601e546000036120f157601f546027546120659190612cd4565b42106120725750806121fb565b601f5461208190600290612bdc565b60275461208e9190612cd4565b42106120bb5760046120a08385612bfe565b6120aa9190612bdc565b6120b49083612cd4565b90506121fb565b601f546120ca90600490612bdc565b6027546120d79190612cd4565b42106120e95760026120a08385612bfe565b50815b6121fb565b601e5460010361212d57602054601d54111561210e575080612111565b50815b60275461212090611c20612cd4565b42106120ec5750806121fb565b601e546002036121f857602054601d5411806121585750601f546027546121549190612cd4565b4210155b156121645750806121fb565b60205461217390600290612bdc565b601d54118061219d5750601f5461218c90600290612bdc565b6027546121999190612cd4565b4210155b156121ae5760046120a08385612bfe565b6020546121bd90600490612bdc565b601d5411806121e75750601f546121d690600490612bdc565b6027546121e39190612cd4565b4210155b156120e95760026120a08385612bfe565b50805b831561220b576021819055612211565b60248190555b50505050565b60008183116122265782612228565b815b9392505050565b6032805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061227757612277612d9f565b6001600160a01b03928316602091820292909201810191909152603154604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156122d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f49190612d00565b8160018151811061230757612307612d9f565b6001600160a01b0390921660209283029190910190910152603454156123585760345460c8906123379084612bc5565b6123419190612bdc565b60358190556123509083612bfe565b603681905591505b6031546123709030906001600160a01b031684611912565b60315460405163791ac94760e01b81526001600160a01b039091169063791ac947906123a9908590600090869030904290600401612db5565b600060405180830381600087803b1580156123c357600080fd5b505af11580156123d7573d6000803e3d6000fd5b50506032805460ff60a81b1916905550505050565b603254600090819081908190600160b81b900460ff16801561241d57506027546276a7009061241b9042612bfe565b105b1561250257606461242f86600a612bc5565b6124399190612bdc565b93507f27becf433f6eafb15520b27cdc27123fc4bb3ab578777db9f713bd54da1611a68460405161246c91815260200190565b60405180910390a16017546040516000916001600160a01b03169086908381818185875af1925050503d80600081146124c1576040519150601f19603f3d011682016040523d82523d6000602084013e6124c6565b606091505b50509050806125005760405162461bcd60e51b8152600401610428906020808252600490820152636e73393960e01b604082015260600190565b505b60345415801590612514575060355415155b156125ec5760365460355461252a908790612bc5565b6125349190612bdc565b6035805460009182905560369190915560315491945091506125619030906001600160a01b031683611912565b6031546001600160a01b031663f305d7198430846000808361258442603c612cd4565b6040518863ffffffff1660e01b81526004016125a596959493929190612d1d565b60606040518083038185885af11580156125c3573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906125e89190612d58565b5050505b6018546001600160a01b03161561190b57601c546064908461260e8789612bfe565b6126189190612bfe565b6126229190612bc5565b61262c9190612bdc565b6018546040519193506000916001600160a01b039091169084908381818185875af1925050503d806000811461267e576040519150601f19603f3d011682016040523d82523d6000602084013e612683565b606091505b50509050806126ba5760405162461bcd60e51b81526020600482015260036024820152626e733960e81b6044820152606401610428565b6040518381527f3392b75a0721e4605be82daf22af3b927da9086deccc7dbb947b37bf895d3deb9060200160405180910390a1505050505050565b600080600080845160208601878a8af19695505050505050565b60006020808352835180602085015260005b8181101561273d57858101830151858201604001528201612721565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146110f057600080fd5b803561277e8161275e565b919050565b6000806040838503121561279657600080fd5b82356127a18161275e565b946020939093013593505050565b6040516101e0810167ffffffffffffffff811182821017156127e157634e487b7160e01b600052604160045260246000fd5b60405290565b60008060008385036102208112156127fe57600080fd5b84356128098161275e565b9350602085013592506101e0603f19820181131561282657600080fd5b61282e6127af565b915061283c60408701612773565b825261284a60608701612773565b60208301526080860135604083015260a0860135606083015260c0860135608083015260e086013560a08301526101008087013560c08401526101208088013560e085015261014080890135838601526101609250828901358286015261018091508189013581860152506101a080890135838601526101c09250828901358286015283890135818601525050610200870135818401525050809150509250925092565b60008060006060848603121561290357600080fd5b833561290e8161275e565b9250602084013561291e8161275e565b929592945050506040919091013590565b60006020828403121561294157600080fd5b81356122288161275e565b6000806040838503121561295f57600080fd5b50508035926020909101359150565b80151581146110f057600080fd5b600060a0828403121561298e57600080fd5b60405160a0810181811067ffffffffffffffff821117156129bf57634e487b7160e01b600052604160045260246000fd5b60405282356129cd8161275e565b8082525060208301356020820152604083013560408201526060830135606082015260808301356129fd8161296e565b60808201529392505050565b600080600060608486031215612a1e57600080fd5b833592506020840135612a308161296e565b91506040840135612a408161275e565b809150509250925092565b60008060408385031215612a5e57600080fd5b8235612a698161275e565b91506020830135612a798161275e565b809150509250929050565b600181811c90821680612a9857607f821691505b602082108103612ab857634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612ad057600080fd5b81516122288161296e565b805161277e8161275e565b60006101e08284031215612af957600080fd5b612b016127af565b612b0a83612adb565b8152612b1860208401612adb565b602082015260408381015190820152606080840151908201526080808401519082015260a0808401519082015260c0808401519082015260e08084015190820152610100808401519082015261012080840151908201526101408084015190820152610160808401519082015261018080840151908201526101a080840151908201526101c0928301519281019290925250919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176103ca576103ca612baf565b600082612bf957634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156103ca576103ca612baf565b81516001600160a01b031681526101e081016020830151612c3d60208401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e083015160e08301526101008084015181840152506101208084015181840152506101408084015181840152506101608084015181840152506101808084015181840152506101a08084015181840152506101c080840151818401525092915050565b808201808211156103ca576103ca612baf565b600060208284031215612cf957600080fd5b5051919050565b600060208284031215612d1257600080fd5b81516122288161275e565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b600080600060608486031215612d6d57600080fd5b8351925060208401519150604084015190509250925092565b600060018201612d9857612d98612baf565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b81811015612e075784516001600160a01b031683529383019391830191600101612de2565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220150f63b34ab0007f805ae8bea6144dc031afae1bef0191267c7b5c954be9808064736f6c63430008170033

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

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.