编译器
0.8.17+commit.8df45f5f
文件 1 的 12:Context.sol
pragma solidity ^0.8.17;
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:IDividendDistributor.sol
pragma solidity ^0.8.17;
interface IDividendDistributor {
function setDistributionCriteria(
uint256 _minPeriod,
uint256 _minDistribution
) external;
function setShare(address shareholder, uint256 amount) external;
function deposit() external payable;
function process(uint256 gas) external;
function setMinPeriod(uint256 _minPeriod) external;
function setMinDistribution(uint256 _minDistribution) external;
function rewardTokenAddress() external view returns(address);
}
文件 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:IERC721A.sol
pragma solidity ^0.8.4;
interface IERC721A {
error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();
error MintERC2309QuantityExceedsLimit();
error OwnershipNotInitializedForExtraData();
struct TokenOwnership {
address addr;
uint64 startTimestamp;
bool burned;
uint24 extraData;
}
function totalSupply() external view returns (uint256);
function supportsInterface(bytes4 interfaceId) external view returns (bool);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external payable;
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external payable;
function transferFrom(
address from,
address to,
uint256 tokenId
) external payable;
function approve(address to, uint256 tokenId) external payable;
function setApprovalForAll(address operator, bool _approved) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function isApprovedForAll(address owner, address operator) external view returns (bool);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}
文件 6 的 12:IFACTORY.sol
pragma solidity ^0.8.17;
interface IFACTORY {
function proofRevenueAddress() external view returns (address);
function proofRewardPoolAddress() external view returns (address);
function isWhitelisted(address user) external view returns(bool);
}
文件 7 的 12:IProofNonReflectionTokenCutter.sol
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "../libraries/ProofNonReflectionTokenFees.sol";
interface IProofNonReflectionTokenCutter is IERC20, IERC20Metadata {
struct BaseData {
string tokenName;
string tokenSymbol;
uint256 initialSupply;
uint256 percentToLP;
uint256 whitelistPeriod;
address owner;
address dev;
address main;
address routerAddress;
address initialProofAdmin;
address[] whitelists;
address nftWhitelist;
}
struct WhitelistAdd_ {
address [] whitelists;
}
function setBasicData(
BaseData memory _baseData,
ProofNonReflectionTokenFees.allFees memory fees
) external;
function addMoreToWhitelist(
WhitelistAdd_ memory _WhitelistAdd
) external;
function updateWhitelistPeriod(
uint256 _whitelistPeriod
) external;
function addNFTSnapshot() external;
function changeFees(
uint256 initialMainFee,
uint256 initialMainFeeOnSell,
uint256 initialLpFee,
uint256 initialLpFeeOnSell,
uint256 initialDevFee,
uint256 initialDevFeeOnSell
) external;
}
文件 8 的 12:IUniswapV2Factory.sol
pragma solidity ^0.8.17;
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
文件 9 的 12:IUniswapV2Router02.sol
pragma solidity ^0.8.17;
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
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 factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
}
文件 10 的 12:Ownable.sol
pragma solidity ^0.8.17;
import "./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(), "caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"new owner is the zero address"
);
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 11 的 12:ProofNonReflectionTokenCutter.sol
pragma solidity ^0.8.17;
import "../interfaces/IERC721A.sol";
import "../libraries/Ownable.sol";
import "../libraries/Context.sol";
import "../libraries/ProofNonReflectionTokenFees.sol";
import "../interfaces/IFACTORY.sol";
import "../interfaces/IDividendDistributor.sol";
import "../interfaces/IUniswapV2Router02.sol";
import "../interfaces/IUniswapV2Factory.sol";
import "../interfaces/IProofNonReflectionTokenCutter.sol";
contract ProofNonReflectionTokenCutter is
Context,
IProofNonReflectionTokenCutter
{
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
address payable public proofBurnerAddress;
address public proofAdmin;
uint256 public whitelistEndTime;
uint256 public whitelistPeriod;
bool public restrictWhales = true;
mapping(address => bool) public userWhitelist;
IERC721A public nftWhitelist;
bool public whitelistMode = true;
mapping(address => bool) public isFeeExempt;
mapping(address => bool) public isTxLimitExempt;
mapping(address => bool) public isDividendExempt;
uint256 public launchedAt;
uint256 public proofFee = 2;
uint256 public mainFee;
uint256 public lpFee;
uint256 public devFee;
uint256 public mainFeeOnSell;
uint256 public lpFeeOnSell;
uint256 public devFeeOnSell;
uint256 public totalFee;
uint256 public totalFeeIfSelling;
IUniswapV2Router02 public router;
address public pair;
address public factory;
address public tokenOwner;
address payable public devWallet;
address payable public mainWallet;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
bool public tradingStatus = true;
uint256 public _maxTxAmount;
uint256 public _walletMax;
uint256 public swapThreshold;
constructor() {
factory = msg.sender;
}
modifier lockTheSwap() {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
modifier onlyProofAdmin() {
require(
proofAdmin == _msgSender(),
"Ownable: caller is not the proofAdmin"
);
_;
}
modifier onlyOwner() {
require(tokenOwner == _msgSender(), "Ownable: caller is not the owner");
_;
}
modifier onlyFactory() {
require(factory == _msgSender(), "Ownable: caller is not the factory");
_;
}
function setBasicData(
BaseData memory _baseData,
ProofNonReflectionTokenFees.allFees memory fees
) external onlyFactory {
_name = _baseData.tokenName;
_symbol = _baseData.tokenSymbol;
_totalSupply = _baseData.initialSupply;
require(_baseData.percentToLP >= 70, "Too low");
_maxTxAmount = (_baseData.initialSupply * 5) / 1000;
_walletMax = (_baseData.initialSupply * 1) / 100;
swapThreshold = (_baseData.initialSupply * 5) / 4000;
router = IUniswapV2Router02(_baseData.routerAddress);
pair = IUniswapV2Factory(router.factory()).createPair(
router.WETH(),
address(this)
);
_allowances[address(this)][address(router)] = type(uint256).max;
userWhitelist[address(this)] = true;
userWhitelist[factory] = true;
userWhitelist[pair] = true;
userWhitelist[_baseData.owner] = true;
userWhitelist[_baseData.initialProofAdmin] = true;
userWhitelist[_baseData.routerAddress] = true;
_addWhitelist(_baseData.whitelists);
nftWhitelist = IERC721A(_baseData.nftWhitelist);
isFeeExempt[address(this)] = true;
isFeeExempt[factory] = true;
isFeeExempt[_baseData.owner] = true;
isTxLimitExempt[_baseData.owner] = true;
isTxLimitExempt[pair] = true;
isTxLimitExempt[factory] = true;
isTxLimitExempt[DEAD] = true;
isTxLimitExempt[ZERO] = true;
whitelistPeriod = _baseData.whitelistPeriod;
lpFee = fees.lpFee;
lpFeeOnSell = fees.lpFeeOnSell;
devFee = fees.devFee;
devFeeOnSell = fees.devFeeOnSell;
mainFee = fees.mainFee;
mainFeeOnSell = fees.mainFeeOnSell;
totalFee = devFee + lpFee + mainFee + proofFee;
totalFeeIfSelling =
devFeeOnSell +
lpFeeOnSell +
mainFeeOnSell +
proofFee;
if (IFACTORY(factory).isWhitelisted(_baseData.owner)) {
require(totalFee <= 12, "high KYC fee");
require(totalFeeIfSelling <= 17, "high KYC fee");
} else {
require(totalFee <= 7, "high fee");
require(totalFeeIfSelling <= 7, "high fee");
}
tokenOwner = _baseData.owner;
devWallet = payable(_baseData.dev);
mainWallet = payable(_baseData.main);
proofAdmin = _baseData.initialProofAdmin;
uint256 forLP = (_baseData.initialSupply * _baseData.percentToLP) / 100;
uint256 forOwner = _baseData.initialSupply - forLP;
_balances[msg.sender] += forLP;
_balances[_baseData.owner] += forOwner;
emit Transfer(address(0), msg.sender, forLP);
emit Transfer(address(0), _baseData.owner, forOwner);
}
function updateWhitelistPeriod(
uint256 _whitelistPeriod
) external onlyProofAdmin {
whitelistPeriod = _whitelistPeriod;
whitelistEndTime = launchedAt + (60 * _whitelistPeriod);
whitelistMode = true;
}
function updateProofAdmin(
address newAdmin
) external virtual onlyProofAdmin {
proofAdmin = newAdmin;
userWhitelist[newAdmin] = true;
}
function updateProofBurnerAddress(
address newproofBurnerAddress
) external onlyProofAdmin {
proofBurnerAddress = payable(newproofBurnerAddress);
}
function swapTradingStatus() external onlyFactory {
tradingStatus = !tradingStatus;
}
function setLaunchedAt() external onlyFactory {
require(launchedAt == 0, "already launched");
launchedAt = block.timestamp;
whitelistEndTime = block.timestamp + (60 * whitelistPeriod);
whitelistMode = true;
}
function cancelToken() external onlyFactory {
isFeeExempt[address(router)] = true;
isTxLimitExempt[address(router)] = true;
isTxLimitExempt[tokenOwner] = true;
tradingStatus = true;
restrictWhales = false;
swapAndLiquifyEnabled = false;
}
function changeFees(
uint256 initialMainFee,
uint256 initialMainFeeOnSell,
uint256 initialLpFee,
uint256 initialLpFeeOnSell,
uint256 initialDevFee,
uint256 initialDevFeeOnSell
) external onlyOwner {
mainFee = initialMainFee;
lpFee = initialLpFee;
devFee = initialDevFee;
mainFeeOnSell = initialMainFeeOnSell;
lpFeeOnSell = initialLpFeeOnSell;
devFeeOnSell = initialDevFeeOnSell;
totalFee = devFee + lpFee + proofFee + mainFee;
totalFeeIfSelling =
devFeeOnSell +
lpFeeOnSell +
proofFee +
mainFeeOnSell;
if (IFACTORY(factory).isWhitelisted(tokenOwner)) {
require(totalFee <= 12, "high fee");
require(totalFeeIfSelling <= 17, "high fee");
} else {
require(totalFee <= 7, "high fee");
require(totalFeeIfSelling <= 7, "high fee");
}
}
function changeTxLimit(uint256 newLimit) external onlyOwner {
require(launchedAt != 0, "!launched");
require(newLimit >= (_totalSupply * 5) / 1000, "Min 0.5%");
require(newLimit <= (_totalSupply * 3) / 100, "Max 3%");
_maxTxAmount = newLimit;
}
function changeWalletLimit(uint256 newLimit) external onlyOwner {
require(launchedAt != 0, "!launched");
require(newLimit >= (_totalSupply * 5) / 1000, "Min 0.5%");
require(newLimit <= (_totalSupply * 3) / 100, "Max 3%");
_walletMax = newLimit;
}
function changeRestrictWhales(bool newValue) external onlyOwner {
require(launchedAt != 0, "!launched");
restrictWhales = newValue;
}
function changeIsFeeExempt(address holder, bool exempt) external onlyOwner {
isFeeExempt[holder] = exempt;
}
function changeIsTxLimitExempt(
address holder,
bool exempt
) external onlyOwner {
isTxLimitExempt[holder] = exempt;
}
function reduceProofFee() external onlyOwner {
require(proofFee == 2, "!already reduced");
require(launchedAt != 0, "!launched");
require(block.timestamp >= launchedAt + 72 hours, "too soon");
proofFee = 1;
totalFee = devFee + lpFee + proofFee + mainFee;
totalFeeIfSelling =
devFeeOnSell +
lpFeeOnSell +
proofFee +
mainFeeOnSell;
}
function adjustProofFee(uint256 _proofFee) external onlyProofAdmin {
require(launchedAt != 0, "!launched");
if (block.timestamp >= launchedAt + 72 hours) {
require(_proofFee <= 1);
proofFee = _proofFee;
totalFee = devFee + lpFee + proofFee + mainFee;
totalFeeIfSelling =
devFeeOnSell +
lpFeeOnSell +
proofFee +
mainFeeOnSell;
} else {
require(_proofFee <= 2);
proofFee = _proofFee;
totalFee = devFee + lpFee + proofFee + mainFee;
totalFeeIfSelling =
devFeeOnSell +
lpFeeOnSell +
proofFee +
mainFeeOnSell;
}
}
function setDevWallet(address payable newDevWallet) external onlyOwner {
devWallet = payable(newDevWallet);
}
function setMainWallet(address payable newMainWallet) external onlyOwner {
mainWallet = newMainWallet;
}
function setOwnerWallet(address payable newOwnerWallet) external onlyOwner {
tokenOwner = newOwnerWallet;
}
function changeSwapBackSettings(
bool enableSwapBack,
uint256 newSwapBackLimit
) external onlyOwner {
swapAndLiquifyEnabled = enableSwapBack;
swapThreshold = newSwapBackLimit;
}
function isWhitelisted(address user) public view returns (bool) {
return userWhitelist[user];
}
function getCirculatingSupply() external view returns (uint256) {
return _totalSupply - balanceOf(DEAD) - balanceOf(ZERO);
}
function name() external view virtual override returns (string memory) {
return _name;
}
function symbol() external view virtual override returns (string memory) {
return _symbol;
}
function decimals() external view virtual override returns (uint8) {
return 9;
}
function totalSupply() external 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
) external 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
) external virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
function transferFrom(
address from,
address to,
uint256 amount
) external virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
function increaseAllowance(
address spender,
uint256 addedValue
) external virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, _allowances[owner][spender] + addedValue);
return true;
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) external virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = _allowances[owner][spender];
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
require(tradingStatus, "Trading Closed");
if(whitelistMode) {
if (block.timestamp >= whitelistEndTime ) {
whitelistMode = false;
} else {
if (sender == pair) {
require(isWhitelisted(recipient), "Not whitelisted");
} else if (recipient == pair) {
require(isWhitelisted(sender), "Not whitelisted");
} else {
require(isWhitelisted(sender) && isWhitelisted(recipient), "Not Whitelisted");
}
}
}
if (inSwapAndLiquify) {
return _basicTransfer(sender, recipient, amount);
}
if (recipient == pair && restrictWhales) {
require(
amount <= _maxTxAmount ||
(isTxLimitExempt[sender] && isTxLimitExempt[recipient]),
"Max TX"
);
}
if (!isTxLimitExempt[recipient] && restrictWhales) {
require(_balances[recipient] + amount <= _walletMax, "Max Wallet");
}
if (
sender != pair &&
!inSwapAndLiquify &&
swapAndLiquifyEnabled &&
_balances[address(this)] >= swapThreshold
) {
swapBack();
}
_balances[sender] = _balances[sender] - amount;
uint256 finalAmount = amount;
if (sender == pair || recipient == pair) {
finalAmount = !isFeeExempt[sender] && !isFeeExempt[recipient]
? takeFee(sender, recipient, amount)
: amount;
}
_balances[recipient] = _balances[recipient] + finalAmount;
emit Transfer(sender, recipient, finalAmount);
return true;
}
function _basicTransfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
_balances[sender] = _balances[sender] - amount;
_balances[recipient] = _balances[recipient] + amount;
emit Transfer(sender, recipient, amount);
return true;
}
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 takeFee(
address sender,
address recipient,
uint256 amount
) internal returns (uint256) {
uint256 feeApplicable = pair == recipient
? totalFeeIfSelling
: totalFee;
uint256 feeAmount = (amount * feeApplicable) / 100;
_balances[address(this)] = _balances[address(this)] + feeAmount;
emit Transfer(sender, address(this), feeAmount);
return amount - feeAmount;
}
function swapBack() internal lockTheSwap {
uint256 tokensToLiquify = _balances[address(this)];
uint256 amountToLiquify;
uint256 devBalance;
uint256 proofBalance;
uint256 amountEthLiquidity;
if (totalFee <= 2) {
amountToLiquify =
(tokensToLiquify * lpFeeOnSell) /
totalFeeIfSelling /
2;
} else {
amountToLiquify = (tokensToLiquify * lpFee) / totalFee / 2;
}
uint256 amountToSwap = tokensToLiquify - amountToLiquify;
if (amountToSwap == 0) return;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = router.WETH();
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
amountToSwap,
0,
path,
address(this),
block.timestamp
);
uint256 amountETH = address(this).balance;
if (totalFee <= 2) {
amountEthLiquidity =
(amountETH * lpFeeOnSell) /
totalFeeIfSelling /
2;
} else {
amountEthLiquidity = (amountETH * lpFee) / totalFee / 2;
}
if (amountToLiquify > 0) {
router.addLiquidityETH{value: amountEthLiquidity}(
address(this),
amountToLiquify,
0,
0,
0x000000000000000000000000000000000000dEaD,
block.timestamp
);
}
uint256 amountETHafterLP = address(this).balance;
if (totalFee <= 2) {
devBalance = (amountETHafterLP * devFeeOnSell) / totalFeeIfSelling;
proofBalance = (amountETHafterLP * proofFee) / totalFeeIfSelling;
} else {
devBalance = (amountETHafterLP * devFee) / totalFee;
proofBalance = (amountETHafterLP * proofFee) / totalFee;
}
uint256 amountEthMain = amountETHafterLP - devBalance - proofBalance;
if (amountETH > 0) {
if (proofBalance > 0) {
uint256 revenueSplit = proofBalance / 2;
(bool sent, ) = payable(IFACTORY(factory).proofRevenueAddress()).call{value: revenueSplit}("");
require(sent);
(bool sent1, ) = payable(IFACTORY(factory).proofRewardPoolAddress()).call{value: revenueSplit}("");
require(sent1);
}
if (devBalance > 0) {
(bool sent, ) = devWallet.call{value: devBalance}("");
require(sent);
}
if (amountEthMain > 0) {
(bool sent1, ) = mainWallet.call{value: amountEthMain}("");
require(sent1);
}
}
}
function _addWhitelist(address[] memory _whitelists) internal {
uint256 length = _whitelists.length;
for (uint256 i = 0; i < length; i++) {
userWhitelist[_whitelists[i]] = true;
}
}
function addMoreToWhitelist(WhitelistAdd_ memory _WhitelistAdd) external onlyFactory {
_addWhitelist(_WhitelistAdd.whitelists);
}
function addNFTSnapshot() external onlyFactory {
uint256 len = nftWhitelist.totalSupply() + 1;
for (uint256 i = 1; i < len; ) {
userWhitelist[nftWhitelist.ownerOf(i)] = true;
unchecked { ++i; }
}
}
receive() external payable {}
}
文件 12 的 12:ProofNonReflectionTokenFees.sol
pragma solidity ^0.8.17;
library ProofNonReflectionTokenFees {
struct allFees {
uint256 mainFee;
uint256 mainFeeOnSell;
uint256 lpFee;
uint256 lpFeeOnSell;
uint256 devFee;
uint256 devFeeOnSell;
}
}
{
"compilationTarget": {
"contracts/tokenCutters/ProofNonReflectionTokenCutter.sol": "ProofNonReflectionTokenCutter"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_maxTxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_walletMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"whitelists","type":"address[]"}],"internalType":"struct IProofNonReflectionTokenCutter.WhitelistAdd_","name":"_WhitelistAdd","type":"tuple"}],"name":"addMoreToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"addNFTSnapshot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proofFee","type":"uint256"}],"name":"adjustProofFee","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":"cancelToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"initialMainFee","type":"uint256"},{"internalType":"uint256","name":"initialMainFeeOnSell","type":"uint256"},{"internalType":"uint256","name":"initialLpFee","type":"uint256"},{"internalType":"uint256","name":"initialLpFeeOnSell","type":"uint256"},{"internalType":"uint256","name":"initialDevFee","type":"uint256"},{"internalType":"uint256","name":"initialDevFeeOnSell","type":"uint256"}],"name":"changeFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"bool","name":"exempt","type":"bool"}],"name":"changeIsFeeExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"bool","name":"exempt","type":"bool"}],"name":"changeIsTxLimitExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"newValue","type":"bool"}],"name":"changeRestrictWhales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enableSwapBack","type":"bool"},{"internalType":"uint256","name":"newSwapBackLimit","type":"uint256"}],"name":"changeSwapBackSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"changeTxLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"changeWalletLimit","outputs":[],"stateMutability":"nonpayable","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":"devFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devFeeOnSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devWallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCirculatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isDividendExempt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isFeeExempt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isTxLimitExempt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"launchedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpFeeOnSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mainFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mainFeeOnSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mainWallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftWhitelist","outputs":[{"internalType":"contract IERC721A","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofBurnerAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reduceProofFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"restrictWhales","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"tokenSymbol","type":"string"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"uint256","name":"percentToLP","type":"uint256"},{"internalType":"uint256","name":"whitelistPeriod","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"dev","type":"address"},{"internalType":"address","name":"main","type":"address"},{"internalType":"address","name":"routerAddress","type":"address"},{"internalType":"address","name":"initialProofAdmin","type":"address"},{"internalType":"address[]","name":"whitelists","type":"address[]"},{"internalType":"address","name":"nftWhitelist","type":"address"}],"internalType":"struct IProofNonReflectionTokenCutter.BaseData","name":"_baseData","type":"tuple"},{"components":[{"internalType":"uint256","name":"mainFee","type":"uint256"},{"internalType":"uint256","name":"mainFeeOnSell","type":"uint256"},{"internalType":"uint256","name":"lpFee","type":"uint256"},{"internalType":"uint256","name":"lpFeeOnSell","type":"uint256"},{"internalType":"uint256","name":"devFee","type":"uint256"},{"internalType":"uint256","name":"devFeeOnSell","type":"uint256"}],"internalType":"struct ProofNonReflectionTokenFees.allFees","name":"fees","type":"tuple"}],"name":"setBasicData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newDevWallet","type":"address"}],"name":"setDevWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setLaunchedAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newMainWallet","type":"address"}],"name":"setMainWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newOwnerWallet","type":"address"}],"name":"setOwnerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapAndLiquifyEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapTradingStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFeeIfSelling","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":"tradingStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"newAdmin","type":"address"}],"name":"updateProofAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newproofBurnerAddress","type":"address"}],"name":"updateProofBurnerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_whitelistPeriod","type":"uint256"}],"name":"updateWhitelistPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]