Address
0xee9b9d3d841e27e83a94b127de4ebe131117174bCurrent Holdings
$0.00
TXs sent
not counted
First Active
2026-04-12
block 26,264,692
Last Active
159 days ago
block 26,264,692
Funded By
not identified
Net worth historyi
No net-worth snapshots recorded yet
exact matchTaxSimulatorsolc 0.8.34+commit.80d5c536runtime exact · creation exact
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IRouter {
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
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 IERC20 {
function approve(address spender, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
}
contract TaxSimulator {
address constant ROUTER = 0x165C3410fC91EF562C50559f7d2289fEbed552d9; // PulseX V2 Router
address constant WPLS = 0xA1077a294dDE1B09bB078844df40758a5D0f9a27; // WPLS
address constant DEAD = 0x000000000000000000000000000000000000dEaD; // Neutral test address
receive() external payable {}
// We now return boolean flags to give Python a perfect diagnostic breakdown
function simulate(address token) external payable returns (
uint256 expectedTokens,
uint256 actualTokens,
uint256 expectedPLS,
uint256 actualPLS,
bool buySuccess,
bool trapSuccess,
bool sellSuccess
) {
address[] memory buyPath = new address[](2);
buyPath[0] = WPLS;
buyPath[1] = token;
// --- 1. THE BUY PHASE ---
expectedTokens = IRouter(ROUTER).getAmountsOut(msg.value, buyPath)[1];
try IRouter(ROUTER).swapExactETHForTokensSupportingFeeOnTransferTokens{value: msg.value}(
0, buyPath, address(this), block.timestamp
) {
buySuccess = true;
actualTokens = IERC20(token).balanceOf(address(this));
} catch {
// If buying fails, we immediately exit and report the failure.
return (expectedTokens, 0, 0, 0, false, false, false);
}
// --- 2. THE 9MM ROUTER TRAP TEST ---
// Attempt to send 1000 wei out of the PulseX ecosystem.
try IERC20(token).transfer(DEAD, 1000) {
trapSuccess = true;
} catch {
trapSuccess = false; // Token is hardcoded to block other routers
}
// --- 3. THE SELL PHASE ---
uint256 balanceToSell = IERC20(token).balanceOf(address(this));
if (balanceToSell == 0) return (expectedTokens, actualTokens, 0, 0, true, trapSuccess, false);
address[] memory sellPath = new address[](2);
sellPath[0] = token;
sellPath[1] = WPLS;
expectedPLS = IRouter(ROUTER).getAmountsOut(balanceToSell, sellPath)[1];
// Test for the Approval Trap
try IERC20(token).approve(ROUTER, type(uint256).max) {} catch {
return (expectedTokens, actualTokens, expectedPLS, 0, true, trapSuccess, false);
}
uint256 initialPLS = address(this).balance;
// Test the final Sell execution
try IRouter(ROUTER).swapExactTokensForETHSupportingFeeOnTransferTokens(
balanceToSell, 0, sellPath, address(this), block.timestamp
) {
sellSuccess = true;
actualPLS = address(this).balance - initialPLS;
} catch {
sellSuccess = false; // Sell failed (Honeypot or Cooldown)
}
return (expectedTokens, actualTokens, expectedPLS, actualPLS, buySuccess, trapSuccess, sellSuccess);
}
}