编译器
0.8.19+commit.7dd6d404
文件 1 的 7:ERC20.sol
pragma solidity ^0.8.4;
abstract contract ERC20 {
error TotalSupplyOverflow();
error AllowanceOverflow();
error AllowanceUnderflow();
error InsufficientBalance();
error InsufficientAllowance();
error InvalidPermit();
error PermitExpired();
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
uint256 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
uint256 private constant _APPROVAL_EVENT_SIGNATURE =
0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925;
uint256 private constant _TOTAL_SUPPLY_SLOT = 0x05345cdf77eb68f44c;
uint256 private constant _BALANCE_SLOT_SEED = 0x87a211a2;
uint256 private constant _ALLOWANCE_SLOT_SEED = 0x7f5e9f20;
uint256 private constant _NONCES_SLOT_SEED = 0x38377508;
function name() public view virtual returns (string memory);
function symbol() public view virtual returns (string memory);
function decimals() public view virtual returns (uint8) {
return 18;
}
function totalSupply() public view virtual returns (uint256 result) {
assembly {
result := sload(_TOTAL_SUPPLY_SLOT)
}
}
function balanceOf(address owner) public view virtual returns (uint256 result) {
assembly {
mstore(0x0c, _BALANCE_SLOT_SEED)
mstore(0x00, owner)
result := sload(keccak256(0x0c, 0x20))
}
}
function allowance(address owner, address spender)
public
view
virtual
returns (uint256 result)
{
assembly {
mstore(0x20, spender)
mstore(0x0c, _ALLOWANCE_SLOT_SEED)
mstore(0x00, owner)
result := sload(keccak256(0x0c, 0x34))
}
}
function approve(address spender, uint256 amount) public virtual returns (bool) {
assembly {
mstore(0x20, spender)
mstore(0x0c, _ALLOWANCE_SLOT_SEED)
mstore(0x00, caller())
sstore(keccak256(0x0c, 0x34), amount)
mstore(0x00, amount)
log3(0x00, 0x20, _APPROVAL_EVENT_SIGNATURE, caller(), shr(96, mload(0x2c)))
}
return true;
}
function increaseAllowance(address spender, uint256 difference) public virtual returns (bool) {
assembly {
mstore(0x20, spender)
mstore(0x0c, _ALLOWANCE_SLOT_SEED)
mstore(0x00, caller())
let allowanceSlot := keccak256(0x0c, 0x34)
let allowanceBefore := sload(allowanceSlot)
let allowanceAfter := add(allowanceBefore, difference)
if lt(allowanceAfter, allowanceBefore) {
mstore(0x00, 0xf9067066)
revert(0x1c, 0x04)
}
sstore(allowanceSlot, allowanceAfter)
mstore(0x00, allowanceAfter)
log3(0x00, 0x20, _APPROVAL_EVENT_SIGNATURE, caller(), shr(96, mload(0x2c)))
}
return true;
}
function decreaseAllowance(address spender, uint256 difference) public virtual returns (bool) {
assembly {
mstore(0x20, spender)
mstore(0x0c, _ALLOWANCE_SLOT_SEED)
mstore(0x00, caller())
let allowanceSlot := keccak256(0x0c, 0x34)
let allowanceBefore := sload(allowanceSlot)
if lt(allowanceBefore, difference) {
mstore(0x00, 0x8301ab38)
revert(0x1c, 0x04)
}
let allowanceAfter := sub(allowanceBefore, difference)
sstore(allowanceSlot, allowanceAfter)
mstore(0x00, allowanceAfter)
log3(0x00, 0x20, _APPROVAL_EVENT_SIGNATURE, caller(), shr(96, mload(0x2c)))
}
return true;
}
function transfer(address to, uint256 amount) public virtual returns (bool) {
_beforeTokenTransfer(msg.sender, to, amount);
assembly {
mstore(0x0c, _BALANCE_SLOT_SEED)
mstore(0x00, caller())
let fromBalanceSlot := keccak256(0x0c, 0x20)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8)
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
mstore(0x00, to)
let toBalanceSlot := keccak256(0x0c, 0x20)
sstore(toBalanceSlot, add(sload(toBalanceSlot), amount))
mstore(0x20, amount)
log3(0x20, 0x20, _TRANSFER_EVENT_SIGNATURE, caller(), shr(96, mload(0x0c)))
}
_afterTokenTransfer(msg.sender, to, amount);
return true;
}
function transferFrom(address from, address to, uint256 amount) public virtual returns (bool) {
_beforeTokenTransfer(from, to, amount);
assembly {
let from_ := shl(96, from)
mstore(0x20, caller())
mstore(0x0c, or(from_, _ALLOWANCE_SLOT_SEED))
let allowanceSlot := keccak256(0x0c, 0x34)
let allowance_ := sload(allowanceSlot)
if iszero(eq(allowance_, not(0))) {
if gt(amount, allowance_) {
mstore(0x00, 0x13be252b)
revert(0x1c, 0x04)
}
sstore(allowanceSlot, sub(allowance_, amount))
}
mstore(0x0c, or(from_, _BALANCE_SLOT_SEED))
let fromBalanceSlot := keccak256(0x0c, 0x20)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8)
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
mstore(0x00, to)
let toBalanceSlot := keccak256(0x0c, 0x20)
sstore(toBalanceSlot, add(sload(toBalanceSlot), amount))
mstore(0x20, amount)
log3(0x20, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, from_), shr(96, mload(0x0c)))
}
_afterTokenTransfer(from, to, amount);
return true;
}
function nonces(address owner) public view virtual returns (uint256 result) {
assembly {
mstore(0x0c, _NONCES_SLOT_SEED)
mstore(0x00, owner)
result := sload(keccak256(0x0c, 0x20))
}
}
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
bytes32 domainSeparator = DOMAIN_SEPARATOR();
assembly {
let m := mload(0x40)
if gt(timestamp(), deadline) {
mstore(0x00, 0x1a15a3cc)
revert(0x1c, 0x04)
}
owner := shr(96, shl(96, owner))
spender := shr(96, shl(96, spender))
mstore(0x0c, _NONCES_SLOT_SEED)
mstore(0x00, owner)
let nonceSlot := keccak256(0x0c, 0x20)
let nonceValue := sload(nonceSlot)
sstore(nonceSlot, add(nonceValue, 1))
mstore(m, 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9)
mstore(add(m, 0x20), owner)
mstore(add(m, 0x40), spender)
mstore(add(m, 0x60), value)
mstore(add(m, 0x80), nonceValue)
mstore(add(m, 0xa0), deadline)
mstore(0, 0x1901)
mstore(0x20, domainSeparator)
mstore(0x40, keccak256(m, 0xc0))
mstore(0, keccak256(0x1e, 0x42))
mstore(0x20, and(0xff, v))
mstore(0x40, r)
mstore(0x60, s)
pop(staticcall(gas(), 1, 0, 0x80, 0x20, 0x20))
if iszero(eq(mload(returndatasize()), owner)) {
mstore(0x00, 0xddafbaef)
revert(0x1c, 0x04)
}
mstore(0x40, or(shl(160, _ALLOWANCE_SLOT_SEED), spender))
sstore(keccak256(0x2c, 0x34), value)
log3(add(m, 0x60), 0x20, _APPROVAL_EVENT_SIGNATURE, owner, spender)
mstore(0x40, m)
mstore(0x60, 0)
}
}
function DOMAIN_SEPARATOR() public view virtual returns (bytes32 result) {
assembly {
result := mload(0x40)
}
bytes32 nameHash = keccak256(bytes(name()));
assembly {
let m := result
mstore(m, 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f)
mstore(add(m, 0x20), nameHash)
mstore(add(m, 0x40), 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6)
mstore(add(m, 0x60), chainid())
mstore(add(m, 0x80), address())
result := keccak256(m, 0xa0)
}
}
function _mint(address to, uint256 amount) internal virtual {
_beforeTokenTransfer(address(0), to, amount);
assembly {
let totalSupplyBefore := sload(_TOTAL_SUPPLY_SLOT)
let totalSupplyAfter := add(totalSupplyBefore, amount)
if lt(totalSupplyAfter, totalSupplyBefore) {
mstore(0x00, 0xe5cfe957)
revert(0x1c, 0x04)
}
sstore(_TOTAL_SUPPLY_SLOT, totalSupplyAfter)
mstore(0x0c, _BALANCE_SLOT_SEED)
mstore(0x00, to)
let toBalanceSlot := keccak256(0x0c, 0x20)
sstore(toBalanceSlot, add(sload(toBalanceSlot), amount))
mstore(0x20, amount)
log3(0x20, 0x20, _TRANSFER_EVENT_SIGNATURE, 0, shr(96, mload(0x0c)))
}
_afterTokenTransfer(address(0), to, amount);
}
function _burn(address from, uint256 amount) internal virtual {
_beforeTokenTransfer(from, address(0), amount);
assembly {
mstore(0x0c, _BALANCE_SLOT_SEED)
mstore(0x00, from)
let fromBalanceSlot := keccak256(0x0c, 0x20)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8)
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
sstore(_TOTAL_SUPPLY_SLOT, sub(sload(_TOTAL_SUPPLY_SLOT), amount))
mstore(0x00, amount)
log3(0x00, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, shl(96, from)), 0)
}
_afterTokenTransfer(from, address(0), amount);
}
function _transfer(address from, address to, uint256 amount) internal virtual {
_beforeTokenTransfer(from, to, amount);
assembly {
let from_ := shl(96, from)
mstore(0x0c, or(from_, _BALANCE_SLOT_SEED))
let fromBalanceSlot := keccak256(0x0c, 0x20)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8)
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
mstore(0x00, to)
let toBalanceSlot := keccak256(0x0c, 0x20)
sstore(toBalanceSlot, add(sload(toBalanceSlot), amount))
mstore(0x20, amount)
log3(0x20, 0x20, _TRANSFER_EVENT_SIGNATURE, shr(96, from_), shr(96, mload(0x0c)))
}
_afterTokenTransfer(from, to, amount);
}
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
assembly {
mstore(0x20, spender)
mstore(0x0c, _ALLOWANCE_SLOT_SEED)
mstore(0x00, owner)
let allowanceSlot := keccak256(0x0c, 0x34)
let allowance_ := sload(allowanceSlot)
if iszero(eq(allowance_, not(0))) {
if gt(amount, allowance_) {
mstore(0x00, 0x13be252b)
revert(0x1c, 0x04)
}
sstore(allowanceSlot, sub(allowance_, amount))
}
}
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
assembly {
let owner_ := shl(96, owner)
mstore(0x20, spender)
mstore(0x0c, or(owner_, _ALLOWANCE_SLOT_SEED))
sstore(keccak256(0x0c, 0x34), amount)
mstore(0x00, amount)
log3(0x00, 0x20, _APPROVAL_EVENT_SIGNATURE, shr(96, owner_), shr(96, mload(0x2c)))
}
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
文件 2 的 7: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);
}
文件 3 的 7:IUniswapV2Factory.sol
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint256);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
文件 4 的 7:IUniswapV2Router01.sol
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external returns (address);
function WETH() external returns (address);
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 removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
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 swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(uint256 amountOut, address[] calldata path, address to, uint256 deadline)
external
payable
returns (uint256[] memory amounts);
function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB);
function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut)
external
pure
returns (uint256 amountOut);
function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut)
external
pure
returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
文件 5 的 7:IUniswapV2Router02.sol
pragma solidity >=0.6.2;
import "./IUniswapV2Router01.sol";
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
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;
}
文件 6 的 7:Nchart.sol
pragma solidity 0.8.19;
import "@solady/tokens/ERC20.sol";
import "@solady/auth/Ownable.sol";
import "@openzeppelin/token/ERC20/IERC20.sol";
import "./IUniswapV2Factory.sol";
import "./IUniswapV2Router02.sol";
contract Nchart is ERC20, Ownable {
struct User {
bool isBlacklisted;
bool isAutomatedMarketMaker;
bool isExcludedFromFees;
bool isExcludedFromMaxTransactionAmount;
}
struct Fees {
uint8 buy;
uint8 sell;
uint8 liquidity;
uint8 revShare;
uint8 team;
}
struct Settings {
bool limitsInEffect;
bool swapEnabled;
bool blacklistRenounced;
bool feeChangeRenounced;
bool tradingActive;
uint216 endBlock;
}
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
uint256 private constant _ALLOWANCE_SLOT_SEED = 0x7f5e9f20;
uint256 public constant MAX_SUPPLY = 10_000_000 * 1e18;
uint256 public constant MIN_SWAP_AMOUNT = MAX_SUPPLY / 100_000;
uint256 public constant MAX_SWAP_AMOUNT = MAX_SUPPLY * 5 / 1_000;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
address public revShareWallet;
address public teamWallet;
bool private _swapping;
uint256 public tokensForBotProtection;
Fees public feeAmounts;
Settings private settings = Settings({
limitsInEffect: true,
swapEnabled: true,
blacklistRenounced: false,
feeChangeRenounced: false,
tradingActive: false,
endBlock: uint216(0)
});
mapping(address => User) private _users;
event ExcludeFromFees(address indexed account, bool isExcluded);
event ExcludeFromMaxTransaction(address indexed account, bool isExcluded);
event FailedSwapBackTransfer(address indexed destination, uint256 amount);
event FeesUpdated(uint8 buyFee, uint8 sellFee, uint8 revSharePercent, uint8 liquidityPercent, uint8 teamPercent);
event MaxTransactionAmountUpdated(uint256 newAmount, uint256 oldAmount);
event MaxWalletAmountUpdated(uint256 newAmount, uint256 oldAmount);
event RevShareWalletUpdated(address indexed newWallet, address indexed oldWallet);
event SetAutomatedMarketMakerPair(address indexed pair, bool value);
event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived);
event SwapTokensAtAmountUpdated(uint256 newAmount, uint256 oldAmount);
event TeamWalletUpdated(address indexed newWallet, address indexed oldWallet);
event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
error Nchart__BlacklistModificationDisabled();
error Nchart__BuyAmountGreaterThanMax();
error Nchart__CannotBlacklistLPPair();
error Nchart__CannotBlacklistRouter();
error Nchart__CannotRemovePairFromAMMs();
error Nchart__CannotSetWalletToAddressZero();
error Nchart__CannotTransferFromAddressZero();
error Nchart__CannotTransferToAddressZero();
error Nchart__ErrorWithdrawingEth();
error Nchart__FeeChangeRenounced();
error Nchart__MaxFeeFivePercent();
error Nchart__MaxTransactionTooLow();
error Nchart__MaxWalletAmountExceeded();
error Nchart__MaxWalletAmountTooLow();
error Nchart__OnlyOwner();
error Nchart__ReceiverBlacklisted();
error Nchart__ReceiverCannotBeAddressZero();
error Nchart__SellAmountGreaterThanMax();
error Nchart__SenderBlacklisted();
error Nchart__StuckEthWithdrawError();
error Nchart__SwapAmountGreaterThanMaximum();
error Nchart__SwapAmountLowerThanMinimum();
error Nchart__TokenAddressCannotBeAddressZero();
error Nchart__TradingNotActive();
constructor(address ownerWallet, address teamWallet_, address revShareWallet_, address routerAddress) {
_initializeOwner(ownerWallet);
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(routerAddress);
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
maxTransactionAmount = MAX_SUPPLY / 100;
maxWallet = MAX_SUPPLY / 100;
swapTokensAtAmount = MAX_SUPPLY * 5 / 10_000;
feeAmounts = Fees({buy: 5, sell: 5, revShare: 0, liquidity: 25, team: 75});
revShareWallet = revShareWallet_;
teamWallet = teamWallet_;
_users[teamWallet_] = User({
isExcludedFromFees: true,
isExcludedFromMaxTransactionAmount: true,
isAutomatedMarketMaker: false,
isBlacklisted: false
});
_users[address(this)] = User({
isExcludedFromFees: true,
isExcludedFromMaxTransactionAmount: true,
isAutomatedMarketMaker: false,
isBlacklisted: false
});
_users[address(0xdead)] = User({
isExcludedFromFees: true,
isExcludedFromMaxTransactionAmount: true,
isAutomatedMarketMaker: false,
isBlacklisted: false
});
_users[address(ownerWallet)] = User({
isExcludedFromFees: true,
isExcludedFromMaxTransactionAmount: true,
isAutomatedMarketMaker: false,
isBlacklisted: false
});
_users[address(uniswapV2Router)] = User({
isExcludedFromMaxTransactionAmount: true,
isAutomatedMarketMaker: false,
isExcludedFromFees: false,
isBlacklisted: false
});
_users[address(uniswapV2Pair)] = User({
isExcludedFromMaxTransactionAmount: true,
isAutomatedMarketMaker: true,
isExcludedFromFees: false,
isBlacklisted: false
});
_mint(ownerWallet, MAX_SUPPLY);
}
receive() external payable {}
function name() public pure override returns (string memory) {
return "Nchart Token";
}
function symbol() public pure override returns (string memory) {
return "CHART";
}
function enableTrading() public {
_requireIsOwner();
settings.endBlock = uint216(block.number) + 19;
settings.tradingActive = true;
}
function removeLimits() external {
_requireIsOwner();
settings.limitsInEffect = false;
}
function updateSwapTokensAtAmount(uint256 newAmount) external {
_requireIsOwner();
if (newAmount < MIN_SWAP_AMOUNT) {
revert Nchart__SwapAmountLowerThanMinimum();
}
if (newAmount > MAX_SWAP_AMOUNT) {
revert Nchart__SwapAmountGreaterThanMaximum();
}
uint256 oldSwapAmount = swapTokensAtAmount;
swapTokensAtAmount = newAmount;
emit SwapTokensAtAmountUpdated(newAmount, oldSwapAmount);
}
function updateMaxTransactionAmount(uint256 newAmount) external {
_requireIsOwner();
if (newAmount < MAX_SUPPLY * 5 / 1000) {
revert Nchart__MaxTransactionTooLow();
}
uint256 oldMaxTransactionAmount = maxTransactionAmount;
maxTransactionAmount = newAmount;
emit MaxTransactionAmountUpdated(newAmount, oldMaxTransactionAmount);
}
function updateMaxWalletAmount(uint256 newNum) external {
_requireIsOwner();
if (newNum < MAX_SUPPLY / 100) {
revert Nchart__MaxWalletAmountTooLow();
}
uint256 oldMaxWallet = maxWallet;
maxWallet = newNum;
emit MaxWalletAmountUpdated(newNum, oldMaxWallet);
}
function updateSwapEnabled(bool enabled) external {
_requireIsOwner();
settings.swapEnabled = enabled;
}
function updateBuyFees(uint8 revShareFee, uint8 liquidityFee, uint8 teamFee) external {
_requireIsOwner();
if (settings.feeChangeRenounced) {
revert Nchart__FeeChangeRenounced();
}
uint8 totalFees = revShareFee + liquidityFee + teamFee;
if (totalFees > 5) {
revert Nchart__MaxFeeFivePercent();
}
uint8 sellFee = feeAmounts.sell;
uint8 revPercent = revShareFee * 100 / totalFees;
uint8 liqPercent = liquidityFee * 100 / totalFees;
uint8 teamPercent = 100 - revPercent - liqPercent;
feeAmounts =
Fees({buy: totalFees, sell: sellFee, revShare: revPercent, liquidity: liqPercent, team: teamPercent});
emit FeesUpdated(totalFees, sellFee, revPercent, liqPercent, teamPercent);
}
function updateSellFees(uint8 revShareFee, uint8 liquidityFee, uint8 teamFee) external {
_requireIsOwner();
if (settings.feeChangeRenounced) {
revert Nchart__FeeChangeRenounced();
}
uint8 totalFees = revShareFee + liquidityFee + teamFee;
if (totalFees > 5) {
revert Nchart__MaxFeeFivePercent();
}
uint8 buyFee = feeAmounts.buy;
uint8 revPercent = revShareFee * 100 / totalFees;
uint8 liqPercent = liquidityFee * 100 / totalFees;
uint8 teamPercent = 100 - revPercent - liqPercent;
feeAmounts =
Fees({buy: buyFee, sell: totalFees, revShare: revPercent, liquidity: liqPercent, team: teamPercent});
emit FeesUpdated(buyFee, totalFees, revPercent, liqPercent, teamPercent);
}
function excludeFromFees(address account, bool excluded) external {
_requireIsOwner();
_users[account].isExcludedFromFees = excluded;
emit ExcludeFromFees(account, excluded);
}
function excludeFromMaxTransaction(address account, bool isExcluded) external {
_requireIsOwner();
_users[account].isExcludedFromMaxTransactionAmount = isExcluded;
emit ExcludeFromMaxTransaction(account, isExcluded);
}
function setAutomatedMarketMakerPair(address pair, bool value) external {
_requireIsOwner();
if (pair == uniswapV2Pair) {
revert Nchart__CannotRemovePairFromAMMs();
}
_users[pair].isAutomatedMarketMaker = value;
emit SetAutomatedMarketMakerPair(pair, value);
}
function updateRevShareWallet(address newWallet) external {
_requireIsOwner();
if (newWallet == address(0)) {
revert Nchart__CannotSetWalletToAddressZero();
}
address oldWallet = revShareWallet;
revShareWallet = newWallet;
emit RevShareWalletUpdated(newWallet, oldWallet);
}
function updateTeamWallet(address newWallet) external {
_requireIsOwner();
if (newWallet == address(0)) {
revert Nchart__CannotSetWalletToAddressZero();
}
address oldWallet = teamWallet;
teamWallet = newWallet;
emit TeamWalletUpdated(newWallet, oldWallet);
}
function withdrawStuckChart(uint256 amount) external {
_requireIsOwner();
uint256 transferAmount;
if (amount == 0) {
transferAmount = balanceOf(address(this));
} else {
transferAmount = amount;
}
super._transfer(address(this), msg.sender, transferAmount);
}
function withdrawStuckToken(address _token) external {
_requireIsOwner();
if (_token == address(0)) {
revert Nchart__TokenAddressCannotBeAddressZero();
}
uint256 _contractBalance = IERC20(_token).balanceOf(address(this));
IERC20(_token).transfer(msg.sender, _contractBalance);
}
function withdrawStuckEth() external {
_requireIsOwner();
(bool success,) = msg.sender.call{value: address(this).balance}("");
if (!success) {
revert Nchart__ErrorWithdrawingEth();
}
}
function renounceBlacklist() external {
_requireIsOwner();
settings.blacklistRenounced = true;
}
function renounceFeeChange() external {
_requireIsOwner();
settings.feeChangeRenounced = true;
}
function blacklist(address account) external {
_requireIsOwner();
if (settings.blacklistRenounced) {
revert Nchart__BlacklistModificationDisabled();
}
if (account == uniswapV2Pair) {
revert Nchart__CannotBlacklistLPPair();
}
if (account == address(uniswapV2Router)) {
revert Nchart__CannotBlacklistRouter();
}
_users[account].isBlacklisted = true;
}
function unblacklist(address account) external {
_requireIsOwner();
_users[account].isBlacklisted = false;
}
function isExcludedFromFees(address account) external view returns (bool) {
return _users[account].isExcludedFromFees;
}
function isExcludedFromMaxTransactionAmount(address account) external view returns (bool) {
return _users[account].isExcludedFromMaxTransactionAmount;
}
function isAutomatedMarketMakerPair(address pair) external view returns (bool) {
return _users[pair].isAutomatedMarketMaker;
}
function isBlacklisted(address account) external view returns (bool) {
return _users[account].isBlacklisted;
}
function isSwapEnabled() external view returns (bool) {
return settings.swapEnabled;
}
function isBlacklistRenounced() external view returns (bool) {
return settings.blacklistRenounced;
}
function isFeeChangeRenounced() external view returns (bool) {
return settings.feeChangeRenounced;
}
function isTradingActive() external view returns (bool) {
return settings.tradingActive;
}
function isLimitInEffect() external view returns (bool) {
return settings.limitsInEffect;
}
function transfer(address to, uint256 amount) public override returns (bool) {
_transfer(msg.sender, to, amount);
return true;
}
function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
assembly {
let from_ := shl(96, from)
mstore(0x20, caller())
mstore(0x0c, or(from_, _ALLOWANCE_SLOT_SEED))
let allowanceSlot := keccak256(0x0c, 0x34)
let allowance_ := sload(allowanceSlot)
if iszero(eq(allowance_, not(0))) {
if gt(amount, allowance_) {
mstore(0x00, 0x13be252b)
revert(0x1c, 0x04)
}
sstore(allowanceSlot, sub(allowance_, amount))
}
}
_transfer(from, to, amount);
return true;
}
function _transfer(address from, address to, uint256 amount) internal override {
if (from == address(0)) {
revert Nchart__CannotTransferFromAddressZero();
}
if (to == address(0)) {
revert Nchart__CannotTransferToAddressZero();
}
User memory fromData = _users[from];
User memory toData = _users[to];
Settings memory settingCache = settings;
if (!settingCache.tradingActive) {
if (!fromData.isExcludedFromFees) {
if (!toData.isExcludedFromFees) {
revert Nchart__TradingNotActive();
}
}
}
if (fromData.isBlacklisted) {
revert Nchart__SenderBlacklisted();
}
if (toData.isBlacklisted) {
revert Nchart__ReceiverBlacklisted();
}
if (amount == 0) {
return;
}
bool excludedFromFees = fromData.isExcludedFromFees || toData.isExcludedFromFees;
uint8 txType = 3;
if (fromData.isAutomatedMarketMaker) {
txType = 1;
} else if (toData.isAutomatedMarketMaker) {
txType = 2;
}
if (!_swapping) {
if (settingCache.limitsInEffect) {
if (txType == 1 && !toData.isExcludedFromMaxTransactionAmount) {
if (amount > maxTransactionAmount) {
revert Nchart__BuyAmountGreaterThanMax();
}
if (amount + balanceOf(to) > maxWallet) {
revert Nchart__MaxWalletAmountExceeded();
}
}
else if (txType == 2 && !fromData.isExcludedFromMaxTransactionAmount) {
if (amount > maxTransactionAmount) {
revert Nchart__SellAmountGreaterThanMax();
}
} else if (!toData.isExcludedFromMaxTransactionAmount) {
if (amount + balanceOf(to) > maxWallet) {
revert Nchart__MaxWalletAmountExceeded();
}
}
}
if (settingCache.swapEnabled) {
if (txType == 2) {
if (balanceOf(address(this)) >= swapTokensAtAmount) {
_swapping = true;
_swapBack();
_swapping = false;
}
}
}
}
if (txType < 3) {
bool takeFee = !_swapping;
if (excludedFromFees) {
takeFee = false;
}
uint256 fees = 0;
if (takeFee) {
Fees memory feeCache = feeAmounts;
if (txType == 2) {
if (feeCache.sell > 0) {
fees = amount * feeCache.sell / 100;
}
}
else if (txType == 1) {
if (feeCache.buy > 0) {
fees = amount * feeCache.buy / 100;
}
}
if (block.number < settingCache.endBlock) {
uint256 blocksLeft = settingCache.endBlock - block.number;
uint256 botFeeMultiplier = 90;
if (blocksLeft < 18) {
botFeeMultiplier -= (5 * (18 - blocksLeft));
}
uint256 botFee = (amount * botFeeMultiplier) / 100;
super._transfer(from, teamWallet, botFee);
amount -= botFee;
tokensForBotProtection += botFee;
}
amount -= fees;
if (fees > 0) {
super._transfer(from, address(this), fees);
}
}
}
super._transfer(from, to, amount);
}
function _swapTokensForEth(uint256 tokenAmount) internal {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
address(this),
block.timestamp
);
}
function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal {
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0,
0,
owner(),
block.timestamp
);
}
function _swapBack() internal {
uint256 contractBalance = balanceOf(address(this));
Fees memory feeCache = feeAmounts;
bool success;
if (contractBalance == 0) {
return;
}
uint256 maxAmount = swapTokensAtAmount * 20;
if (contractBalance > maxAmount) {
contractBalance = maxAmount;
}
uint256 liquidityAmount = contractBalance * feeCache.liquidity / 100;
uint256 liquidityTokens = liquidityAmount - (liquidityAmount / 2);
uint256 amountToSwapForETH = contractBalance - liquidityTokens;
uint256 initialETHBalance = address(this).balance;
_swapTokensForEth(amountToSwapForETH);
uint256 ethBalance = address(this).balance - initialETHBalance;
uint256 ethForRevShare = ethBalance * feeCache.revShare / 100;
uint256 ethForTeam = ethBalance * feeCache.team / 100;
uint256 ethForLiquidity = ethBalance - ethForRevShare - ethForTeam;
if (liquidityTokens > 0 && ethForLiquidity > 0) {
_addLiquidity(liquidityTokens, ethForLiquidity);
emit SwapAndLiquify(amountToSwapForETH, ethForLiquidity);
}
address teamWallet_ = teamWallet;
(success,) = address(teamWallet_).call{value: ethForTeam}("");
if (!success) {
emit FailedSwapBackTransfer(teamWallet_, ethForTeam);
}
if (ethForRevShare > 0) {
(success,) = address(revShareWallet).call{value: ethForRevShare}("");
if (!success) {
emit FailedSwapBackTransfer(revShareWallet, ethForRevShare);
}
}
}
function _requireIsOwner() internal view {
if (msg.sender != owner()) {
revert Nchart__OnlyOwner();
}
}
}
文件 7 的 7:Ownable.sol
pragma solidity ^0.8.4;
abstract contract Ownable {
error Unauthorized();
error NewOwnerIsZeroAddress();
error NoHandoverRequest();
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
event OwnershipHandoverRequested(address indexed pendingOwner);
event OwnershipHandoverCanceled(address indexed pendingOwner);
uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE =
0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0;
uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE =
0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d;
uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE =
0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92;
uint256 private constant _OWNER_SLOT_NOT = 0x8b78c6d8;
uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1;
function _initializeOwner(address newOwner) internal virtual {
assembly {
newOwner := shr(96, shl(96, newOwner))
sstore(not(_OWNER_SLOT_NOT), newOwner)
log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)
}
}
function _setOwner(address newOwner) internal virtual {
assembly {
let ownerSlot := not(_OWNER_SLOT_NOT)
newOwner := shr(96, shl(96, newOwner))
log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)
sstore(ownerSlot, newOwner)
}
}
function _checkOwner() internal view virtual {
assembly {
if iszero(eq(caller(), sload(not(_OWNER_SLOT_NOT)))) {
mstore(0x00, 0x82b42900)
revert(0x1c, 0x04)
}
}
}
function _ownershipHandoverValidFor() internal view virtual returns (uint64) {
return 48 * 3600;
}
function transferOwnership(address newOwner) public payable virtual onlyOwner {
assembly {
if iszero(shl(96, newOwner)) {
mstore(0x00, 0x7448fbae)
revert(0x1c, 0x04)
}
}
_setOwner(newOwner);
}
function renounceOwnership() public payable virtual onlyOwner {
_setOwner(address(0));
}
function requestOwnershipHandover() public payable virtual {
unchecked {
uint256 expires = block.timestamp + _ownershipHandoverValidFor();
assembly {
mstore(0x0c, _HANDOVER_SLOT_SEED)
mstore(0x00, caller())
sstore(keccak256(0x0c, 0x20), expires)
log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller())
}
}
}
function cancelOwnershipHandover() public payable virtual {
assembly {
mstore(0x0c, _HANDOVER_SLOT_SEED)
mstore(0x00, caller())
sstore(keccak256(0x0c, 0x20), 0)
log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller())
}
}
function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner {
assembly {
mstore(0x0c, _HANDOVER_SLOT_SEED)
mstore(0x00, pendingOwner)
let handoverSlot := keccak256(0x0c, 0x20)
if gt(timestamp(), sload(handoverSlot)) {
mstore(0x00, 0x6f5e8818)
revert(0x1c, 0x04)
}
sstore(handoverSlot, 0)
}
_setOwner(pendingOwner);
}
function owner() public view virtual returns (address result) {
assembly {
result := sload(not(_OWNER_SLOT_NOT))
}
}
function ownershipHandoverExpiresAt(address pendingOwner)
public
view
virtual
returns (uint256 result)
{
assembly {
mstore(0x0c, _HANDOVER_SLOT_SEED)
mstore(0x00, pendingOwner)
result := sload(keccak256(0x0c, 0x20))
}
}
modifier onlyOwner() virtual {
_checkOwner();
_;
}
}
{
"compilationTarget": {
"src/Nchart.sol": "Nchart"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 500000
},
"remappings": [
":@openzeppelin/=lib/openzeppelin-contracts/contracts/",
":@solady/=lib/solady/src/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
":forge-std/=lib/forge-std/src/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/",
":solady/=lib/solady/",
"lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/",
"lib/openzeppelin-contracts:ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"lib/openzeppelin-contracts:erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/openzeppelin-contracts:forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/openzeppelin-contracts:openzeppelin/=lib/openzeppelin-contracts/contracts/",
"lib/solady:ds-test/=lib/solady/lib/ds-test/src/",
"lib/solady:forge-std/=lib/solady/test/utils/forge-std/"
]
}
[{"inputs":[{"internalType":"address","name":"ownerWallet","type":"address"},{"internalType":"address","name":"teamWallet_","type":"address"},{"internalType":"address","name":"revShareWallet_","type":"address"},{"internalType":"address","name":"routerAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllowanceOverflow","type":"error"},{"inputs":[],"name":"AllowanceUnderflow","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidPermit","type":"error"},{"inputs":[],"name":"Nchart__BlacklistModificationDisabled","type":"error"},{"inputs":[],"name":"Nchart__BuyAmountGreaterThanMax","type":"error"},{"inputs":[],"name":"Nchart__CannotBlacklistLPPair","type":"error"},{"inputs":[],"name":"Nchart__CannotBlacklistRouter","type":"error"},{"inputs":[],"name":"Nchart__CannotRemovePairFromAMMs","type":"error"},{"inputs":[],"name":"Nchart__CannotSetWalletToAddressZero","type":"error"},{"inputs":[],"name":"Nchart__CannotTransferFromAddressZero","type":"error"},{"inputs":[],"name":"Nchart__CannotTransferToAddressZero","type":"error"},{"inputs":[],"name":"Nchart__ErrorWithdrawingEth","type":"error"},{"inputs":[],"name":"Nchart__FeeChangeRenounced","type":"error"},{"inputs":[],"name":"Nchart__MaxFeeFivePercent","type":"error"},{"inputs":[],"name":"Nchart__MaxTransactionTooLow","type":"error"},{"inputs":[],"name":"Nchart__MaxWalletAmountExceeded","type":"error"},{"inputs":[],"name":"Nchart__MaxWalletAmountTooLow","type":"error"},{"inputs":[],"name":"Nchart__OnlyOwner","type":"error"},{"inputs":[],"name":"Nchart__ReceiverBlacklisted","type":"error"},{"inputs":[],"name":"Nchart__ReceiverCannotBeAddressZero","type":"error"},{"inputs":[],"name":"Nchart__SellAmountGreaterThanMax","type":"error"},{"inputs":[],"name":"Nchart__SenderBlacklisted","type":"error"},{"inputs":[],"name":"Nchart__StuckEthWithdrawError","type":"error"},{"inputs":[],"name":"Nchart__SwapAmountGreaterThanMaximum","type":"error"},{"inputs":[],"name":"Nchart__SwapAmountLowerThanMinimum","type":"error"},{"inputs":[],"name":"Nchart__TokenAddressCannotBeAddressZero","type":"error"},{"inputs":[],"name":"Nchart__TradingNotActive","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"PermitExpired","type":"error"},{"inputs":[],"name":"TotalSupplyOverflow","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"ExcludeFromFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"ExcludeFromMaxTransaction","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FailedSwapBackTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"buyFee","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"sellFee","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"revSharePercent","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"liquidityPercent","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"teamPercent","type":"uint8"}],"name":"FeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldAmount","type":"uint256"}],"name":"MaxTransactionAmountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldAmount","type":"uint256"}],"name":"MaxWalletAmountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newWallet","type":"address"},{"indexed":true,"internalType":"address","name":"oldWallet","type":"address"}],"name":"RevShareWalletUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"SetAutomatedMarketMakerPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokensSwapped","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethReceived","type":"uint256"}],"name":"SwapAndLiquify","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldAmount","type":"uint256"}],"name":"SwapTokensAtAmountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newWallet","type":"address"},{"indexed":true,"internalType":"address","name":"oldWallet","type":"address"}],"name":"TeamWalletUpdated","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":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"},{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"}],"name":"UpdateUniswapV2Router","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"result","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SWAP_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_SWAP_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"result","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":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"blacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","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":"difference","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"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"excludeFromMaxTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAmounts","outputs":[{"internalType":"uint8","name":"buy","type":"uint8"},{"internalType":"uint8","name":"sell","type":"uint8"},{"internalType":"uint8","name":"liquidity","type":"uint8"},{"internalType":"uint8","name":"revShare","type":"uint8"},{"internalType":"uint8","name":"team","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"difference","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"}],"name":"isAutomatedMarketMakerPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBlacklistRenounced","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromMaxTransactionAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFeeChangeRenounced","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLimitInEffect","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":"isTradingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTransactionAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"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":[],"name":"removeLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceFeeChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"revShareWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setAutomatedMarketMakerPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapTokensAtAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"teamWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensForBotProtection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"result","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"unblacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"revShareFee","type":"uint8"},{"internalType":"uint8","name":"liquidityFee","type":"uint8"},{"internalType":"uint8","name":"teamFee","type":"uint8"}],"name":"updateBuyFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"updateMaxTransactionAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newNum","type":"uint256"}],"name":"updateMaxWalletAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newWallet","type":"address"}],"name":"updateRevShareWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"revShareFee","type":"uint8"},{"internalType":"uint8","name":"liquidityFee","type":"uint8"},{"internalType":"uint8","name":"teamFee","type":"uint8"}],"name":"updateSellFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"updateSwapEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"updateSwapTokensAtAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newWallet","type":"address"}],"name":"updateTeamWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawStuckChart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawStuckEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"withdrawStuckToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]