Contract

0xC30E0C6def1E76dB3984a4c282a687c4Fe482BEe

Overview
0.0000 Trust Bitcoin
$0.0000
More Info
 
Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : USDT.sol

// SPDX-License-Identifier: Unlicensed pragma solidity 0.8.10; /// @title Ownable - Basic ownership control mechanism /// @notice Provides a modifier to restrict function access to the contract owner contract Ownable { /// @notice The address of the contract owner address public owner; /// @notice Restricts function access to only the current owner modifier onlyOwner() { require(msg.sender == owner); _; } /// @notice Transfers ownership to a new address /// @param newOwner The address to be assigned as the new owner function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0), "New owner is zero address"); owner = newOwner; } /// @notice Removes the current owner and leaves the contract without an owner /// @dev This action is irreversible and disables all `onlyOwner` functions function renounceOwnership() public onlyOwner { owner = address(0); } } /// @title ITBC20 - Interface for TBC-20 like token /// @notice Describes the standard TBC-20 token functions and events interface ITBC20 { 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); /// @notice Emitted when tokens are transferred between addresses event Transfer(address indexed from, address indexed to, uint256 value); /// @notice Emitted when an approval is made for a spender event Approval(address indexed owner, address indexed spender, uint256 value); } /// @title TBC20Basic - A basic TBC-20 implementation with minting and ownership /// @notice Implements the ITBC20 interface with additional mint functionality contract TBC20Basic is ITBC20, Ownable { /// @notice Tracks the current total circulating supply uint256 circulatingSupply; /// @notice Mapping of user balances mapping(address => uint256) balances; /// @notice Nested mapping to track allowances mapping(address => mapping (address => uint256)) allowed; /// @notice Tracks blacklisted addresses mapping(address => bool) public blacklisted; /// @notice Emitted when an address is blacklisted or unblacklisted event BlacklistUpdated(address indexed account, bool isBlacklisted); /// @notice Modifier to block blacklisted addresses from performing actions modifier notBlacklisted(address account) { require(!blacklisted[account], "Address is blacklisted"); _; } /// @notice Returns the total number of tokens in circulation /// @return The circulating token supply function totalSupply() public override view returns (uint256) { return circulatingSupply ; } /// @notice Gets the token balance of a specific address /// @param tokenOwner The address to query /// @return The balance of the queried address function balanceOf(address tokenOwner) public override view returns (uint256) { return balances[tokenOwner]; } /// @notice Transfers tokens to a specified address /// @param receiver The address to receive the tokens /// @param numTokens The number of tokens to transfer /// @return True if the transfer was successful function transfer(address receiver, uint256 numTokens) public override notBlacklisted(msg.sender) notBlacklisted(receiver) returns (bool) { require(numTokens <= balances[msg.sender], "Transfer amount exceeds balance"); require(receiver != address(0), "Transfer from the zero address"); balances[address(msg.sender)] -= numTokens; balances[address(receiver)] += numTokens; emit Transfer(address(msg.sender), address(receiver), numTokens); return true; } /// @notice Approves a spender to transfer tokens on your behalf /// @param spender The address authorized to spend /// @param numTokens The number of tokens to approve /// @return True if the approval was successful function approve(address spender, uint256 numTokens) public override returns (bool) { allowed[address(msg.sender)][address(spender)] = numTokens; emit Approval(address(msg.sender), address(spender), numTokens); return true; } /// @notice Returns the remaining number of tokens that a spender can spend /// @param owner The address which owns the tokens /// @param spender The address which will spend the tokens /// @return The remaining allowance function allowance(address owner, address spender) public override view returns (uint) { return allowed[address(owner)][address(spender)]; } /// @notice Transfers tokens on behalf of another address /// @param sender The address to send tokens from /// @param receiver The address to transfer tokens to /// @param numTokens The number of tokens to transfer /// @return True if the transfer was successful function transferFrom(address sender, address receiver, uint256 numTokens) public override notBlacklisted(msg.sender) notBlacklisted(sender) notBlacklisted(receiver) returns (bool) { require(numTokens <= balances[sender], "Transfer amount exceeds balance"); require(numTokens <= allowed[sender][msg.sender], "Transfer amount exceeds allowance"); require(receiver != address(0), "Transfer to the zero address"); balances[address(sender)] -= numTokens; balances[address(receiver)] += numTokens; allowed[address(sender)][address(msg.sender)] -= numTokens; emit Transfer(address(sender), address(receiver), numTokens); return true; } /// @notice Mints new tokens to the owner's balance /// @dev Can only be called by the contract owner /// @param numTokens The number of tokens to mint function mint(uint256 numTokens) public onlyOwner notBlacklisted(msg.sender) { require(numTokens > 0, "Must mint more than 0 tokens"); circulatingSupply += numTokens; balances[address(msg.sender)] += numTokens; emit Transfer(address(0), address(msg.sender), numTokens); } /// @notice Allows the owner to update blacklist status /// @param account The address to blacklist or unblacklist /// @param isBlacklisted Boolean indicating whether to blacklist (true) or unblacklist (false) function setBlacklist(address account, bool isBlacklisted) public onlyOwner { require(account != address(0), "Cannot blacklist zero address"); blacklisted[account] = isBlacklisted; emit BlacklistUpdated(account, isBlacklisted); } /// @notice Allows the owner to destroy (burn) funds of a blacklisted address /// @param account The blacklisted address whose funds will be burned function burnBlacklistedFunds(address account) public onlyOwner { require(blacklisted[account], "Address is not blacklisted"); uint256 blacklistedBalance = balances[account]; require(blacklistedBalance > 0, "No funds to burn"); balances[account] = 0; circulatingSupply -= blacklistedBalance; emit Transfer(account, address(0), blacklistedBalance); } } /// @title USDT Token Contract /// @notice TBC-20 compatible token with an initial supply and minting ability contract USDT is TBC20Basic { /// @notice The name of the token string public constant name = "USD Trust"; /// @notice The token symbol string public constant symbol = "USDT"; /// @notice Number of decimals used by the token uint8 public constant decimals = 18; /// @notice Initializes the token with a predefined supply assigned to the given receiver /// @param receiver The address that receives the initial supply and becomes the owner constructor(address receiver) { require(receiver != address(0), "Receiver is zero address"); owner = address(receiver); circulatingSupply = 21_000_000 * 10**18; balances[address(receiver)] = circulatingSupply; emit Transfer(address(0), address(receiver), circulatingSupply); } }
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": "account", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "isBlacklisted", "type": "bool" } ], "name": "BlacklistUpdated", "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": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "blacklisted", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "burnBlacklistedFunds", "outputs": [], "stateMutability": "nonpayable", "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": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "bool", "name": "isBlacklisted", "type": "bool" } ], "name": "setBlacklist", "outputs": [], "stateMutability": "nonpayable", "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
0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063a9059cbb11610066578063a9059cbb1461025f578063dbac26e914610272578063dd62ed3e14610295578063f2fde38b146102ce57600080fd5b8063715018a6146101f65780638da5cb5b146101fe57806395d89b4114610229578063a0712d681461024c57600080fd5b806318160ddd116100d357806318160ddd1461018e57806323b872dd146101a0578063313ce567146101b357806370a08231146101cd57600080fd5b806306fdde0314610105578063095ea7b314610143578063114f4c9b14610166578063153b0d1e1461017b575b600080fd5b61012d604051806040016040528060098152602001681554d108151c9d5cdd60ba1b81525081565b60405161013a9190610b76565b60405180910390f35b610156610151366004610be7565b6102e1565b604051901515815260200161013a565b610179610174366004610c11565b61034d565b005b610179610189366004610c33565b610490565b6001545b60405190815260200161013a565b6101566101ae366004610c6f565b61055c565b6101bb601281565b60405160ff909116815260200161013a565b6101926101db366004610c11565b6001600160a01b031660009081526002602052604090205490565b61017961081c565b600054610211906001600160a01b031681565b6040516001600160a01b03909116815260200161013a565b61012d604051806040016040528060048152602001631554d11560e21b81525081565b61017961025a366004610cab565b610845565b61015661026d366004610be7565b61093a565b610156610280366004610c11565b60046020526000908152604090205460ff1681565b6101926102a3366004610cc4565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6101796102dc366004610c11565b610ae7565b3360008181526003602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061033c9086815260200190565b60405180910390a350600192915050565b6000546001600160a01b0316331461036457600080fd5b6001600160a01b03811660009081526004602052604090205460ff166103d15760405162461bcd60e51b815260206004820152601a60248201527f41646472657373206973206e6f7420626c61636b6c697374656400000000000060448201526064015b60405180910390fd5b6001600160a01b0381166000908152600260205260409020548061042a5760405162461bcd60e51b815260206004820152601060248201526f273790333ab73239903a3790313ab93760811b60448201526064016103c8565b6001600160a01b038216600090815260026020526040812081905560018054839290610457908490610d0d565b90915550506040518181526000906001600160a01b03841690600080516020610d6d833981519152906020015b60405180910390a35050565b6000546001600160a01b031633146104a757600080fd5b6001600160a01b0382166104fd5760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f7420626c61636b6c697374207a65726f206164647265737300000060448201526064016103c8565b6001600160a01b038216600081815260046020908152604091829020805460ff191685151590811790915591519182527f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac910160405180910390a25050565b3360008181526004602052604081205490919060ff161561058f5760405162461bcd60e51b81526004016103c890610d24565b6001600160a01b038516600090815260046020526040902054859060ff16156105ca5760405162461bcd60e51b81526004016103c890610d24565b6001600160a01b038516600090815260046020526040902054859060ff16156106055760405162461bcd60e51b81526004016103c890610d24565b6001600160a01b03871660009081526002602052604090205485111561066d5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220616d6f756e7420657863656564732062616c616e63650060448201526064016103c8565b6001600160a01b03871660009081526003602090815260408083203384529091529020548511156106ea5760405162461bcd60e51b815260206004820152602160248201527f5472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636044820152606560f81b60648201526084016103c8565b6001600160a01b0386166107405760405162461bcd60e51b815260206004820152601c60248201527f5472616e7366657220746f20746865207a65726f20616464726573730000000060448201526064016103c8565b6001600160a01b03871660009081526002602052604081208054879290610768908490610d0d565b90915550506001600160a01b03861660009081526002602052604081208054879290610795908490610d54565b90915550506001600160a01b0387166000908152600360209081526040808320338452909152812080548792906107cd908490610d0d565b92505081905550856001600160a01b0316876001600160a01b0316600080516020610d6d8339815191528760405161080791815260200190565b60405180910390a35060019695505050505050565b6000546001600160a01b0316331461083357600080fd5b600080546001600160a01b0319169055565b6000546001600160a01b0316331461085c57600080fd5b3360008181526004602052604090205460ff161561088c5760405162461bcd60e51b81526004016103c890610d24565b600082116108dc5760405162461bcd60e51b815260206004820152601c60248201527f4d757374206d696e74206d6f7265207468616e203020746f6b656e730000000060448201526064016103c8565b81600160008282546108ee9190610d54565b90915550503360009081526002602052604081208054849290610912908490610d54565b90915550506040518281523390600090600080516020610d6d83398151915290602001610484565b3360008181526004602052604081205490919060ff161561096d5760405162461bcd60e51b81526004016103c890610d24565b6001600160a01b038416600090815260046020526040902054849060ff16156109a85760405162461bcd60e51b81526004016103c890610d24565b33600090815260026020526040902054841115610a075760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220616d6f756e7420657863656564732062616c616e63650060448201526064016103c8565b6001600160a01b038516610a5d5760405162461bcd60e51b815260206004820152601e60248201527f5472616e736665722066726f6d20746865207a65726f2061646472657373000060448201526064016103c8565b3360009081526002602052604081208054869290610a7c908490610d0d565b90915550506001600160a01b03851660009081526002602052604081208054869290610aa9908490610d54565b90915550506040518481526001600160a01b038616903390600080516020610d6d8339815191529060200160405180910390a3506001949350505050565b6000546001600160a01b03163314610afe57600080fd5b6001600160a01b038116610b545760405162461bcd60e51b815260206004820152601960248201527f4e6577206f776e6572206973207a65726f20616464726573730000000000000060448201526064016103c8565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600060208083528351808285015260005b81811015610ba357858101830151858201604001528201610b87565b81811115610bb5576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610be257600080fd5b919050565b60008060408385031215610bfa57600080fd5b610c0383610bcb565b946020939093013593505050565b600060208284031215610c2357600080fd5b610c2c82610bcb565b9392505050565b60008060408385031215610c4657600080fd5b610c4f83610bcb565b915060208301358015158114610c6457600080fd5b809150509250929050565b600080600060608486031215610c8457600080fd5b610c8d84610bcb565b9250610c9b60208501610bcb565b9150604084013590509250925092565b600060208284031215610cbd57600080fd5b5035919050565b60008060408385031215610cd757600080fd5b610ce083610bcb565b9150610cee60208401610bcb565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015610d1f57610d1f610cf7565b500390565b6020808252601690820152751059191c995cdcc81a5cc8189b1858dadb1a5cdd195960521b604082015260600190565b60008219821115610d6757610d67610cf7565b50019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220b16005843e72560bf65f04b504f6283b90a5d0e4f68c5e6815ecb5fa7d1dd2a864736f6c634300080a0033
1. allowance

2. balanceOf

3. blacklisted

4. decimals

5. name

6. owner

7. symbol

8. totalSupply

1. approve
2. burnBlacklistedFunds
3. mint
4. renounceOwnership
5. setBlacklist
6. transfer
7. transferFrom
8. 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.