S Price: $0.512864 (+1.10%)

Contract

0x5Ef1C93FcF3F9703c4097A02a56D911b09c55DE6

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x0A59593e...47230C054
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
honeyCheckerV5

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

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

pragma abicoder v2;
pragma solidity ^0.8.7;

interface IERC20 {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

    function decimals() external view returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(
        address owner,
        address spender
    ) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);
}

interface IWETH {
    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

    function withdraw(uint256) external;
}

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

    function WETH() external pure returns (address);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);

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

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

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

interface IUniswapV3Router {
    struct ExactInputParams {
        bytes path; // Encoded path
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);
}

contract honeyCheckerV5 {
    IUniswapV2Router02 public routerV2;
    IUniswapV3Router public routerV3;
    uint256 approveInfinity =
        115792089237316195423570985008687907853269984665640564039457584007913129639935;

    struct HoneyResponse {
        uint256 buyResult;
        uint256 tokenBalance2;
        uint256 sellResult;
        uint256 buyCost;
        uint256 sellCost;
        uint256 expectedAmount;
    }

    constructor() {}

    function honeyCheckV2(
        address targetTokenAddress,
        address idexRouterAddres
    ) external payable returns (HoneyResponse memory response) {
        routerV2 = IUniswapV2Router02(idexRouterAddres);

        IERC20 wCoin = IERC20(routerV2.WETH()); // wETH
        IERC20 targetToken = IERC20(targetTokenAddress); //Test Token

        address[] memory buyPath = new address[](2);
        buyPath[0] = routerV2.WETH();
        buyPath[1] = targetTokenAddress;

        address[] memory sellPath = new address[](2);
        sellPath[0] = targetTokenAddress;
        sellPath[1] = routerV2.WETH();

        uint256[] memory amounts = routerV2.getAmountsOut(msg.value, buyPath);

        uint256 expectedAmount = amounts[1];

        IWETH(routerV2.WETH()).deposit{value: msg.value}();

        wCoin.approve(idexRouterAddres, approveInfinity);

        uint256 wCoinBalance = wCoin.balanceOf(address(this));

        uint256 startBuyGas = gasleft();

        routerV2.swapExactTokensForTokensSupportingFeeOnTransferTokens(
            wCoinBalance,
            1,
            buyPath,
            address(this),
            block.timestamp + 10
        );

        uint256 buyResult = targetToken.balanceOf(address(this));

        uint256 finishBuyGas = gasleft();

        targetToken.approve(idexRouterAddres, approveInfinity);

        uint256 startSellGas = gasleft();

        routerV2.swapExactTokensForTokensSupportingFeeOnTransferTokens(
            buyResult,
            1,
            sellPath,
            address(this),
            block.timestamp + 10
        );

        uint256 finishSellGas = gasleft();

        uint256 tokenBalance2 = targetToken.balanceOf(address(this));

        uint256 sellResult = wCoin.balanceOf(address(this));

        // uint256 buyCost = startBuyGas - finishBuyGas;
        // uint256 sellCost = startSellGas - finishSellGas;

        response = HoneyResponse(
            buyResult,
            tokenBalance2,
            sellResult,
            startBuyGas - finishBuyGas,
            startSellGas - finishSellGas,
            expectedAmount
        );

        return response;
    }


function honeyCheckV3(
    address targetTokenAddress,
    address uniswapRouterAddress
) external payable returns (HoneyResponse memory response) {
    require(msg.value > 0, "Must send ETH to perform a check");
    require(targetTokenAddress != address(0), "Invalid target token address");

    routerV3 = IUniswapV3Router(uniswapRouterAddress);

    IERC20 wCoin = IERC20(routerV2.WETH());
    IERC20 targetToken = IERC20(targetTokenAddress);

    bytes memory buyPath = abi.encodePacked(routerV2.WETH(), targetTokenAddress);
    bytes memory sellPath = abi.encodePacked(targetTokenAddress, routerV2.WETH());

    IWETH(routerV2.WETH()).deposit{value: msg.value}();

    wCoin.approve(uniswapRouterAddress, approveInfinity);

    uint256 startBuyGas = gasleft();
    uint256 buyResult = routerV3.exactInput(
        IUniswapV3Router.ExactInputParams({
            path: buyPath,
            recipient: address(this),
            deadline: block.timestamp + 10,
            amountIn: msg.value,
            amountOutMinimum: 1
        })
    );
    uint256 finishBuyGas = gasleft();

    targetToken.approve(uniswapRouterAddress, approveInfinity);

    uint256 startSellGas = gasleft();
    uint256 sellResult = routerV3.exactInput(
        IUniswapV3Router.ExactInputParams({
            path: sellPath,
            recipient: address(this),
            deadline: block.timestamp + 10,
            amountIn: buyResult,
            amountOutMinimum: 1
        })
    );
    uint256 finishSellGas = gasleft();

    uint256 tokenBalance2 = targetToken.balanceOf(address(this));

    response = HoneyResponse({
        buyResult: buyResult,
        tokenBalance2: tokenBalance2,
        sellResult: sellResult,
        buyCost: startBuyGas - finishBuyGas,
        sellCost: startSellGas - finishSellGas,
        expectedAmount: 0 
    });

    return response;
}

}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"targetTokenAddress","type":"address"},{"internalType":"address","name":"idexRouterAddres","type":"address"}],"name":"honeyCheckV2","outputs":[{"components":[{"internalType":"uint256","name":"buyResult","type":"uint256"},{"internalType":"uint256","name":"tokenBalance2","type":"uint256"},{"internalType":"uint256","name":"sellResult","type":"uint256"},{"internalType":"uint256","name":"buyCost","type":"uint256"},{"internalType":"uint256","name":"sellCost","type":"uint256"},{"internalType":"uint256","name":"expectedAmount","type":"uint256"}],"internalType":"struct honeyCheckerV5.HoneyResponse","name":"response","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"targetTokenAddress","type":"address"},{"internalType":"address","name":"uniswapRouterAddress","type":"address"}],"name":"honeyCheckV3","outputs":[{"components":[{"internalType":"uint256","name":"buyResult","type":"uint256"},{"internalType":"uint256","name":"tokenBalance2","type":"uint256"},{"internalType":"uint256","name":"sellResult","type":"uint256"},{"internalType":"uint256","name":"buyCost","type":"uint256"},{"internalType":"uint256","name":"sellCost","type":"uint256"},{"internalType":"uint256","name":"expectedAmount","type":"uint256"}],"internalType":"struct honeyCheckerV5.HoneyResponse","name":"response","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"routerV2","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"routerV3","outputs":[{"internalType":"contract IUniswapV3Router","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x60806040526004361061003f5760003560e01c8063144ff6f31461004457806332662a78146100ac578063502f7446146100bf578063f2b3b467146100f7575b600080fd5b610057610052366004610fd6565b610117565b6040516100a39190600060c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015292915050565b60405180910390f35b6100576100ba366004610fd6565b6107c6565b3480156100cb57600080fd5b506000546100df906001600160a01b031681565b6040516001600160a01b0390911681526020016100a3565b34801561010357600080fd5b506001546100df906001600160a01b031681565b6101506040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b600034116101a55760405162461bcd60e51b815260206004820181905260248201527f4d7573742073656e642045544820746f20706572666f726d206120636865636b60448201526064015b60405180910390fd5b6001600160a01b0383166101fb5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642074617267657420746f6b656e206164647265737300000000604482015260640161019c565b600180546001600160a01b0319166001600160a01b038481169190911790915560008054604080516315ab88c960e31b815290519293919091169163ad5c4648916004808201926020929091908290030181865afa158015610261573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610285919061100f565b60008054604080516315ab88c960e31b8152905193945087936001600160a01b039092169163ad5c4648916004808201926020929091908290030181865afa1580156102d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f9919061100f565b6040516bffffffffffffffffffffffff19606092831b811660208301529188901b9091166034820152604801604051602081830303815290604052905060008660008054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561038a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ae919061100f565b6040516bffffffffffffffffffffffff19606093841b811660208301529190921b16603482015260480160408051601f198184030181528282526000546315ab88c960e31b845291519093506001600160a01b039091169163ad5c46489160048083019260209291908290030181865afa158015610430573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610454919061100f565b6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561048e57600080fd5b505af11580156104a2573d6000803e3d6000fd5b505060025460405163095ea7b360e01b81526001600160a01b038b811660048301526024820192909252908816935063095ea7b3925060440190506020604051808303816000875af11580156104fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105209190611033565b5060005a6001546040805160a0810182528681523060208201529293506000926001600160a01b039092169163c04b8d5991810161055f42600a61106b565b815260200134815260200160018152506040518263ffffffff1660e01b815260040161058b919061107e565b6020604051808303816000875af11580156105aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ce9190611108565b905060005a60025460405163095ea7b360e01b81526001600160a01b038c81166004830152602482019290925291925087169063095ea7b3906044016020604051808303816000875af1158015610629573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064d9190611033565b5060005a6001546040805160a0810182528881523060208201529293506000926001600160a01b039092169163c04b8d5991810161068c42600a61106b565b815260200187815260200160018152506040518263ffffffff1660e01b81526004016106b8919061107e565b6020604051808303816000875af11580156106d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fb9190611108565b905060005a6040516370a0823160e01b81523060048201529091506000906001600160a01b038b16906370a0823190602401602060405180830381865afa15801561074a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076e9190611108565b90506040518060c0016040528087815260200182815260200184815260200186896107999190611121565b81526020016107a88487611121565b815260200160008152509b5050505050505050505050505b92915050565b6107ff6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b600080546001600160a01b0319166001600160a01b0384169081178255604080516315ab88c960e31b8152905163ad5c4648916004808201926020929091908290030181865afa158015610857573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087b919061100f565b604080516002808252606082018352929350869260009260208301908036833701905050905060008054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610916919061100f565b816000815181106109295761092961114a565b60200260200101906001600160a01b031690816001600160a01b031681525050858160018151811061095d5761095d61114a565b6001600160a01b0392909216602092830291909101820152604080516002808252606082018352600093919290918301908036833701905050905086816000815181106109ac576109ac61114a565b60200260200101906001600160a01b031690816001600160a01b03168152505060008054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a41919061100f565b81600181518110610a5457610a5461114a565b6001600160a01b0392831660209182029290920101526000805460405163d06ca61f60e01b81529192169063d06ca61f90610a9590349087906004016111a4565b600060405180830381865afa158015610ab2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ada91908101906111c5565b9050600081600181518110610af157610af161114a565b6020026020010151905060008054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b70919061100f565b6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610baa57600080fd5b505af1158015610bbe573d6000803e3d6000fd5b505060025460405163095ea7b360e01b81526001600160a01b038d811660048301526024820192909252908a16935063095ea7b3925060440190506020604051808303816000875af1158015610c18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3c9190611033565b506040516370a0823160e01b81523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015610c84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca89190611108565b905060005a6000549091506001600160a01b0316635c11d7958360018930610cd142600a61106b565b6040518663ffffffff1660e01b8152600401610cf1959493929190611283565b600060405180830381600087803b158015610d0b57600080fd5b505af1158015610d1f573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092506001600160a01b038a1691506370a0823190602401602060405180830381865afa158015610d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8e9190611108565b905060005a60025460405163095ea7b360e01b81526001600160a01b038f8116600483015260248201929092529192508a169063095ea7b3906044016020604051808303816000875af1158015610de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0d9190611033565b5060005a6000549091506001600160a01b0316635c11d7958460018b30610e3542600a61106b565b6040518663ffffffff1660e01b8152600401610e55959493929190611283565b600060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b5050505060005a6040516370a0823160e01b81523060048201529091506000906001600160a01b038d16906370a0823190602401602060405180830381865afa158015610ed4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef89190611108565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038f16906370a0823190602401602060405180830381865afa158015610f42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f669190611108565b90506040518060c001604052808781526020018381526020018281526020018689610f919190611121565b8152602001610fa08587611121565b81526020019990995250969f9e505050505050505050505050505050565b6001600160a01b0381168114610fd357600080fd5b50565b60008060408385031215610fe957600080fd5b8235610ff481610fbe565b9150602083013561100481610fbe565b809150509250929050565b60006020828403121561102157600080fd5b815161102c81610fbe565b9392505050565b60006020828403121561104557600080fd5b8151801515811461102c57600080fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156107c0576107c0611055565b60006020808352835160a08285015280518060c086015260005b818110156110b45782810184015186820160e001528301611098565b50600060e08287010152918501516001600160a01b0381166040860152916040860151606086015260608601516080860152608086015160a086015260e0601f19601f830116860101935050505092915050565b60006020828403121561111a57600080fd5b5051919050565b818103818111156107c0576107c0611055565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b838110156111995781516001600160a01b031687529582019590820190600101611174565b509495945050505050565b8281526040602082015260006111bd6040830184611160565b949350505050565b600060208083850312156111d857600080fd5b825167ffffffffffffffff808211156111f057600080fd5b818501915085601f83011261120457600080fd5b81518181111561121657611216611134565b8060051b604051601f19603f8301168101818110858211171561123b5761123b611134565b60405291825284820192508381018501918883111561125957600080fd5b938501935b828510156112775784518452938501939285019261125e565b98975050505050505050565b85815284602082015260a0604082015260006112a260a0830186611160565b6001600160a01b039490941660608301525060800152939250505056fea2646970667358221220209044c1080f68be2425fa8ece9447dac258098abcc5453b50b42543969bf31c64736f6c63430008130033

Block Transaction 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

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.