ETH Price: $3,605.21 (-2.17%)

Contract

0x9CCe1faAdb983b08CA0876f750EB9b0456B7ce26
 

Overview

ETH Balance

0.027 ETH

Eth Value

$97.34 (@ $3,605.21/ETH)

Token Holdings

Multichain Info

No addresses found
Age:1H
Reset Filter

Transaction Hash
Method
Block
From
To

There are no matching entries

Update your filters to view other transactions

Latest 23 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
213115482024-12-02 1:28:4711 hrs ago1733102927
0x9CCe1faA...456B7ce26
0.4605 ETH
212752582024-11-26 23:37:475 days ago1732664267
0x9CCe1faA...456B7ce26
0.0985 ETH
212586292024-11-24 15:54:117 days ago1732463651
0x9CCe1faA...456B7ce26
0.2075 ETH
212184352024-11-19 1:17:3513 days ago1731979055
0x9CCe1faA...456B7ce26
0.52710326 ETH
210751592024-10-30 1:24:1133 days ago1730251451
0x9CCe1faA...456B7ce26
0.9009 ETH
208757442024-10-02 5:32:5961 days ago1727847179
0x9CCe1faA...456B7ce26
0.9 ETH
208756402024-10-02 5:12:1161 days ago1727845931
0x9CCe1faA...456B7ce26
0.2455 ETH
207424942024-09-13 15:09:3579 days ago1726240175
0x9CCe1faA...456B7ce26
0.696 ETH
207239272024-09-11 0:55:3582 days ago1726016135
0x9CCe1faA...456B7ce26
0.5 ETH
206964002024-09-07 4:42:2386 days ago1725684143
0x9CCe1faA...456B7ce26
1.0637 ETH
204887232024-08-09 4:42:35115 days ago1723178555
0x9CCe1faA...456B7ce26
0.37 ETH
204721012024-08-06 21:05:35117 days ago1722978335
0x9CCe1faA...456B7ce26
0.45253 ETH
204556952024-08-04 14:09:23119 days ago1722780563
0x9CCe1faA...456B7ce26
0.9717 ETH
202638932024-07-08 19:32:23146 days ago1720467143
0x9CCe1faA...456B7ce26
0.74 ETH
202271562024-07-03 16:24:35151 days ago1720023875
0x9CCe1faA...456B7ce26
1.2746 ETH
202224972024-07-03 0:47:11152 days ago1719967631
0x9CCe1faA...456B7ce26
0.344 ETH
201547412024-06-23 13:39:11161 days ago1719149951
0x9CCe1faA...456B7ce26
0.945 ETH
200725832024-06-12 1:51:59173 days ago1718157119
0x9CCe1faA...456B7ce26
0.538 ETH
198112352024-05-06 13:07:11209 days ago1715000831
0x9CCe1faA...456B7ce26
0.5 ETH
198067112024-05-05 21:56:11210 days ago1714946171
0x9CCe1faA...456B7ce26
0.598 ETH
196720062024-04-17 1:47:47229 days ago1713318467
0x9CCe1faA...456B7ce26
0.111 ETH
196652942024-04-16 3:13:35230 days ago1713237215
0x9CCe1faA...456B7ce26
0.717 ETH
194159512024-03-12 2:14:35265 days ago1710209675
0x9CCe1faA...456B7ce26
1.28409 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KTOverter

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : ktoverter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

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

// Interface for the Uniswap V2 Router
interface IUniswapV2Router02 {
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function WETH() external pure returns (address);
    
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;

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

/**
 * @title KTOverter - Token Exchange Contract
 * @dev This contract allows users to buy and sell KTO tokens using the Uniswap V2 Router.
 * @dev This contract also allows direct sale of KTO tokens from/to contract balance.
 */
contract KTOverter is Ownable, Pausable, ReentrancyGuard{
    using SafeMath for uint256;

    uint256 public minAmount = 1 * (10**9);
    uint256 public maxAmount = 1000000000 * (10**9); // 1 billion
    address public feeReceiver;
    IERC20 public theToken;
    uint256 public feeAmount;
    bool public ktoSellEnabled = false;
    uint256 public maxSellAmount;

    enum Fee {
        Disabled,
        Enabled
    }
    Fee public feeState;
    IUniswapV2Router02 public uniswapRouter;

    /**
     * @dev Initializes the KTOverter contract.
     * @param _tokenAddress The address of the KTO token contract.
     * @param _uniswapRouterAddress The address of the Uniswap V2 Router contract.
     */
    constructor(address _tokenAddress, address _uniswapRouterAddress) {
        theToken = IERC20(_tokenAddress);
        uniswapRouter = IUniswapV2Router02(_uniswapRouterAddress);
        feeState = Fee.Disabled;
    }

    /**
     * @dev Executes the fee calculation for a given input amount.
     * @param _amountIn The input amount to calculate the fee for.
     * @return _totalAfterFee The total amount after deducting the fee.
     */
    function enactFee(uint256 _amountIn) internal view returns(uint256 _totalAfterFee)
    {
        require(_amountIn > 0, "Amount must be greater than 0");
        uint256 divisor = 10_000;
        uint256 amountOutAfterFee = (_amountIn * (divisor - feeAmount)) / divisor;
        return amountOutAfterFee;
    }

    /**
     * @dev Returns the amount of output tokens for a given input amount of Ether.
     * @param _amountIn The input amount of Ether.
     * @param _tokenOut The address of the output token.
     * @return The amount of output tokens.
     */
    function getAmountOutFromEth(uint256 _amountIn, address _tokenOut) public view returns (uint256)
    {
        require(_amountIn > 0, "Value must be greater than 0 to get amount");
        require(_tokenOut != address(0), "Fatal error");

        address[] memory path = new address[](2);
        path[0] = uniswapRouter.WETH();
        path[1] = _tokenOut;

        uint[] memory amounts = uniswapRouter.getAmountsOut(_amountIn, path);
        
        return amounts[1];
    }
    /**  
    * @dev gets the conversion rate from token to weth
    * @param _amountKTOin the input amount of KTO
     */
    function tokenAmountInToEth(uint256 _amountKTOin) public view returns (uint256 _ethOut)
    {
        address[] memory path = new address[](2);
        path[0] = address(theToken);
        path[1] = uniswapRouter.WETH();

        uint[] memory amounts = uniswapRouter.getAmountsOut(_amountKTOin, path);

        return amounts[1];
    }
    /**
    * @dev allows users to sell KTO back to the verter
    * @param _amountOfKTO the amount of kto without decimals the user would like to sell
     */
    function sellKtoToConverter(uint _amountOfKTO) public
    {
        require(ktoSellEnabled, "selling through converter is currently disabled");
        require(maxSellAmount > 0, "max sell amount not set");
        require(address(this).balance > 0, "no eth to give for KTO-sell transaction");

        uint256 ethBalance = address(this).balance;
        uint256 prelimEth = tokenAmountInToEth(_amountOfKTO);
        uint256 finalEth;
        if(feeState == Fee.Enabled){
            finalEth = enactFee(prelimEth);
        } else {
            finalEth = prelimEth;
        }

        require(ethBalance >= finalEth, "not enough eth in contract for trade");

        require(_amountOfKTO <= maxSellAmount, "cannot sell over limit");

        bool transfer = theToken.transferFrom(msg.sender, address(this), _amountOfKTO);
        
        require(transfer, "token transfer failed");
        payable(msg.sender).transfer(finalEth);
        emit KTOSold(msg.sender, _amountOfKTO, block.timestamp);
        
    }
    function setSellActiveForVerterPool() public onlyOwner
    {
        ktoSellEnabled = !ktoSellEnabled;
    }
    function setMaxAmountForSelltoVerter(uint256 _newLimit) public onlyOwner
    {
        uint256 _newLimitWithDecimals = (_newLimit * 10 ** 9); 
        maxSellAmount = _newLimitWithDecimals;
    }

    /**
     * @dev Allows users to buy KTO tokens by sending Ether.
     */
    function buyWithWei() public payable whenNotPaused nonReentrant
    {
        uint amountOut = getAmountOutFromEth(msg.value, address(theToken));
        uint256 balToken = theToken.balanceOf(address(this));

        require(amountOut <= balToken, "Contract does not have enough balance");
        require(amountOut >= minAmount, "Below min");
        require(amountOut <= maxAmount, "Above max");
        
        uint256 eventAmount;

        if(feeState == Fee.Enabled){
            uint totalAmountOut = enactFee(amountOut);
            eventAmount = totalAmountOut;
        }else{
            eventAmount = amountOut;
        }

        require(theToken.transfer(msg.sender, eventAmount), "Transfer failed");
        emit KTOPurchase(msg.sender, eventAmount, block.timestamp);
    }

    /* Utility Functions */

    /**
     * @dev Sets the receiver address for the fee.
     * @param _receiver The address to receive the fee.
     */
    function setFeeReceiver(address _receiver) public onlyOwner
    {
        require(_receiver != address(0), "Cannot set receiver to burn");
        feeReceiver = _receiver;
    }

    /**
     * @dev Sets the fee amount.
     * @param _newFee The new fee amount.
     */
    function setFeeAmountForAll(uint256 _newFee) public onlyOwner
    {
        require(_newFee <= 1000 && _newFee >= 100, "Not permitted to raise fee over 10% of 10_000 or can't set below 1% of 10_000");
        feeAmount = _newFee;
    }

    /**
     * @dev Adds funds to the contract.
     * @param _amount The amount of tokens to add.
     * @notice only enter whole tokens. decimal calc is done already
     */
    function addFunds(uint256 _amount) public onlyOwner nonReentrant
    {
        uint totalAmount = _amount * 10 ** 9;

        require(theToken.transferFrom(msg.sender, address(this), totalAmount), "Transfer failed");
        emit AddFunds(msg.sender, _amount);
    }

    /**
     * @dev Sets the minimum amount of KTO tokens that can be bought.
     * @param _newMinAmount The new minimum amount. enter whole tokens
     */
    function setMinAmountBuy(uint256 _newMinAmount) public onlyOwner
    {
        minAmount = _newMinAmount * 10 ** 9;
    }

    /**
     * @dev Sets the maximum amount of KTO tokens that can be bought.
     * @param _newMaxAmount The new maximum amount.
     */
    function setMaxAmountBuy(uint256 _newMaxAmount) public onlyOwner
    {
        maxAmount = _newMaxAmount * 10 ** 9;
    }

    /**
     * @dev Toggles the fee state between enabled and disabled.
     */
    function toggleFee() public onlyOwner
    {
        if(feeState == Fee.Disabled){
            feeState = Fee.Enabled;
        } else if(feeState == Fee.Enabled){
            feeState = Fee.Disabled;
        }
    }

    /**
     * @dev Pauses the contract.
     */
    function pause() public onlyOwner
    {
        _pause();
    }

    /**
     * @dev Unpauses the contract.
     */
    function unpause() public onlyOwner
    {
        _unpause();
    }

    /**
     * @dev Allows the owner to withdraw ETH from the contract.
     */
    function withdrawETH() public onlyOwner nonReentrant
    {
        uint256 ethBalance = address(this).balance;
        payable(feeReceiver).transfer(ethBalance);
        emit Withdraw(feeReceiver, ethBalance);
    }

    /**
     * @dev Allows the owner to withdraw the base ERC-20 token from the contract's balance.
     */
    function withdrawKTO() public onlyOwner nonReentrant
    {
        uint256 balance = theToken.balanceOf(address(this));
        require(balance > 0, "Not enough balance");
        require(theToken.transfer(feeReceiver, balance), "Transfer failed");
        emit WithdrawTokens(feeReceiver, theToken, balance);
    }

    /**
     * @dev Updates the address of the Uniswap V2 Router contract.
     * @param _newPool The new address of the Uniswap V2 Router contract.
     */
    function updateRouterAddress(address _newPool) public onlyOwner nonReentrant
    {
        uniswapRouter = IUniswapV2Router02(_newPool);
    }

    /**
     * @dev Updates the address of the KTO token contract.
     * @param _tokenAddress The new address of the KTO token contract.
     */
    function updateTokenAddress(address _tokenAddress) public onlyOwner nonReentrant
    {
        theToken = IERC20(_tokenAddress);
    }

    /* Uniswap Pool Interaction */

    /**
     * @dev Buys KTO tokens with Ether. KTO stored in contract balance
     */
    function buyKTOforContract() public nonReentrant payable onlyOwner
    {
        uint256 ethBalance = address(this).balance;
        require(ethBalance > 0, "no eth to exchange");

        // Generate the Uniswap pair path of WETH -> transferTaxToken
        address[] memory path = new address[](2);
        path[0] = uniswapRouter.WETH();
        path[1] = address(theToken);

        // Make the swap
        uniswapRouter.swapExactETHForTokensSupportingFeeOnTransferTokens{ value: ethBalance }(
            0,  // Accept any amount of Ether
            path,
            address(this),
            block.timestamp
        );
    }

    /* Events */
    event Withdraw(address indexed user, uint256 amount);
    event WithdrawTokens(address indexed user, IERC20 indexed token, uint256 amount);
    event TokenExchanged(address indexed user, uint256 amountTokens, uint256 amountEth);
    event AddFunds(address indexed user, uint256 amount);
    event KTOPurchase(address indexed user, uint256 KTOamount, uint256 time);
    event KTOSold(address indexed user, uint256 KTOamount, uint256 time);
}

File 2 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 3 of 7 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 7 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 5 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}

File 6 of 7 : 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 7 of 7 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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 subtraction 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;
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_uniswapRouterAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AddFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"KTOamount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"KTOPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"KTOamount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"KTOSold","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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountEth","type":"uint256"}],"name":"TokenExchanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawTokens","type":"event"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyKTOforContract","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buyWithWei","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"feeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeState","outputs":[{"internalType":"enum KTOverter.Fee","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenOut","type":"address"}],"name":"getAmountOutFromEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ktoSellEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSellAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountOfKTO","type":"uint256"}],"name":"sellKtoToConverter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newFee","type":"uint256"}],"name":"setFeeAmountForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"setFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxAmount","type":"uint256"}],"name":"setMaxAmountBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newLimit","type":"uint256"}],"name":"setMaxAmountForSelltoVerter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMinAmount","type":"uint256"}],"name":"setMinAmountBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setSellActiveForVerterPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"theToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountKTOin","type":"uint256"}],"name":"tokenAmountInToEth","outputs":[{"internalType":"uint256","name":"_ethOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newPool","type":"address"}],"name":"updateRouterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"updateTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawKTO","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052633b9aca00600255670de0b6b3a76400006003556007805460ff191690553480156200002f57600080fd5b5060405162001ea438038062001ea483398101604081905262000052916200011e565b6200005d33620000b1565b6000805460ff60a01b1916905560018055600580546001600160a01b039384166001600160a01b031990911617905560098054919092166101000260ff19166001600160a81b031990911617905562000156565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200011957600080fd5b919050565b600080604083850312156200013257600080fd5b6200013d8362000101565b91506200014d6020840162000101565b90509250929050565b611d3e80620001666000396000f3fe6080604052600436106101e25760003560e01c80638456cb5911610102578063c47b405a11610095578063efdcd97411610064578063efdcd9741461051e578063f2a4314d1461053e578063f2fde38b14610546578063fcdcb7561461056657600080fd5b8063c47b405a146104a9578063c8f21a8a146104c9578063d6c9d91a146104e9578063e086e5ec1461050957600080fd5b8063a9c8d488116100d1578063a9c8d48814610441578063ad19b72414610461578063b3f0067414610469578063be9997051461048957600080fd5b80638456cb59146103e35780638da5cb5b146103f85780639b2cb5d814610416578063a8978c2e1461042c57600080fd5b80635e2093631161017a57806369e154041161014957806369e1540414610366578063715018a61461037c578063735de9f7146103915780637e288529146103ce57600080fd5b80635e209363146103055780635f48f3931461031a5780636691461a1461033057806366d602ae1461035057600080fd5b80633f4ba83a116101b65780633f4ba83a1461027957806352e616661461028e57806355fb3774146102b85780635c975abb146102e657600080fd5b8062e6be7b146101e75780631b9e1134146102095780631e1f5d451461022957806336bae70214610259575b600080fd5b3480156101f357600080fd5b506102076102023660046119fe565b610586565b005b34801561021557600080fd5b50610207610224366004611a22565b6105c0565b34801561023557600080fd5b506009546102439060ff1681565b6040516102509190611a51565b60405180910390f35b34801561026557600080fd5b50610207610274366004611a22565b6105dc565b34801561028557600080fd5b50610207610917565b34801561029a57600080fd5b506007546102a89060ff1681565b6040519015158152602001610250565b3480156102c457600080fd5b506102d86102d3366004611a22565b610929565b604051908152602001610250565b3480156102f257600080fd5b50600054600160a01b900460ff166102a8565b34801561031157600080fd5b50610207610acc565b34801561032657600080fd5b506102d860035481565b34801561033c57600080fd5b5061020761034b3660046119fe565b610b2b565b34801561035c57600080fd5b506102d860085481565b34801561037257600080fd5b506102d860065481565b34801561038857600080fd5b50610207610b5d565b34801561039d57600080fd5b506009546103b69061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610250565b3480156103da57600080fd5b50610207610b6f565b3480156103ef57600080fd5b50610207610b8b565b34801561040457600080fd5b506000546001600160a01b03166103b6565b34801561042257600080fd5b506102d860025481565b34801561043857600080fd5b50610207610b9b565b34801561044d57600080fd5b5061020761045c366004611a22565b610d4b565b610207610d67565b34801561047557600080fd5b506004546103b6906001600160a01b031681565b34801561049557600080fd5b506102076104a4366004611a22565b610f20565b3480156104b557600080fd5b506102076104c4366004611a22565b611017565b3480156104d557600080fd5b506102076104e4366004611a22565b6110bf565b3480156104f557600080fd5b506102d8610504366004611a79565b6110de565b34801561051557600080fd5b5061020761131b565b34801561052a57600080fd5b506102076105393660046119fe565b6113b2565b610207611432565b34801561055257600080fd5b506102076105613660046119fe565b6116b8565b34801561057257600080fd5b506005546103b6906001600160a01b031681565b61058e61172e565b610596611788565b60098054610100600160a81b0319166101006001600160a01b038416021790556001805550565b50565b6105c861172e565b6105d681633b9aca00611abf565b60035550565b60075460ff1661064b5760405162461bcd60e51b815260206004820152602f60248201527f73656c6c696e67207468726f75676820636f6e7665727465722069732063757260448201526e1c995b9d1b1e48191a5cd8589b1959608a1b60648201526084015b60405180910390fd5b60006008541161069d5760405162461bcd60e51b815260206004820152601760248201527f6d61782073656c6c20616d6f756e74206e6f74207365740000000000000000006044820152606401610642565b600047116106fd5760405162461bcd60e51b815260206004820152602760248201527f6e6f2065746820746f206769766520666f72204b544f2d73656c6c207472616e60448201526639b0b1ba34b7b760c91b6064820152608401610642565b47600061070983610929565b90506000600160095460ff16600181111561072657610726611a3b565b0361073b57610734826117e1565b905061073e565b50805b8083101561079a5760405162461bcd60e51b8152602060048201526024808201527f6e6f7420656e6f7567682065746820696e20636f6e747261637420666f7220746044820152637261646560e01b6064820152608401610642565b6008548411156107e55760405162461bcd60e51b815260206004820152601660248201527518d85b9b9bdd081cd95b1b081bdd995c881b1a5b5a5d60521b6044820152606401610642565b6005546040516323b872dd60e01b8152336004820152306024820152604481018690526000916001600160a01b0316906323b872dd906064016020604051808303816000875af115801561083d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108619190611ad6565b9050806108a85760405162461bcd60e51b81526020600482015260156024820152741d1bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610642565b604051339083156108fc029084906000818181858888f193505050501580156108d5573d6000803e3d6000fd5b506040805186815242602082015233917f3eb348b6478cbb086a23884b056d13b842570ab6cee3d7f29976335de7c2503e910160405180910390a25050505050565b61091f61172e565b610927611864565b565b60408051600280825260608201835260009283929190602083019080368337505060055482519293506001600160a01b03169183915060009061096e5761096e611b0e565b60200260200101906001600160a01b031690816001600160a01b031681525050600960019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a059190611b24565b81600181518110610a1857610a18611b0e565b6001600160a01b03928316602091820292909201015260095460405163d06ca61f60e01b81526000926101009092049091169063d06ca61f90610a619087908690600401611b85565b600060405180830381865afa158015610a7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aa69190810190611b9e565b905080600181518110610abb57610abb611b0e565b602002602001015192505050919050565b610ad461172e565b600060095460ff166001811115610aed57610aed611a3b565b03610b01576009805460ff19166001179055565b600160095460ff166001811115610b1a57610b1a611a3b565b03610927576009805460ff19169055565b610b3361172e565b610b3b611788565b600580546001600160a01b0319166001600160a01b0383161790556001805550565b610b6561172e565b61092760006118b9565b610b7761172e565b6007805460ff19811660ff90911615179055565b610b9361172e565b610927611909565b610ba361172e565b610bab611788565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610bf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c189190611c5c565b905060008111610c5f5760405162461bcd60e51b81526020600482015260126024820152714e6f7420656e6f7567682062616c616e636560701b6044820152606401610642565b6005546004805460405163a9059cbb60e01b81526001600160a01b0391821692810192909252602482018490529091169063a9059cbb906044016020604051808303816000875af1158015610cb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdc9190611ad6565b610cf85760405162461bcd60e51b815260040161064290611c75565b6005546004546040518381526001600160a01b0392831692909116907f70082d08c003c5341f2401bec1c2ae1dbcdc29ae17e9cc5633fa617caa8acd4c9060200160405180910390a35061092760018055565b610d5361172e565b610d6181633b9aca00611abf565b60025550565b610d6f611788565b610d7761172e565b4780610dba5760405162461bcd60e51b81526020600482015260126024820152716e6f2065746820746f2065786368616e676560701b6044820152606401610642565b604080516002808252606082018352600092602083019080368337019050509050600960019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e529190611b24565b81600081518110610e6557610e65611b0e565b6001600160a01b039283166020918202929092010152600554825191169082906001908110610e9657610e96611b0e565b6001600160a01b03928316602091820292909201015260095460405163b6f9de9560e01b81526101009091049091169063b6f9de95908490610ee390600090869030904290600401611c9e565b6000604051808303818588803b158015610efc57600080fd5b505af1158015610f10573d6000803e3d6000fd5b5050505050505061092760018055565b610f2861172e565b610f30611788565b6000610f4082633b9aca00611abf565b6005546040516323b872dd60e01b8152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbc9190611ad6565b610fd85760405162461bcd60e51b815260040161064290611c75565b60405182815233907ff424eeb50f7d240513b6dc4a39048768557d8465bdc7d2dd363ecc538006c2be9060200160405180910390a2506105bd60018055565b61101f61172e565b6103e88111158015611032575060648110155b6110ba5760405162461bcd60e51b815260206004820152604d60248201527f4e6f74207065726d697474656420746f20726169736520666565206f7665722060448201527f313025206f662031305f303030206f722063616e2774207365742062656c6f7760648201526c0203125206f662031305f30303609c1b608482015260a401610642565b600655565b6110c761172e565b60006110d782633b9aca00611abf565b6008555050565b60008083116111425760405162461bcd60e51b815260206004820152602a60248201527f56616c7565206d7573742062652067726561746572207468616e203020746f2060448201526919d95d08185b5bdd5b9d60b21b6064820152608401610642565b6001600160a01b0382166111865760405162461bcd60e51b815260206004820152600b60248201526a2330ba30b61032b93937b960a91b6044820152606401610642565b604080516002808252606082018352600092602083019080368337019050509050600960019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121e9190611b24565b8160008151811061123157611231611b0e565b60200260200101906001600160a01b031690816001600160a01b031681525050828160018151811061126557611265611b0e565b6001600160a01b03928316602091820292909201015260095460405163d06ca61f60e01b81526000926101009092049091169063d06ca61f906112ae9088908690600401611b85565b600060405180830381865afa1580156112cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112f39190810190611b9e565b90508060018151811061130857611308611b0e565b6020026020010151925050505b92915050565b61132361172e565b61132b611788565b60045460405147916001600160a01b03169082156108fc029083906000818181858888f19350505050158015611365573d6000803e3d6000fd5b506004546040518281526001600160a01b03909116907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a25061092760018055565b6113ba61172e565b6001600160a01b0381166114105760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f742073657420726563656976657220746f206275726e00000000006044820152606401610642565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b61143a61194c565b611442611788565b60055460009061145c9034906001600160a01b03166110de565b6005546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156114aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ce9190611c5c565b90508082111561152e5760405162461bcd60e51b815260206004820152602560248201527f436f6e747261637420646f6573206e6f74206861766520656e6f7567682062616044820152646c616e636560d81b6064820152608401610642565b60025482101561156c5760405162461bcd60e51b81526020600482015260096024820152682132b637bb9036b4b760b91b6044820152606401610642565b6003548211156115aa5760405162461bcd60e51b8152602060048201526009602482015268082c4deecca40dac2f60bb1b6044820152606401610642565b6000600160095460ff1660018111156115c5576115c5611a3b565b036115de5760006115d5846117e1565b91506115e19050565b50815b60055460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015611632573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116569190611ad6565b6116725760405162461bcd60e51b815260040161064290611c75565b6040805182815242602082015233917f93e2dc77f6d09d7d02ee2b5283915399b840c36cf6036427ff7c3328ae4c236e910160405180910390a250505061092760018055565b6116c061172e565b6001600160a01b0381166117255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610642565b6105bd816118b9565b6000546001600160a01b031633146109275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610642565b6002600154036117da5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610642565b6002600155565b60008082116118325760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610642565b6006546127109060009082906118489082611cd3565b6118529086611abf565b61185c9190611ce6565b949350505050565b61186c611999565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61191161194c565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861189c3390565b600054600160a01b900460ff16156109275760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610642565b600054600160a01b900460ff166109275760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610642565b6001600160a01b03811681146105bd57600080fd5b600060208284031215611a1057600080fd5b8135611a1b816119e9565b9392505050565b600060208284031215611a3457600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b6020810160028310611a7357634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215611a8c57600080fd5b823591506020830135611a9e816119e9565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761131557611315611aa9565b600060208284031215611ae857600080fd5b81518015158114611a1b57600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215611b3657600080fd5b8151611a1b816119e9565b600081518084526020808501945080840160005b83811015611b7a5781516001600160a01b031687529582019590820190600101611b55565b509495945050505050565b82815260406020820152600061185c6040830184611b41565b60006020808385031215611bb157600080fd5b825167ffffffffffffffff80821115611bc957600080fd5b818501915085601f830112611bdd57600080fd5b815181811115611bef57611bef611af8565b8060051b604051601f19603f83011681018181108582111715611c1457611c14611af8565b604052918252848201925083810185019188831115611c3257600080fd5b938501935b82851015611c5057845184529385019392850192611c37565b98975050505050505050565b600060208284031215611c6e57600080fd5b5051919050565b6020808252600f908201526e151c985b9cd9995c8819985a5b1959608a1b604082015260600190565b848152608060208201526000611cb76080830186611b41565b6001600160a01b03949094166040830152506060015292915050565b8181038181111561131557611315611aa9565b600082611d0357634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220e13fbb4105a9415e739edf79eec5d3c6f8a7d829fc2ec6eb29bc528a334f71a264736f6c63430008110033000000000000000000000000616ef40d55c0d2c506f4d6873bda8090b79bf8fc0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

Deployed Bytecode

0x6080604052600436106101e25760003560e01c80638456cb5911610102578063c47b405a11610095578063efdcd97411610064578063efdcd9741461051e578063f2a4314d1461053e578063f2fde38b14610546578063fcdcb7561461056657600080fd5b8063c47b405a146104a9578063c8f21a8a146104c9578063d6c9d91a146104e9578063e086e5ec1461050957600080fd5b8063a9c8d488116100d1578063a9c8d48814610441578063ad19b72414610461578063b3f0067414610469578063be9997051461048957600080fd5b80638456cb59146103e35780638da5cb5b146103f85780639b2cb5d814610416578063a8978c2e1461042c57600080fd5b80635e2093631161017a57806369e154041161014957806369e1540414610366578063715018a61461037c578063735de9f7146103915780637e288529146103ce57600080fd5b80635e209363146103055780635f48f3931461031a5780636691461a1461033057806366d602ae1461035057600080fd5b80633f4ba83a116101b65780633f4ba83a1461027957806352e616661461028e57806355fb3774146102b85780635c975abb146102e657600080fd5b8062e6be7b146101e75780631b9e1134146102095780631e1f5d451461022957806336bae70214610259575b600080fd5b3480156101f357600080fd5b506102076102023660046119fe565b610586565b005b34801561021557600080fd5b50610207610224366004611a22565b6105c0565b34801561023557600080fd5b506009546102439060ff1681565b6040516102509190611a51565b60405180910390f35b34801561026557600080fd5b50610207610274366004611a22565b6105dc565b34801561028557600080fd5b50610207610917565b34801561029a57600080fd5b506007546102a89060ff1681565b6040519015158152602001610250565b3480156102c457600080fd5b506102d86102d3366004611a22565b610929565b604051908152602001610250565b3480156102f257600080fd5b50600054600160a01b900460ff166102a8565b34801561031157600080fd5b50610207610acc565b34801561032657600080fd5b506102d860035481565b34801561033c57600080fd5b5061020761034b3660046119fe565b610b2b565b34801561035c57600080fd5b506102d860085481565b34801561037257600080fd5b506102d860065481565b34801561038857600080fd5b50610207610b5d565b34801561039d57600080fd5b506009546103b69061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610250565b3480156103da57600080fd5b50610207610b6f565b3480156103ef57600080fd5b50610207610b8b565b34801561040457600080fd5b506000546001600160a01b03166103b6565b34801561042257600080fd5b506102d860025481565b34801561043857600080fd5b50610207610b9b565b34801561044d57600080fd5b5061020761045c366004611a22565b610d4b565b610207610d67565b34801561047557600080fd5b506004546103b6906001600160a01b031681565b34801561049557600080fd5b506102076104a4366004611a22565b610f20565b3480156104b557600080fd5b506102076104c4366004611a22565b611017565b3480156104d557600080fd5b506102076104e4366004611a22565b6110bf565b3480156104f557600080fd5b506102d8610504366004611a79565b6110de565b34801561051557600080fd5b5061020761131b565b34801561052a57600080fd5b506102076105393660046119fe565b6113b2565b610207611432565b34801561055257600080fd5b506102076105613660046119fe565b6116b8565b34801561057257600080fd5b506005546103b6906001600160a01b031681565b61058e61172e565b610596611788565b60098054610100600160a81b0319166101006001600160a01b038416021790556001805550565b50565b6105c861172e565b6105d681633b9aca00611abf565b60035550565b60075460ff1661064b5760405162461bcd60e51b815260206004820152602f60248201527f73656c6c696e67207468726f75676820636f6e7665727465722069732063757260448201526e1c995b9d1b1e48191a5cd8589b1959608a1b60648201526084015b60405180910390fd5b60006008541161069d5760405162461bcd60e51b815260206004820152601760248201527f6d61782073656c6c20616d6f756e74206e6f74207365740000000000000000006044820152606401610642565b600047116106fd5760405162461bcd60e51b815260206004820152602760248201527f6e6f2065746820746f206769766520666f72204b544f2d73656c6c207472616e60448201526639b0b1ba34b7b760c91b6064820152608401610642565b47600061070983610929565b90506000600160095460ff16600181111561072657610726611a3b565b0361073b57610734826117e1565b905061073e565b50805b8083101561079a5760405162461bcd60e51b8152602060048201526024808201527f6e6f7420656e6f7567682065746820696e20636f6e747261637420666f7220746044820152637261646560e01b6064820152608401610642565b6008548411156107e55760405162461bcd60e51b815260206004820152601660248201527518d85b9b9bdd081cd95b1b081bdd995c881b1a5b5a5d60521b6044820152606401610642565b6005546040516323b872dd60e01b8152336004820152306024820152604481018690526000916001600160a01b0316906323b872dd906064016020604051808303816000875af115801561083d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108619190611ad6565b9050806108a85760405162461bcd60e51b81526020600482015260156024820152741d1bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610642565b604051339083156108fc029084906000818181858888f193505050501580156108d5573d6000803e3d6000fd5b506040805186815242602082015233917f3eb348b6478cbb086a23884b056d13b842570ab6cee3d7f29976335de7c2503e910160405180910390a25050505050565b61091f61172e565b610927611864565b565b60408051600280825260608201835260009283929190602083019080368337505060055482519293506001600160a01b03169183915060009061096e5761096e611b0e565b60200260200101906001600160a01b031690816001600160a01b031681525050600960019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a059190611b24565b81600181518110610a1857610a18611b0e565b6001600160a01b03928316602091820292909201015260095460405163d06ca61f60e01b81526000926101009092049091169063d06ca61f90610a619087908690600401611b85565b600060405180830381865afa158015610a7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aa69190810190611b9e565b905080600181518110610abb57610abb611b0e565b602002602001015192505050919050565b610ad461172e565b600060095460ff166001811115610aed57610aed611a3b565b03610b01576009805460ff19166001179055565b600160095460ff166001811115610b1a57610b1a611a3b565b03610927576009805460ff19169055565b610b3361172e565b610b3b611788565b600580546001600160a01b0319166001600160a01b0383161790556001805550565b610b6561172e565b61092760006118b9565b610b7761172e565b6007805460ff19811660ff90911615179055565b610b9361172e565b610927611909565b610ba361172e565b610bab611788565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610bf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c189190611c5c565b905060008111610c5f5760405162461bcd60e51b81526020600482015260126024820152714e6f7420656e6f7567682062616c616e636560701b6044820152606401610642565b6005546004805460405163a9059cbb60e01b81526001600160a01b0391821692810192909252602482018490529091169063a9059cbb906044016020604051808303816000875af1158015610cb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdc9190611ad6565b610cf85760405162461bcd60e51b815260040161064290611c75565b6005546004546040518381526001600160a01b0392831692909116907f70082d08c003c5341f2401bec1c2ae1dbcdc29ae17e9cc5633fa617caa8acd4c9060200160405180910390a35061092760018055565b610d5361172e565b610d6181633b9aca00611abf565b60025550565b610d6f611788565b610d7761172e565b4780610dba5760405162461bcd60e51b81526020600482015260126024820152716e6f2065746820746f2065786368616e676560701b6044820152606401610642565b604080516002808252606082018352600092602083019080368337019050509050600960019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e529190611b24565b81600081518110610e6557610e65611b0e565b6001600160a01b039283166020918202929092010152600554825191169082906001908110610e9657610e96611b0e565b6001600160a01b03928316602091820292909201015260095460405163b6f9de9560e01b81526101009091049091169063b6f9de95908490610ee390600090869030904290600401611c9e565b6000604051808303818588803b158015610efc57600080fd5b505af1158015610f10573d6000803e3d6000fd5b5050505050505061092760018055565b610f2861172e565b610f30611788565b6000610f4082633b9aca00611abf565b6005546040516323b872dd60e01b8152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbc9190611ad6565b610fd85760405162461bcd60e51b815260040161064290611c75565b60405182815233907ff424eeb50f7d240513b6dc4a39048768557d8465bdc7d2dd363ecc538006c2be9060200160405180910390a2506105bd60018055565b61101f61172e565b6103e88111158015611032575060648110155b6110ba5760405162461bcd60e51b815260206004820152604d60248201527f4e6f74207065726d697474656420746f20726169736520666565206f7665722060448201527f313025206f662031305f303030206f722063616e2774207365742062656c6f7760648201526c0203125206f662031305f30303609c1b608482015260a401610642565b600655565b6110c761172e565b60006110d782633b9aca00611abf565b6008555050565b60008083116111425760405162461bcd60e51b815260206004820152602a60248201527f56616c7565206d7573742062652067726561746572207468616e203020746f2060448201526919d95d08185b5bdd5b9d60b21b6064820152608401610642565b6001600160a01b0382166111865760405162461bcd60e51b815260206004820152600b60248201526a2330ba30b61032b93937b960a91b6044820152606401610642565b604080516002808252606082018352600092602083019080368337019050509050600960019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121e9190611b24565b8160008151811061123157611231611b0e565b60200260200101906001600160a01b031690816001600160a01b031681525050828160018151811061126557611265611b0e565b6001600160a01b03928316602091820292909201015260095460405163d06ca61f60e01b81526000926101009092049091169063d06ca61f906112ae9088908690600401611b85565b600060405180830381865afa1580156112cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112f39190810190611b9e565b90508060018151811061130857611308611b0e565b6020026020010151925050505b92915050565b61132361172e565b61132b611788565b60045460405147916001600160a01b03169082156108fc029083906000818181858888f19350505050158015611365573d6000803e3d6000fd5b506004546040518281526001600160a01b03909116907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a25061092760018055565b6113ba61172e565b6001600160a01b0381166114105760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f742073657420726563656976657220746f206275726e00000000006044820152606401610642565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b61143a61194c565b611442611788565b60055460009061145c9034906001600160a01b03166110de565b6005546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156114aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ce9190611c5c565b90508082111561152e5760405162461bcd60e51b815260206004820152602560248201527f436f6e747261637420646f6573206e6f74206861766520656e6f7567682062616044820152646c616e636560d81b6064820152608401610642565b60025482101561156c5760405162461bcd60e51b81526020600482015260096024820152682132b637bb9036b4b760b91b6044820152606401610642565b6003548211156115aa5760405162461bcd60e51b8152602060048201526009602482015268082c4deecca40dac2f60bb1b6044820152606401610642565b6000600160095460ff1660018111156115c5576115c5611a3b565b036115de5760006115d5846117e1565b91506115e19050565b50815b60055460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015611632573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116569190611ad6565b6116725760405162461bcd60e51b815260040161064290611c75565b6040805182815242602082015233917f93e2dc77f6d09d7d02ee2b5283915399b840c36cf6036427ff7c3328ae4c236e910160405180910390a250505061092760018055565b6116c061172e565b6001600160a01b0381166117255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610642565b6105bd816118b9565b6000546001600160a01b031633146109275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610642565b6002600154036117da5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610642565b6002600155565b60008082116118325760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610642565b6006546127109060009082906118489082611cd3565b6118529086611abf565b61185c9190611ce6565b949350505050565b61186c611999565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61191161194c565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861189c3390565b600054600160a01b900460ff16156109275760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610642565b600054600160a01b900460ff166109275760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610642565b6001600160a01b03811681146105bd57600080fd5b600060208284031215611a1057600080fd5b8135611a1b816119e9565b9392505050565b600060208284031215611a3457600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b6020810160028310611a7357634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215611a8c57600080fd5b823591506020830135611a9e816119e9565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761131557611315611aa9565b600060208284031215611ae857600080fd5b81518015158114611a1b57600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215611b3657600080fd5b8151611a1b816119e9565b600081518084526020808501945080840160005b83811015611b7a5781516001600160a01b031687529582019590820190600101611b55565b509495945050505050565b82815260406020820152600061185c6040830184611b41565b60006020808385031215611bb157600080fd5b825167ffffffffffffffff80821115611bc957600080fd5b818501915085601f830112611bdd57600080fd5b815181811115611bef57611bef611af8565b8060051b604051601f19603f83011681018181108582111715611c1457611c14611af8565b604052918252848201925083810185019188831115611c3257600080fd5b938501935b82851015611c5057845184529385019392850192611c37565b98975050505050505050565b600060208284031215611c6e57600080fd5b5051919050565b6020808252600f908201526e151c985b9cd9995c8819985a5b1959608a1b604082015260600190565b848152608060208201526000611cb76080830186611b41565b6001600160a01b03949094166040830152506060015292915050565b8181038181111561131557611315611aa9565b600082611d0357634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220e13fbb4105a9415e739edf79eec5d3c6f8a7d829fc2ec6eb29bc528a334f71a264736f6c63430008110033

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

000000000000000000000000616ef40d55c0d2c506f4d6873bda8090b79bf8fc0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0x616ef40D55C0D2c506f4d6873Bda8090b79BF8fC
Arg [1] : _uniswapRouterAddress (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000616ef40d55c0d2c506f4d6873bda8090b79bf8fc
Arg [1] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d


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  ]

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.