Skip to content
Verified contractPartial

TronToken

Address0x062344dc7fbe2cb6a14eaf84b613af64684252bf
Balance

0 ETH

 

Transactions

1,700

 

Compiler

solc 0.4.18

 

Same code

Only this contract

 

Details

Compiler
solc 0.4.18+commit.9cf6e910
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
5,052,616
Creation transaction
0x5ff8b47165…fbce3dc0d5

TronToken.sol

pragma solidity ^0.4.18;

contract TronToken {

    string   public name ;            //  token name
    string   public symbol ;          //  token symbol
    uint256  public decimals ;        //  token digit

    mapping (address => uint256) public balanceOf;

    uint256 public totalSupply = 0;
    bool public stopped = false;      //  stopflag: true is stoped,false is not stoped

    uint256 constant valueFounder = 500000000000000000;
    address owner = 0x0;

    modifier isOwner {
        assert(owner == msg.sender);
        _;
    }

    modifier isRunning {
        assert (!stopped);
        _;
    }

    modifier validAddress {
        assert(0x0 != msg.sender);
        _;
    }

    function TronToken(address _addressFounder,uint256 _initialSupply, string _tokenName, uint8 _decimalUnits, string _tokenSymbol) public {
        owner = msg.sender;
        if (_addressFounder == 0x0)
            _addressFounder = msg.sender;
        if (_initialSupply == 0) 
            _initialSupply = valueFounder;
        totalSupply = _initialSupply;   // Set the totalSupply 
        name = _tokenName;              // Set the name for display 
        symbol = _tokenSymbol;          // Set the symbol for display 
        decimals = _decimalUnits;       // Amount of decimals for display purposes
        balanceOf[_addressFounder] = totalSupply;
        Transfer(0x0, _addressFounder, totalSupply);
    }

    function transfer(address _to, uint256 _value) public isRunning validAddress returns (bool success) {
        require(balanceOf[msg.sender] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);
        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;
        Transfer(msg.sender, _to, _value);
        return true;
    }

    function stop() public isOwner {
        stopped = true;
    }

    function start() public isOwner {
        stopped = false;
    }

    function setName(string _name) public isOwner {
        name = _name;
    }
    
    function setOwner(address _owner) public isOwner {
        owner = _owner;
    }

    function burn(uint256 _value) public {
        require(balanceOf[msg.sender] >= _value);
        balanceOf[msg.sender] -= _value;
        balanceOf[0x0] += _value;
        Transfer(msg.sender, 0x0, _value);
    }

    event Transfer(address indexed _from, address indexed _to, uint256 _value);
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.