编译器
0.8.17+commit.8df45f5f
文件 1 的 12:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 2 的 12:ERC20.sol
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function decimals() public view virtual override returns (uint8) {
return 18;
}
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_balances[to] += amount;
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
文件 3 的 12:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 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 from,
address to,
uint256 amount
) external returns (bool);
}
文件 4 的 12:IERC20Metadata.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
文件 5 的 12:IFeeDiscountOracle.sol
pragma solidity ^0.8.0;
interface IFeeDiscountOracle {
function buyFeeDiscountFor(address account, uint256 totalFeeAmount)
external
view
returns (uint256 discountAmount);
function sellFeeDiscountFor(address account, uint256 totalFeeAmount)
external
view
returns (uint256 discountAmount);
}
文件 6 的 12:ILeetSwapV2Factory.sol
pragma solidity ^0.8.0;
interface ILeetSwapV2Factory {
function allPairsLength() external view returns (uint256);
function isPair(address pair) external view returns (bool);
function pairCodeHash() external pure returns (bytes32);
function getPair(
address tokenA,
address token,
bool stable
) external view returns (address);
function createPair(
address tokenA,
address tokenB,
bool stable
) external returns (address);
function createPair(address tokenA, address tokenB)
external
returns (address);
function getInitializable()
external
view
returns (
address token0,
address token1,
bool stable
);
function protocolFeesShare() external view returns (uint256);
function protocolFeesRecipient() external view returns (address);
function tradingFees(address pair, address to)
external
view
returns (uint256);
function isPaused() external view returns (bool);
}
文件 7 的 12:ILeetSwapV2Pair.sol
pragma solidity ^0.8.0;
interface ILeetSwapV2Pair {
function factory() external view returns (address);
function fees() external view returns (address);
function transferFrom(
address src,
address dst,
uint256 amount
) external returns (bool);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function burn(address to)
external
returns (uint256 amount0, uint256 amount1);
function mint(address to) external returns (uint256 liquidity);
function getReserves()
external
view
returns (
uint256 _reserve0,
uint256 _reserve1,
uint256 _blockTimestampLast
);
function getAmountOut(uint256, address) external view returns (uint256);
function current(address tokenIn, uint256 amountIn)
external
view
returns (uint256);
function token0() external view returns (address);
function token1() external view returns (address);
function stable() external view returns (bool);
function balanceOf(address) external view returns (uint256);
function sample(
address tokenIn,
uint256 amountIn,
uint256 points,
uint256 window
) external view returns (uint256[] memory);
function quote(
address tokenIn,
uint256 amountIn,
uint256 granularity
) external view returns (uint256);
function claimFeesFor(address account)
external
returns (uint256 claimed0, uint256 claimed1);
function claimFees() external returns (uint256 claimed0, uint256 claimed1);
function claimableFeesFor(address account)
external
returns (uint256 claimed0, uint256 claimed1);
function claimableFees()
external
returns (uint256 claimed0, uint256 claimed1);
}
文件 8 的 12:ILeetSwapV2Router01.sol
pragma solidity ^0.8.0;
import "@leetswap/interfaces/IWCANTO.sol";
interface ILeetSwapV2Router01 {
function factory() external view returns (address);
function WETH() external view returns (address);
function wcanto() external view returns (IWCANTO);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountCANTOMin,
address to,
uint256 deadline
) external returns (uint256 amountCANTO);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function getAmountOut(
uint256 amountIn,
address tokenIn,
address tokenOut
) external view returns (uint256 amount);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function pairFor(address tokenA, address tokenB)
external
view
returns (address pair);
}
文件 9 的 12:ILiquidityManageable.sol
pragma solidity ^0.8.0;
interface ILiquidityManageable {
function setLiquidityManagementPhase(bool _isManagingLiquidity) external;
function isLiquidityManager(address _addr) external returns (bool);
function isLiquidityManagementPhase() external returns (bool);
}
文件 10 的 12:IWCANTO.sol
pragma solidity ^0.8.0;
interface IWCANTO {
function deposit() external payable;
function transfer(address to, uint256 value) external returns (bool);
function withdraw(uint256) external;
}
文件 11 的 12:LeetToken.sol
pragma solidity =0.8.17;
import "@leetswap/interfaces/ILiquidityManageable.sol";
import "@leetswap/dex/v2/interfaces/ILeetSwapV2Router01.sol";
import "@leetswap/dex/v2/interfaces/ILeetSwapV2Factory.sol";
import "@leetswap/dex/v2/interfaces/ILeetSwapV2Pair.sol";
import "@leetswap/tokens/interfaces/IFeeDiscountOracle.sol";
import {ERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
contract LeetToken is ERC20, Ownable, ILiquidityManageable {
address public constant DEAD = 0x000000000000000000000000000000000000dEaD;
uint256 public constant FEE_DENOMINATOR = 1e4;
uint256 public constant MAX_FEE = 1000;
uint256 public burnBuyFee;
uint256 public farmsBuyFee;
uint256 public stakingBuyFee;
uint256 public treasuryBuyFee;
uint256 public totalBuyFee;
uint256 public burnSellFee;
uint256 public farmsSellFee;
uint256 public stakingSellFee;
uint256 public treasurySellFee;
uint256 public totalSellFee;
address public farmsFeeRecipient;
address public stakingFeeRecipient;
address public treasuryFeeRecipient;
bool public tradingEnabled;
uint256 public tradingEnabledTimestamp = 0;
ILeetSwapV2Router01 public swapFeesRouter;
IFeeDiscountOracle public feeDiscountOracle;
address public swapPairToken;
bool public swappingFeesEnabled;
bool public isSwappingFees;
uint256 public swapFeesAtAmount;
uint256 public maxSwapFeesAmount;
uint256 public maxWalletAmount;
uint256 public sniperBuyBaseFee = 0;
uint256 public sniperBuyFeeDecayPeriod = 0;
uint256 public sniperBuyFeeBurnShare = 2500;
bool public sniperBuyFeeEnabled = true;
uint256 public sniperSellBaseFee = 0;
uint256 public sniperSellFeeDecayPeriod = 0;
uint256 public sniperSellFeeBurnShare = 2500;
bool public sniperSellFeeEnabled = true;
bool public pairAutoDetectionEnabled;
bool public indirectSwapFeeEnabled;
bool public maxWalletEnabled;
mapping(address => bool) public isExcludedFromFee;
mapping(address => bool) public isLiquidityManager;
mapping(address => bool) public isWhitelistedFactory;
mapping(address => bool) public isBot;
bool internal _isLiquidityManagementPhase;
uint256 internal _currentCacheVersion;
mapping(address => bool) internal _isLeetPair;
mapping(uint256 => mapping(address => bool))
internal _isCachedAutodetectedLeetPair;
mapping(address => bool) internal _isExcludedFromMaxWallet;
event BuyFeeUpdated(uint256 _fee, uint256 _previousFee);
event SellFeeUpdated(uint256 _fee, uint256 _previousFee);
event LeetPairAdded(address _pair);
event LeetPairRemoved(address _pair);
event AddressExcludedFromFees(address _address);
event AddressIncludedInFees(address _address);
event WhitelistedFactoryAdded(address _factory);
event WhitelistedFactoryRemoved(address _factory);
error TradingNotEnabled();
error TradingAlreadyEnabled();
error SniperBotDetected();
error MaxWalletReached();
error TimestampIsInThePast();
error FeeTooHigh();
error InvalidFeeRecipient();
error NotLiquidityManager();
error TransferFailed();
error ArrayLengthMismatch();
constructor(
address _router,
address _swapPairToken
) ERC20("leetswap.finance", "LEET") {
ILeetSwapV2Router01 router = ILeetSwapV2Router01(_router);
ILeetSwapV2Factory factory = ILeetSwapV2Factory(router.factory());
swapPairToken = _swapPairToken;
isExcludedFromFee[owner()] = true;
isExcludedFromFee[address(this)] = true;
isExcludedFromFee[DEAD] = true;
_isExcludedFromMaxWallet[owner()] = true;
_isExcludedFromMaxWallet[address(this)] = true;
_isExcludedFromMaxWallet[DEAD] = true;
burnBuyFee = 0;
farmsBuyFee = 0;
stakingBuyFee = 0;
treasuryBuyFee = 0;
setBuyFees(burnBuyFee, farmsBuyFee, stakingBuyFee, treasuryBuyFee);
burnSellFee = 0;
farmsSellFee = 150;
stakingSellFee = 100;
treasurySellFee = 50;
setSellFees(burnSellFee, farmsSellFee, stakingSellFee, treasurySellFee);
farmsFeeRecipient = owner();
stakingFeeRecipient = owner();
treasuryFeeRecipient = owner();
isLiquidityManager[address(router)] = true;
isWhitelistedFactory[address(factory)] = true;
address pair = factory.createPair(address(this), swapPairToken);
address feesVault = ILeetSwapV2Pair(pair).fees();
_isExcludedFromMaxWallet[feesVault] = true;
isExcludedFromFee[feesVault] = true;
_isLeetPair[pair] = true;
maxWalletEnabled = true;
_mint(owner(), 1337000 * 10 ** decimals());
swapFeesRouter = router;
swapFeesAtAmount = (totalSupply() * 3) / 1e5;
maxSwapFeesAmount = (totalSupply() * 4) / 1e5;
maxWalletAmount = (totalSupply() * 1) / 1e3;
}
modifier onlyLiquidityManager() {
if (!isLiquidityManager[msg.sender]) {
revert NotLiquidityManager();
}
_;
}
function isLeetPair(address _pair) public returns (bool isPair) {
if (_isLeetPair[_pair]) {
return true;
}
if (!pairAutoDetectionEnabled) {
return false;
}
if (_isCachedAutodetectedLeetPair[_currentCacheVersion][_pair]) {
return true;
}
if (_pair.code.length == 0) {
return false;
}
(bool success, bytes memory data) = _pair.staticcall(
abi.encodeWithSignature("factory()")
);
if (!success) return false;
address factory = abi.decode(data, (address));
if (factory == address(0)) return false;
bool isVerifiedPair = isWhitelistedFactory[factory] &&
ILeetSwapV2Factory(factory).isPair(_pair);
(success, data) = _pair.staticcall(abi.encodeWithSignature("token0()"));
if (!success) return false;
address token0 = abi.decode(data, (address));
if (token0 == address(this)) {
if (isVerifiedPair) {
_isCachedAutodetectedLeetPair[_currentCacheVersion][
_pair
] = true;
}
return true;
}
(success, data) = _pair.staticcall(abi.encodeWithSignature("token1()"));
if (!success) return false;
address token1 = abi.decode(data, (address));
if (token1 == address(this)) {
if (isVerifiedPair) {
_isCachedAutodetectedLeetPair[_currentCacheVersion][
_pair
] = true;
}
return true;
}
return false;
}
function _shouldTakeTransferTax(
address sender,
address recipient
) internal returns (bool) {
if (isExcludedFromFee[sender] || isExcludedFromFee[recipient]) {
return false;
}
return
!_isLiquidityManagementPhase &&
(isLeetPair(sender) || isLeetPair(recipient));
}
function sniperBuyFee() public view returns (uint256) {
if (!sniperBuyFeeEnabled) {
return 0;
}
uint256 timeSinceLaunch = block.timestamp - tradingEnabledTimestamp;
if (timeSinceLaunch >= sniperBuyFeeDecayPeriod) {
return 0;
}
return
sniperBuyBaseFee -
(sniperBuyBaseFee * timeSinceLaunch) /
sniperBuyFeeDecayPeriod;
}
function sniperSellFee() public view returns (uint256) {
if (!sniperSellFeeEnabled) {
return 0;
}
uint256 timeSinceLaunch = block.timestamp - tradingEnabledTimestamp;
if (timeSinceLaunch >= sniperSellFeeDecayPeriod) {
return 0;
}
return
sniperSellBaseFee -
(sniperSellBaseFee * timeSinceLaunch) /
sniperSellFeeDecayPeriod;
}
function buyFeeDiscountFor(
address account,
uint256 totalFeeAmount
) public view returns (uint256) {
if (address(feeDiscountOracle) == address(0)) return 0;
return feeDiscountOracle.buyFeeDiscountFor(account, totalFeeAmount);
}
function sellFeeDiscountFor(
address account,
uint256 totalFeeAmount
) public view returns (uint256) {
if (address(feeDiscountOracle) == address(0)) return 0;
return feeDiscountOracle.sellFeeDiscountFor(account, totalFeeAmount);
}
function _takeBuyFee(
address sender,
address user,
uint256 amount
) internal returns (uint256) {
if (totalBuyFee == 0) return 0;
uint256 totalFeeAmount = (amount * totalBuyFee) / FEE_DENOMINATOR;
uint256 feeDiscountAmount = buyFeeDiscountFor(user, totalFeeAmount);
totalFeeAmount -= feeDiscountAmount;
if (totalFeeAmount == 0) return 0;
uint256 burnFeeAmount = (totalFeeAmount * burnBuyFee) / totalBuyFee;
uint256 farmsFeeAmount = (totalFeeAmount * farmsBuyFee) / totalBuyFee;
uint256 stakingFeeAmount = (totalFeeAmount * stakingBuyFee) /
totalBuyFee;
uint256 treasuryFeeAmount = totalFeeAmount -
burnFeeAmount -
farmsFeeAmount -
stakingFeeAmount;
if (burnFeeAmount > 0) super._transfer(sender, DEAD, burnFeeAmount);
if (farmsFeeAmount > 0)
super._transfer(sender, farmsFeeRecipient, farmsFeeAmount);
if (stakingFeeAmount > 0)
super._transfer(sender, stakingFeeRecipient, stakingFeeAmount);
if (treasuryFeeAmount > 0)
super._transfer(sender, address(this), treasuryFeeAmount);
return totalFeeAmount;
}
function _takeSellFee(
address sender,
address user,
uint256 amount
) internal returns (uint256) {
if (totalSellFee == 0) return 0;
uint256 totalFeeAmount = (amount * totalSellFee) / FEE_DENOMINATOR;
uint256 feeDiscountAmount = sellFeeDiscountFor(user, totalFeeAmount);
totalFeeAmount -= feeDiscountAmount;
if (totalFeeAmount == 0) return 0;
uint256 burnFeeAmount = (totalFeeAmount * burnSellFee) / totalSellFee;
uint256 farmsFeeAmount = (totalFeeAmount * farmsSellFee) / totalSellFee;
uint256 stakingFeeAmount = (totalFeeAmount * stakingSellFee) /
totalSellFee;
uint256 treasuryFeeAmount = totalFeeAmount -
burnFeeAmount -
farmsFeeAmount -
stakingFeeAmount;
if (burnFeeAmount > 0) super._transfer(sender, DEAD, burnFeeAmount);
if (farmsFeeAmount > 0)
super._transfer(sender, farmsFeeRecipient, farmsFeeAmount);
if (stakingFeeAmount > 0)
super._transfer(sender, stakingFeeRecipient, stakingFeeAmount);
if (treasuryFeeAmount > 0)
super._transfer(sender, address(this), treasuryFeeAmount);
return totalFeeAmount;
}
function _takeSniperBuyFee(
address sender,
uint256 amount
) internal returns (uint256) {
uint256 totalFeeAmount = (amount * sniperBuyFee()) / FEE_DENOMINATOR;
uint256 burnFeeAmount = (totalFeeAmount * sniperBuyFeeBurnShare) /
FEE_DENOMINATOR;
uint256 treasuryFeeAmount = totalFeeAmount - burnFeeAmount;
if (burnFeeAmount > 0) super._transfer(sender, DEAD, burnFeeAmount);
if (treasuryFeeAmount > 0)
super._transfer(sender, address(this), treasuryFeeAmount);
return totalFeeAmount;
}
function _takeSniperSellFee(
address sender,
uint256 amount
) internal returns (uint256) {
uint256 totalFeeAmount = (amount * sniperSellFee()) / FEE_DENOMINATOR;
uint256 burnFeeAmount = (totalFeeAmount * sniperSellFeeBurnShare) /
FEE_DENOMINATOR;
uint256 treasuryFeeAmount = totalFeeAmount - burnFeeAmount;
if (burnFeeAmount > 0) super._transfer(sender, DEAD, burnFeeAmount);
if (treasuryFeeAmount > 0)
super._transfer(sender, address(this), treasuryFeeAmount);
return totalFeeAmount;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override {
if (
!(tradingEnabled && tradingEnabledTimestamp <= block.timestamp) &&
!isExcludedFromFee[sender] &&
!isExcludedFromFee[recipient]
) {
revert TradingNotEnabled();
}
if (isBot[sender] || isBot[recipient]) revert SniperBotDetected();
if (
maxWalletEnabled &&
!isExcludedFromMaxWallet(recipient) &&
balanceOf(recipient) + amount > maxWalletAmount
) revert MaxWalletReached();
bool takeFee = !isSwappingFees &&
_shouldTakeTransferTax(sender, recipient);
bool isBuy = isLeetPair(sender);
bool isSell = isLeetPair(recipient);
bool isIndirectSwap = (_isLeetPair[sender] ||
_isCachedAutodetectedLeetPair[_currentCacheVersion][sender]) &&
(_isLeetPair[recipient] ||
_isCachedAutodetectedLeetPair[_currentCacheVersion][recipient]);
takeFee = takeFee && (indirectSwapFeeEnabled || !isIndirectSwap);
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwapFees = contractTokenBalance >= swapFeesAtAmount;
bool isEOATransfer = sender.code.length == 0 &&
recipient.code.length == 0;
if (
canSwapFees &&
swappingFeesEnabled &&
!isSwappingFees &&
!_isLiquidityManagementPhase &&
!isIndirectSwap &&
(isSell || isEOATransfer) &&
!isExcludedFromFee[sender] &&
!isExcludedFromFee[recipient]
) {
isSwappingFees = true;
_swapFees();
isSwappingFees = false;
}
uint256 totalFeeAmount;
if (takeFee) {
if (isSell) {
totalFeeAmount = _takeSellFee(sender, sender, amount);
totalFeeAmount += _takeSniperSellFee(sender, amount);
} else if (isBuy) {
totalFeeAmount = _takeBuyFee(sender, recipient, amount);
totalFeeAmount += _takeSniperBuyFee(sender, amount);
}
}
super._transfer(sender, recipient, amount - totalFeeAmount);
}
function _swapFees() internal {
uint256 contractTokenBalance = balanceOf(address(this));
uint256 amountToSwap = contractTokenBalance > maxSwapFeesAmount
? maxSwapFeesAmount
: contractTokenBalance;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = swapPairToken;
_approve(address(this), address(swapFeesRouter), amountToSwap);
swapFeesRouter.swapExactTokensForTokens(
amountToSwap,
0,
path,
treasuryFeeRecipient,
block.timestamp
);
}
function isLiquidityManagementPhase() external view returns (bool) {
return _isLiquidityManagementPhase;
}
function setLiquidityManagementPhase(
bool isLiquidityManagementPhase_
) external onlyLiquidityManager {
_isLiquidityManagementPhase = isLiquidityManagementPhase_;
}
function withdrawStuckEth(uint256 amount) public onlyOwner {
(bool success, ) = address(msg.sender).call{value: amount}("");
if (!success) revert TransferFailed();
}
function withdrawStuckEth() public onlyOwner {
withdrawStuckEth(address(this).balance);
}
function withdrawStuckTokens(
IERC20 token,
uint256 amount
) public onlyOwner {
bool success = token.transfer(msg.sender, amount);
if (!success) revert TransferFailed();
}
function withdrawStuckTokens(IERC20 token) public onlyOwner {
uint256 balance = token.balanceOf(address(this));
withdrawStuckTokens(token, balance);
}
function airdropHolders(
address[] memory wallets,
uint256[] memory amounts
) external onlyOwner {
if (wallets.length != amounts.length) {
revert ArrayLengthMismatch();
}
for (uint256 i = 0; i < wallets.length; i++) {
address wallet = wallets[i];
uint256 amount = amounts[i];
_transfer(msg.sender, wallet, amount);
}
}
function isExcludedFromMaxWallet(
address account
) public view returns (bool) {
return _isExcludedFromMaxWallet[account] || _isLeetPair[account];
}
function excludeFromMaxWallet(address account) external onlyOwner {
_isExcludedFromMaxWallet[account] = true;
}
function includeInMaxWallet(address account) external onlyOwner {
_isExcludedFromMaxWallet[account] = false;
}
function setMaxWalletEnabled(bool enabled) external onlyOwner {
maxWalletEnabled = enabled;
}
function setMaxWalletAmount(uint256 amount) external onlyOwner {
maxWalletAmount = amount;
}
function addLeetPair(address _pair) external onlyOwner {
_isLeetPair[_pair] = true;
emit LeetPairAdded(_pair);
}
function removeLeetPair(address _pair) external onlyOwner {
_isLeetPair[_pair] = false;
emit LeetPairRemoved(_pair);
}
function excludeFromFee(address _account) external onlyOwner {
isExcludedFromFee[_account] = true;
emit AddressExcludedFromFees(_account);
}
function includeInFee(address _account) external onlyOwner {
isExcludedFromFee[_account] = false;
emit AddressIncludedInFees(_account);
}
function setFarmsFeeRecipient(address _account) external onlyOwner {
if (_account == address(0)) {
revert InvalidFeeRecipient();
}
farmsFeeRecipient = _account;
}
function setStakingFeeRecipient(address _account) external onlyOwner {
if (_account == address(0)) {
revert InvalidFeeRecipient();
}
stakingFeeRecipient = _account;
}
function setTreasuryFeeRecipient(address _account) external onlyOwner {
if (_account == address(0)) {
revert InvalidFeeRecipient();
}
treasuryFeeRecipient = _account;
}
function setBuyFees(
uint256 _burnBuyFee,
uint256 _farmsBuyFee,
uint256 _stakingBuyFee,
uint256 _treasuryBuyFee
) public onlyOwner {
if (
_burnBuyFee + _farmsBuyFee + _stakingBuyFee + _treasuryBuyFee >
MAX_FEE
) {
revert FeeTooHigh();
}
burnBuyFee = _burnBuyFee;
farmsBuyFee = _farmsBuyFee;
stakingBuyFee = _stakingBuyFee;
treasuryBuyFee = _treasuryBuyFee;
totalBuyFee = burnBuyFee + farmsBuyFee + stakingBuyFee + treasuryBuyFee;
}
function setSellFees(
uint256 _burnSellFee,
uint256 _farmsSellFee,
uint256 _stakingSellFee,
uint256 _treasurySellFee
) public onlyOwner {
if (
_burnSellFee + _farmsSellFee + _stakingSellFee + _treasurySellFee >
MAX_FEE
) {
revert FeeTooHigh();
}
burnSellFee = _burnSellFee;
farmsSellFee = _farmsSellFee;
stakingSellFee = _stakingSellFee;
treasurySellFee = _treasurySellFee;
totalSellFee =
burnSellFee +
farmsSellFee +
stakingSellFee +
treasurySellFee;
}
function setLiquidityManager(
address _liquidityManager,
bool _isManager
) public onlyOwner {
isLiquidityManager[_liquidityManager] = _isManager;
}
function addWhitelistedFactory(address _factory) public onlyOwner {
isWhitelistedFactory[_factory] = true;
}
function removeWhitelistedFactory(address _factory) public onlyOwner {
isWhitelistedFactory[_factory] = false;
_currentCacheVersion++;
}
function setIndirectSwapFeeEnabled(
bool _indirectSwapFeeEnabled
) public onlyOwner {
indirectSwapFeeEnabled = _indirectSwapFeeEnabled;
}
function enableTrading() public onlyOwner {
if (tradingEnabled) revert TradingAlreadyEnabled();
tradingEnabled = true;
if (tradingEnabledTimestamp < block.timestamp) {
tradingEnabledTimestamp = block.timestamp;
}
swappingFeesEnabled = true;
}
function setTradingEnabledTimestamp(uint256 _timestamp) public onlyOwner {
if (tradingEnabled && tradingEnabledTimestamp <= block.timestamp) {
revert TradingAlreadyEnabled();
}
if (tradingEnabled && _timestamp < block.timestamp) {
revert TimestampIsInThePast();
}
tradingEnabledTimestamp = _timestamp;
}
function setPairAutoDetectionEnabled(
bool _pairAutoDetectionEnabled
) public onlyOwner {
pairAutoDetectionEnabled = _pairAutoDetectionEnabled;
}
function setSniperBuyFeeEnabled(
bool _sniperBuyFeeEnabled
) public onlyOwner {
sniperBuyFeeEnabled = _sniperBuyFeeEnabled;
}
function setSniperSellFeeEnabled(
bool _sniperSellFeeEnabled
) public onlyOwner {
sniperSellFeeEnabled = _sniperSellFeeEnabled;
}
function setSwapFeesAtAmount(uint256 _swapFeesAtAmount) public onlyOwner {
swapFeesAtAmount = _swapFeesAtAmount;
}
function setMaxSwapFeesAmount(uint256 _maxSwapFeesAmount) public onlyOwner {
maxSwapFeesAmount = _maxSwapFeesAmount;
}
function setSwappingFeesEnabled(
bool _swappingFeesEnabled
) public onlyOwner {
swappingFeesEnabled = _swappingFeesEnabled;
}
function setSwapFeesRouter(address _swapFeesRouter) public onlyOwner {
swapFeesRouter = ILeetSwapV2Router01(_swapFeesRouter);
}
function setFeeDiscountOracle(IFeeDiscountOracle _oracle) public onlyOwner {
feeDiscountOracle = _oracle;
}
function addBot(address account) public onlyOwner {
isBot[account] = true;
}
function removeBot(address account) public onlyOwner {
isBot[account] = false;
}
}
文件 12 的 12:Ownable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
{
"compilationTarget": {
"src/tokens/LeetToken.sol": "LeetToken"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":@leetswap/=src/",
":@openzeppelin/=lib/openzeppelin-contracts/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/",
":solmate/=lib/solmate/src/"
]
}
[{"inputs":[{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_swapPairToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArrayLengthMismatch","type":"error"},{"inputs":[],"name":"FeeTooHigh","type":"error"},{"inputs":[],"name":"InvalidFeeRecipient","type":"error"},{"inputs":[],"name":"MaxWalletReached","type":"error"},{"inputs":[],"name":"NotLiquidityManager","type":"error"},{"inputs":[],"name":"SniperBotDetected","type":"error"},{"inputs":[],"name":"TimestampIsInThePast","type":"error"},{"inputs":[],"name":"TradingAlreadyEnabled","type":"error"},{"inputs":[],"name":"TradingNotEnabled","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"AddressExcludedFromFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"AddressIncludedInFees","type":"event"},{"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":false,"internalType":"uint256","name":"_fee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_previousFee","type":"uint256"}],"name":"BuyFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_pair","type":"address"}],"name":"LeetPairAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_pair","type":"address"}],"name":"LeetPairRemoved","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":false,"internalType":"uint256","name":"_fee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_previousFee","type":"uint256"}],"name":"SellFeeUpdated","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":false,"internalType":"address","name":"_factory","type":"address"}],"name":"WhitelistedFactoryAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_factory","type":"address"}],"name":"WhitelistedFactoryRemoved","type":"event"},{"inputs":[],"name":"DEAD","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addBot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"}],"name":"addLeetPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_factory","type":"address"}],"name":"addWhitelistedFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"wallets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"airdropHolders","outputs":[],"stateMutability":"nonpayable","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":[],"name":"burnBuyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnSellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"totalFeeAmount","type":"uint256"}],"name":"buyFeeDiscountFor","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":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"excludeFromFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"excludeFromMaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"farmsBuyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"farmsFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"farmsSellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeDiscountOracle","outputs":[{"internalType":"contract IFeeDiscountOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"includeInFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"includeInMaxWallet","outputs":[],"stateMutability":"nonpayable","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":"indirectSwapFeeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromMaxWallet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"}],"name":"isLeetPair","outputs":[{"internalType":"bool","name":"isPair","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isLiquidityManagementPhase","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isLiquidityManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSwappingFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelistedFactory","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSwapFeesAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWalletAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWalletEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"pairAutoDetectionEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeBot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"}],"name":"removeLeetPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_factory","type":"address"}],"name":"removeWhitelistedFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"totalFeeAmount","type":"uint256"}],"name":"sellFeeDiscountFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_burnBuyFee","type":"uint256"},{"internalType":"uint256","name":"_farmsBuyFee","type":"uint256"},{"internalType":"uint256","name":"_stakingBuyFee","type":"uint256"},{"internalType":"uint256","name":"_treasuryBuyFee","type":"uint256"}],"name":"setBuyFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"setFarmsFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IFeeDiscountOracle","name":"_oracle","type":"address"}],"name":"setFeeDiscountOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_indirectSwapFeeEnabled","type":"bool"}],"name":"setIndirectSwapFeeEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isLiquidityManagementPhase_","type":"bool"}],"name":"setLiquidityManagementPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_liquidityManager","type":"address"},{"internalType":"bool","name":"_isManager","type":"bool"}],"name":"setLiquidityManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSwapFeesAmount","type":"uint256"}],"name":"setMaxSwapFeesAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMaxWalletAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setMaxWalletEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_pairAutoDetectionEnabled","type":"bool"}],"name":"setPairAutoDetectionEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_burnSellFee","type":"uint256"},{"internalType":"uint256","name":"_farmsSellFee","type":"uint256"},{"internalType":"uint256","name":"_stakingSellFee","type":"uint256"},{"internalType":"uint256","name":"_treasurySellFee","type":"uint256"}],"name":"setSellFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_sniperBuyFeeEnabled","type":"bool"}],"name":"setSniperBuyFeeEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_sniperSellFeeEnabled","type":"bool"}],"name":"setSniperSellFeeEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"setStakingFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapFeesAtAmount","type":"uint256"}],"name":"setSwapFeesAtAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapFeesRouter","type":"address"}],"name":"setSwapFeesRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_swappingFeesEnabled","type":"bool"}],"name":"setSwappingFeesEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setTradingEnabledTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"setTreasuryFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sniperBuyBaseFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sniperBuyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sniperBuyFeeBurnShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sniperBuyFeeDecayPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sniperBuyFeeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sniperSellBaseFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sniperSellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sniperSellFeeBurnShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sniperSellFeeDecayPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sniperSellFeeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingBuyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingSellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapFeesAtAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapFeesRouter","outputs":[{"internalType":"contract ILeetSwapV2Router01","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapPairToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swappingFeesEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBuyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSellFee","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":"tradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingEnabledTimestamp","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":"treasuryBuyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasurySellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawStuckEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawStuckEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawStuckTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawStuckTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]