USA Node
Top Transactions
Blocks
Staking
Tokens
Broadcast TXN
CLI Interface
Developer API
Smart Contract HQ
Contact Us
Donate
Node Status
Node:
Main Net - US
Search
Token Contract Details
Contract:
0x0684cfd481d4504e2faec28bfc8ae7a6eb46661b
Name:
Theta Kingdom
Symbol:
KING
Total Supply:
8,880,300.00
Decimal:
18
Compiler Version:
v0.7.6
Published Contract:
Send Transactions
TNT-20 Transactions
TNT-721 Transactions
Contract
Contract ByteCode:
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80634bf365df116100715780634bf365df146101d957806370a08231146101e157806395d89b4114610207578063a0712d681461020f578063a9059cbb1461022c578063dd62ed3e14610258576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b6610286565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561031c565b604080519115158252519081900360200190f35b610173610339565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b0381358116916020810135909116906040013561033f565b6101c36103c6565b6040805160ff9092168252519081900360200190f35b6101576103cf565b610173600480360360208110156101f757600080fd5b50356001600160a01b03166103df565b6100b66103fa565b6101576004803603602081101561022557600080fd5b503561045b565b6101576004803603604081101561024257600080fd5b506001600160a01b038135169060200135610539565b6101736004803603604081101561026e57600080fd5b506001600160a01b038135811691602001351661054d565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103125780601f106102e757610100808354040283529160200191610312565b820191906000526020600020905b8154815290600101906020018083116102f557829003601f168201915b5050505050905090565b60006103306103296105d9565b84846105dd565b50600192915050565b60035490565b600061034c8484846106c9565b6103bc846103586105d9565b6103b785604051806060016040528060288152602001610a49602891396001600160a01b038a166000908152600160205260408120906103966105d9565b6001600160a01b031681526020810191909152604001600020549190610819565b6105dd565b5060019392505050565b60065460ff1690565b600254600160a01b900460ff1690565b6001600160a01b031660009081526020819052604090205490565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103125780601f106102e757610100808354040283529160200191610312565b600254600090600160a01b900460ff166104bc576040805162461bcd60e51b815260206004820152601960248201527f74686520746f6b656e206973206e6f74206d696e7461626c6500000000000000604482015290519081900360640190fd5b6002546001600160a01b0316331461051b576040805162461bcd60e51b815260206004820152601e60248201527f6f6e6c792061646d696e2063616e206d696e74206e657720746f6b656e730000604482015290519081900360640190fd5b600254610531906001600160a01b0316836108b0565b506001919050565b60006103306105466105d9565b84846106c9565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000828201838110156105d2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b0383166106225760405162461bcd60e51b8152600401808060200182810382526024815260200180610a256024913960400191505060405180910390fd5b6001600160a01b0382166106675760405162461bcd60e51b81526004018080602001828103825260228152602001806109dd6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831661070e5760405162461bcd60e51b81526004018080602001828103825260258152602001806109b86025913960400191505060405180910390fd5b6001600160a01b0382166107535760405162461bcd60e51b81526004018080602001828103825260238152602001806109956023913960400191505060405180910390fd5b610790816040518060600160405280602681526020016109ff602691396001600160a01b0386166000908152602081905260409020549190610819565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107bf9082610578565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086d578181015183820152602001610855565b50505050905090810190601f16801561089a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b03821661090b576040805162461bcd60e51b815260206004820152601f60248201527f544e5432303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6003546109189082610578565b6003556001600160a01b03821660009081526020819052604090205461093e9082610578565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505056fe544e5432303a207472616e7366657220746f20746865207a65726f2061646472657373544e5432303a207472616e736665722066726f6d20746865207a65726f2061646472657373544e5432303a20617070726f766520746f20746865207a65726f2061646472657373544e5432303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365544e5432303a20617070726f76652066726f6d20746865207a65726f2061646472657373544e5432303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220bfc79bebe9b21cbb7627c8ad0bec77bacd2a706f59c8e80c61e526608a241b9064736f6c63430007060033
Published Contract:
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface ITNT20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract MintableTNT20 is Context, ITNT20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _admin; bool private _mintable; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name_, string memory symbol_, uint8 decimals_, uint256 initialSupply_, bool mintable_) public { require(msg.sender != address(0x0), "cannot deploy the token from address 0x0"); _name = name_; _symbol = symbol_; _decimals = decimals_; _admin = msg.sender; _mint(_admin, initialSupply_); _mintable = mintable_; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "TNT20: transfer amount exceeds allowance")); return true; } function mintable() public view returns (bool) { return _mintable; } function mint(uint256 amount) public returns (bool) { require(_mintable, "the token is not mintable"); require(msg.sender == _admin, "only admin can mint new tokens"); _mint(_admin, amount); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "TNT20: transfer from the zero address"); require(recipient != address(0), "TNT20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "TNT20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "TNT20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "TNT20: approve from the zero address"); require(spender != address(0), "TNT20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } }
Contract ABI:
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"uint256","name":"initialSupply_","type":"uint256"},{"internalType":"bool","name":"mintable_","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]