编译器
0.8.23+commit.f704f362
文件 1 的 13:CF_Burnable.sol
pragma solidity 0.8.23;
import "./CF_Common.sol";
import "./CF_ERC20.sol";
abstract contract CF_Burnable is CF_Common, CF_ERC20 {
function totalBurned() external view returns (uint256) {
return _totalBurned;
}
function burn(uint256 amount) external {
_burn(msg.sender, amount);
}
function burnFrom(address account, uint256 amount) external {
_spendAllowance(account, msg.sender, amount);
_burn(account, amount);
}
function _burn(address account, uint256 amount) internal virtual {
require(_balance[account] >= amount, "Exceeds balance");
unchecked {
_balance[account] -= amount;
_totalSupply -= amount;
_totalBurned += amount;
}
emit Transfer(account, address(0xdEaD), amount);
}
}
文件 2 的 13:CF_Common.sol
pragma solidity 0.8.23;
import "./IDEXV2.sol";
import "./IERC20.sol";
abstract contract CF_Common {
string internal constant _version = "1.0.0";
mapping(address => uint256) internal _balance;
mapping(address => mapping(address => uint256)) internal _allowance;
mapping(address => bool) internal _whitelisted;
mapping(address => holderAccount) internal _holder;
mapping(uint8 => taxBeneficiary) internal _taxBeneficiary;
address[] internal _holders;
bool internal _swapEnabled;
bool internal _swapping;
bool internal _suspendTaxes;
bool internal _distributing;
bool internal immutable _initialized;
uint8 internal immutable _decimals;
uint24 internal constant _denominator = 1000;
uint24 internal _maxTxPercent;
uint24 internal _maxBalancePercent;
uint24 internal _totalTxTax;
uint24 internal _totalBuyTax;
uint24 internal _totalSellTax;
uint24 internal _totalPenaltyTxTax;
uint24 internal _totalPenaltyBuyTax;
uint24 internal _totalPenaltySellTax;
uint24 internal _minTaxDistributionPercent;
uint24 internal _minSwapPercent;
uint32 internal _lastTaxDistribution;
uint32 internal _tradingEnabled;
uint32 internal _lastSwap;
uint32 internal _earlyPenaltyTime;
uint256 internal _totalSupply;
uint256 internal _totalBurned;
uint256 internal _maxTxAmount;
uint256 internal _maxBalanceAmount;
uint256 internal _totalTaxCollected;
uint256 internal _minTaxDistributionAmount;
uint256 internal _amountForTaxDistribution;
uint256 internal _amountSwappedForTaxDistribution;
uint256 internal _minSwapAmount;
uint256 internal _amountForLiquidity;
uint256 internal _ethForTaxDistribution;
uint256 internal _reflectionTokensForTaxDistribution;
struct Renounced {
bool Whitelist;
bool MaxTx;
bool MaxBalance;
bool Taxable;
bool DEXRouterV2;
}
struct holderAccount {
bool exists;
bool penalty;
}
struct taxBeneficiary {
bool exists;
address account;
uint24[3] percent;
uint24[3] penalty;
uint256 unclaimed;
}
struct DEXRouterV2 {
address router;
address pair;
address WETH;
address receiver;
}
Renounced internal _renounced;
DEXRouterV2 internal _dex;
IERC20 internal _reflectionToken;
function _percentage(uint256 amount, uint256 bps) internal pure returns (uint256) {
unchecked {
return (amount * bps) / (100 * uint256(_denominator));
}
}
function _timestamp() internal view returns (uint32) {
unchecked {
return uint32(block.timestamp % 2**32);
}
}
function denominator() external pure returns (uint24) {
return _denominator;
}
function version() external pure returns (string memory) {
return _version;
}
}
文件 3 的 13:CF_DEXRouterV2.sol
pragma solidity 0.8.23;
import "./CF_Ownable.sol";
import "./CF_Common.sol";
import "./CF_ERC20.sol";
abstract contract CF_DEXRouterV2 is CF_Ownable, CF_Common, CF_ERC20 {
event SwapAndLiquify(uint256 tokenAmount, uint256 ethAmount, uint256 liquidity);
event SwappedTokensForETH(uint256 tokenAmount, uint256 ethAmount);
event SwappedTokensForERC20(address token, uint256 token0Amount, uint256 token1Amount);
event SetDEXRouter(address indexed router, address indexed pair, address receiver);
event RenouncedDEXRouterV2();
modifier lockSwapping {
_swapping = true;
_;
_swapping = false;
}
function renounceDEXRouterV2() external onlyOwner {
_renounced.DEXRouterV2 = true;
emit RenouncedDEXRouterV2();
}
function setDEXRouter(address router, address receiver) external onlyOwner returns (address) {
require(!_renounced.DEXRouterV2);
return _setDEXRouter(router, receiver);
}
function _setDEXRouter(address router, address receiver) internal returns (address) {
require(router != address(0));
if (_dex.router != router) {
IDEXRouterV2 _router = IDEXRouterV2(router);
IDEXFactoryV2 factory = IDEXFactoryV2(_router.factory());
address WETH = _router.WETH();
address pair = factory.getPair(address(this), WETH);
if (pair == address(0)) { pair = factory.createPair(address(this), WETH); }
_dex = DEXRouterV2(router, pair, WETH, receiver);
}
if (receiver != _dex.receiver) { _dex.receiver = receiver; }
emit SetDEXRouter(router, _dex.pair, receiver);
return _dex.pair;
}
function getDEXRouter() external view returns (address) {
return _dex.router;
}
function getDEXPair() external view returns (address) {
return _dex.pair;
}
function getDEXReceiver() external view returns (address) {
return _dex.receiver;
}
function getReflectionToken() external view returns (address) {
return address(_reflectionToken);
}
function isSwapEnabled() external view returns (bool) {
return _swapEnabled;
}
function isTradingEnabled() external view returns (bool) {
return _tradingEnabled > 0;
}
function liquifyExcess() external onlyOwner {
require(_swapEnabled && !_swapping);
unchecked {
uint256 assigned = _amountForTaxDistribution + _amountForLiquidity;
require(_balance[address(this)] > assigned);
uint256 excess = _balance[address(this)] - assigned;
_amountForLiquidity += excess;
}
_autoSwap(false);
}
function autoSwap() external {
require(_swapEnabled && !_swapping && !_distributing);
_autoSwap(false);
}
function autoSwap(bool force) external onlyOwner {
require(_swapEnabled && !_swapping && !_distributing);
_autoSwap(force);
}
function _autoSwap(bool force) internal lockSwapping {
if (!_swapEnabled) { return; }
unchecked {
if (force || ((address(_reflectionToken) == _dex.WETH ? _amountForTaxDistribution : 0) + _amountForLiquidity / 2 >= _minSwapAmount && _balance[address(this)] >= (address(_reflectionToken) == _dex.WETH ? _amountForTaxDistribution : 0) + _amountForLiquidity)) {
uint256 tokenAmountForLiquidity = _amountForLiquidity / 2;
uint256 ethBalance = address(this).balance;
address[] memory pathToSwapExactTokensForETH = new address[](2);
pathToSwapExactTokensForETH[0] = address(this);
pathToSwapExactTokensForETH[1] = _dex.WETH;
_approve(address(this), _dex.router, (address(_reflectionToken) == _dex.WETH ? _amountForTaxDistribution : 0) + tokenAmountForLiquidity);
try IDEXRouterV2(_dex.router).swapExactTokensForETHSupportingFeeOnTransferTokens((address(_reflectionToken) == _dex.WETH ? _amountForTaxDistribution : 0) + tokenAmountForLiquidity, 0, pathToSwapExactTokensForETH, address(this), block.timestamp + 1) {
_lastSwap = _timestamp();
if (_amountForLiquidity > 0) { _amountForLiquidity /= 2; }
uint256 ethAmount = address(this).balance - ethBalance;
emit SwappedTokensForETH((address(_reflectionToken) == _dex.WETH ? _amountForTaxDistribution : 0) + tokenAmountForLiquidity, ethAmount);
if (ethAmount > 0) {
uint256 ethForLiquidity = ethAmount;
if (address(_reflectionToken) == _dex.WETH) {
ethForLiquidity = _percentage(ethAmount, tokenAmountForLiquidity >= _amountForTaxDistribution ? (100 * uint256(_denominator)) - ((uint256(_denominator) * _amountForTaxDistribution * 100) / (tokenAmountForLiquidity + _amountForTaxDistribution)) : (uint256(_denominator) * tokenAmountForLiquidity * 100) / (tokenAmountForLiquidity + _amountForTaxDistribution));
_amountSwappedForTaxDistribution += _amountForTaxDistribution;
_amountForTaxDistribution = 0;
_ethForTaxDistribution += ethAmount - ethForLiquidity;
}
if (tokenAmountForLiquidity > 0 && ethForLiquidity > 0) {
_approve(address(this), _dex.router, tokenAmountForLiquidity);
try IDEXRouterV2(_dex.router).addLiquidityETH{ value: ethForLiquidity }(address(this), tokenAmountForLiquidity, 0, 0, _dex.receiver, block.timestamp + 1) returns (uint256 amountToken, uint256 amountETH, uint256 liquidity) {
emit SwapAndLiquify(amountToken, amountETH, liquidity);
_amountForLiquidity = 0;
} catch {
_approve(address(this), _dex.router, 0);
}
}
}
} catch {
_approve(address(this), _dex.router, 0);
}
}
if (force || (address(_reflectionToken) != address(this) && address(_reflectionToken) != _dex.WETH && _amountForTaxDistribution >= _minSwapAmount && _balance[address(this)] >= _amountForTaxDistribution)) {
uint256 reflectionTokenBalance = _reflectionToken.balanceOf(address(this));
address[] memory pathToSwapExactTokensForERC20 = new address[](3);
pathToSwapExactTokensForERC20[0] = address(this);
pathToSwapExactTokensForERC20[1] = _dex.WETH;
pathToSwapExactTokensForERC20[2] = address(_reflectionToken);
_reflectionToken.approve(_dex.router, _amountForTaxDistribution);
try IDEXRouterV2(_dex.router).swapExactTokensForTokensSupportingFeeOnTransferTokens(_amountForTaxDistribution, 0, (pathToSwapExactTokensForERC20), address(this), block.timestamp + 1) {
emit SwappedTokensForERC20(address(_reflectionToken), _amountForTaxDistribution, reflectionTokenBalance - _reflectionToken.balanceOf(address(this)));
_amountSwappedForTaxDistribution += _amountForTaxDistribution;
_amountForTaxDistribution = 0;
_reflectionTokensForTaxDistribution += reflectionTokenBalance - _reflectionToken.balanceOf(address(this));
} catch {
_reflectionToken.approve(_dex.router, 0);
}
}
}
}
function setReflection(address token) external onlyOwner {
require(!_renounced.DEXRouterV2);
_setReflection(token);
}
function _setReflection(address token) internal {
require(token == address(0) || token == address(this) || token == _dex.WETH || IDEXFactoryV2(IDEXRouterV2(_dex.router).factory()).getPair(_dex.WETH, token) != address(0), "No Pair");
_reflectionToken = IERC20(token == address(0) ? address(this) : token);
}
function getMinSwapPercent() external view returns (uint24) {
return _minSwapPercent;
}
function setMinSwapPercent(uint24 percent) external onlyOwner {
require(!_renounced.DEXRouterV2);
require(percent >= 1 && percent <= 1000, "0.001% to 1%");
_setMinSwapPercent(percent);
}
function _setMinSwapPercent(uint24 percent) internal {
_minSwapPercent = percent;
_minSwapAmount = _percentage(_totalSupply, uint256(percent));
}
function setSwapStatus(bool status) external onlyOwner {
require(!_renounced.DEXRouterV2);
require(!status || _dex.router != address(0), "No DEX");
_swapEnabled = status;
}
function enableTrading() external onlyOwner {
require(!_renounced.DEXRouterV2);
require(_tradingEnabled == 0, "Already enabled");
_tradingEnabled = _timestamp();
}
}
文件 4 的 13:CF_ERC20.sol
pragma solidity 0.8.23;
import "./CF_Common.sol";
abstract contract CF_ERC20 is CF_Common {
string internal _name;
string internal _symbol;
bytes32 internal _domainSeparator;
bytes32 private constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
mapping(address => uint256) private _nonces;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function name() external view returns (string memory) {
return _name;
}
function symbol() external view returns (string memory) {
return _symbol;
}
function decimals() external view returns (uint8) {
return _decimals;
}
function totalSupply() external view returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) external view returns (uint256) {
return _balance[account];
}
function allowance(address owner, address spender) public view returns (uint256) {
return _allowance[owner][spender];
}
function approve(address spender, uint256 amount) external returns (bool) {
_approve(msg.sender, spender, amount);
return true;
}
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external {
require(deadline >= block.timestamp, "Expired signature");
unchecked {
bytes32 digest = keccak256(abi.encodePacked(hex"1901", _domainSeparator, keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _nonces[owner]++, deadline))));
address recoveredAddress = ecrecover(digest, v, r, s);
require(recoveredAddress != address(0) && recoveredAddress == owner, "Invalid signature");
}
_approve(owner, spender, value);
}
function nonces(address owner) external view returns (uint256) {
return _nonces[owner];
}
function DOMAIN_SEPARATOR() external view returns (bytes32) {
return _domainSeparator;
}
function transfer(address to, uint256 amount) external returns (bool) {
_transfer(msg.sender, to, amount);
return true;
}
function transferFrom(address from, address to, uint256 amount) external returns (bool) {
_spendAllowance(from, msg.sender, amount);
_transfer(from, to, amount);
return true;
}
function increaseAllowance(address spender, uint256 addedValue) external returns (bool) {
unchecked {
_approve(msg.sender, spender, allowance(msg.sender, spender) + addedValue);
}
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) {
uint256 currentAllowance = allowance(msg.sender, spender);
require(currentAllowance >= subtractedValue, "Negative allowance");
unchecked {
_approve(msg.sender, spender, currentAllowance - subtractedValue);
}
return true;
}
function _approve(address owner, address spender, uint256 amount) internal {
_allowance[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _spendAllowance(address owner, address spender, uint256 amount) internal {
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= amount, "Insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0) && to != address(0), "Transfer from/to zero address");
require(_balance[from] >= amount, "Exceeds balance");
if (amount > 0) {
unchecked {
_balance[from] -= amount;
_balance[to] += amount;
}
}
emit Transfer(from, to, amount);
}
}
文件 5 的 13:CF_MaxBalance.sol
pragma solidity 0.8.23;
import "./CF_Ownable.sol";
import "./CF_Common.sol";
abstract contract CF_MaxBalance is CF_Ownable, CF_Common {
event SetMaxBalancePercent(uint24 percent);
event RenouncedMaxBalance();
function renounceMaxBalance() external onlyOwner {
_renounced.MaxBalance = true;
emit RenouncedMaxBalance();
}
function getMaxBalancePercent() external view returns (uint24) {
return _maxBalancePercent;
}
function setMaxBalancePercent(uint24 percent) external onlyOwner {
require(!_renounced.MaxBalance);
unchecked {
require(percent == 0 || (percent >= 100 && percent <= 100 * _denominator));
}
_setMaxBalancePercent(percent);
emit SetMaxBalancePercent(percent);
}
function _setMaxBalancePercent(uint24 percent) internal {
_maxBalancePercent = percent;
_maxBalanceAmount = percent > 0 ? _percentage(_totalSupply, uint256(percent)) : 0;
if (!_initialized) { emit SetMaxBalancePercent(percent); }
}
}
文件 6 的 13:CF_MaxTx.sol
pragma solidity 0.8.23;
import "./CF_Ownable.sol";
import "./CF_Common.sol";
abstract contract CF_MaxTx is CF_Ownable, CF_Common {
event SetMaxTxPercent(uint24 percent);
event RenouncedMaxTx();
function renounceMaxTx() external onlyOwner {
_renounced.MaxTx = true;
emit RenouncedMaxTx();
}
function getMaxTxPercent() external view returns (uint24) {
return _maxTxPercent;
}
function setMaxTxPercent(uint24 percent) external onlyOwner {
require(!_renounced.MaxTx);
unchecked {
require(percent == 0 || (percent >= 100 && percent <= 100 * _denominator));
}
_setMaxTxPercent(percent);
emit SetMaxTxPercent(percent);
}
function _setMaxTxPercent(uint24 percent) internal {
_maxTxPercent = percent;
_maxTxAmount = percent > 0 ? _percentage(_totalSupply, uint256(percent)) : 0;
if (!_initialized) { emit SetMaxTxPercent(percent); }
}
}
文件 7 的 13:CF_Ownable.sol
pragma solidity 0.8.23;
abstract contract CF_Ownable {
address internal _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() {
require(_owner == msg.sender, "Unauthorized");
_;
}
function owner() external view returns (address) {
return _owner;
}
function renounceOwnership() external onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) external onlyOwner {
require(newOwner != address(0));
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 8 的 13:CF_Recoverable.sol
pragma solidity 0.8.23;
import "./CF_Ownable.sol";
import "./CF_Common.sol";
abstract contract CF_Recoverable is CF_Ownable, CF_Common {
function recoverERC20(address token, address to, uint256 amount) external onlyOwner {
unchecked {
uint256 balance = IERC20(token).balanceOf(address(this));
uint256 allocated = token == address(this) ? _amountForTaxDistribution + _amountForLiquidity : (address(_reflectionToken) == token ? _reflectionTokensForTaxDistribution : 0);
require(balance - (allocated >= balance ? balance : allocated) >= amount, "Exceeds balance");
}
IERC20(token).transfer(to, amount);
}
function recoverETH(address payable to, uint256 amount) external onlyOwner {
unchecked {
uint256 balance = address(this).balance;
uint256 allocated = address(_reflectionToken) == _dex.WETH ? _ethForTaxDistribution : 0;
require(balance - (allocated >= balance ? balance : allocated) >= amount, "Exceeds balance");
}
(bool success, ) = to.call{ value: amount }("");
require(success);
}
}
文件 9 的 13:CF_Taxable.sol
pragma solidity 0.8.23;
import "./CF_Ownable.sol";
import "./CF_Common.sol";
import "./CF_ERC20.sol";
abstract contract CF_Taxable is CF_Ownable, CF_Common, CF_ERC20 {
event SetTaxBeneficiary(uint8 slot, address account, uint24[3] percent, uint24[3] penalty);
event SetEarlyPenaltyTime(uint32 time);
event TaxDistributed(uint256 amount);
event RenouncedTaxable();
struct taxBeneficiaryView {
address account;
uint24[3] percent;
uint24[3] penalty;
uint256 unclaimed;
}
modifier lockDistributing {
_distributing = true;
_;
_distributing = false;
}
function renounceTaxable() external onlyOwner {
_renounced.Taxable = true;
emit RenouncedTaxable();
}
function totalTaxCollected() external view returns (uint256) {
return _totalTaxCollected;
}
function txTax() external view returns (uint24) {
return txTax(msg.sender);
}
function txTax(address from) public view returns (uint24) {
unchecked {
return from == address(this) || _whitelisted[from] || from == _dex.pair ? 0 : (_holder[from].penalty || _tradingEnabled + _earlyPenaltyTime >= _timestamp() ? _totalPenaltyTxTax : _totalTxTax);
}
}
function buyTax() external view returns (uint24) {
return buyTax(msg.sender);
}
function buyTax(address from) public view returns (uint24) {
if (_suspendTaxes) { return 0; }
unchecked {
return from == address(this) || _whitelisted[from] || from == _dex.pair ? 0 : (_holder[from].penalty || _tradingEnabled + _earlyPenaltyTime >= _timestamp() ? _totalPenaltyBuyTax : _totalBuyTax);
}
}
function sellTax() external view returns (uint24) {
return sellTax(msg.sender);
}
function sellTax(address to) public view returns (uint24) {
if (_suspendTaxes) { return 0; }
unchecked {
return to == address(this) || _whitelisted[to] || to == _dex.pair || to == _dex.router ? 0 : (_holder[to].penalty || _tradingEnabled + _earlyPenaltyTime >= _timestamp() ? _totalPenaltySellTax : _totalSellTax);
}
}
function listTaxBeneficiaries() external view returns (taxBeneficiaryView[] memory list) {
list = new taxBeneficiaryView[](5);
unchecked {
for (uint8 i; i < 5; i++) { list[i] = taxBeneficiaryView(_taxBeneficiary[i].account, _taxBeneficiary[i].percent, _taxBeneficiary[i].penalty, _taxBeneficiary[i].unclaimed); }
}
}
function setTaxBeneficiary(uint8 slot, address account, uint24[3] memory percent, uint24[3] memory penalty) external onlyOwner {
require(!_renounced.Taxable);
_setTaxBeneficiary(slot, account, percent, penalty);
}
function _setTaxBeneficiary(uint8 slot, address account, uint24[3] memory percent, uint24[3] memory penalty) internal {
require(slot < 5);
require(account != address(this) && account != address(0));
taxBeneficiary storage _taxBeneficiary = _taxBeneficiary[slot];
if (account == address(0xdEaD) && _taxBeneficiary.exists && _taxBeneficiary.unclaimed > 0) { revert("Unclaimed taxes"); }
unchecked {
_totalTxTax += percent[0] - _taxBeneficiary.percent[0];
_totalBuyTax += percent[1] - _taxBeneficiary.percent[1];
_totalSellTax += percent[2] - _taxBeneficiary.percent[2];
_totalPenaltyTxTax += penalty[0] - _taxBeneficiary.penalty[0];
_totalPenaltyBuyTax += penalty[1] - _taxBeneficiary.penalty[1];
_totalPenaltySellTax += penalty[2] - _taxBeneficiary.penalty[2];
require(_totalTxTax <= 25 * _denominator && ((_totalBuyTax <= 25 * _denominator && _totalSellTax <= 25 * _denominator) && (_totalBuyTax + _totalSellTax <= 25 * _denominator)), "High Tax");
require(_totalPenaltyTxTax <= 100 * _denominator && _totalPenaltyBuyTax <= 100 * _denominator && _totalPenaltySellTax <= 100 * _denominator, "Invalid Penalty");
}
_taxBeneficiary.account = account;
_taxBeneficiary.percent = percent;
_taxBeneficiary.penalty = penalty;
if (!_taxBeneficiary.exists) { _taxBeneficiary.exists = true; }
emit SetTaxBeneficiary(slot, account, percent, penalty);
}
function autoTaxDistribute() external {
require(!_swapping && !_distributing);
_autoTaxDistribute(false);
}
function autoTaxDistribute(bool force) external onlyOwner {
require(!_swapping && !_distributing);
_autoTaxDistribute(force);
}
function _autoTaxDistribute(bool force) internal lockDistributing {
if (!force) {
if (address(_reflectionToken) == address(this) && (_amountForTaxDistribution == 0 || _balance[address(this)] < _amountForTaxDistribution || _amountForTaxDistribution < _minTaxDistributionAmount)) { return; }
if (address(_reflectionToken) == _dex.WETH && (_ethForTaxDistribution == 0 || _ethForTaxDistribution < address(this).balance)) { return; }
if (address(_reflectionToken) != address(this) && address(_reflectionToken) != _dex.WETH && (_reflectionTokensForTaxDistribution == 0 || _reflectionTokensForTaxDistribution < _reflectionToken.balanceOf(address(this)))) { return; }
}
unchecked {
uint256 distributed;
for (uint8 i; i < 5; i++) {
address account = _taxBeneficiary[i].account;
uint256 unclaimed = _taxBeneficiary[i].unclaimed;
if (unclaimed == 0 || account == address(0xdEaD) || account == _dex.pair) { continue; }
uint256 _distributed = _distribute(account, unclaimed);
if (_distributed > 0) { _taxBeneficiary[i].unclaimed -= _distributed; }
distributed += _distributed;
}
_lastTaxDistribution = _timestamp();
emit TaxDistributed(distributed);
}
}
function _distribute(address account, uint256 unclaimed) private returns (uint256) {
if (address(_reflectionToken) == address(this)) {
super._transfer(address(this), account, unclaimed);
_amountForTaxDistribution -= unclaimed;
} else {
uint256 percent = (uint256(_denominator) * unclaimed * 100) / _amountSwappedForTaxDistribution;
uint256 amount;
if (address(_reflectionToken) == _dex.WETH) {
amount = _percentage(_ethForTaxDistribution, percent);
if (_ethForTaxDistribution < amount) { return 0; }
(bool success, ) = payable(account).call{ value: amount, gas: 30000 }("");
if (!success) { return 0; }
_ethForTaxDistribution -= amount;
} else {
amount = _percentage(_reflectionTokensForTaxDistribution, percent);
if (_reflectionTokensForTaxDistribution < unclaimed) { return 0; }
_reflectionToken.transfer(account, amount);
_reflectionTokensForTaxDistribution -= amount;
}
_amountSwappedForTaxDistribution -= unclaimed;
}
return unclaimed;
}
function suspendTaxes(bool status) external onlyOwner {
require(!_renounced.Taxable);
_suspendTaxes = status;
}
function taxesSuspended() external view returns (bool) {
return _suspendTaxes;
}
function getMinTaxDistributionPercent() external view returns (uint24) {
return _minTaxDistributionPercent;
}
function setMinTaxDistributionPercent(uint24 percent) external onlyOwner {
require(!_renounced.Taxable);
require(percent >= 1 && percent <= 1000, "0.001% to 1%");
_setMinTaxDistributionPercent(percent);
}
function _setMinTaxDistributionPercent(uint24 percent) internal {
_minTaxDistributionPercent = percent;
_minTaxDistributionAmount = _percentage(_totalSupply, uint256(percent));
}
function removePenalty(address account) external onlyOwner {
require(!_renounced.Taxable);
_holder[account].penalty = false;
}
function isPenalized(address account) external view returns (bool) {
return _holder[account].penalty;
}
function getEarlyPenaltyTime() external view returns (uint32) {
return _earlyPenaltyTime;
}
function setEarlyPenaltyTime(uint32 time) external onlyOwner {
require(!_renounced.Taxable);
require(time <= 600);
_setEarlyPenaltyTime(time);
}
function _setEarlyPenaltyTime(uint32 time) internal {
_earlyPenaltyTime = time;
emit SetEarlyPenaltyTime(time);
}
}
文件 10 的 13:CF_Whitelist.sol
pragma solidity 0.8.23;
import "./CF_Ownable.sol";
import "./CF_Common.sol";
abstract contract CF_Whitelist is CF_Ownable, CF_Common {
event Whitelisted(address indexed account, bool status);
event RenouncedWhitelist();
function renounceWhitelist() external onlyOwner {
_renounced.Whitelist = true;
emit RenouncedWhitelist();
}
function isWhitelisted(address account) external view returns (bool) {
return _whitelisted[account];
}
function whitelist(address account, bool status) public onlyOwner {
_whitelist(account, status);
}
function _whitelist(address account, bool status) internal {
require(!_renounced.Whitelist);
require(account != address(0) && account != address(0xdEaD));
require(account != _dex.router && account != _dex.pair, "DEX router and pair are privileged");
_whitelisted[account] = status;
emit Whitelisted(account, status);
}
function whitelist(address[] calldata accounts, bool status) external onlyOwner {
unchecked {
uint256 cnt = accounts.length;
for (uint256 i; i < cnt; i++) { _whitelist(accounts[i], status); }
}
}
function _initialWhitelist(address[1] memory accounts) internal {
require(!_initialized);
unchecked {
for (uint256 i; i < 1; i++) { _whitelist(accounts[i], true); }
}
}
}
文件 11 的 13:IDEXV2.sol
pragma solidity 0.8.23;
interface IDEXRouterV2 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external;
}
interface IDEXFactoryV2 {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external returns (address pair);
}
文件 12 的 13:IERC20.sol
pragma solidity 0.8.23;
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
}
文件 13 的 13:InvestAI.sol
pragma solidity 0.8.23;
import "./CF_Ownable.sol";
import "./CF_Common.sol";
import "./CF_ERC20.sol";
import "./CF_Recoverable.sol";
import "./CF_Burnable.sol";
import "./CF_Whitelist.sol";
import "./CF_MaxTx.sol";
import "./CF_MaxBalance.sol";
import "./CF_Taxable.sol";
import "./CF_DEXRouterV2.sol";
contract InvestAI is CF_Ownable, CF_Common, CF_ERC20, CF_Recoverable, CF_Burnable, CF_Whitelist, CF_MaxTx, CF_MaxBalance, CF_Taxable, CF_DEXRouterV2 {
constructor() {
_name = unicode"InvestAI";
_symbol = unicode"INVEST";
_decimals = 18;
_totalSupply = 50000000000000000000000000;
_transferOwnership(0x7ba33149136A20E1F3342B6C719d0A1102Abe856);
_transferInitialSupply(0x7ba33149136A20E1F3342B6C719d0A1102Abe856, 100000);
_setEarlyPenaltyTime(180);
_setDEXRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 0x7ba33149136A20E1F3342B6C719d0A1102Abe856);
_setReflection(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
_swapEnabled = true;
_setMinSwapPercent(50);
_setMinTaxDistributionPercent(50);
_setTaxBeneficiary(0, 0x7ba33149136A20E1F3342B6C719d0A1102Abe856, [ uint24(0), uint24(4990), uint24(4990) ], [ uint24(50000), uint24(50000), uint24(50000) ]);
_initialWhitelist([ 0x7ba33149136A20E1F3342B6C719d0A1102Abe856 ]);
_setMaxBalancePercent(2000);
_domainSeparator = keccak256(abi.encode(keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(_name)), keccak256(bytes("1")), block.chainid, address(this)));
_initialized = true;
}
function _transfer(address from, address to, uint256 amount) internal virtual override {
require(to != address(0xdEaD));
if (!_distributing && !_swapping && (from != _dex.pair && from != _dex.router)) {
_autoSwap(false);
_autoTaxDistribute(false);
}
if (amount > 0 && !_whitelisted[from] && !_whitelisted[to] && from != address(this) && to != address(this) && to != _dex.router) {
require((from != _dex.pair && to != _dex.pair) || ((from == _dex.pair || to == _dex.pair) && _tradingEnabled > 0), "Trading disabled");
unchecked {
require(_maxTxAmount == 0 || amount <= _maxTxAmount, "Exceeds maxTx");
require(_maxBalanceAmount == 0 || to == address(this) || (to == _dex.pair || to == _dex.router) || _balance[to] + amount <= _maxBalanceAmount, "Exceeds maxBalance");
if (!_suspendTaxes && !_distributing && !_swapping) {
uint256 appliedTax;
uint8 taxType;
if (from == _dex.pair || to == _dex.pair) { taxType = from == _dex.pair ? 1 : 2; }
address _account = taxType == 1 ? to : from;
if (_tradingEnabled + _earlyPenaltyTime >= _timestamp() && !_holder[_account].penalty) { _holder[_account].penalty = true; }
for (uint8 i; i < 5; i++) {
uint256 percent = uint256(taxType > 0 ? (taxType == 1 ? (_holder[_account].penalty ? _taxBeneficiary[i].penalty[1] : _taxBeneficiary[i].percent[1]) : (_holder[_account].penalty ? _taxBeneficiary[i].penalty[2] : _taxBeneficiary[i].percent[2])) : (_holder[_account].penalty ? _taxBeneficiary[i].penalty[0] : _taxBeneficiary[i].percent[0]));
if (percent == 0) { continue; }
uint256 taxAmount = _percentage(amount, percent);
super._transfer(from, address(this), taxAmount);
if (_taxBeneficiary[i].account == _dex.pair) {
_amountForLiquidity += taxAmount;
} else if (_taxBeneficiary[i].account == address(0xdEaD)) {
_burn(address(this), taxAmount);
} else {
_taxBeneficiary[i].unclaimed += taxAmount;
_amountForTaxDistribution += taxAmount;
}
appliedTax += taxAmount;
}
if (appliedTax > 0) {
_totalTaxCollected += appliedTax;
amount -= appliedTax;
}
}
}
}
super._transfer(from, to, amount);
}
function _burn(address account, uint256 amount) internal virtual override {
super._burn(account, amount);
_setMaxTxPercent(_maxTxPercent);
_setMaxBalancePercent(_maxBalancePercent);
_setMinTaxDistributionPercent(_minTaxDistributionPercent);
_setMinSwapPercent(_minSwapPercent);
}
function _transferInitialSupply(address account, uint24 percent) private {
require(!_initialized);
uint256 amount = _percentage(_totalSupply, uint256(percent));
_balance[account] = amount;
emit Transfer(address(0), account, amount);
}
function renounced() external view returns (bool Whitelist, bool MaxTx, bool MaxBalance, bool Taxable, bool DEXRouterV2) {
return (_renounced.Whitelist, _renounced.MaxTx, _renounced.MaxBalance, _renounced.Taxable, _renounced.DEXRouterV2);
}
function info() external view returns (string memory name, string memory symbol, uint8 decimals, address owner, uint256 totalSupply, string memory version) {
return (_name, _symbol, _decimals, _owner, _totalSupply, _version);
}
receive() external payable { }
fallback() external payable { }
}
{
"compilationTarget": {
"InvestAI.sol": "InvestAI"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 800
},
"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":[],"name":"RenouncedDEXRouterV2","type":"event"},{"anonymous":false,"inputs":[],"name":"RenouncedMaxBalance","type":"event"},{"anonymous":false,"inputs":[],"name":"RenouncedMaxTx","type":"event"},{"anonymous":false,"inputs":[],"name":"RenouncedTaxable","type":"event"},{"anonymous":false,"inputs":[],"name":"RenouncedWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"router","type":"address"},{"indexed":true,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"SetDEXRouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"time","type":"uint32"}],"name":"SetEarlyPenaltyTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint24","name":"percent","type":"uint24"}],"name":"SetMaxBalancePercent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint24","name":"percent","type":"uint24"}],"name":"SetMaxTxPercent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"slot","type":"uint8"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint24[3]","name":"percent","type":"uint24[3]"},{"indexed":false,"internalType":"uint24[3]","name":"penalty","type":"uint24[3]"}],"name":"SetTaxBeneficiary","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liquidity","type":"uint256"}],"name":"SwapAndLiquify","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"token0Amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"token1Amount","type":"uint256"}],"name":"SwappedTokensForERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"SwappedTokensForETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TaxDistributed","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"Whitelisted","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[],"name":"autoSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"force","type":"bool"}],"name":"autoSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoTaxDistribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"force","type":"bool"}],"name":"autoTaxDistribute","outputs":[],"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":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyTax","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"buyTax","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"denominator","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"enableTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDEXPair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDEXReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDEXRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEarlyPenaltyTime","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxBalancePercent","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxTxPercent","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinSwapPercent","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinTaxDistributionPercent","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReflectionToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"info","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"string","name":"version","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isPenalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSwapEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquifyExcess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"listTaxBeneficiaries","outputs":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint24[3]","name":"percent","type":"uint24[3]"},{"internalType":"uint24[3]","name":"penalty","type":"uint24[3]"},{"internalType":"uint256","name":"unclaimed","type":"uint256"}],"internalType":"struct CF_Taxable.taxBeneficiaryView[]","name":"list","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removePenalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceDEXRouterV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceMaxBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceMaxTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceTaxable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounced","outputs":[{"internalType":"bool","name":"Whitelist","type":"bool"},{"internalType":"bool","name":"MaxTx","type":"bool"},{"internalType":"bool","name":"MaxBalance","type":"bool"},{"internalType":"bool","name":"Taxable","type":"bool"},{"internalType":"bool","name":"DEXRouterV2","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"sellTax","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sellTax","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"address","name":"receiver","type":"address"}],"name":"setDEXRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"time","type":"uint32"}],"name":"setEarlyPenaltyTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"percent","type":"uint24"}],"name":"setMaxBalancePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"percent","type":"uint24"}],"name":"setMaxTxPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"percent","type":"uint24"}],"name":"setMinSwapPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"percent","type":"uint24"}],"name":"setMinTaxDistributionPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"setReflection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setSwapStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"slot","type":"uint8"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint24[3]","name":"percent","type":"uint24[3]"},{"internalType":"uint24[3]","name":"penalty","type":"uint24[3]"}],"name":"setTaxBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"suspendTaxes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxesSuspended","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTaxCollected","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","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":[],"name":"txTax","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"txTax","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"bool","name":"status","type":"bool"}],"name":"whitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"whitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]