Verified contractExactMIT
USDT
Address0x8ebf54bd5dadba71d6821470378bd478d2d32edd
- Balance
0 ETH
- Transactions
11
- Compiler
solc 0.8.20
- Same code
Only this contract
Details
- Compiler
- solc 0.8.20+commit.a1b79de6
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 23,220,111
- Creation transaction
- 0x0e0934e3ec…b1a3bc8b65
USDT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract USDT {
string public name = "Tether USD";
string public symbol = "USDT";
uint8 public decimals = 6;
uint256 public totalSupply;
address public owner;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
constructor() {
owner = msg.sender;
uint256 initialSupply = 1_000_000_000* (10 ** uint256(decimals));
totalSupply = initialSupply;
balanceOf[owner] = initialSupply;
emit Transfer(address(0), owner, initialSupply);
}
function transfer(address to, uint256 value) public returns (bool) {
require(balanceOf[msg.sender] >= value, "Insufficient balance");
require(to != address(0), "Invalid recipient");
balanceOf[msg.sender] -= value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
function approve(address spender, uint256 value) public returns (bool) {
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
function transferFrom(address from, address to, uint256 value) public returns (bool) {
require(balanceOf[from] >= value, "Insufficient balance");
require(allowance[from][msg.sender] >= value, "Allowance exceeded");
require(to != address(0), "Invalid recipient");
balanceOf[from] -= value;
balanceOf[to] += value;
allowance[from][msg.sender] -= value;
emit Transfer(from, to, value);
return true;
}
function mint(address to, uint256 value) public returns (bool) {
require(msg.sender == owner, "Only owner can mint");
require(to != address(0), "Invalid address");
totalSupply += value;
balanceOf[to] += value;
emit Transfer(address(0), to, value);
return true;
}
}Compiler settingsShow
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.