Verified contractExactMIT
TUSTD
Address0xf741490a90d2db93fffe7544797658ea11a15df7
- Balance
0 ETH
- Transactions
18
- 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
- 25,621,684
- Creation transaction
- 0x872ba1f6b4…a72b27023c
TUSDT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract TUSTD {
string public name = "Tethar USTD";
string public symbol = "USTD";
uint8 public decimals = 18;
uint256 public totalSupply;
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() {
uint256 initialSupply = 1_000_000_000 * 10 ** uint256(decimals);
totalSupply = initialSupply;
balanceOf[msg.sender] = initialSupply;
emit Transfer(address(0), msg.sender, initialSupply);
}
function _transfer(address from, address to, uint256 value) internal {
require(to != address(0), "ERC20: transfer to the zero address");
uint256 fromBalance = balanceOf[from];
require(fromBalance >= value, "ERC20: transfer amount exceeds balance");
unchecked {
balanceOf[from] = fromBalance - value;
}
balanceOf[to] += value;
emit Transfer(from, to, value);
}
function transfer(address to, uint256 value) public returns (bool) {
_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) {
uint256 currentAllowance = allowance[from][msg.sender];
require(currentAllowance >= value, "ERC20: transfer amount exceeds allowance");
unchecked {
allowance[from][msg.sender] = currentAllowance - value;
}
_transfer(from, to, value);
return true;
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.