Contract

0x4339e21EF3D523321FCD5e48869cdDA682aA0667

Overview
0.0000 Trust Bitcoin
$0.0000
More Info
 
Contract Source Code Verified (Exact Match)
TUSD
Yes with 200 runs

0.8.6+commit.11564f7e
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : TUSD.sol

// SPDX-License-Identifier: Unlicensed pragma solidity 0.8.6; contract Ownable { address public owner; modifier onlyOwner() { require(msg.sender == owner); _; } function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); owner = newOwner; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); 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 ERC20Basic is IERC20, Ownable { mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) allowed; uint256 totalSupply_; function totalSupply() public override view returns (uint256) { return totalSupply_; } function balanceOf(address tokenOwner) public override view returns (uint256) { return balances[tokenOwner]; } function transfer(address receiver, uint256 numTokens) public override returns (bool) { require(numTokens <= balances[msg.sender], "transfer amount exceeds balance"); balances[msg.sender] = balances[msg.sender] - numTokens; balances[receiver] = balances[receiver] - numTokens; emit Transfer(msg.sender, receiver, numTokens); return true; } function approve(address delegate, uint256 numTokens) public override returns (bool) { allowed[msg.sender][delegate] = numTokens; emit Approval(msg.sender, delegate, numTokens); return true; } function allowance(address owner, address delegate) public override view returns (uint) { return allowed[owner][delegate]; } function transferFrom(address sender, address receiver, uint256 numTokens) public override returns (bool) { require(numTokens <= balances[sender], "transfer amount exceeds balance"); require(numTokens <= allowed[sender][msg.sender]); balances[sender] = balances[sender] - numTokens; allowed[sender][msg.sender] = allowed[sender][msg.sender] - numTokens; balances[receiver] = balances[receiver] + numTokens; emit Transfer(sender, receiver, numTokens); return true; } function mint(uint256 _value) public onlyOwner{ totalSupply_ = totalSupply_ + _value; balances[msg.sender] = balances[msg.sender] + _value; emit Transfer(address(0), msg.sender, _value); } } contract TUSD is ERC20Basic { string public constant name = "Trust USD"; string public constant symbol = "TUSD"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 210000000 * 10**18; constructor(address _owner) { owner = _owner; totalSupply_ = INITIAL_SUPPLY; balances[_owner] = INITIAL_SUPPLY; emit Transfer(address(0), _owner, INITIAL_SUPPLY); } }
ABI Code (Solidity Standard Json-Input format)

File 1 of 1 : ABI.json

[ { "inputs": [ { "internalType": "address", "name": "receiver", "type": "address" } ], "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": "numTokens", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenOwner", "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": "numTokens", "type": "uint256" } ], "name": "mint", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "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": "receiver", "type": "address" }, { "internalType": "uint256", "name": "numTokens", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "numTokens", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]
Contract Creation Code
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461015f5780638da5cb5b1461018857806395d89b41146101b3578063a9059cbb146101d6578063dd62ed3e146101e9578063f2fde38b1461022257600080fd5b806306fdde03146100b9578063095ea7b3146100f757806318160ddd1461011a57806323b872dd14610131578063313ce5671461014457806340c10f191461014c575b600080fd5b6100e160405180604001604052806009815260200168151c9d5cdd081554d160ba1b81525081565b6040516100ee9190610887565b60405180910390f35b61010a6101053660046108f8565b610237565b60405190151581526020016100ee565b61012360015481565b6040519081526020016100ee565b61010a61013f366004610922565b6102f9565b610123601281565b61010a61015a3660046108f8565b61050c565b61012361016d36600461095e565b6001600160a01b031660009081526002602052604090205490565b60005461019b906001600160a01b031681565b6040516001600160a01b0390911681526020016100ee565b6100e160405180604001604052806004815260200163151554d160e21b81525081565b61010a6101e43660046108f8565b610663565b6101236101f7366004610980565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b61023561023036600461095e565b610783565b005b60006001600160a01b0383166102945760405162461bcd60e51b815260206004820152601b60248201527f7370656e64657220697320746865207a65726f2061646472657373000000000060448201526064015b60405180910390fd5b3360008181526003602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a350600192915050565b60006001600160a01b0383166103215760405162461bcd60e51b815260040161028b906109b3565b6001600160a01b0384166000908152600260205260409020548211156103895760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220616d6f756e7420657863656564732062616c616e636500604482015260640161028b565b6001600160a01b038416600090815260036020908152604080832033845290915290205482111561040b5760405162461bcd60e51b815260206004820152602660248201527f5472616e7366657220616d6f756e74206578636565647320616c6c6f77656420604482015265185b5bdd5b9d60d21b606482015260840161028b565b6001600160a01b03841660009081526002602052604090205461042f908390610a00565b6001600160a01b0385166000908152600260209081526040808320939093556003815282822033835290522054610467908390610a00565b6001600160a01b0380861660009081526003602090815260408083203384528252808320949094559186168152600290915220546104a6908390610a17565b6001600160a01b0380851660008181526002602052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104fa9086815260200190565b60405180910390a35060019392505050565b600080546001600160a01b031633146105675760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c79206f776e65722063616c6c20746869732066756e6374696f6e000000604482015260640161028b565b6001600160a01b03831661058d5760405162461bcd60e51b815260040161028b906109b3565b600082116105dd5760405162461bcd60e51b815260206004820181905260248201527f416d6f756e74206973207a65726f206f72206c657373207468616e207a65726f604482015260640161028b565b816001546105eb9190610a17565b6001556001600160a01b038316600090815260026020526040902054610612908390610a17565b6001600160a01b0384166000818152600260205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906102e89086815260200190565b60006001600160a01b03831661068b5760405162461bcd60e51b815260040161028b906109b3565b336000908152600260205260409020548211156106ea5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220616d6f756e7420657863656564732062616c616e636500604482015260640161028b565b33600090815260026020526040902054610705908390610a00565b33600090815260026020526040808220929092556001600160a01b03851681522054610732908390610a17565b6001600160a01b0384166000818152600260205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906102e89086815260200190565b6000546001600160a01b031633146107dd5760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c79206f776e65722063616c6c20746869732066756e6374696f6e000000604482015260640161028b565b6001600160a01b0381166108335760405162461bcd60e51b815260206004820152601f60248201527f4e6577206f776e65722063616e2774206265207a65726f2d6164647265737300604482015260640161028b565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527fdfc39691aec87dc6aa51ff70c0e592f260c54d2ed6c64e8c4c2306da0eec872b9060200160405180910390a150565b600060208083528351808285015260005b818110156108b457858101830151858201604001528201610898565b818111156108c6576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146108f357600080fd5b919050565b6000806040838503121561090b57600080fd5b610914836108dc565b946020939093013593505050565b60008060006060848603121561093757600080fd5b610940846108dc565b925061094e602085016108dc565b9150604084013590509250925092565b60006020828403121561097057600080fd5b610979826108dc565b9392505050565b6000806040838503121561099357600080fd5b61099c836108dc565b91506109aa602084016108dc565b90509250929050565b6020808252601c908201527f5472616e7366657220746f20746865207a65726f2d6164647265737300000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015610a1257610a126109ea565b500390565b60008219821115610a2a57610a2a6109ea565b50019056fea2646970667358221220c3fb79e4c808d8354f4721f126eab7cf11ef0ca4ae13b0f8a62d038522b2507e64736f6c634300080b0033
1. allowance

2. balanceOf

3. decimals

4. name

5. owner

6. symbol

7. totalSupply

1. approve
2. mint
3. transfer
4. transferFrom
5. transferOwnership

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met.