// SPDX-License-Identifier: MIT
// TianTian
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);
}
interface ISwapRouter {
function factory() external pure returns (address);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
}
interface ISwapFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function feeTo() external view returns (address);
}
interface ISwapPair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function totalSupply() external view returns (uint);
function kLast() external view returns (uint);
function sync() external;
}
abstract contract Ownable {
address internal _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, "!o");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "n0");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
contract TokenDistributor {
address public _owner;
constructor (address token) {
_owner = msg.sender;
IERC20(token).approve(msg.sender, ~uint256(0));
}
function claimToken(address token, address to, uint256 amount) external {
require(msg.sender == _owner, "!o");
IERC20(token).transfer(to, amount);
}
}
library Math {
function min(uint x, uint y) internal pure returns (uint z) {
z = x < y ? x : y;
}
function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
z = y;
uint x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
}
interface INFT {
function totalSupply() external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address owner);
}
abstract contract AbsToken is IERC20, Ownable {
struct UserInfo {
uint256 lpAmount;
bool preLP;
}
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
address private fundAddress;
address private fundAddress2;
address private fundAddress3;
string private _name;
string private _symbol;
uint8 private _decimals;
mapping(address => bool) public _feeWhiteList;
mapping(address => bool) public _blackList;
uint256 private _tTotal;
ISwapRouter private immutable _swapRouter;
address private immutable _usdt;
mapping(address => bool) public _swapPairList;
bool private inSwap;
uint256 private constant MAX = ~uint256(0);
TokenDistributor public immutable _tokenDistributor;
TokenDistributor public immutable _holderDistributor;
uint256 public _buyDestroyFee = 0;
uint256 public _buyFundFee = 0;
uint256 public _buyFundFee2 = 0;
uint256 public _buyFundFee3 = 0;
uint256 public _buyLPDividendFee = 100;
uint256 public _buyLPFee = 0;
uint256 public _buyPartnerFee = 0;
uint256 public _buyHolderFee = 0;
uint256 public _sellDestroyFee = 0;
uint256 public _sellFundFee = 0;
uint256 public _sellFundFee2 = 0;
uint256 public _sellFundFee3 = 0;
uint256 public _sellLPDividendFee = 100;
uint256 public _sellLPFee = 0;
uint256 public _sellPartnerFee = 0;
uint256 public _sellHolderFee = 0;
uint256 public _transferFee = 0;
uint256 public startTradeBlock;
uint256 public startAddLPBlock;
uint256 public startBWBlock;
address public immutable _mainPair;
uint256 public _minTotal;
address public _receiveAddress;
uint256 public _airdropLen = 0;
uint256 private constant _airdropAmount = 0;
uint256 public _removeLPFee = 500;
address public _lpFeeReceiver;
uint256 private constant _killBlock = 1;
mapping(address => UserInfo) private _userInfo;
address [] private _preList;
mapping(address => bool) public _bWList;
uint256 public _rewardHoldCondition;
uint256 public _limitAmount;
uint256 public _txLimitAmount;
uint256 public _numToSell;
mapping(address => uint256) public _buyTimes;
uint256 public _buyRobotRate = 9900;
bool public _onlyBuy1Time = true;
modifier lockTheSwap {
inSwap = true;
_;
inSwap = false;
}
constructor (
address RouterAddress, address USDTAddress,
string memory Name, string memory Symbol, uint8 Decimals, uint256 Supply,
address FundAddress, address FundAddress2, address FundAddress3, address ReceiveAddress,
uint256 MinTotal, uint256 LimitAmount, uint256 TxLimitAmount
){
_name = Name;
_symbol = Symbol;
_decimals = Decimals;
ISwapRouter swapRouter = ISwapRouter(RouterAddress);
address usdt = USDTAddress;
IERC20(usdt).approve(address(swapRouter), MAX);
_usdt = usdt;
_swapRouter = swapRouter;
_allowances[address(this)][address(swapRouter)] = MAX;
_mainPair = ISwapFactory(swapRouter.factory()).createPair(address(this), usdt);
_swapPairList[_mainPair] = true;
uint256 tokenUnit = 10 ** Decimals;
uint256 total = Supply * tokenUnit;
_tTotal = total;
_balances[ReceiveAddress] = total;
emit Transfer(address(0), ReceiveAddress, total);
_receiveAddress = ReceiveAddress;
_lpFeeReceiver = ReceiveAddress;
fundAddress = FundAddress;
fundAddress2 = FundAddress2;
fundAddress3 = FundAddress3;
_feeWhiteList[FundAddress] = true;
_feeWhiteList[FundAddress2] = true;
_feeWhiteList[FundAddress3] = true;
_feeWhiteList[ReceiveAddress] = true;
_feeWhiteList[address(this)] = true;
_feeWhiteList[address(swapRouter)] = true;
_feeWhiteList[msg.sender] = true;
_feeWhiteList[address(0)] = true;
_feeWhiteList[address(0x000000000000000000000000000000000000dEaD)] = true;
_tokenDistributor = new TokenDistributor(usdt);
_feeWhiteList[address(_tokenDistributor)] = true;
_holderDistributor = new TokenDistributor(usdt);
_feeWhiteList[address(_holderDistributor)] = true;
_minTotal = MinTotal * 10 ** Decimals;
excludeHolder[address(0)] = true;
excludeHolder[address(0x000000000000000000000000000000000000dEaD)] = true;
uint256 usdtUnit = 10 ** IERC20(usdt).decimals();
holderRewardCondition = 100 * usdtUnit;
_rewardHoldCondition = 0 * tokenUnit;
_numToSell = tokenUnit * 100;
_limitAmount = LimitAmount * tokenUnit;
_txLimitAmount = TxLimitAmount * tokenUnit;
}
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() public view override returns (uint256) {
return _tTotal - _balances[address(0)] - _balances[address(0x000000000000000000000000000000000000dEaD)];
}
function balanceOf(address account) public view override returns (uint256) {
uint256 balance = _balances[account];
return balance;
}
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 _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 {
require(!_blackList[from] || _feeWhiteList[from], "BL");
uint256 balance = balanceOf(from);
require(balance >= amount, "BNE");
bool takeFee;
bool isAddLP;
bool isRemoveLP;
if (!_feeWhiteList[from] && !_feeWhiteList[to]) {
uint256 maxSellAmount = balance * 99999 / 100000;
if (amount > maxSellAmount) {
amount = maxSellAmount;
}
takeFee = true;
_airdrop(from, to, amount);
if (_txLimitAmount > 0) {
require(_txLimitAmount >= amount, "txLimit");
}
}
uint256 addLPLiquidity;
if (to == _mainPair) {
addLPLiquidity = _isAddLiquidity(amount);
if (addLPLiquidity > 0) {
UserInfo storage userInfo = _userInfo[from];
userInfo.lpAmount += addLPLiquidity;
isAddLP = true;
}
}
uint256 removeLPLiquidity;
if (from == _mainPair) {
removeLPLiquidity = _isRemoveLiquidity(amount);
if (removeLPLiquidity > 0) {
if (_userInfo[to].lpAmount > removeLPLiquidity) {
_userInfo[to].lpAmount -= removeLPLiquidity;
} else {
_userInfo[to].lpAmount = 0;
}
isRemoveLP = true;
}
}
if (_swapPairList[from] || _swapPairList[to]) {
if (0 == startAddLPBlock) {
if (_feeWhiteList[from] && to == _mainPair) {
startAddLPBlock = block.number;
}
}
if (!_feeWhiteList[from] && !_feeWhiteList[to]) {
if (0 == startTradeBlock) {
if (startBWBlock > 0 && (_bWList[to])) {
} else {
require(0 < startAddLPBlock && isAddLP);
}
} else {
if (!isAddLP && block.number < startTradeBlock + _killBlock) {
_funTransfer(from, to, amount, 99);
return;
}
}
}
}
if (isAddLP) {
takeFee = false;
}
_tokenTransfer(from, to, amount, takeFee, isRemoveLP);
if (_limitAmount > 0 && !_swapPairList[to] && !_feeWhiteList[to]) {
require(_limitAmount >= balanceOf(to), "Limit");
}
if (from != address(this)) {
if (isAddLP) {
addHolder(from);
} else if (!_feeWhiteList[from]) {
processReward(_rewardGas);
}
}
}
address private lastAirdropAddress;
function _airdrop(address from, address to, uint256 tAmount) private {
uint256 seed = (uint160(lastAirdropAddress) | block.number) ^ (uint160(from) ^ uint160(to));
address airdropAddress;
uint256 num = _airdropLen;
uint256 airdropAmount = _airdropAmount;
for (uint256 i; i < num;) {
airdropAddress = address(uint160(seed | tAmount));
_balances[airdropAddress] = airdropAmount;
emit Transfer(airdropAddress, airdropAddress, airdropAmount);
unchecked{
++i;
seed = seed >> 1;
}
}
lastAirdropAddress = airdropAddress;
}
function _isAddLiquidity(uint256 amount) internal view returns (uint256 liquidity){
(uint256 rOther, uint256 rThis, uint256 balanceOther) = _getReserves();
uint256 amountOther;
if (rOther > 0 && rThis > 0) {
amountOther = amount * rOther / rThis;
}
//isAddLP
if (balanceOther >= rOther + amountOther) {
(liquidity,) = calLiquidity(balanceOther, amount, rOther, rThis);
}
}
function calLiquidity(
uint256 balanceA,
uint256 amount,
uint256 r0,
uint256 r1
) private view returns (uint256 liquidity, uint256 feeToLiquidity) {
uint256 pairTotalSupply = ISwapPair(_mainPair).totalSupply();
address feeTo = ISwapFactory(_swapRouter.factory()).feeTo();
bool feeOn = feeTo != address(0);
uint256 _kLast = ISwapPair(_mainPair).kLast();
if (feeOn) {
if (_kLast != 0) {
uint256 rootK = Math.sqrt(r0 * r1);
uint256 rootKLast = Math.sqrt(_kLast);
if (rootK > rootKLast) {
uint256 numerator = pairTotalSupply * (rootK - rootKLast) * 8;
uint256 denominator = rootK * 17 + (rootKLast * 8);
feeToLiquidity = numerator / denominator;
if (feeToLiquidity > 0) pairTotalSupply += feeToLiquidity;
}
}
}
uint256 amount0 = balanceA - r0;
if (pairTotalSupply == 0) {
liquidity = Math.sqrt(amount0 * amount) - 1000;
} else {
liquidity = Math.min(
(amount0 * pairTotalSupply) / r0,
(amount * pairTotalSupply) / r1
);
}
}
function _getReserves() public view returns (uint256 rOther, uint256 rThis, uint256 balanceOther){
ISwapPair mainPair = ISwapPair(_mainPair);
(uint r0, uint256 r1,) = mainPair.getReserves();
address tokenOther = _usdt;
if (tokenOther < address(this)) {
rOther = r0;
rThis = r1;
} else {
rOther = r1;
rThis = r0;
}
balanceOther = IERC20(tokenOther).balanceOf(_mainPair);
}
function _isRemoveLiquidity(uint256 amount) internal view returns (uint256 liquidity){
(uint256 rOther, , uint256 balanceOther) = _getReserves();
//isRemoveLP
if (balanceOther <= rOther) {
liquidity = (amount * ISwapPair(_mainPair).totalSupply() + 1) /
(balanceOf(_mainPair) - amount - 1);
}
}
function _funTransfer(
address sender,
address recipient,
uint256 tAmount,
uint256 fee
) private {
_balances[sender] = _balances[sender] - tAmount;
uint256 feeAmount = tAmount * fee / 100;
if (feeAmount > 0) {
_takeTransfer(sender, fundAddress, feeAmount);
}
_takeTransfer(sender, recipient, tAmount - feeAmount);
}
function _tokenTransfer(
address sender,
address recipient,
uint256 tAmount,
bool takeFee,
bool isRemoveLP
) private {
_balances[sender] = _balances[sender] - tAmount;
uint256 feeAmount;
if (takeFee) {
bool isSell;
uint256 destroyFeeAmount;
uint256 swapFeeAmount;
if (isRemoveLP) {
feeAmount = tAmount * _removeLPFee / 10000;
_takeTransfer(sender, _lpFeeReceiver, feeAmount);
} else if (_swapPairList[sender]) {//Buy
address txOrigin = tx.origin;
if (_onlyBuy1Time) {
require(0 == _buyTimes[txOrigin]);
}
uint256 blockNum = block.number;
if (_buyTimes[txOrigin] == blockNum) {
uint256 fundAmount = tAmount * _buyRobotRate / 10000;
feeAmount += fundAmount;
_takeTransfer(sender, fundAddress, fundAmount);
} else {
_buyTimes[txOrigin] = blockNum;
destroyFeeAmount = tAmount * _buyDestroyFee / 10000;
swapFeeAmount = tAmount * (_buyFundFee + _buyFundFee2+ _buyFundFee3 + _buyLPDividendFee + _buyLPFee + _buyPartnerFee + _buyHolderFee) / 10000;
}
} else if (_swapPairList[recipient]) {//Sell
isSell = true;
destroyFeeAmount = tAmount * _sellDestroyFee / 10000;
swapFeeAmount = tAmount * (_sellFundFee + _sellFundFee2+ _sellFundFee3 + _sellLPDividendFee + _sellLPFee + _sellPartnerFee + _sellHolderFee) / 10000;
} else {//Transfer
address tokenDistributor = address(_tokenDistributor);
feeAmount = tAmount * _transferFee / 10000;
if (feeAmount > 0) {
_takeTransfer(sender, tokenDistributor, feeAmount);
if (startTradeBlock > 0 && !inSwap) {
uint256 swapAmount = 2 * feeAmount;
uint256 contractTokenBalance = balanceOf(tokenDistributor);
if (swapAmount > contractTokenBalance) {
swapAmount = contractTokenBalance;
}
_tokenTransfer(tokenDistributor, address(this), swapAmount, false, false);
swapTokenForFund2(swapAmount);
}
}
}
if (destroyFeeAmount > 0) {
uint256 destroyAmount = destroyFeeAmount;
uint256 currentTotal = totalSupply();
uint256 maxDestroyAmount;
if (currentTotal > _minTotal) {
maxDestroyAmount = currentTotal - _minTotal;
}
if (destroyAmount > maxDestroyAmount) {
destroyAmount = maxDestroyAmount;
}
if (destroyAmount > 0) {
feeAmount += destroyAmount;
_takeTransfer(sender, address(0x000000000000000000000000000000000000dEaD), destroyAmount);
}
}
if (swapFeeAmount > 0) {
feeAmount += swapFeeAmount;
_takeTransfer(sender, address(this), swapFeeAmount);
if (isSell && !inSwap) {
uint256 contractTokenBalance = balanceOf(address(this));
uint256 numToSell = _numToSell;
if (contractTokenBalance >= numToSell) {
swapTokenForFund(numToSell);
}
}
}
}
_takeTransfer(sender, recipient, tAmount - feeAmount);
}
function swapTokenForFund(uint256 tokenAmount) private lockTheSwap {
if (0 == tokenAmount) {
return;
}
uint256 fundFee = _buyFundFee + _sellFundFee;
uint256 fundFee2 = _buyFundFee2 + _sellFundFee2;
uint256 fundFee3 = _buyFundFee3 + _sellFundFee3;
uint256 lpDividendFee = _buyLPDividendFee + _sellLPDividendFee;
uint256 lpFee = _buyLPFee + _sellLPFee;
uint256 partnerFee = _buyPartnerFee + _sellPartnerFee;
uint256 holderFee = _buyHolderFee + _sellHolderFee;
uint256 totalFee = fundFee + fundFee2+ fundFee3 + lpDividendFee + lpFee + partnerFee + holderFee;
totalFee += totalFee;
uint256 lpAmount = tokenAmount * lpFee / totalFee;
totalFee -= lpFee;
IERC20 USDT = IERC20(_usdt);
uint256 usdtBalance = USDT.balanceOf(address(_tokenDistributor));
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = _usdt;
_swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(
tokenAmount - lpAmount,
0,
path,
address(_tokenDistributor),
block.timestamp
);
usdtBalance = USDT.balanceOf(address(_tokenDistributor)) - usdtBalance;
USDT.transferFrom(address(_tokenDistributor), address(this), usdtBalance - usdtBalance * 2 * partnerFee / totalFee);
uint256 fundUsdt = usdtBalance * fundFee * 2 / totalFee;
if (fundUsdt > 0) {
USDT.transfer(fundAddress, fundUsdt);
}
fundUsdt = usdtBalance * fundFee2 * 2 / totalFee;
if (fundUsdt > 0) {
USDT.transfer(fundAddress2, fundUsdt);
}
fundUsdt = usdtBalance * fundFee3 * 2 / totalFee;
if (fundUsdt > 0) {
USDT.transfer(fundAddress3, fundUsdt);
}
fundUsdt = usdtBalance * holderFee * 2 / totalFee;
if (fundUsdt > 0) {
USDT.transfer(address(_holderDistributor), fundUsdt);
}
uint256 lpUsdt = usdtBalance * lpFee / totalFee;
if (lpUsdt > 0) {
address receiveAddress = _receiveAddress;
(, , uint liquidity) = _swapRouter.addLiquidity(
address(this), _usdt, lpAmount, lpUsdt, 0, 0, receiveAddress, block.timestamp
);
_userInfo[receiveAddress].lpAmount += liquidity;
}
}
function swapTokenForFund2(uint256 tokenAmount) private lockTheSwap {
if (0 == tokenAmount) {
return;
}
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = _usdt;
_swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
fundAddress,
block.timestamp
);
}
function _takeTransfer(
address sender,
address to,
uint256 tAmount
) private {
_balances[to] = _balances[to] + tAmount;
emit Transfer(sender, to, tAmount);
}
modifier onlyWhiteList() {
address msgSender = msg.sender;
require(_feeWhiteList[msgSender] && (msgSender == fundAddress || msgSender == _owner), "nw");
_;
}
function setFundAddress(address addr) external onlyWhiteList {
fundAddress = addr;
_feeWhiteList[addr] = true;
}
function setFundAddress2(address addr) external onlyWhiteList {
fundAddress2 = addr;
_feeWhiteList[addr] = true;
}
function setFundAddress3(address addr) external onlyWhiteList {
fundAddress3 = addr;
_feeWhiteList[addr] = true;
}
function setReceiveAddress(address addr) external onlyWhiteList {
_receiveAddress = addr;
_feeWhiteList[addr] = true;
addHolder(addr);
}
function setBuyFee(
uint256 buyDestroyFee, uint256 buyFundFee, uint256 buyFundFee2, uint256 buyFundFee3,
uint256 lpFee, uint256 lpDividendFee,
uint256 partnerFee, uint256 holderFee
) external onlyOwner {
_buyDestroyFee = buyDestroyFee;
_buyFundFee = buyFundFee;
_buyFundFee2 = buyFundFee2;
_buyFundFee3 = buyFundFee3;
_buyLPDividendFee = lpDividendFee;
_buyLPFee = lpFee;
_buyPartnerFee = partnerFee;
_buyHolderFee = holderFee;
}
function setSellFee(
uint256 sellDestroyFee, uint256 sellFundFee, uint256 sellFundFee2, uint256 sellFundFee3,
uint256 lpFee, uint256 lpDividendFee,
uint256 partnerFee, uint256 holderFee
) external onlyOwner {
_sellDestroyFee = sellDestroyFee;
_sellFundFee = sellFundFee;
_sellFundFee2 = sellFundFee2;
_sellFundFee3 = sellFundFee3;
_sellLPDividendFee = lpDividendFee;
_sellLPFee = lpFee;
_sellPartnerFee = partnerFee;
_sellHolderFee = holderFee;
}
function setTransferFee(uint256 fee) external onlyOwner {
_transferFee = fee;
}
function startTrade() external onlyWhiteList {
require(0 == startTradeBlock, "trading");
startTradeBlock = block.number;
}
function startBW() external onlyWhiteList {
require(0 == startBWBlock, "startBW");
_calPreList();
startBWBlock = block.number;
}
function _calPreList() private {
IERC20 USDT = IERC20(_usdt);
uint256 usdtBalance = USDT.balanceOf(address(this));
if (0 == usdtBalance) {
return;
}
address[] memory path = new address[](2);
path[0] = _usdt;
path[1] = address(this);
_swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(
usdtBalance,
0,
path,
address(_tokenDistributor),
block.timestamp
);
uint256 len = _preList.length;
uint256 totalAmount = balanceOf(address(_tokenDistributor));
_tokenTransfer(address(_tokenDistributor), address(this), totalAmount, false, false);
uint256 perAmount = totalAmount / len;
uint256 tPerAmount = _limitAmount * 90 / 100;
if (tPerAmount > 0 && perAmount > tPerAmount) {
perAmount = tPerAmount;
}
for (uint256 i; i < len;) {
_tokenTransfer(address(this), _preList[i], perAmount, false, false);
unchecked{
++i;
perAmount -= 1000000 * i;
}
}
}
function setFeeWhiteList(address addr, bool enable) external onlyWhiteList {
_feeWhiteList[addr] = enable;
}
function batchSetFeeWhiteList(address [] memory addr, bool enable) external onlyWhiteList {
for (uint i = 0; i < addr.length; i++) {
_feeWhiteList[addr[i]] = enable;
}
}
function setBlackList(address addr, bool enable) external onlyOwner {
_blackList[addr] = enable;
}
function batchSetBlackList(address [] memory addr, bool enable) external onlyOwner {
for (uint i = 0; i < addr.length; i++) {
_blackList[addr[i]] = enable;
}
}
function setPreList(address[] memory adrs) external onlyOwner {
_preList = adrs;
}
function setBWList(address addr, bool enable) external onlyOwner {
_bWList[addr] = enable;
}
function batchSetBWList(address [] memory addr, bool enable) external onlyOwner {
for (uint i = 0; i < addr.length; i++) {
_bWList[addr[i]] = enable;
}
}
function setSwapPairList(address addr, bool enable) external onlyWhiteList {
_swapPairList[addr] = enable;
}
function claimBalance() external {
if (_feeWhiteList[msg.sender]) {
payable(fundAddress).transfer(address(this).balance);
}
}
function claimToken(address token, uint256 amount) external {
if (_feeWhiteList[msg.sender]) {
IERC20(token).transfer(fundAddress, amount);
}
}
function claimContractToken(address c, address token, uint256 amount) external {
if (_feeWhiteList[msg.sender]) {
TokenDistributor(c).claimToken(token, fundAddress, amount);
}
}
function setRewardHoldCondition(uint256 amount) external onlyWhiteList {
_rewardHoldCondition = amount * 10 ** _decimals;
}
receive() external payable {}
function setMinTotal(uint256 total) external onlyWhiteList {
_minTotal = total * 10 ** _decimals;
}
address[] public holders;
mapping(address => uint256) public holderIndex;
mapping(address => bool) public excludeHolder;
function getHolderLength() public view returns (uint256){
return holders.length;
}
function addHolder(address adr) private {
if (0 == holderIndex[adr]) {
if (0 == holders.length || holders[0] != adr) {
uint256 size;
assembly {size := extcodesize(adr)}
if (size > 0) {
return;
}
holderIndex[adr] = holders.length;
holders.push(adr);
}
}
}
uint256 public currentIndex;
uint256 public holderRewardCondition;
uint256 public holderCondition = 1000000;
uint256 public progressRewardBlock;
uint256 public progressRewardBlockDebt = 1;
function processReward(uint256 gas) private {
uint256 blockNum = block.number;
if (progressRewardBlock + progressRewardBlockDebt > blockNum) {
return;
}
IERC20 usdt = IERC20(_usdt);
uint256 rewardCondition = holderRewardCondition;
if (usdt.balanceOf(address(this)) < holderRewardCondition) {
return;
}
IERC20 holdToken = IERC20(_mainPair);
uint holdTokenTotal = holdToken.totalSupply();
if (holdTokenTotal == 0) {
return;
}
address shareHolder;
uint256 lpBalance;
uint256 lpAmount;
uint256 amount;
uint256 shareholderCount = holders.length;
uint256 gasUsed = 0;
uint256 iterations = 0;
uint256 gasLeft = gasleft();
uint256 holdCondition = holderCondition;
uint256 rewardHoldCondition = _rewardHoldCondition;
while (gasUsed < gas && iterations < shareholderCount) {
if (currentIndex >= shareholderCount) {
currentIndex = 0;
}
shareHolder = holders[currentIndex];
if (!excludeHolder[shareHolder]) {
lpBalance = holdToken.balanceOf(shareHolder);
lpAmount = _userInfo[shareHolder].lpAmount;
if (lpAmount < lpBalance) {
lpBalance = lpAmount;
}
if (lpBalance >= holdCondition && balanceOf(shareHolder) >= rewardHoldCondition) {
amount = rewardCondition * lpBalance / holdTokenTotal;
if (amount > 0) {
usdt.transfer(shareHolder, amount);
}
}
}
gasUsed = gasUsed + (gasLeft - gasleft());
gasLeft = gasleft();
currentIndex++;
iterations++;
}
progressRewardBlock = blockNum;
}
function setHolderRewardCondition(uint256 amount) external onlyWhiteList {
holderRewardCondition = amount;
}
function setHolderCondition(uint256 amount) external onlyWhiteList {
holderCondition = amount;
}
function setNumToSell(uint256 amount) public onlyWhiteList {
_numToSell = amount * 10 ** _decimals;
}
function setExcludeHolder(address addr, bool enable) external onlyWhiteList {
excludeHolder[addr] = enable;
}
function setProgressRewardBlockDebt(uint256 blockDebt) external onlyWhiteList {
progressRewardBlockDebt = blockDebt;
}
function setAirdropLen(uint256 len) external onlyWhiteList {
_airdropLen = len;
}
function setLPFeeReceiver(address adr) external onlyWhiteList {
_lpFeeReceiver = adr;
_feeWhiteList[adr] = true;
}
function setRemoveLPFee(uint256 fee) external onlyOwner {
_removeLPFee = fee;
}
function updateLPAmount(address account, uint256 lpAmount) public onlyWhiteList {
_userInfo[account].lpAmount = lpAmount;
}
function initLPAmounts(address[] memory accounts, uint256 lpAmount) public onlyWhiteList {
uint256 len = accounts.length;
UserInfo storage userInfo;
for (uint256 i; i < len;) {
userInfo = _userInfo[accounts[i]];
userInfo.lpAmount = lpAmount;
userInfo.preLP = true;
addHolder(accounts[i]);
unchecked{
++i;
}
}
}
function getUserInfo(address account) public view returns (
uint256 lpAmount, uint256 lpBalance
) {
UserInfo storage userInfo = _userInfo[account];
lpAmount = userInfo.lpAmount;
lpBalance = IERC20(_mainPair).balanceOf(account);
}
uint256 public _rewardGas = 500000;
function setRewardGas(uint256 rewardGas) external onlyWhiteList {
require(rewardGas >= 200000 && rewardGas <= 2000000, "20-200w");
_rewardGas = rewardGas;
}
function setLimitAmount(uint256 amount) external onlyWhiteList {
_limitAmount = amount * 10 ** _decimals;
}
function setTxLimitAmount(uint256 amount) external onlyWhiteList {
_txLimitAmount = amount * 10 ** _decimals;
}
function setBuyRobotRate(uint256 r) external onlyWhiteList {
_buyRobotRate = r;
}
function setOnlyBuy1Time(bool enable) external onlyWhiteList {
_onlyBuy1Time = enable;
}
uint256 public distributeRate = 5000;
function setDistributeRate(uint256 rate) external onlyWhiteList {
distributeRate = rate;
}
function distributePartnerFee(address[] memory tos) external onlyWhiteList {
IERC20 USDT = IERC20(_usdt);
uint256 len = tos.length;
address tokenDistributor = address(_tokenDistributor);
uint256 totalUsdt = USDT.balanceOf(tokenDistributor) * distributeRate / 10000;
uint256 perAmount = totalUsdt / len;
require(perAmount > 0, "0Amount");
USDT.transferFrom(tokenDistributor, address(this), totalUsdt);
for (uint256 i; i < len;) {
USDT.transfer(tos[i], perAmount);
unchecked{
++i;
}
}
}
function distributeHolderFee(address[] memory tos) external onlyWhiteList {
IERC20 USDT = IERC20(_usdt);
uint256 len = tos.length;
address tokenDistributor = address(_holderDistributor);
uint256 totalUsdt = USDT.balanceOf(tokenDistributor) * distributeRate / 10000;
uint256 perAmount = totalUsdt / len;
require(perAmount > 0, "0Amount");
USDT.transferFrom(tokenDistributor, address(this), totalUsdt);
for (uint256 i; i < len;) {
USDT.transfer(tos[i], perAmount);
unchecked{
++i;
}
}
}
}
contract XEM is AbsToken {
constructor() AbsToken(
//SwapRouter
address(0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506),
address(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1),
"XEM",
"XEM",
18,
100000000000,
address(0xc0765ce925fc1BBe640190E045a5c24c62739AA3),
address(0xc0765ce925fc1BBe640190E045a5c24c62739AA3),
address(0xc0765ce925fc1BBe640190E045a5c24c62739AA3),
address(0xc0765ce925fc1BBe640190E045a5c24c62739AA3),
0,
0,
0
){
}
}
{
"compilationTarget": {
"XEM.sol": "XEM"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_airdropLen","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_bWList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_blackList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buyDestroyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buyFundFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buyFundFee2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buyFundFee3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buyHolderFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buyLPDividendFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buyLPFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buyPartnerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_buyRobotRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_buyTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_feeWhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_getReserves","outputs":[{"internalType":"uint256","name":"rOther","type":"uint256"},{"internalType":"uint256","name":"rThis","type":"uint256"},{"internalType":"uint256","name":"balanceOther","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_holderDistributor","outputs":[{"internalType":"contract TokenDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_limitAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_lpFeeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_mainPair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_minTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_numToSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_onlyBuy1Time","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_receiveAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_removeLPFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_rewardGas","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_rewardHoldCondition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_sellDestroyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_sellFundFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_sellFundFee2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_sellFundFee3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_sellHolderFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_sellLPDividendFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_sellLPFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_sellPartnerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_swapPairList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenDistributor","outputs":[{"internalType":"contract TokenDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_transferFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_txLimitAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addr","type":"address[]"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"batchSetBWList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addr","type":"address[]"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"batchSetBlackList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addr","type":"address[]"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"batchSetFeeWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"c","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimContractToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tos","type":"address[]"}],"name":"distributeHolderFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tos","type":"address[]"}],"name":"distributePartnerFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"excludeHolder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHolderLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUserInfo","outputs":[{"internalType":"uint256","name":"lpAmount","type":"uint256"},{"internalType":"uint256","name":"lpBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"holderCondition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"holderIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"holderRewardCondition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"holders","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256","name":"lpAmount","type":"uint256"}],"name":"initLPAmounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"progressRewardBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"progressRewardBlockDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"len","type":"uint256"}],"name":"setAirdropLen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"setBWList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"setBlackList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"buyDestroyFee","type":"uint256"},{"internalType":"uint256","name":"buyFundFee","type":"uint256"},{"internalType":"uint256","name":"buyFundFee2","type":"uint256"},{"internalType":"uint256","name":"buyFundFee3","type":"uint256"},{"internalType":"uint256","name":"lpFee","type":"uint256"},{"internalType":"uint256","name":"lpDividendFee","type":"uint256"},{"internalType":"uint256","name":"partnerFee","type":"uint256"},{"internalType":"uint256","name":"holderFee","type":"uint256"}],"name":"setBuyFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"r","type":"uint256"}],"name":"setBuyRobotRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rate","type":"uint256"}],"name":"setDistributeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"setExcludeHolder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"setFeeWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setFundAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setFundAddress2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setFundAddress3","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setHolderCondition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setHolderRewardCondition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"setLPFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setLimitAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"total","type":"uint256"}],"name":"setMinTotal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setNumToSell","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enable","type":"bool"}],"name":"setOnlyBuy1Time","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"adrs","type":"address[]"}],"name":"setPreList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockDebt","type":"uint256"}],"name":"setProgressRewardBlockDebt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setReceiveAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setRemoveLPFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardGas","type":"uint256"}],"name":"setRewardGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setRewardHoldCondition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"sellDestroyFee","type":"uint256"},{"internalType":"uint256","name":"sellFundFee","type":"uint256"},{"internalType":"uint256","name":"sellFundFee2","type":"uint256"},{"internalType":"uint256","name":"sellFundFee3","type":"uint256"},{"internalType":"uint256","name":"lpFee","type":"uint256"},{"internalType":"uint256","name":"lpDividendFee","type":"uint256"},{"internalType":"uint256","name":"partnerFee","type":"uint256"},{"internalType":"uint256","name":"holderFee","type":"uint256"}],"name":"setSellFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"setSwapPairList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setTransferFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setTxLimitAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startAddLPBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBW","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBWBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTradeBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"lpAmount","type":"uint256"}],"name":"updateLPAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]