ETH Price: $3,333.18 (-0.47%)
 
Transaction Hash
Method
Block
From
To
Set Treasury188162912023-12-18 23:57:35379 days ago1702943855IN
0xd6A74757...884e3cc56
0 ETH0.0012705343.55307571
Remove Liquidity179063372023-08-13 13:48:47506 days ago1691934527IN
0xd6A74757...884e3cc56
0 ETH0.0087191918.35527594
Remove Liquidity178816582023-08-10 2:57:47510 days ago1691636267IN
0xd6A74757...884e3cc56
0 ETH0.0106024521.95143657
Remove Liquidity178730702023-08-08 22:06:47511 days ago1691532407IN
0xd6A74757...884e3cc56
0 ETH0.0099625432.12956421
Remove Liquidity178595872023-08-07 0:49:35513 days ago1691369375IN
0xd6A74757...884e3cc56
0 ETH0.0058522812.64352468
Add Liquidity ET...178197912023-08-01 11:15:59518 days ago1690888559IN
0xd6A74757...884e3cc56
0.26 ETH0.0066903415.81971678
Remove Liquidity178091092023-07-30 23:26:59520 days ago1690759619IN
0xd6A74757...884e3cc56
0 ETH0.0047703414.61202568
Remove Liquidity178090722023-07-30 23:19:35520 days ago1690759175IN
0xd6A74757...884e3cc56
0 ETH0.005371516.45439418
Remove Liquidity176666282023-07-10 23:50:35540 days ago1689033035IN
0xd6A74757...884e3cc56
0 ETH0.006050120.91645315
Add Liquidity ET...176154892023-07-03 19:23:35547 days ago1688412215IN
0xd6A74757...884e3cc56
0.06479479 ETH0.0227004326.76105207
Update Wallet A176036502023-07-02 3:27:35549 days ago1688268455IN
0xd6A74757...884e3cc56
0 ETH0.0004059513.38807376
Add Liquidity ET...175548102023-06-25 6:47:35555 days ago1687675655IN
0xd6A74757...884e3cc56
0.25701456 ETH0.0084353418.69153625
Remove Liquidity175401852023-06-23 5:24:59558 days ago1687497899IN
0xd6A74757...884e3cc56
0 ETH0.0048096517.46195298
Remove Liquidity175386922023-06-23 0:22:59558 days ago1687479779IN
0xd6A74757...884e3cc56
0 ETH0.0082306413.48600654
Remove Liquidity175164862023-06-19 21:34:11561 days ago1687210451IN
0xd6A74757...884e3cc56
0 ETH0.007589319.12982909
Remove Liquidity175053372023-06-18 7:59:23562 days ago1687075163IN
0xd6A74757...884e3cc56
0 ETH0.0086093320.80423735
Remove Liquidity174889052023-06-16 0:41:47565 days ago1686876107IN
0xd6A74757...884e3cc56
0 ETH0.0061115915.34963219
Remove Liquidity174810662023-06-14 22:12:35566 days ago1686780755IN
0xd6A74757...884e3cc56
0 ETH0.014570736.72737161
Remove Liquidity173977422023-06-03 4:20:23578 days ago1685766023IN
0xd6A74757...884e3cc56
0 ETH0.0162617726.64413964
Remove Liquidity173780372023-05-31 9:42:35580 days ago1685526155IN
0xd6A74757...884e3cc56
0 ETH0.0172039635.09065879
Remove Liquidity173656212023-05-29 15:46:23582 days ago1685375183IN
0xd6A74757...884e3cc56
0 ETH0.0186733946.90074635
Remove Liquidity173645632023-05-29 12:12:11582 days ago1685362331IN
0xd6A74757...884e3cc56
0 ETH0.0193186438.50545577
Add Liquidity ET...173590502023-05-28 17:37:47583 days ago1685295467IN
0xd6A74757...884e3cc56
6.14494459 ETH0.0317855236.73624451
Remove Liquidity173406572023-05-26 3:38:47586 days ago1685072327IN
0xd6A74757...884e3cc56
0 ETH0.0117693134.21163578
Remove Liquidity173385672023-05-25 20:35:47586 days ago1685046947IN
0xd6A74757...884e3cc56
0 ETH0.0150465331
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
178197912023-08-01 11:15:59518 days ago1690888559
0xd6A74757...884e3cc56
0.0026 ETH
178197912023-08-01 11:15:59518 days ago1690888559
0xd6A74757...884e3cc56
1 wei
178197912023-08-01 11:15:59518 days ago1690888559
0xd6A74757...884e3cc56
0.2574 ETH
176154892023-07-03 19:23:35547 days ago1688412215
0xd6A74757...884e3cc56
0.00078945 ETH
176154892023-07-03 19:23:35547 days ago1688412215
0xd6A74757...884e3cc56
0.0001415 ETH
176154892023-07-03 19:23:35547 days ago1688412215
0xd6A74757...884e3cc56
0.06414684 ETH
175548102023-06-25 6:47:35555 days ago1687675655
0xd6A74757...884e3cc56
0.00257014 ETH
175548102023-06-25 6:47:35555 days ago1687675655
0xd6A74757...884e3cc56
0.25444442 ETH
173590502023-05-28 17:37:47583 days ago1685295467
0xd6A74757...884e3cc56
0.06144944 ETH
173590502023-05-28 17:37:47583 days ago1685295467
0xd6A74757...884e3cc56
6.08349515 ETH
173266552023-05-24 4:23:23588 days ago1684902203
0xd6A74757...884e3cc56
0.00282207 ETH
173266552023-05-24 4:23:23588 days ago1684902203
0xd6A74757...884e3cc56
0.00234777 ETH
173266552023-05-24 4:23:23588 days ago1684902203
0xd6A74757...884e3cc56
0.04695549 ETH
172986512023-05-20 5:46:59592 days ago1684561619
0xd6A74757...884e3cc56
0.00024149 ETH
172986512023-05-20 5:46:59592 days ago1684561619
0xd6A74757...884e3cc56
0.02390798 ETH
172983242023-05-20 4:40:47592 days ago1684557647
0xd6A74757...884e3cc56
0.00322328 ETH
172983242023-05-20 4:40:47592 days ago1684557647
0xd6A74757...884e3cc56
0.3191055 ETH
172836872023-05-18 3:11:47594 days ago1684379507
0xd6A74757...884e3cc56
0.00289846 ETH
172836872023-05-18 3:11:47594 days ago1684379507
0xd6A74757...884e3cc56
0.28694832 ETH
172764572023-05-17 2:39:47595 days ago1684291187
0xd6A74757...884e3cc56
0.00184004 ETH
172764572023-05-17 2:39:47595 days ago1684291187
0xd6A74757...884e3cc56
0.18216423 ETH
172297972023-05-10 11:46:11601 days ago1683719171
0xd6A74757...884e3cc56
0.01050685 ETH
172297972023-05-10 11:46:11601 days ago1683719171
0xd6A74757...884e3cc56
0 ETH
172297972023-05-10 11:46:11601 days ago1683719171
0xd6A74757...884e3cc56
1.04017815 ETH
172229672023-05-09 12:43:35602 days ago1683636215
0xd6A74757...884e3cc56
0.00498413 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BrewlabsLiquidityManager

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 12 : BrewlabsLiquidityManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./libs/IUniFactory.sol";
import "./libs/IUniRouter02.sol";
import "./libs/IWETH.sol";

contract BrewlabsLiquidityManager is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    address public uniRouterAddress;

    uint256 public fee = 100; // 1%
    address public treasury = 0xE1f1dd010BBC2860F81c8F90Ea4E38dB949BB16F;
    address public walletA = 0xE1f1dd010BBC2860F81c8F90Ea4E38dB949BB16F;

    address public wethAddress;
    address[] public wethToBrewsPath;
    uint256 public slippageFactor = 9500; // 5% default slippage tolerance
    uint256 public constant slippageFactorUL = 8000;
    
    bool public buyBackBurn = false;
    uint256 public buyBackLimit = 1 ether;
    address public constant buyBackAddress = 0xE1f1dd010BBC2860F81c8F90Ea4E38dB949BB16F;
    
    event WalletAUpdated(address _addr);
    event FeeUpdated(uint256 _fee);
    event BuyBackStatusChanged(bool _status);
    event BuyBackLimitUpdated(uint256 _limit);
    event AdminTokenRecovered(address tokenRecovered, uint256 amount);

    constructor() {}

    function initialize(
        address _uniRouterAddress,
        address[] memory _wethToBrewsPath
    ) external onlyOwner {
        require(_uniRouterAddress != address(0x0), "Invalid address");
        
        uniRouterAddress = _uniRouterAddress;
        wethToBrewsPath = _wethToBrewsPath;

        wethAddress = IUniRouter02(uniRouterAddress).WETH();
    }

    function addLiquidity(address token0, address token1, uint256 _amount0, uint256 _amount1, uint256 _slipPage) external payable nonReentrant returns (uint256 amountA, uint256 amountB, uint256 liquidity) {
        require(_amount0 > 0 && _amount1 > 0, "amount is zero");
        require(_slipPage < 10000, "slippage cannot exceed 100%");
        require(token0 != token1, "cannot use same token for pair");

        uint256 beforeAmt = IERC20(token0).balanceOf(address(this));
        IERC20(token0).transferFrom(msg.sender, address(this), _amount0);
        uint256 token0Amt = IERC20(token0).balanceOf(address(this)).sub(beforeAmt);
        token0Amt = token0Amt.mul(10000 - fee).div(10000);

        beforeAmt = IERC20(token1).balanceOf(address(this));
        IERC20(token1).transferFrom(msg.sender, address(this), _amount1);
        uint256 token1Amt = IERC20(token1).balanceOf(address(this)).sub(beforeAmt);
        token1Amt = token1Amt.mul(10000 - fee).div(10000);
        
        (amountA, amountB, liquidity) = _addLiquidity( token0, token1, token0Amt, token1Amt, _slipPage);

        token0Amt = IERC20(token0).balanceOf(address(this));
        token1Amt = IERC20(token1).balanceOf(address(this));
        IERC20(token0).transfer(walletA, token0Amt);
        IERC20(token1).transfer(walletA, token1Amt);
    }

    function _addLiquidity(address token0, address token1, uint256 _amount0, uint256 _amount1, uint256 _slipPage) internal returns (uint256, uint256, uint256) {
        IERC20(token0).safeIncreaseAllowance(uniRouterAddress, _amount0);
        IERC20(token1).safeIncreaseAllowance(uniRouterAddress, _amount1);

        return IUniRouter02(uniRouterAddress).addLiquidity(
                token0,
                token1,
                _amount0,
                _amount1,
                _amount0.mul(10000 - _slipPage).div(10000),
                _amount1.mul(10000 - _slipPage).div(10000),
                msg.sender,
                block.timestamp.add(600)
            );
    }

    function addLiquidityETH(address token, uint256 _amount, uint256 _slipPage) external payable nonReentrant returns (uint256 amountToken, uint256 amountETH, uint256 liquidity) {
        require(_amount > 0, "amount is zero");
        require(_slipPage < 10000, "slippage cannot exceed 100%");
        require(msg.value > 0, "amount is zero");

        uint256 beforeAmt = IERC20(token).balanceOf(address(this));
        IERC20(token).transferFrom(msg.sender, address(this), _amount);
        uint256 tokenAmt = IERC20(token).balanceOf(address(this)).sub(beforeAmt);
        tokenAmt = tokenAmt.mul(10000 - fee).div(10000);

        uint256 ethAmt = msg.value;
        ethAmt = ethAmt.mul(10000 - fee).div(10000);
    
        IERC20(token).safeIncreaseAllowance(uniRouterAddress, tokenAmt);        
        (amountToken, amountETH, liquidity) = _addLiquidityETH(token, tokenAmt, ethAmt, _slipPage);

        tokenAmt = IERC20(token).balanceOf(address(this));
        IERC20(token).transfer(walletA, tokenAmt);

        if(buyBackBurn) {
            buyBack();
        } else {
            ethAmt = address(this).balance;
            payable(treasury).transfer(ethAmt);
        }
    }

    function _addLiquidityETH(address token, uint256 _amount, uint256 _ethAmt, uint256 _slipPage) internal returns (uint256, uint256, uint256) {
        IERC20(token).safeIncreaseAllowance(uniRouterAddress, _amount);        
        
        return IUniRouter02(uniRouterAddress).addLiquidityETH{value: _ethAmt}(
            token,
            _amount,
            _amount.mul(10000 - _slipPage).div(10000),
            _ethAmt.mul(10000 - _slipPage).div(10000),
            msg.sender,
            block.timestamp.add(600)
        );
    }

    function removeLiquidity(address token0, address token1, uint256 _amount) external nonReentrant returns (uint256 amountA, uint256 amountB){
        require(_amount > 0, "amount is zero");
        
        address pair = getPair(token0, token1);
        IERC20(pair).transferFrom(msg.sender, address(this), _amount);
        IERC20(pair).safeIncreaseAllowance(uniRouterAddress, _amount);

        uint256 beforeAmt0 = IERC20(token0).balanceOf(address(this));
        uint256 beforeAmt1 = IERC20(token1).balanceOf(address(this));                
        IUniRouter02(uniRouterAddress).removeLiquidity(
            token0,
            token1,
            _amount,
            0,
            0,
            address(this),
            block.timestamp.add(600)
        );
        uint256 afterAmt0 = IERC20(token0).balanceOf(address(this));
        uint256 afterAmt1 = IERC20(token1).balanceOf(address(this));

        amountA = afterAmt0.sub(beforeAmt0);
        amountB = afterAmt1.sub(beforeAmt1);
        IERC20(token0).safeTransfer(msg.sender, amountA.mul(10000 - fee).div(10000));
        IERC20(token1).safeTransfer(msg.sender, amountB.mul(10000 - fee).div(10000));

        IERC20(token0).transfer(walletA, amountA.mul(fee).div(10000));
        IERC20(token1).transfer(walletA, amountB.mul(fee).div(10000));

        amountA = amountA.mul(10000 - fee).div(10000);
        amountB = amountB.mul(10000 - fee).div(10000);
    }

    function removeLiquidityETH(address token, uint256 _amount) external nonReentrant returns (uint256 amountToken, uint256 amountETH){
        require(_amount > 0, "amount is zero");
        
        address pair = getPair(token, wethAddress);
        IERC20(pair).transferFrom(msg.sender, address(this), _amount);
        IERC20(pair).safeIncreaseAllowance(uniRouterAddress, _amount);
        
        uint256 beforeAmt0 = IERC20(token).balanceOf(address(this));
        uint256 beforeAmt1 = address(this).balance;        
        IUniRouter02(uniRouterAddress).removeLiquidityETH(
            token,
            _amount,
            0,
            0,
            address(this),                
            block.timestamp.add(600)
        );
        uint256 afterAmt0 = IERC20(token).balanceOf(address(this));
        uint256 afterAmt1 = address(this).balance;
        
        amountToken = afterAmt0.sub(beforeAmt0);
        amountETH = afterAmt1.sub(beforeAmt1);
        IERC20(token).safeTransfer(msg.sender, amountToken.mul(10000 - fee).div(10000));
        payable(msg.sender).transfer(amountETH.mul(10000 - fee).div(10000));

        IERC20(token).transfer(walletA, amountToken.mul(fee).div(10000));
        payable(treasury).transfer(amountETH.mul(fee).div(10000));

        amountToken = amountToken.mul(10000 - fee).div(10000);
        amountETH = amountETH.mul(10000 - fee).div(10000);
    }

    function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 _amount) external nonReentrant returns (uint256 amountETH){
        require(_amount > 0, "amount is zero");
        
        address pair = getPair(token, wethAddress);
        IERC20(pair).transferFrom(msg.sender, address(this), _amount);
        IERC20(pair).safeIncreaseAllowance(uniRouterAddress, _amount);

        uint256 beforeAmt0 = IERC20(token).balanceOf(address(this));
        uint256 beforeAmt1 = address(this).balance;
        IUniRouter02(uniRouterAddress).removeLiquidityETHSupportingFeeOnTransferTokens(
            token,
            _amount,
            0,
            0,
            address(this),
            block.timestamp.add(600)
        );
        uint256 afterAmt0 = IERC20(token).balanceOf(address(this));
        uint256 afterAmt1 = address(this).balance;
        
        uint256 amountToken = afterAmt0.sub(beforeAmt0);
        amountETH = afterAmt1.sub(beforeAmt1);
        IERC20(token).safeTransfer(msg.sender, amountToken.mul(10000 - fee).div(10000));
        payable(msg.sender).transfer(amountETH.mul(10000 - fee).div(10000));

        IERC20(token).transfer(walletA, amountToken.mul(fee).div(10000));
        payable(treasury).transfer(amountETH.mul(fee).div(10000));

        amountToken = amountToken.mul(10000 - fee).div(10000);
        amountETH = amountETH.mul(10000 - fee).div(10000);
    }
   
    /**
     * @notice It allows the admin to recover wrong tokens sent to the contract
     * @param _tokenAddress: the address of the token to withdraw
     * @param _tokenAmount: the number of tokens to withdraw
     * @dev This function is only callable by admin.
     */
    function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
        if(_tokenAddress == address(0x0)) {
            payable(msg.sender).transfer(_tokenAmount);
        } else {
            IERC20(_tokenAddress).safeTransfer(address(msg.sender), _tokenAmount);
        }

        emit AdminTokenRecovered(_tokenAddress, _tokenAmount);
    }

    function updateWalletA(address _walletA) external onlyOwner {
        require(_walletA != address(0x0) || _walletA != walletA, "Invalid address");

        walletA = _walletA;
        emit WalletAUpdated(_walletA);
    }

    function updateFee(uint256 _fee) external onlyOwner {
        require(_fee < 2000, "fee cannot exceed 20%");

        fee = _fee;
        emit FeeUpdated(_fee);
    }

    function setBuyBackStatus(bool _status) external onlyOwner {
        buyBackBurn = _status;

        uint256 ethAmt = address(this).balance;
        if(ethAmt > 0 && _status == false) {
            payable(walletA).transfer(ethAmt);
        }

        emit BuyBackStatusChanged(_status);
    }

    function setTreasury(address _treasury) external onlyOwner {
        require(_treasury != address(0x0), "Invalid address");
        treasury = _treasury;
    }

    function updateBuyBackLimit(uint256 _limit) external onlyOwner {
        require(_limit > 0, "Invalid amount");

        buyBackLimit = _limit;
        emit BuyBackLimitUpdated(_limit);
    }

    function buyBack() internal {
        uint256 wethAmt = address(this).balance;

        if(wethAmt > buyBackLimit) {
             _safeSwapWeth(
                wethAmt,
                wethToBrewsPath,
                buyBackAddress
            );
        }
    }

    function _safeSwapWeth(
        uint256 _amountIn,
        address[] memory _path,
        address _to
    ) internal {
        uint256[] memory amounts = IUniRouter02(uniRouterAddress).getAmountsOut(_amountIn, _path);
        uint256 amountOut = amounts[amounts.length.sub(1)];

        IUniRouter02(uniRouterAddress).swapExactETHForTokens{value: _amountIn}(
            amountOut.mul(slippageFactor).div(10000),
            _path,
            _to,
            block.timestamp.add(600)
        );
    }

    function getPair(address token0, address token1) public view returns (address) {
        address factory = IUniRouter02(uniRouterAddress).factory();
        return IUniV2Factory(factory).getPair(token0, token1);
    }

    receive() external payable {}
}

File 2 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 3 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 4 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 6 of 12 : IUniFactory.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IUniV2Factory {
    function getPair(address tokenA, address tokenB)
        external
        view
        returns (address);
}

File 7 of 12 : IUniRouter02.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IUniRouter01.sol";

interface IUniRouter02 is IUniRouter01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

File 8 of 12 : IWETH.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

File 9 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 10 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 11 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 12 of 12 : IUniRouter01.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IUniRouter01 {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenRecovered","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AdminTokenRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"BuyBackLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"BuyBackStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"FeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_addr","type":"address"}],"name":"WalletAUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint256","name":"_amount0","type":"uint256"},{"internalType":"uint256","name":"_amount1","type":"uint256"},{"internalType":"uint256","name":"_slipPage","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_slipPage","type":"uint256"}],"name":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buyBackAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyBackBurn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyBackLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"}],"name":"getPair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_uniRouterAddress","type":"address"},{"internalType":"address[]","name":"_wethToBrewsPath","type":"address[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"recoverWrongTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"removeLiquidityETHSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setBuyBackStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slippageFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slippageFactorUL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniRouterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"updateBuyBackLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"updateFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_walletA","type":"address"}],"name":"updateWalletA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"walletA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"wethToBrewsPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405260646003556004805473e1f1dd010bbc2860f81c8f90ea4e38db949bb16f6001600160a01b0319918216811790925560058054909116909117905561251c6008556009805460ff19169055670de0b6b3a7640000600a553480156200006857600080fd5b506200007d6200007762000087565b6200008b565b60018055620000db565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61354e80620000eb6000396000f3fe6080604052600436106101705760003560e01c80639012c4a8116100cc578063b77e7da01161007a578063b77e7da0146103ce578063d752fab2146103e3578063ddca3f4314610403578063e6a4390514610418578063f0f4426014610438578063f2fde38b14610458578063ffbd3b1f1461047857610177565b80639012c4a81461031157806391c98a2a14610331578063946d92041461034457806399c4b950146103645780639b4198a3146103795780639f5e992e14610399578063b74cd242146103b957610177565b806361d027b31161012957806361d027b31461025b578063693a090b14610270578063715018a61461028557806372db17c21461029a578063783478ad146102c75780637972271b146102dc5780638da5cb5b146102fc57610177565b80630145ff681461017c578063129bd67a146101a757806317e8b708146101d55780633f138d4b146101f7578063433ad7ab146102195780634f0e0ef31461023957610177565b3661017757005b600080fd5b61018f61018a366004612dd5565b61048d565b60405161019e939291906133cb565b60405180910390f35b3480156101b357600080fd5b506101c76101c2366004612daa565b610893565b60405161019e9291906133bd565b3480156101e157600080fd5b506101ea610d1b565b60405161019e91906130df565b34801561020357600080fd5b50610217610212366004612daa565b610d24565b005b34801561022557600080fd5b50610217610234366004612e99565b610df5565b34801561024557600080fd5b5061024e610ec0565b60405161019e9190612fb0565b34801561026757600080fd5b5061024e610ecf565b34801561027c57600080fd5b5061024e610ede565b34801561029157600080fd5b50610217610eed565b3480156102a657600080fd5b506102ba6102b5366004612daa565b610f38565b60405161019e9190613366565b3480156102d357600080fd5b5061024e611398565b3480156102e857600080fd5b506102176102f7366004612bf7565b6113b0565b34801561030857600080fd5b5061024e611486565b34801561031d57600080fd5b5061021761032c366004612ed1565b611495565b61018f61033f366004612ca7565b61152a565b34801561035057600080fd5b5061021761035f366004612cf7565b611aae565b34801561037057600080fd5b506102ba611bec565b34801561038557600080fd5b50610217610394366004612ed1565b611bf2565b3480156103a557600080fd5b5061024e6103b4366004612ed1565b611c86565b3480156103c557600080fd5b506102ba611cb0565b3480156103da57600080fd5b5061024e611cb6565b3480156103ef57600080fd5b506101c76103fe366004612c67565b611cc5565b34801561040f57600080fd5b506102ba61223d565b34801561042457600080fd5b5061024e610433366004612c2f565b612243565b34801561044457600080fd5b50610217610453366004612bf7565b612355565b34801561046457600080fd5b50610217610473366004612bf7565b6123dc565b34801561048457600080fd5b506102ba61244d565b6000806000600260015414156104be5760405162461bcd60e51b81526004016104b59061332f565b60405180910390fd5b6002600155846104e05760405162461bcd60e51b81526004016104b59061311d565b61271084106105015760405162461bcd60e51b81526004016104b590613242565b600034116105215760405162461bcd60e51b81526004016104b59061311d565b6040516370a0823160e01b81526000906001600160a01b038816906370a0823190610550903090600401612fb0565b60206040518083038186803b15801561056857600080fd5b505afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a09190612ee9565b6040516323b872dd60e01b81529091506001600160a01b038816906323b872dd906105d390339030908b90600401612fde565b602060405180830381600087803b1580156105ed57600080fd5b505af1158015610601573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106259190612eb5565b5060006106ae82896001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106589190612fb0565b60206040518083038186803b15801561067057600080fd5b505afa158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a89190612ee9565b90612453565b90506106d66127106106d06003546127106106c99190613486565b8490612466565b90612472565b905060003490506106f66127106106d06003546127106106c99190613486565b600254909150610713906001600160a01b038b811691168461247e565b61071f8983838a612567565b6040516370a0823160e01b815292985090965094506001600160a01b038a16906370a0823190610753903090600401612fb0565b60206040518083038186803b15801561076b57600080fd5b505afa15801561077f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a39190612ee9565b60055460405163a9059cbb60e01b81529193506001600160a01b03808c169263a9059cbb926107d8921690869060040161308b565b602060405180830381600087803b1580156107f257600080fd5b505af1158015610806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082a9190612eb5565b5060095460ff16156108435761083e612659565b610880565b5060045460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505015801561087e573d6000803e3d6000fd5b505b5050506001808190555093509350939050565b600080600260015414156108b95760405162461bcd60e51b81526004016104b59061332f565b6002600155826108db5760405162461bcd60e51b81526004016104b59061311d565b6006546000906108f59086906001600160a01b0316612243565b6040516323b872dd60e01b81529091506001600160a01b038216906323b872dd9061092890339030908990600401612fde565b602060405180830381600087803b15801561094257600080fd5b505af1158015610956573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097a9190612eb5565b50600254610995906001600160a01b0383811691168661247e565b6040516370a0823160e01b81526000906001600160a01b038716906370a08231906109c4903090600401612fb0565b60206040518083038186803b1580156109dc57600080fd5b505afa1580156109f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a149190612ee9565b60025490915047906001600160a01b03166302751cec888860008030610a3c426102586126de565b6040518763ffffffff1660e01b8152600401610a5d969594939291906130a4565b6040805180830381600087803b158015610a7657600080fd5b505af1158015610a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aae9190612f01565b50506040516370a0823160e01b81526000906001600160a01b038916906370a0823190610adf903090600401612fb0565b60206040518083038186803b158015610af757600080fd5b505afa158015610b0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2f9190612ee9565b905047610b3c8285612453565b9650610b488184612453565b9550610b7f33610b6e6127106106d0600354612710610b679190613486565b8c90612466565b6001600160a01b038c1691906126ea565b336001600160a01b03166108fc610bac6127106106d0600354612710610ba59190613486565b8b90612466565b6040518115909202916000818181858888f19350505050158015610bd4573d6000803e3d6000fd5b506005546003546001600160a01b03808c169263a9059cbb92911690610c0390612710906106d0908d90612466565b6040518363ffffffff1660e01b8152600401610c2092919061308b565b602060405180830381600087803b158015610c3a57600080fd5b505af1158015610c4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c729190612eb5565b506004546003546001600160a01b03909116906108fc90610c9c90612710906106d0908b90612466565b6040518115909202916000818181858888f19350505050158015610cc4573d6000803e3d6000fd5b50610ce56127106106d0600354612710610cde9190613486565b8a90612466565b9650610d076127106106d0600354612710610d009190613486565b8990612466565b600180559699969850959650505050505050565b60095460ff1681565b610d2c61270e565b6001600160a01b0316610d3d611486565b6001600160a01b031614610d635760405162461bcd60e51b81526004016104b590613279565b6001600160a01b038216610da457604051339082156108fc029083906000818181858888f19350505050158015610d9e573d6000803e3d6000fd5b50610db8565b610db86001600160a01b03831633836126ea565b7f74f5dcd55c394cb1c6d3b9da22c2464bcc46c38cc3865bd629ed75823249b40b8282604051610de992919061308b565b60405180910390a15050565b610dfd61270e565b6001600160a01b0316610e0e611486565b6001600160a01b031614610e345760405162461bcd60e51b81526004016104b590613279565b6009805460ff1916821515179055478015801590610e50575081155b15610e91576005546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610e8f573d6000803e3d6000fd5b505b7f12afa72b34e117ccb27c64c4c3aa4da51e78821b3248bce50e6a1f974cbd05cd82604051610de991906130df565b6006546001600160a01b031681565b6004546001600160a01b031681565b6002546001600160a01b031681565b610ef561270e565b6001600160a01b0316610f06611486565b6001600160a01b031614610f2c5760405162461bcd60e51b81526004016104b590613279565b610f366000612712565b565b600060026001541415610f5d5760405162461bcd60e51b81526004016104b59061332f565b600260015581610f7f5760405162461bcd60e51b81526004016104b59061311d565b600654600090610f999085906001600160a01b0316612243565b6040516323b872dd60e01b81529091506001600160a01b038216906323b872dd90610fcc90339030908890600401612fde565b602060405180830381600087803b158015610fe657600080fd5b505af1158015610ffa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101e9190612eb5565b50600254611039906001600160a01b0383811691168561247e565b6040516370a0823160e01b81526000906001600160a01b038616906370a0823190611068903090600401612fb0565b60206040518083038186803b15801561108057600080fd5b505afa158015611094573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b89190612ee9565b60025490915047906001600160a01b031663af2979eb8787600080306110e0426102586126de565b6040518763ffffffff1660e01b8152600401611101969594939291906130a4565b602060405180830381600087803b15801561111b57600080fd5b505af115801561112f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111539190612ee9565b506040516370a0823160e01b81526000906001600160a01b038816906370a0823190611183903090600401612fb0565b60206040518083038186803b15801561119b57600080fd5b505afa1580156111af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d39190612ee9565b90504760006111e28386612453565b90506111ee8285612453565b965061121433610b6e6127106106d060035461271061120d9190613486565b8690612466565b336001600160a01b03166108fc61123a6127106106d0600354612710610b679190613486565b6040518115909202916000818181858888f19350505050158015611262573d6000803e3d6000fd5b506005546003546001600160a01b03808c169263a9059cbb9291169061129190612710906106d0908790612466565b6040518363ffffffff1660e01b81526004016112ae92919061308b565b602060405180830381600087803b1580156112c857600080fd5b505af11580156112dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113009190612eb5565b506004546003546001600160a01b03909116906108fc9061132a90612710906106d0908c90612466565b6040518115909202916000818181858888f19350505050158015611352573d6000803e3d6000fd5b5061136c6127106106d06003546127106106c99190613486565b90506113876127106106d0600354612710610cde9190613486565b600180559998505050505050505050565b73e1f1dd010bbc2860f81c8f90ea4e38db949bb16f81565b6113b861270e565b6001600160a01b03166113c9611486565b6001600160a01b0316146113ef5760405162461bcd60e51b81526004016104b590613279565b6001600160a01b03811615158061141457506005546001600160a01b03828116911614155b6114305760405162461bcd60e51b81526004016104b590613145565b600580546001600160a01b0319166001600160a01b0383161790556040517f6de6ddf87fbce1f42220b349684d9b952eac9bffd639fd2093096032cb1d4d4e9061147b908390612fb0565b60405180910390a150565b6000546001600160a01b031690565b61149d61270e565b6001600160a01b03166114ae611486565b6001600160a01b0316146114d45760405162461bcd60e51b81526004016104b590613279565b6107d081106114f55760405162461bcd60e51b81526004016104b59061316e565b60038190556040517f8c4d35e54a3f2ef1134138fd8ea3daee6a3c89e10d2665996babdf70261e2c769061147b908390613366565b6000806000600260015414156115525760405162461bcd60e51b81526004016104b59061332f565b600260015585158015906115665750600085115b6115825760405162461bcd60e51b81526004016104b59061311d565b61271084106115a35760405162461bcd60e51b81526004016104b590613242565b866001600160a01b0316886001600160a01b031614156115d55760405162461bcd60e51b81526004016104b59061320b565b6040516370a0823160e01b81526000906001600160a01b038a16906370a0823190611604903090600401612fb0565b60206040518083038186803b15801561161c57600080fd5b505afa158015611630573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116549190612ee9565b6040516323b872dd60e01b81529091506001600160a01b038a16906323b872dd9061168790339030908c90600401612fde565b602060405180830381600087803b1580156116a157600080fd5b505af11580156116b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d99190612eb5565b50600061170c828b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106589190612fb0565b90506117276127106106d06003546127106106c99190613486565b6040516370a0823160e01b81529091506001600160a01b038a16906370a0823190611756903090600401612fb0565b60206040518083038186803b15801561176e57600080fd5b505afa158015611782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a69190612ee9565b6040516323b872dd60e01b81529092506001600160a01b038a16906323b872dd906117d990339030908c90600401612fde565b602060405180830381600087803b1580156117f357600080fd5b505af1158015611807573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182b9190612eb5565b50600061185e838b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106589190612fb0565b90506118796127106106d06003546127106106c99190613486565b90506118888b8b84848b612762565b6040516370a0823160e01b815292985090965094506001600160a01b038c16906370a08231906118bc903090600401612fb0565b60206040518083038186803b1580156118d457600080fd5b505afa1580156118e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190c9190612ee9565b6040516370a0823160e01b81529092506001600160a01b038b16906370a082319061193b903090600401612fb0565b60206040518083038186803b15801561195357600080fd5b505afa158015611967573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198b9190612ee9565b60055460405163a9059cbb60e01b81529192506001600160a01b03808e169263a9059cbb926119c0921690869060040161308b565b602060405180830381600087803b1580156119da57600080fd5b505af11580156119ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a129190612eb5565b5060055460405163a9059cbb60e01b81526001600160a01b038c81169263a9059cbb92611a479290911690859060040161308b565b602060405180830381600087803b158015611a6157600080fd5b505af1158015611a75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a999190612eb5565b50506001805550929891975095509350505050565b611ab661270e565b6001600160a01b0316611ac7611486565b6001600160a01b031614611aed5760405162461bcd60e51b81526004016104b590613279565b6001600160a01b038216611b135760405162461bcd60e51b81526004016104b590613145565b600280546001600160a01b0319166001600160a01b0384161790558051611b41906007906020840190612b7d565b50600260009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611b9057600080fd5b505afa158015611ba4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc89190612c13565b600680546001600160a01b0319166001600160a01b03929092169190911790555050565b600a5481565b611bfa61270e565b6001600160a01b0316611c0b611486565b6001600160a01b031614611c315760405162461bcd60e51b81526004016104b590613279565b60008111611c515760405162461bcd60e51b81526004016104b5906131e3565b600a8190556040517fbb5795be137acb1622efe70a666c841ec27b45970c2bd987caeba70df342f53e9061147b908390613366565b60078181548110611c9657600080fd5b6000918252602090912001546001600160a01b0316905081565b611f4081565b6005546001600160a01b031681565b60008060026001541415611ceb5760405162461bcd60e51b81526004016104b59061332f565b600260015582611d0d5760405162461bcd60e51b81526004016104b59061311d565b6000611d198686612243565b6040516323b872dd60e01b81529091506001600160a01b038216906323b872dd90611d4c90339030908990600401612fde565b602060405180830381600087803b158015611d6657600080fd5b505af1158015611d7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9e9190612eb5565b50600254611db9906001600160a01b0383811691168661247e565b6040516370a0823160e01b81526000906001600160a01b038816906370a0823190611de8903090600401612fb0565b60206040518083038186803b158015611e0057600080fd5b505afa158015611e14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e389190612ee9565b90506000866001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401611e689190612fb0565b60206040518083038186803b158015611e8057600080fd5b505afa158015611e94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb89190612ee9565b6002549091506001600160a01b031663baa2abde89898960008030611edf426102586126de565b6040518863ffffffff1660e01b8152600401611f019796959493929190613002565b6040805180830381600087803b158015611f1a57600080fd5b505af1158015611f2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f529190612f01565b50506040516370a0823160e01b81526000906001600160a01b038a16906370a0823190611f83903090600401612fb0565b60206040518083038186803b158015611f9b57600080fd5b505afa158015611faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd39190612ee9565b90506000886001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016120039190612fb0565b60206040518083038186803b15801561201b57600080fd5b505afa15801561202f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120539190612ee9565b905061205f8285612453565b965061206b8184612453565b955061209b3361208a6127106106d0600354612710610b679190613486565b6001600160a01b038d1691906126ea565b6120b833610b6e6127106106d0600354612710610ba59190613486565b6005546003546001600160a01b03808d169263a9059cbb929116906120e690612710906106d0908d90612466565b6040518363ffffffff1660e01b815260040161210392919061308b565b602060405180830381600087803b15801561211d57600080fd5b505af1158015612131573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121559190612eb5565b506005546003546001600160a01b03808c169263a9059cbb9291169061218490612710906106d0908c90612466565b6040518363ffffffff1660e01b81526004016121a192919061308b565b602060405180830381600087803b1580156121bb57600080fd5b505af11580156121cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f39190612eb5565b5061220d6127106106d0600354612710610cde9190613486565b96506122286127106106d0600354612710610d009190613486565b60018055969a96995095975050505050505050565b60035481565b600080600260009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561229457600080fd5b505afa1580156122a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122cc9190612c13565b60405163e6a4390560e01b81529091506001600160a01b0382169063e6a43905906122fd9087908790600401612fc4565b60206040518083038186803b15801561231557600080fd5b505afa158015612329573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234d9190612c13565b949350505050565b61235d61270e565b6001600160a01b031661236e611486565b6001600160a01b0316146123945760405162461bcd60e51b81526004016104b590613279565b6001600160a01b0381166123ba5760405162461bcd60e51b81526004016104b590613145565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6123e461270e565b6001600160a01b03166123f5611486565b6001600160a01b03161461241b5760405162461bcd60e51b81526004016104b590613279565b6001600160a01b0381166124415760405162461bcd60e51b81526004016104b59061319d565b61244a81612712565b50565b60085481565b600061245f8284613486565b9392505050565b600061245f8284613467565b600061245f8284613447565b600081846001600160a01b031663dd62ed3e30866040518363ffffffff1660e01b81526004016124af929190612fc4565b60206040518083038186803b1580156124c757600080fd5b505afa1580156124db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ff9190612ee9565b612509919061342f565b90506125618463095ea7b360e01b858460405160240161252a92919061308b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612872565b50505050565b60025460009081908190612588906001600160a01b0389811691168861247e565b6002546001600160a01b031663f305d7198689896125b66127106106d06125af8c83613486565b8e90612466565b6125c96127106106d06125af8d83613486565b336125d6426102586126de565b6040518863ffffffff1660e01b81526004016125f7969594939291906130a4565b6060604051808303818588803b15801561261057600080fd5b505af1158015612624573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906126499190612f24565b9250925092509450945094915050565b600a54479081111561244a5761244a8160078054806020026020016040519081016040528092919081815260200182805480156126bf57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116126a1575b505050505073e1f1dd010bbc2860f81c8f90ea4e38db949bb16f612901565b600061245f828461342f565b6127098363a9059cbb60e01b848460405160240161252a92919061308b565b505050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460009081908190612783906001600160a01b038a811691168861247e565b60025461279d906001600160a01b0389811691168761247e565b6002546001600160a01b031663e8e33700898989896127cc6127106106d06127c58d83613486565b8f90612466565b6127df6127106106d06127c58e83613486565b336127ec426102586126de565b6040518963ffffffff1660e01b815260040161280f989796959493929190613042565b606060405180830381600087803b15801561282957600080fd5b505af115801561283d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128619190612f24565b925092509250955095509592505050565b60006128c7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a959092919063ffffffff16565b80519091501561270957808060200190518101906128e59190612eb5565b6127095760405162461bcd60e51b81526004016104b5906132e5565b60025460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f90612934908790879060040161336f565b60006040518083038186803b15801561294c57600080fd5b505afa158015612960573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526129889190810190612e09565b90506000816129a26001845161245390919063ffffffff16565b815181106129c057634e487b7160e01b600052603260045260246000fd5b60200260200101519050600260009054906101000a90046001600160a01b03166001600160a01b0316637ff36ab586612a0a6127106106d06008548761246690919063ffffffff16565b8787612a18426102586126de565b6040518663ffffffff1660e01b8152600401612a379493929190613388565b6000604051808303818588803b158015612a5057600080fd5b505af1158015612a64573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052612a8d9190810190612e09565b505050505050565b606061234d848460008585612aa985612b3e565b612ac55760405162461bcd60e51b81526004016104b5906132ae565b600080866001600160a01b03168587604051612ae19190612f94565b60006040518083038185875af1925050503d8060008114612b1e576040519150601f19603f3d011682016040523d82523d6000602084013e612b23565b606091505b5091509150612b33828286612b44565b979650505050505050565b3b151590565b60608315612b5357508161245f565b825115612b635782518084602001fd5b8160405162461bcd60e51b81526004016104b591906130ea565b828054828255906000526020600020908101928215612bd2579160200282015b82811115612bd257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612b9d565b50612bde929150612be2565b5090565b5b80821115612bde5760008155600101612be3565b600060208284031215612c08578081fd5b813561245f816134f5565b600060208284031215612c24578081fd5b815161245f816134f5565b60008060408385031215612c41578081fd5b8235612c4c816134f5565b91506020830135612c5c816134f5565b809150509250929050565b600080600060608486031215612c7b578081fd5b8335612c86816134f5565b92506020840135612c96816134f5565b929592945050506040919091013590565b600080600080600060a08688031215612cbe578081fd5b8535612cc9816134f5565b94506020860135612cd9816134f5565b94979496505050506040830135926060810135926080909101359150565b60008060408385031215612d09578182fd5b8235612d14816134f5565b915060208381013567ffffffffffffffff811115612d30578283fd5b8401601f81018613612d40578283fd5b8035612d53612d4e8261340b565b6133e1565b81815283810190838501858402850186018a1015612d6f578687fd5b8694505b83851015612d9a578035612d86816134f5565b835260019490940193918501918501612d73565b5080955050505050509250929050565b60008060408385031215612dbc578182fd5b8235612dc7816134f5565b946020939093013593505050565b600080600060608486031215612de9578283fd5b8335612df4816134f5565b95602085013595506040909401359392505050565b60006020808385031215612e1b578182fd5b825167ffffffffffffffff811115612e31578283fd5b8301601f81018513612e41578283fd5b8051612e4f612d4e8261340b565b8181528381019083850185840285018601891015612e6b578687fd5b8694505b83851015612e8d578051835260019490940193918501918501612e6f565b50979650505050505050565b600060208284031215612eaa578081fd5b813561245f8161350a565b600060208284031215612ec6578081fd5b815161245f8161350a565b600060208284031215612ee2578081fd5b5035919050565b600060208284031215612efa578081fd5b5051919050565b60008060408385031215612f13578182fd5b505080516020909101519092909150565b600080600060608486031215612f38578081fd5b8351925060208401519150604084015190509250925092565b6000815180845260208085019450808401835b83811015612f895781516001600160a01b031687529582019590820190600101612f64565b509495945050505050565b60008251612fa681846020870161349d565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039788168152958716602087015260408601949094526060850192909252608084015290921660a082015260c081019190915260e00190565b6001600160a01b039889168152968816602088015260408701959095526060860193909352608085019190915260a084015290921660c082015260e08101919091526101000190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b901515815260200190565b600060208252825180602084015261310981604085016020870161349d565b601f01601f19169190910160400192915050565b6020808252600e908201526d616d6f756e74206973207a65726f60901b604082015260600190565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b6020808252601590820152746665652063616e6e6f74206578636565642032302560581b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b6020808252601e908201527f63616e6e6f74207573652073616d6520746f6b656e20666f7220706169720000604082015260600190565b6020808252601b908201527f736c6970706167652063616e6e6f742065786365656420313030250000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b90815260200190565b60008382526040602083015261234d6040830184612f51565b6000858252608060208301526133a16080830186612f51565b6001600160a01b03949094166040830152506060015292915050565b918252602082015260400190565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff81118282101715613403576134036134df565b604052919050565b600067ffffffffffffffff821115613425576134256134df565b5060209081020190565b60008219821115613442576134426134c9565b500190565b60008261346257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613481576134816134c9565b500290565b600082821015613498576134986134c9565b500390565b60005b838110156134b85781810151838201526020016134a0565b838111156125615750506000910152565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461244a57600080fd5b801515811461244a57600080fdfea26469706673582212200eb578a27581e35216426f6c95ec3e78d635f37a248f0853e50cade50dd5b62364736f6c63430008000033

Deployed Bytecode

0x6080604052600436106101705760003560e01c80639012c4a8116100cc578063b77e7da01161007a578063b77e7da0146103ce578063d752fab2146103e3578063ddca3f4314610403578063e6a4390514610418578063f0f4426014610438578063f2fde38b14610458578063ffbd3b1f1461047857610177565b80639012c4a81461031157806391c98a2a14610331578063946d92041461034457806399c4b950146103645780639b4198a3146103795780639f5e992e14610399578063b74cd242146103b957610177565b806361d027b31161012957806361d027b31461025b578063693a090b14610270578063715018a61461028557806372db17c21461029a578063783478ad146102c75780637972271b146102dc5780638da5cb5b146102fc57610177565b80630145ff681461017c578063129bd67a146101a757806317e8b708146101d55780633f138d4b146101f7578063433ad7ab146102195780634f0e0ef31461023957610177565b3661017757005b600080fd5b61018f61018a366004612dd5565b61048d565b60405161019e939291906133cb565b60405180910390f35b3480156101b357600080fd5b506101c76101c2366004612daa565b610893565b60405161019e9291906133bd565b3480156101e157600080fd5b506101ea610d1b565b60405161019e91906130df565b34801561020357600080fd5b50610217610212366004612daa565b610d24565b005b34801561022557600080fd5b50610217610234366004612e99565b610df5565b34801561024557600080fd5b5061024e610ec0565b60405161019e9190612fb0565b34801561026757600080fd5b5061024e610ecf565b34801561027c57600080fd5b5061024e610ede565b34801561029157600080fd5b50610217610eed565b3480156102a657600080fd5b506102ba6102b5366004612daa565b610f38565b60405161019e9190613366565b3480156102d357600080fd5b5061024e611398565b3480156102e857600080fd5b506102176102f7366004612bf7565b6113b0565b34801561030857600080fd5b5061024e611486565b34801561031d57600080fd5b5061021761032c366004612ed1565b611495565b61018f61033f366004612ca7565b61152a565b34801561035057600080fd5b5061021761035f366004612cf7565b611aae565b34801561037057600080fd5b506102ba611bec565b34801561038557600080fd5b50610217610394366004612ed1565b611bf2565b3480156103a557600080fd5b5061024e6103b4366004612ed1565b611c86565b3480156103c557600080fd5b506102ba611cb0565b3480156103da57600080fd5b5061024e611cb6565b3480156103ef57600080fd5b506101c76103fe366004612c67565b611cc5565b34801561040f57600080fd5b506102ba61223d565b34801561042457600080fd5b5061024e610433366004612c2f565b612243565b34801561044457600080fd5b50610217610453366004612bf7565b612355565b34801561046457600080fd5b50610217610473366004612bf7565b6123dc565b34801561048457600080fd5b506102ba61244d565b6000806000600260015414156104be5760405162461bcd60e51b81526004016104b59061332f565b60405180910390fd5b6002600155846104e05760405162461bcd60e51b81526004016104b59061311d565b61271084106105015760405162461bcd60e51b81526004016104b590613242565b600034116105215760405162461bcd60e51b81526004016104b59061311d565b6040516370a0823160e01b81526000906001600160a01b038816906370a0823190610550903090600401612fb0565b60206040518083038186803b15801561056857600080fd5b505afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a09190612ee9565b6040516323b872dd60e01b81529091506001600160a01b038816906323b872dd906105d390339030908b90600401612fde565b602060405180830381600087803b1580156105ed57600080fd5b505af1158015610601573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106259190612eb5565b5060006106ae82896001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106589190612fb0565b60206040518083038186803b15801561067057600080fd5b505afa158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a89190612ee9565b90612453565b90506106d66127106106d06003546127106106c99190613486565b8490612466565b90612472565b905060003490506106f66127106106d06003546127106106c99190613486565b600254909150610713906001600160a01b038b811691168461247e565b61071f8983838a612567565b6040516370a0823160e01b815292985090965094506001600160a01b038a16906370a0823190610753903090600401612fb0565b60206040518083038186803b15801561076b57600080fd5b505afa15801561077f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a39190612ee9565b60055460405163a9059cbb60e01b81529193506001600160a01b03808c169263a9059cbb926107d8921690869060040161308b565b602060405180830381600087803b1580156107f257600080fd5b505af1158015610806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082a9190612eb5565b5060095460ff16156108435761083e612659565b610880565b5060045460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505015801561087e573d6000803e3d6000fd5b505b5050506001808190555093509350939050565b600080600260015414156108b95760405162461bcd60e51b81526004016104b59061332f565b6002600155826108db5760405162461bcd60e51b81526004016104b59061311d565b6006546000906108f59086906001600160a01b0316612243565b6040516323b872dd60e01b81529091506001600160a01b038216906323b872dd9061092890339030908990600401612fde565b602060405180830381600087803b15801561094257600080fd5b505af1158015610956573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097a9190612eb5565b50600254610995906001600160a01b0383811691168661247e565b6040516370a0823160e01b81526000906001600160a01b038716906370a08231906109c4903090600401612fb0565b60206040518083038186803b1580156109dc57600080fd5b505afa1580156109f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a149190612ee9565b60025490915047906001600160a01b03166302751cec888860008030610a3c426102586126de565b6040518763ffffffff1660e01b8152600401610a5d969594939291906130a4565b6040805180830381600087803b158015610a7657600080fd5b505af1158015610a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aae9190612f01565b50506040516370a0823160e01b81526000906001600160a01b038916906370a0823190610adf903090600401612fb0565b60206040518083038186803b158015610af757600080fd5b505afa158015610b0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2f9190612ee9565b905047610b3c8285612453565b9650610b488184612453565b9550610b7f33610b6e6127106106d0600354612710610b679190613486565b8c90612466565b6001600160a01b038c1691906126ea565b336001600160a01b03166108fc610bac6127106106d0600354612710610ba59190613486565b8b90612466565b6040518115909202916000818181858888f19350505050158015610bd4573d6000803e3d6000fd5b506005546003546001600160a01b03808c169263a9059cbb92911690610c0390612710906106d0908d90612466565b6040518363ffffffff1660e01b8152600401610c2092919061308b565b602060405180830381600087803b158015610c3a57600080fd5b505af1158015610c4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c729190612eb5565b506004546003546001600160a01b03909116906108fc90610c9c90612710906106d0908b90612466565b6040518115909202916000818181858888f19350505050158015610cc4573d6000803e3d6000fd5b50610ce56127106106d0600354612710610cde9190613486565b8a90612466565b9650610d076127106106d0600354612710610d009190613486565b8990612466565b600180559699969850959650505050505050565b60095460ff1681565b610d2c61270e565b6001600160a01b0316610d3d611486565b6001600160a01b031614610d635760405162461bcd60e51b81526004016104b590613279565b6001600160a01b038216610da457604051339082156108fc029083906000818181858888f19350505050158015610d9e573d6000803e3d6000fd5b50610db8565b610db86001600160a01b03831633836126ea565b7f74f5dcd55c394cb1c6d3b9da22c2464bcc46c38cc3865bd629ed75823249b40b8282604051610de992919061308b565b60405180910390a15050565b610dfd61270e565b6001600160a01b0316610e0e611486565b6001600160a01b031614610e345760405162461bcd60e51b81526004016104b590613279565b6009805460ff1916821515179055478015801590610e50575081155b15610e91576005546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610e8f573d6000803e3d6000fd5b505b7f12afa72b34e117ccb27c64c4c3aa4da51e78821b3248bce50e6a1f974cbd05cd82604051610de991906130df565b6006546001600160a01b031681565b6004546001600160a01b031681565b6002546001600160a01b031681565b610ef561270e565b6001600160a01b0316610f06611486565b6001600160a01b031614610f2c5760405162461bcd60e51b81526004016104b590613279565b610f366000612712565b565b600060026001541415610f5d5760405162461bcd60e51b81526004016104b59061332f565b600260015581610f7f5760405162461bcd60e51b81526004016104b59061311d565b600654600090610f999085906001600160a01b0316612243565b6040516323b872dd60e01b81529091506001600160a01b038216906323b872dd90610fcc90339030908890600401612fde565b602060405180830381600087803b158015610fe657600080fd5b505af1158015610ffa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101e9190612eb5565b50600254611039906001600160a01b0383811691168561247e565b6040516370a0823160e01b81526000906001600160a01b038616906370a0823190611068903090600401612fb0565b60206040518083038186803b15801561108057600080fd5b505afa158015611094573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b89190612ee9565b60025490915047906001600160a01b031663af2979eb8787600080306110e0426102586126de565b6040518763ffffffff1660e01b8152600401611101969594939291906130a4565b602060405180830381600087803b15801561111b57600080fd5b505af115801561112f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111539190612ee9565b506040516370a0823160e01b81526000906001600160a01b038816906370a0823190611183903090600401612fb0565b60206040518083038186803b15801561119b57600080fd5b505afa1580156111af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d39190612ee9565b90504760006111e28386612453565b90506111ee8285612453565b965061121433610b6e6127106106d060035461271061120d9190613486565b8690612466565b336001600160a01b03166108fc61123a6127106106d0600354612710610b679190613486565b6040518115909202916000818181858888f19350505050158015611262573d6000803e3d6000fd5b506005546003546001600160a01b03808c169263a9059cbb9291169061129190612710906106d0908790612466565b6040518363ffffffff1660e01b81526004016112ae92919061308b565b602060405180830381600087803b1580156112c857600080fd5b505af11580156112dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113009190612eb5565b506004546003546001600160a01b03909116906108fc9061132a90612710906106d0908c90612466565b6040518115909202916000818181858888f19350505050158015611352573d6000803e3d6000fd5b5061136c6127106106d06003546127106106c99190613486565b90506113876127106106d0600354612710610cde9190613486565b600180559998505050505050505050565b73e1f1dd010bbc2860f81c8f90ea4e38db949bb16f81565b6113b861270e565b6001600160a01b03166113c9611486565b6001600160a01b0316146113ef5760405162461bcd60e51b81526004016104b590613279565b6001600160a01b03811615158061141457506005546001600160a01b03828116911614155b6114305760405162461bcd60e51b81526004016104b590613145565b600580546001600160a01b0319166001600160a01b0383161790556040517f6de6ddf87fbce1f42220b349684d9b952eac9bffd639fd2093096032cb1d4d4e9061147b908390612fb0565b60405180910390a150565b6000546001600160a01b031690565b61149d61270e565b6001600160a01b03166114ae611486565b6001600160a01b0316146114d45760405162461bcd60e51b81526004016104b590613279565b6107d081106114f55760405162461bcd60e51b81526004016104b59061316e565b60038190556040517f8c4d35e54a3f2ef1134138fd8ea3daee6a3c89e10d2665996babdf70261e2c769061147b908390613366565b6000806000600260015414156115525760405162461bcd60e51b81526004016104b59061332f565b600260015585158015906115665750600085115b6115825760405162461bcd60e51b81526004016104b59061311d565b61271084106115a35760405162461bcd60e51b81526004016104b590613242565b866001600160a01b0316886001600160a01b031614156115d55760405162461bcd60e51b81526004016104b59061320b565b6040516370a0823160e01b81526000906001600160a01b038a16906370a0823190611604903090600401612fb0565b60206040518083038186803b15801561161c57600080fd5b505afa158015611630573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116549190612ee9565b6040516323b872dd60e01b81529091506001600160a01b038a16906323b872dd9061168790339030908c90600401612fde565b602060405180830381600087803b1580156116a157600080fd5b505af11580156116b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d99190612eb5565b50600061170c828b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106589190612fb0565b90506117276127106106d06003546127106106c99190613486565b6040516370a0823160e01b81529091506001600160a01b038a16906370a0823190611756903090600401612fb0565b60206040518083038186803b15801561176e57600080fd5b505afa158015611782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a69190612ee9565b6040516323b872dd60e01b81529092506001600160a01b038a16906323b872dd906117d990339030908c90600401612fde565b602060405180830381600087803b1580156117f357600080fd5b505af1158015611807573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182b9190612eb5565b50600061185e838b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106589190612fb0565b90506118796127106106d06003546127106106c99190613486565b90506118888b8b84848b612762565b6040516370a0823160e01b815292985090965094506001600160a01b038c16906370a08231906118bc903090600401612fb0565b60206040518083038186803b1580156118d457600080fd5b505afa1580156118e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190c9190612ee9565b6040516370a0823160e01b81529092506001600160a01b038b16906370a082319061193b903090600401612fb0565b60206040518083038186803b15801561195357600080fd5b505afa158015611967573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198b9190612ee9565b60055460405163a9059cbb60e01b81529192506001600160a01b03808e169263a9059cbb926119c0921690869060040161308b565b602060405180830381600087803b1580156119da57600080fd5b505af11580156119ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a129190612eb5565b5060055460405163a9059cbb60e01b81526001600160a01b038c81169263a9059cbb92611a479290911690859060040161308b565b602060405180830381600087803b158015611a6157600080fd5b505af1158015611a75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a999190612eb5565b50506001805550929891975095509350505050565b611ab661270e565b6001600160a01b0316611ac7611486565b6001600160a01b031614611aed5760405162461bcd60e51b81526004016104b590613279565b6001600160a01b038216611b135760405162461bcd60e51b81526004016104b590613145565b600280546001600160a01b0319166001600160a01b0384161790558051611b41906007906020840190612b7d565b50600260009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611b9057600080fd5b505afa158015611ba4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc89190612c13565b600680546001600160a01b0319166001600160a01b03929092169190911790555050565b600a5481565b611bfa61270e565b6001600160a01b0316611c0b611486565b6001600160a01b031614611c315760405162461bcd60e51b81526004016104b590613279565b60008111611c515760405162461bcd60e51b81526004016104b5906131e3565b600a8190556040517fbb5795be137acb1622efe70a666c841ec27b45970c2bd987caeba70df342f53e9061147b908390613366565b60078181548110611c9657600080fd5b6000918252602090912001546001600160a01b0316905081565b611f4081565b6005546001600160a01b031681565b60008060026001541415611ceb5760405162461bcd60e51b81526004016104b59061332f565b600260015582611d0d5760405162461bcd60e51b81526004016104b59061311d565b6000611d198686612243565b6040516323b872dd60e01b81529091506001600160a01b038216906323b872dd90611d4c90339030908990600401612fde565b602060405180830381600087803b158015611d6657600080fd5b505af1158015611d7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9e9190612eb5565b50600254611db9906001600160a01b0383811691168661247e565b6040516370a0823160e01b81526000906001600160a01b038816906370a0823190611de8903090600401612fb0565b60206040518083038186803b158015611e0057600080fd5b505afa158015611e14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e389190612ee9565b90506000866001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401611e689190612fb0565b60206040518083038186803b158015611e8057600080fd5b505afa158015611e94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb89190612ee9565b6002549091506001600160a01b031663baa2abde89898960008030611edf426102586126de565b6040518863ffffffff1660e01b8152600401611f019796959493929190613002565b6040805180830381600087803b158015611f1a57600080fd5b505af1158015611f2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f529190612f01565b50506040516370a0823160e01b81526000906001600160a01b038a16906370a0823190611f83903090600401612fb0565b60206040518083038186803b158015611f9b57600080fd5b505afa158015611faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd39190612ee9565b90506000886001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016120039190612fb0565b60206040518083038186803b15801561201b57600080fd5b505afa15801561202f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120539190612ee9565b905061205f8285612453565b965061206b8184612453565b955061209b3361208a6127106106d0600354612710610b679190613486565b6001600160a01b038d1691906126ea565b6120b833610b6e6127106106d0600354612710610ba59190613486565b6005546003546001600160a01b03808d169263a9059cbb929116906120e690612710906106d0908d90612466565b6040518363ffffffff1660e01b815260040161210392919061308b565b602060405180830381600087803b15801561211d57600080fd5b505af1158015612131573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121559190612eb5565b506005546003546001600160a01b03808c169263a9059cbb9291169061218490612710906106d0908c90612466565b6040518363ffffffff1660e01b81526004016121a192919061308b565b602060405180830381600087803b1580156121bb57600080fd5b505af11580156121cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f39190612eb5565b5061220d6127106106d0600354612710610cde9190613486565b96506122286127106106d0600354612710610d009190613486565b60018055969a96995095975050505050505050565b60035481565b600080600260009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561229457600080fd5b505afa1580156122a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122cc9190612c13565b60405163e6a4390560e01b81529091506001600160a01b0382169063e6a43905906122fd9087908790600401612fc4565b60206040518083038186803b15801561231557600080fd5b505afa158015612329573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234d9190612c13565b949350505050565b61235d61270e565b6001600160a01b031661236e611486565b6001600160a01b0316146123945760405162461bcd60e51b81526004016104b590613279565b6001600160a01b0381166123ba5760405162461bcd60e51b81526004016104b590613145565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6123e461270e565b6001600160a01b03166123f5611486565b6001600160a01b03161461241b5760405162461bcd60e51b81526004016104b590613279565b6001600160a01b0381166124415760405162461bcd60e51b81526004016104b59061319d565b61244a81612712565b50565b60085481565b600061245f8284613486565b9392505050565b600061245f8284613467565b600061245f8284613447565b600081846001600160a01b031663dd62ed3e30866040518363ffffffff1660e01b81526004016124af929190612fc4565b60206040518083038186803b1580156124c757600080fd5b505afa1580156124db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ff9190612ee9565b612509919061342f565b90506125618463095ea7b360e01b858460405160240161252a92919061308b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612872565b50505050565b60025460009081908190612588906001600160a01b0389811691168861247e565b6002546001600160a01b031663f305d7198689896125b66127106106d06125af8c83613486565b8e90612466565b6125c96127106106d06125af8d83613486565b336125d6426102586126de565b6040518863ffffffff1660e01b81526004016125f7969594939291906130a4565b6060604051808303818588803b15801561261057600080fd5b505af1158015612624573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906126499190612f24565b9250925092509450945094915050565b600a54479081111561244a5761244a8160078054806020026020016040519081016040528092919081815260200182805480156126bf57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116126a1575b505050505073e1f1dd010bbc2860f81c8f90ea4e38db949bb16f612901565b600061245f828461342f565b6127098363a9059cbb60e01b848460405160240161252a92919061308b565b505050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460009081908190612783906001600160a01b038a811691168861247e565b60025461279d906001600160a01b0389811691168761247e565b6002546001600160a01b031663e8e33700898989896127cc6127106106d06127c58d83613486565b8f90612466565b6127df6127106106d06127c58e83613486565b336127ec426102586126de565b6040518963ffffffff1660e01b815260040161280f989796959493929190613042565b606060405180830381600087803b15801561282957600080fd5b505af115801561283d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128619190612f24565b925092509250955095509592505050565b60006128c7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a959092919063ffffffff16565b80519091501561270957808060200190518101906128e59190612eb5565b6127095760405162461bcd60e51b81526004016104b5906132e5565b60025460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f90612934908790879060040161336f565b60006040518083038186803b15801561294c57600080fd5b505afa158015612960573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526129889190810190612e09565b90506000816129a26001845161245390919063ffffffff16565b815181106129c057634e487b7160e01b600052603260045260246000fd5b60200260200101519050600260009054906101000a90046001600160a01b03166001600160a01b0316637ff36ab586612a0a6127106106d06008548761246690919063ffffffff16565b8787612a18426102586126de565b6040518663ffffffff1660e01b8152600401612a379493929190613388565b6000604051808303818588803b158015612a5057600080fd5b505af1158015612a64573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052612a8d9190810190612e09565b505050505050565b606061234d848460008585612aa985612b3e565b612ac55760405162461bcd60e51b81526004016104b5906132ae565b600080866001600160a01b03168587604051612ae19190612f94565b60006040518083038185875af1925050503d8060008114612b1e576040519150601f19603f3d011682016040523d82523d6000602084013e612b23565b606091505b5091509150612b33828286612b44565b979650505050505050565b3b151590565b60608315612b5357508161245f565b825115612b635782518084602001fd5b8160405162461bcd60e51b81526004016104b591906130ea565b828054828255906000526020600020908101928215612bd2579160200282015b82811115612bd257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612b9d565b50612bde929150612be2565b5090565b5b80821115612bde5760008155600101612be3565b600060208284031215612c08578081fd5b813561245f816134f5565b600060208284031215612c24578081fd5b815161245f816134f5565b60008060408385031215612c41578081fd5b8235612c4c816134f5565b91506020830135612c5c816134f5565b809150509250929050565b600080600060608486031215612c7b578081fd5b8335612c86816134f5565b92506020840135612c96816134f5565b929592945050506040919091013590565b600080600080600060a08688031215612cbe578081fd5b8535612cc9816134f5565b94506020860135612cd9816134f5565b94979496505050506040830135926060810135926080909101359150565b60008060408385031215612d09578182fd5b8235612d14816134f5565b915060208381013567ffffffffffffffff811115612d30578283fd5b8401601f81018613612d40578283fd5b8035612d53612d4e8261340b565b6133e1565b81815283810190838501858402850186018a1015612d6f578687fd5b8694505b83851015612d9a578035612d86816134f5565b835260019490940193918501918501612d73565b5080955050505050509250929050565b60008060408385031215612dbc578182fd5b8235612dc7816134f5565b946020939093013593505050565b600080600060608486031215612de9578283fd5b8335612df4816134f5565b95602085013595506040909401359392505050565b60006020808385031215612e1b578182fd5b825167ffffffffffffffff811115612e31578283fd5b8301601f81018513612e41578283fd5b8051612e4f612d4e8261340b565b8181528381019083850185840285018601891015612e6b578687fd5b8694505b83851015612e8d578051835260019490940193918501918501612e6f565b50979650505050505050565b600060208284031215612eaa578081fd5b813561245f8161350a565b600060208284031215612ec6578081fd5b815161245f8161350a565b600060208284031215612ee2578081fd5b5035919050565b600060208284031215612efa578081fd5b5051919050565b60008060408385031215612f13578182fd5b505080516020909101519092909150565b600080600060608486031215612f38578081fd5b8351925060208401519150604084015190509250925092565b6000815180845260208085019450808401835b83811015612f895781516001600160a01b031687529582019590820190600101612f64565b509495945050505050565b60008251612fa681846020870161349d565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039788168152958716602087015260408601949094526060850192909252608084015290921660a082015260c081019190915260e00190565b6001600160a01b039889168152968816602088015260408701959095526060860193909352608085019190915260a084015290921660c082015260e08101919091526101000190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b901515815260200190565b600060208252825180602084015261310981604085016020870161349d565b601f01601f19169190910160400192915050565b6020808252600e908201526d616d6f756e74206973207a65726f60901b604082015260600190565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b6020808252601590820152746665652063616e6e6f74206578636565642032302560581b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b6020808252601e908201527f63616e6e6f74207573652073616d6520746f6b656e20666f7220706169720000604082015260600190565b6020808252601b908201527f736c6970706167652063616e6e6f742065786365656420313030250000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b90815260200190565b60008382526040602083015261234d6040830184612f51565b6000858252608060208301526133a16080830186612f51565b6001600160a01b03949094166040830152506060015292915050565b918252602082015260400190565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff81118282101715613403576134036134df565b604052919050565b600067ffffffffffffffff821115613425576134256134df565b5060209081020190565b60008219821115613442576134426134c9565b500190565b60008261346257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613481576134816134c9565b500290565b600082821015613498576134986134c9565b500390565b60005b838110156134b85781810151838201526020016134a0565b838111156125615750506000910152565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461244a57600080fd5b801515811461244a57600080fdfea26469706673582212200eb578a27581e35216426f6c95ec3e78d635f37a248f0853e50cade50dd5b62364736f6c63430008000033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.