comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Caller is not in community Holder" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
contract Zalien is ERC721A, Ownable, ERC2981 {
enum EPublicMintStatus {
NOTACTIVE,
BLUECHIP_MINT,
ALLOWLIST_MINT,
PUBLIC_MINT,
CLOSED
}
EPublicMintStatus public publicMintStatus;
string public baseTokenURI;
string public defaultTokenURI = 'ipfs://bafkreif2mn2ijjtekvu2mzfuxnoo4754rkhcigt4jhticokvnss27fvmay';
uint256 public maxSupply = 4200;
uint256 public publicSalePrice = 0.096 ether;
uint256 public allowListSalePrice = 0.069 ether;
address payable public payMent;
mapping(address => uint256) public usermint;
mapping(address => uint256) public allowlistmint;
mapping(address => uint256) public blurchipmint;
address[] public BlurChipAddress;
bytes32 private _merkleRoot;
constructor() ERC721A ("Zalien", "Zalien") {
}
modifier callerIsUser() {
}
function mint(uint256 _quantity) external payable {
}
function allowListMint(bytes32[] calldata _merkleProof, uint256 _quantity) external payable {
}
function blueChipMint(uint256 _quantity) external payable {
require(publicMintStatus == EPublicMintStatus.BLUECHIP_MINT, "Community sale closed");
require(_quantity <= 3, "Invalid quantity");
require(totalSupply() + _quantity <= maxSupply, "Exceed supply");
require(msg.value >= _quantity * allowListSalePrice, "Ether is not enough");
require(<FILL_ME>)
require(blurchipmint[msg.sender] + _quantity <= 3, "The address has reached the limit");
blurchipmint[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
function checkBlueHolder(address walletaddress) internal view returns (bool) {
}
function isWhitelistAddress(address _address, bytes32[] calldata _signature) public view returns (bool) {
}
function airdrop(address[] memory mintaddress, uint256[] memory mintquantity) public payable onlyOwner {
}
function withdraw() external onlyOwner {
}
function getHoldTokenIdsByOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function setBlurChipAddress(address[] calldata _BlurChipAddress) external onlyOwner {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner {
}
function setDefaultURI(string calldata _defaultURI) external onlyOwner {
}
function setPublicPrice(uint256 mintprice) external onlyOwner {
}
function setAllowlistPrice(uint256 mintprice) external onlyOwner {
}
function setPublicMintStatus(uint256 status) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function setRoyaltyInfo(address payable receiver, uint96 numerator) public onlyOwner {
}
function setPayMent(address _payMent) external onlyOwner {
}
function DeleteDefaultRoyalty() external onlyOwner {
}
}
| checkBlueHolder(msg.sender),"Caller is not in community Holder" | 94,922 | checkBlueHolder(msg.sender) |
"The address has reached the limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
contract Zalien is ERC721A, Ownable, ERC2981 {
enum EPublicMintStatus {
NOTACTIVE,
BLUECHIP_MINT,
ALLOWLIST_MINT,
PUBLIC_MINT,
CLOSED
}
EPublicMintStatus public publicMintStatus;
string public baseTokenURI;
string public defaultTokenURI = 'ipfs://bafkreif2mn2ijjtekvu2mzfuxnoo4754rkhcigt4jhticokvnss27fvmay';
uint256 public maxSupply = 4200;
uint256 public publicSalePrice = 0.096 ether;
uint256 public allowListSalePrice = 0.069 ether;
address payable public payMent;
mapping(address => uint256) public usermint;
mapping(address => uint256) public allowlistmint;
mapping(address => uint256) public blurchipmint;
address[] public BlurChipAddress;
bytes32 private _merkleRoot;
constructor() ERC721A ("Zalien", "Zalien") {
}
modifier callerIsUser() {
}
function mint(uint256 _quantity) external payable {
}
function allowListMint(bytes32[] calldata _merkleProof, uint256 _quantity) external payable {
}
function blueChipMint(uint256 _quantity) external payable {
require(publicMintStatus == EPublicMintStatus.BLUECHIP_MINT, "Community sale closed");
require(_quantity <= 3, "Invalid quantity");
require(totalSupply() + _quantity <= maxSupply, "Exceed supply");
require(msg.value >= _quantity * allowListSalePrice, "Ether is not enough");
require(checkBlueHolder(msg.sender), "Caller is not in community Holder");
require(<FILL_ME>)
blurchipmint[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
function checkBlueHolder(address walletaddress) internal view returns (bool) {
}
function isWhitelistAddress(address _address, bytes32[] calldata _signature) public view returns (bool) {
}
function airdrop(address[] memory mintaddress, uint256[] memory mintquantity) public payable onlyOwner {
}
function withdraw() external onlyOwner {
}
function getHoldTokenIdsByOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function setBlurChipAddress(address[] calldata _BlurChipAddress) external onlyOwner {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner {
}
function setDefaultURI(string calldata _defaultURI) external onlyOwner {
}
function setPublicPrice(uint256 mintprice) external onlyOwner {
}
function setAllowlistPrice(uint256 mintprice) external onlyOwner {
}
function setPublicMintStatus(uint256 status) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function setRoyaltyInfo(address payable receiver, uint96 numerator) public onlyOwner {
}
function setPayMent(address _payMent) external onlyOwner {
}
function DeleteDefaultRoyalty() external onlyOwner {
}
}
| blurchipmint[msg.sender]+_quantity<=3,"The address has reached the limit" | 94,922 | blurchipmint[msg.sender]+_quantity<=3 |
"Exceed supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
contract Zalien is ERC721A, Ownable, ERC2981 {
enum EPublicMintStatus {
NOTACTIVE,
BLUECHIP_MINT,
ALLOWLIST_MINT,
PUBLIC_MINT,
CLOSED
}
EPublicMintStatus public publicMintStatus;
string public baseTokenURI;
string public defaultTokenURI = 'ipfs://bafkreif2mn2ijjtekvu2mzfuxnoo4754rkhcigt4jhticokvnss27fvmay';
uint256 public maxSupply = 4200;
uint256 public publicSalePrice = 0.096 ether;
uint256 public allowListSalePrice = 0.069 ether;
address payable public payMent;
mapping(address => uint256) public usermint;
mapping(address => uint256) public allowlistmint;
mapping(address => uint256) public blurchipmint;
address[] public BlurChipAddress;
bytes32 private _merkleRoot;
constructor() ERC721A ("Zalien", "Zalien") {
}
modifier callerIsUser() {
}
function mint(uint256 _quantity) external payable {
}
function allowListMint(bytes32[] calldata _merkleProof, uint256 _quantity) external payable {
}
function blueChipMint(uint256 _quantity) external payable {
}
function checkBlueHolder(address walletaddress) internal view returns (bool) {
}
function isWhitelistAddress(address _address, bytes32[] calldata _signature) public view returns (bool) {
}
function airdrop(address[] memory mintaddress, uint256[] memory mintquantity) public payable onlyOwner {
for (uint256 i = 0; i < mintaddress.length; i++) {
require(<FILL_ME>)
_safeMint(mintaddress[i], mintquantity[i]);
}
}
function withdraw() external onlyOwner {
}
function getHoldTokenIdsByOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function setBlurChipAddress(address[] calldata _BlurChipAddress) external onlyOwner {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner {
}
function setDefaultURI(string calldata _defaultURI) external onlyOwner {
}
function setPublicPrice(uint256 mintprice) external onlyOwner {
}
function setAllowlistPrice(uint256 mintprice) external onlyOwner {
}
function setPublicMintStatus(uint256 status) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function setRoyaltyInfo(address payable receiver, uint96 numerator) public onlyOwner {
}
function setPayMent(address _payMent) external onlyOwner {
}
function DeleteDefaultRoyalty() external onlyOwner {
}
}
| totalSupply()+mintquantity[i]<=maxSupply,"Exceed supply" | 94,922 | totalSupply()+mintquantity[i]<=maxSupply |
"Roundtrip too high" | //SPDX-License-Identifier: MIT
/*
https://t.me/ProofOfFrogs
https://ProofOfFrogs.com
https://Twitter.com/ProofOfFrogs
*/
pragma solidity 0.8.19;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address __owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed spender, uint256 value);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
abstract contract Auth {
address internal _owner;
constructor(address creatorOwner) {
}
modifier onlyOwner() {
}
function owner() public view returns (address) {
}
function transferOwnership(address payable newOwner) external onlyOwner {
}
function renounceOwnership() external onlyOwner {
}
event OwnershipTransferred(address _owner);
}
contract Pof is IERC20, Auth {
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 1_000_000_000 * (10**_decimals);
string private constant _name = "Proof of Frogs";
string private constant _symbol = "POF";
uint8 private antiSnipeTax1 = 2;
uint8 private antiSnipeTax2 = 1;
uint8 private antiSnipeBlocks1 = 1;
uint8 private antiSnipeBlocks2 = 1;
uint256 private _antiMevBlock = 2;
uint8 private _buyTaxRate = 0;
uint8 private _sellTaxRate = 0;
uint16 private _taxSharesMarketing = 100;
uint16 private _taxSharesDevelopment = 0;
uint16 private _taxSharesLP = 0;
uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesLP;
address payable private _walletMarketing = payable(0x7135240B31efA944ada3DC24c803704643Ac0c54);
address payable private _walletDevelopment = payable(0x7135240B31efA944ada3DC24c803704643Ac0c54);
uint256 private _launchBlock;
uint256 private _maxTxAmount = _totalSupply;
uint256 private _maxWalletAmount = _totalSupply;
uint256 private _taxSwapMin = _totalSupply * 10 / 100000;
uint256 private _taxSwapMax = _totalSupply * 949 / 100000;
uint256 private _swapLimit = _taxSwapMin * 58 * 100;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
address private _lpOwner;
address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress);
address private _primaryLP;
mapping (address => bool) private _isLP;
bool private _tradingOpen;
bool private _inTaxSwap = false;
modifier lockTaxSwap {
}
event TokensBurned(address indexed burnedByWallet, uint256 tokenAmount);
constructor() Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function addLiquidity() external payable onlyOwner lockTaxSwap {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen(address sender) private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function exemptFromFees(address wallet) external view returns (bool) {
}
function exemptFromLimits(address wallet) external view returns (bool) {
}
function setExempt(address wallet, bool noFees, bool noLimits) external onlyOwner {
}
function buyFee() external view returns(uint8) {
}
function sellFee() external view returns(uint8) {
}
function feeSplit() external view returns (uint16 marketing, uint16 development, uint16 LP ) {
}
function setFees(uint8 buy, uint8 sell) external onlyOwner {
require(<FILL_ME>)
_buyTaxRate = buy;
_sellTaxRate = sell;
}
function setFeeSplit(uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner {
}
function marketingWallet() external view returns (address) {
}
function developmentWallet() external view returns (address) {
}
function updateWallets(address marketing, address development, address LPtokens) external onlyOwner {
}
function maxWallet() external view returns (uint256) {
}
function maxTransaction() external view returns (uint256) {
}
function swapAtMin() external view returns (uint256) {
}
function swapAtMax() external view returns (uint256) {
}
function setLimits(uint16 maxTransactionPermille, uint16 maxWalletPermille) external onlyOwner {
}
function setTaxSwap(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _burnTokens(address fromWallet, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 tokenAmount) private {
}
function _distributeTaxEth(uint256 amount) private {
}
function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap {
}
function burn(uint256 amount) external {
}
}
| buy+sell<=5,"Roundtrip too high" | 95,011 | buy+sell<=5 |
"LP cannot be tax wallet" | //SPDX-License-Identifier: MIT
/*
https://t.me/ProofOfFrogs
https://ProofOfFrogs.com
https://Twitter.com/ProofOfFrogs
*/
pragma solidity 0.8.19;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address __owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed spender, uint256 value);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
abstract contract Auth {
address internal _owner;
constructor(address creatorOwner) {
}
modifier onlyOwner() {
}
function owner() public view returns (address) {
}
function transferOwnership(address payable newOwner) external onlyOwner {
}
function renounceOwnership() external onlyOwner {
}
event OwnershipTransferred(address _owner);
}
contract Pof is IERC20, Auth {
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 1_000_000_000 * (10**_decimals);
string private constant _name = "Proof of Frogs";
string private constant _symbol = "POF";
uint8 private antiSnipeTax1 = 2;
uint8 private antiSnipeTax2 = 1;
uint8 private antiSnipeBlocks1 = 1;
uint8 private antiSnipeBlocks2 = 1;
uint256 private _antiMevBlock = 2;
uint8 private _buyTaxRate = 0;
uint8 private _sellTaxRate = 0;
uint16 private _taxSharesMarketing = 100;
uint16 private _taxSharesDevelopment = 0;
uint16 private _taxSharesLP = 0;
uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesLP;
address payable private _walletMarketing = payable(0x7135240B31efA944ada3DC24c803704643Ac0c54);
address payable private _walletDevelopment = payable(0x7135240B31efA944ada3DC24c803704643Ac0c54);
uint256 private _launchBlock;
uint256 private _maxTxAmount = _totalSupply;
uint256 private _maxWalletAmount = _totalSupply;
uint256 private _taxSwapMin = _totalSupply * 10 / 100000;
uint256 private _taxSwapMax = _totalSupply * 949 / 100000;
uint256 private _swapLimit = _taxSwapMin * 58 * 100;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
address private _lpOwner;
address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress);
address private _primaryLP;
mapping (address => bool) private _isLP;
bool private _tradingOpen;
bool private _inTaxSwap = false;
modifier lockTaxSwap {
}
event TokensBurned(address indexed burnedByWallet, uint256 tokenAmount);
constructor() Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function addLiquidity() external payable onlyOwner lockTaxSwap {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen(address sender) private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function exemptFromFees(address wallet) external view returns (bool) {
}
function exemptFromLimits(address wallet) external view returns (bool) {
}
function setExempt(address wallet, bool noFees, bool noLimits) external onlyOwner {
}
function buyFee() external view returns(uint8) {
}
function sellFee() external view returns(uint8) {
}
function feeSplit() external view returns (uint16 marketing, uint16 development, uint16 LP ) {
}
function setFees(uint8 buy, uint8 sell) external onlyOwner {
}
function setFeeSplit(uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner {
}
function marketingWallet() external view returns (address) {
}
function developmentWallet() external view returns (address) {
}
function updateWallets(address marketing, address development, address LPtokens) external onlyOwner {
require(<FILL_ME>)
_walletMarketing = payable(marketing);
_walletDevelopment = payable(development);
_lpOwner = LPtokens;
_noFees[marketing] = true;
_noLimits[marketing] = true;
_noFees[development] = true;
_noLimits[development] = true;
}
function maxWallet() external view returns (uint256) {
}
function maxTransaction() external view returns (uint256) {
}
function swapAtMin() external view returns (uint256) {
}
function swapAtMax() external view returns (uint256) {
}
function setLimits(uint16 maxTransactionPermille, uint16 maxWalletPermille) external onlyOwner {
}
function setTaxSwap(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _burnTokens(address fromWallet, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 tokenAmount) private {
}
function _distributeTaxEth(uint256 amount) private {
}
function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap {
}
function burn(uint256 amount) external {
}
}
| !_isLP[marketing]&&!_isLP[development]&&!_isLP[LPtokens],"LP cannot be tax wallet" | 95,011 | !_isLP[marketing]&&!_isLP[development]&&!_isLP[LPtokens] |
"failed to decode signal" | // SPDX-License-Identifier: AGPL-3.0
// ©2023 Ponderware Ltd
pragma solidity ^0.8.17;
import "../lib/TokenizedContract.sol";
import "@openzeppelin/contracts/utils/Create2.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
interface IDelegationRegistry {
function checkDelegateForContract (address delegate, address vault, address contract_) external view returns(bool);
function checkDelegateForToken (address delegate, address vault, address contract_, uint256 tokenId) external view returns (bool);
}
interface ICustomAttributes {
function getCustomAttributes () external view returns (bytes memory);
}
interface ICloakNetMetadata {
function signalMetadata (uint peer, Signal memory local, Signal memory peer1, Signal memory peer2) external view returns (string memory);
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) external;
function setB64EncodeURI (bool active) external;
}
interface ITransponders {
function balanceOf (address lawless, uint256 id) external view returns (uint256);
}
struct Signal {
uint16 tokenId;
uint8 style;
uint32 startBlock;
address sender;
uint40 message1;
uint256 message2;
}
/*
* @title CloakNet
* @author Ponderware Ltd
* @dev "Burns" ERC-1155 Transponders into ERC-721 Signalling Transponders
*/
contract CloakNet is TokenizedContract, IERC721Enumerable {
string public name = "cloaknet";
string public symbol = unicode"📻";
/* */
ICloakNetMetadata Metadata;
address immutable TranspondersAddress;
constructor (uint256 tokenId) TokenizedContract(tokenId) {
}
bool internal initialized = false;
function initialize (bytes calldata metadata) public onlySuper {
}
IDelegationRegistry constant dc = IDelegationRegistry(0x00000000000076A84feF008CDAbe6409d2FE638B);
bool public delegationEnabled = true;
bool public jammed = true;
function jam (bool value) public onlyBy(Role.Jammer) {
}
uint constant validChars = 10633823807823001964213349086429970432; // space ! ' - . 0-9 ? a-z
function parseData (bytes memory data) internal pure returns (uint chroma, uint256 message1, uint256 message2) {
chroma = uint8(data[0]);
require (chroma < 5, "incompatible power supply");
require (data.length <= 38, "data overload");
for (uint i = 1; i < data.length; ++i) {
uint b = uint8(data[i]);
require(<FILL_ME>)
if (i < 6) {
message1 <<= 8;
message1 += b;
} else {
message2 <<= 8;
message2 += b;
}
}
if (data.length <= 6) {
message1 <<= ((5 - (data.length - 1)) * 8);
} else {
message2 <<= ((32 - (data.length - 6)) * 8);
}
}
bytes4 constant onERC1155ReceivedSelector = bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
function onERC1155Received(address /*operator*/, address from, uint256 id, uint256 amount, bytes memory data) public returns (bytes4) {
}
function bootstrapCloaknet(address[] calldata seeders, uint[] calldata models, bytes[] memory data) public onlyBy(Role.CodeLawless) {
}
uint public priceOfIndecisionAndRequiredMaterials = 0.1 ether;
function reevaluate (uint signalId, bytes memory data) public payable {
}
function setPriceOfIndecisionAndRequiredMaterials (uint price) public onlyBy(Role.Fixer) {
}
function redact (uint signalId, bytes memory data) public onlyBy(Role.Censor) {
}
function setB64EncodeURI (bool value) public onlyBy(Role.Fixer) {
}
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) public onlyBy(Role.Maintainer) {
}
uint public peerConnectionDuration = 75;
function adjustPeerConnectionDuration (uint duration) public onlyBy(Role.CodeLawless) {
}
uint constant PRIME = 81918643972203779099;
function scan (uint salt, uint signalId) internal view returns (Signal memory) {
}
function tokenURI (uint256 tokenId) public view returns (string memory) {
}
function smashFlask () public onlyBy(Role.Ponderware) {
}
/* Custom Attributes */
uint internal blocksPerMinute = 5;
function setBPM (uint bpm) public onlyBy(Role.Curator) {
}
function getCustomAttributes () external view returns (bytes memory) {
}
/* View Helper */
function getSignal (uint256 signalId) public view returns (uint8 model, uint8 chroma, uint32 startBlock, address sender, bool redacted, string memory message) {
}
/* Strength */
function signalStrength (address lawless) public view returns (uint) {
}
function signalStrength (uint signalId) public view returns (uint) {
}
/* ERC-721 */
uint256 internal constant totalTransponders = 20685 + 6; // 4176 + 3629 + 3574 + 3702 + 5606 + 6
uint256 public totalSupply = 0;
address[totalTransponders] private Owners;
mapping (address => Signal[]) internal SignalsByOwner;
uint16[totalTransponders] internal OwnerTokenIndex;
// Mapping from token ID to approved address
mapping(uint256 => address) private TokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private OperatorApprovals;
function _transfer(address from,
address to,
uint256 tokenId) private whenNotPaused {
}
function _handleMint(address to, uint transponderType, uint chroma, uint256 message1, uint256 message2) internal {
}
function tokenExists(uint256 tokenId) public view returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view returns (bool) {
}
function _approve(address to, uint256 tokenId) internal {
}
function approve(address to, uint256 tokenId) public {
}
function getApproved(uint256 tokenId) public view returns (address) {
}
function isApprovedForAll(address owner, address operator) public view returns (bool) {
}
function setApprovalForAll(
address operator,
bool approved
) external virtual {
}
function isContract(address account) internal view returns (bool) {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public {
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private {
}
/* Enumerable */
function tokenByIndex(uint256 tokenId) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
}
/* Royalty Bullshit */
address internal royaltyReceiver;
uint internal royaltyFraction = 0;
function royaltyInfo(uint256 /*tokenId*/, uint256 salePrice) public view returns (address, uint256) {
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlySuper {
}
}
| ((1<<b)&validChars)>0,"failed to decode signal" | 95,084 | ((1<<b)&validChars)>0 |
"jammed" | // SPDX-License-Identifier: AGPL-3.0
// ©2023 Ponderware Ltd
pragma solidity ^0.8.17;
import "../lib/TokenizedContract.sol";
import "@openzeppelin/contracts/utils/Create2.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
interface IDelegationRegistry {
function checkDelegateForContract (address delegate, address vault, address contract_) external view returns(bool);
function checkDelegateForToken (address delegate, address vault, address contract_, uint256 tokenId) external view returns (bool);
}
interface ICustomAttributes {
function getCustomAttributes () external view returns (bytes memory);
}
interface ICloakNetMetadata {
function signalMetadata (uint peer, Signal memory local, Signal memory peer1, Signal memory peer2) external view returns (string memory);
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) external;
function setB64EncodeURI (bool active) external;
}
interface ITransponders {
function balanceOf (address lawless, uint256 id) external view returns (uint256);
}
struct Signal {
uint16 tokenId;
uint8 style;
uint32 startBlock;
address sender;
uint40 message1;
uint256 message2;
}
/*
* @title CloakNet
* @author Ponderware Ltd
* @dev "Burns" ERC-1155 Transponders into ERC-721 Signalling Transponders
*/
contract CloakNet is TokenizedContract, IERC721Enumerable {
string public name = "cloaknet";
string public symbol = unicode"📻";
/* */
ICloakNetMetadata Metadata;
address immutable TranspondersAddress;
constructor (uint256 tokenId) TokenizedContract(tokenId) {
}
bool internal initialized = false;
function initialize (bytes calldata metadata) public onlySuper {
}
IDelegationRegistry constant dc = IDelegationRegistry(0x00000000000076A84feF008CDAbe6409d2FE638B);
bool public delegationEnabled = true;
bool public jammed = true;
function jam (bool value) public onlyBy(Role.Jammer) {
}
uint constant validChars = 10633823807823001964213349086429970432; // space ! ' - . 0-9 ? a-z
function parseData (bytes memory data) internal pure returns (uint chroma, uint256 message1, uint256 message2) {
}
bytes4 constant onERC1155ReceivedSelector = bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
function onERC1155Received(address /*operator*/, address from, uint256 id, uint256 amount, bytes memory data) public returns (bytes4) {
require(msg.sender == TranspondersAddress, "unrecognized transponder");
require(<FILL_ME>)
require(amount == 1, "too much interference");
(uint chroma, uint256 message1, uint256 message2) = parseData(data);
_handleMint(from, id, chroma, message1, message2);
return onERC1155ReceivedSelector;
}
function bootstrapCloaknet(address[] calldata seeders, uint[] calldata models, bytes[] memory data) public onlyBy(Role.CodeLawless) {
}
uint public priceOfIndecisionAndRequiredMaterials = 0.1 ether;
function reevaluate (uint signalId, bytes memory data) public payable {
}
function setPriceOfIndecisionAndRequiredMaterials (uint price) public onlyBy(Role.Fixer) {
}
function redact (uint signalId, bytes memory data) public onlyBy(Role.Censor) {
}
function setB64EncodeURI (bool value) public onlyBy(Role.Fixer) {
}
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) public onlyBy(Role.Maintainer) {
}
uint public peerConnectionDuration = 75;
function adjustPeerConnectionDuration (uint duration) public onlyBy(Role.CodeLawless) {
}
uint constant PRIME = 81918643972203779099;
function scan (uint salt, uint signalId) internal view returns (Signal memory) {
}
function tokenURI (uint256 tokenId) public view returns (string memory) {
}
function smashFlask () public onlyBy(Role.Ponderware) {
}
/* Custom Attributes */
uint internal blocksPerMinute = 5;
function setBPM (uint bpm) public onlyBy(Role.Curator) {
}
function getCustomAttributes () external view returns (bytes memory) {
}
/* View Helper */
function getSignal (uint256 signalId) public view returns (uint8 model, uint8 chroma, uint32 startBlock, address sender, bool redacted, string memory message) {
}
/* Strength */
function signalStrength (address lawless) public view returns (uint) {
}
function signalStrength (uint signalId) public view returns (uint) {
}
/* ERC-721 */
uint256 internal constant totalTransponders = 20685 + 6; // 4176 + 3629 + 3574 + 3702 + 5606 + 6
uint256 public totalSupply = 0;
address[totalTransponders] private Owners;
mapping (address => Signal[]) internal SignalsByOwner;
uint16[totalTransponders] internal OwnerTokenIndex;
// Mapping from token ID to approved address
mapping(uint256 => address) private TokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private OperatorApprovals;
function _transfer(address from,
address to,
uint256 tokenId) private whenNotPaused {
}
function _handleMint(address to, uint transponderType, uint chroma, uint256 message1, uint256 message2) internal {
}
function tokenExists(uint256 tokenId) public view returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view returns (bool) {
}
function _approve(address to, uint256 tokenId) internal {
}
function approve(address to, uint256 tokenId) public {
}
function getApproved(uint256 tokenId) public view returns (address) {
}
function isApprovedForAll(address owner, address operator) public view returns (bool) {
}
function setApprovalForAll(
address operator,
bool approved
) external virtual {
}
function isContract(address account) internal view returns (bool) {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public {
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private {
}
/* Enumerable */
function tokenByIndex(uint256 tokenId) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
}
/* Royalty Bullshit */
address internal royaltyReceiver;
uint internal royaltyFraction = 0;
function royaltyInfo(uint256 /*tokenId*/, uint256 salePrice) public view returns (address, uint256) {
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlySuper {
}
}
| !jammed,"jammed" | 95,084 | !jammed |
"unauthorized access detected" | // SPDX-License-Identifier: AGPL-3.0
// ©2023 Ponderware Ltd
pragma solidity ^0.8.17;
import "../lib/TokenizedContract.sol";
import "@openzeppelin/contracts/utils/Create2.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
interface IDelegationRegistry {
function checkDelegateForContract (address delegate, address vault, address contract_) external view returns(bool);
function checkDelegateForToken (address delegate, address vault, address contract_, uint256 tokenId) external view returns (bool);
}
interface ICustomAttributes {
function getCustomAttributes () external view returns (bytes memory);
}
interface ICloakNetMetadata {
function signalMetadata (uint peer, Signal memory local, Signal memory peer1, Signal memory peer2) external view returns (string memory);
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) external;
function setB64EncodeURI (bool active) external;
}
interface ITransponders {
function balanceOf (address lawless, uint256 id) external view returns (uint256);
}
struct Signal {
uint16 tokenId;
uint8 style;
uint32 startBlock;
address sender;
uint40 message1;
uint256 message2;
}
/*
* @title CloakNet
* @author Ponderware Ltd
* @dev "Burns" ERC-1155 Transponders into ERC-721 Signalling Transponders
*/
contract CloakNet is TokenizedContract, IERC721Enumerable {
string public name = "cloaknet";
string public symbol = unicode"📻";
/* */
ICloakNetMetadata Metadata;
address immutable TranspondersAddress;
constructor (uint256 tokenId) TokenizedContract(tokenId) {
}
bool internal initialized = false;
function initialize (bytes calldata metadata) public onlySuper {
}
IDelegationRegistry constant dc = IDelegationRegistry(0x00000000000076A84feF008CDAbe6409d2FE638B);
bool public delegationEnabled = true;
bool public jammed = true;
function jam (bool value) public onlyBy(Role.Jammer) {
}
uint constant validChars = 10633823807823001964213349086429970432; // space ! ' - . 0-9 ? a-z
function parseData (bytes memory data) internal pure returns (uint chroma, uint256 message1, uint256 message2) {
}
bytes4 constant onERC1155ReceivedSelector = bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
function onERC1155Received(address /*operator*/, address from, uint256 id, uint256 amount, bytes memory data) public returns (bytes4) {
}
function bootstrapCloaknet(address[] calldata seeders, uint[] calldata models, bytes[] memory data) public onlyBy(Role.CodeLawless) {
}
uint public priceOfIndecisionAndRequiredMaterials = 0.1 ether;
function reevaluate (uint signalId, bytes memory data) public payable {
address lawless = ownerOf(signalId);
require(<FILL_ME>)
require(msg.value >= priceOfIndecisionAndRequiredMaterials, "parts aren't free");
(uint chroma, uint256 message1, uint256 message2) = parseData(data);
Signal storage s = SignalsByOwner[lawless][OwnerTokenIndex[signalId]];
s.message1 = uint40(message1);
s.message2 = message2;
s.style = uint8((chroma << 4) + (s.style & 15));
s.sender = lawless;
}
function setPriceOfIndecisionAndRequiredMaterials (uint price) public onlyBy(Role.Fixer) {
}
function redact (uint signalId, bytes memory data) public onlyBy(Role.Censor) {
}
function setB64EncodeURI (bool value) public onlyBy(Role.Fixer) {
}
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) public onlyBy(Role.Maintainer) {
}
uint public peerConnectionDuration = 75;
function adjustPeerConnectionDuration (uint duration) public onlyBy(Role.CodeLawless) {
}
uint constant PRIME = 81918643972203779099;
function scan (uint salt, uint signalId) internal view returns (Signal memory) {
}
function tokenURI (uint256 tokenId) public view returns (string memory) {
}
function smashFlask () public onlyBy(Role.Ponderware) {
}
/* Custom Attributes */
uint internal blocksPerMinute = 5;
function setBPM (uint bpm) public onlyBy(Role.Curator) {
}
function getCustomAttributes () external view returns (bytes memory) {
}
/* View Helper */
function getSignal (uint256 signalId) public view returns (uint8 model, uint8 chroma, uint32 startBlock, address sender, bool redacted, string memory message) {
}
/* Strength */
function signalStrength (address lawless) public view returns (uint) {
}
function signalStrength (uint signalId) public view returns (uint) {
}
/* ERC-721 */
uint256 internal constant totalTransponders = 20685 + 6; // 4176 + 3629 + 3574 + 3702 + 5606 + 6
uint256 public totalSupply = 0;
address[totalTransponders] private Owners;
mapping (address => Signal[]) internal SignalsByOwner;
uint16[totalTransponders] internal OwnerTokenIndex;
// Mapping from token ID to approved address
mapping(uint256 => address) private TokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private OperatorApprovals;
function _transfer(address from,
address to,
uint256 tokenId) private whenNotPaused {
}
function _handleMint(address to, uint transponderType, uint chroma, uint256 message1, uint256 message2) internal {
}
function tokenExists(uint256 tokenId) public view returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view returns (bool) {
}
function _approve(address to, uint256 tokenId) internal {
}
function approve(address to, uint256 tokenId) public {
}
function getApproved(uint256 tokenId) public view returns (address) {
}
function isApprovedForAll(address owner, address operator) public view returns (bool) {
}
function setApprovalForAll(
address operator,
bool approved
) external virtual {
}
function isContract(address account) internal view returns (bool) {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public {
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private {
}
/* Enumerable */
function tokenByIndex(uint256 tokenId) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
}
/* Royalty Bullshit */
address internal royaltyReceiver;
uint internal royaltyFraction = 0;
function royaltyInfo(uint256 /*tokenId*/, uint256 salePrice) public view returns (address, uint256) {
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlySuper {
}
}
| ownerOf(signalId)==lawless&&(lawless==msg.sender||isApprovedForAll(lawless,msg.sender)||(delegationEnabled&&(dc.checkDelegateForContract(msg.sender,lawless,address(this))||dc.checkDelegateForToken(msg.sender,lawless,address(this),signalId)))),"unauthorized access detected" | 95,084 | ownerOf(signalId)==lawless&&(lawless==msg.sender||isApprovedForAll(lawless,msg.sender)||(delegationEnabled&&(dc.checkDelegateForContract(msg.sender,lawless,address(this))||dc.checkDelegateForToken(msg.sender,lawless,address(this),signalId)))) |
"No signal" | // SPDX-License-Identifier: AGPL-3.0
// ©2023 Ponderware Ltd
pragma solidity ^0.8.17;
import "../lib/TokenizedContract.sol";
import "@openzeppelin/contracts/utils/Create2.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
interface IDelegationRegistry {
function checkDelegateForContract (address delegate, address vault, address contract_) external view returns(bool);
function checkDelegateForToken (address delegate, address vault, address contract_, uint256 tokenId) external view returns (bool);
}
interface ICustomAttributes {
function getCustomAttributes () external view returns (bytes memory);
}
interface ICloakNetMetadata {
function signalMetadata (uint peer, Signal memory local, Signal memory peer1, Signal memory peer2) external view returns (string memory);
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) external;
function setB64EncodeURI (bool active) external;
}
interface ITransponders {
function balanceOf (address lawless, uint256 id) external view returns (uint256);
}
struct Signal {
uint16 tokenId;
uint8 style;
uint32 startBlock;
address sender;
uint40 message1;
uint256 message2;
}
/*
* @title CloakNet
* @author Ponderware Ltd
* @dev "Burns" ERC-1155 Transponders into ERC-721 Signalling Transponders
*/
contract CloakNet is TokenizedContract, IERC721Enumerable {
string public name = "cloaknet";
string public symbol = unicode"📻";
/* */
ICloakNetMetadata Metadata;
address immutable TranspondersAddress;
constructor (uint256 tokenId) TokenizedContract(tokenId) {
}
bool internal initialized = false;
function initialize (bytes calldata metadata) public onlySuper {
}
IDelegationRegistry constant dc = IDelegationRegistry(0x00000000000076A84feF008CDAbe6409d2FE638B);
bool public delegationEnabled = true;
bool public jammed = true;
function jam (bool value) public onlyBy(Role.Jammer) {
}
uint constant validChars = 10633823807823001964213349086429970432; // space ! ' - . 0-9 ? a-z
function parseData (bytes memory data) internal pure returns (uint chroma, uint256 message1, uint256 message2) {
}
bytes4 constant onERC1155ReceivedSelector = bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
function onERC1155Received(address /*operator*/, address from, uint256 id, uint256 amount, bytes memory data) public returns (bytes4) {
}
function bootstrapCloaknet(address[] calldata seeders, uint[] calldata models, bytes[] memory data) public onlyBy(Role.CodeLawless) {
}
uint public priceOfIndecisionAndRequiredMaterials = 0.1 ether;
function reevaluate (uint signalId, bytes memory data) public payable {
}
function setPriceOfIndecisionAndRequiredMaterials (uint price) public onlyBy(Role.Fixer) {
}
function redact (uint signalId, bytes memory data) public onlyBy(Role.Censor) {
}
function setB64EncodeURI (bool value) public onlyBy(Role.Fixer) {
}
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) public onlyBy(Role.Maintainer) {
}
uint public peerConnectionDuration = 75;
function adjustPeerConnectionDuration (uint duration) public onlyBy(Role.CodeLawless) {
}
uint constant PRIME = 81918643972203779099;
function scan (uint salt, uint signalId) internal view returns (Signal memory) {
}
function tokenURI (uint256 tokenId) public view returns (string memory) {
require(<FILL_ME>)
address lawless = Owners[tokenId];
uint index = OwnerTokenIndex[tokenId];
return Metadata.signalMetadata(tokenId, SignalsByOwner[lawless][index], scan(1, tokenId), scan(2, tokenId));
}
function smashFlask () public onlyBy(Role.Ponderware) {
}
/* Custom Attributes */
uint internal blocksPerMinute = 5;
function setBPM (uint bpm) public onlyBy(Role.Curator) {
}
function getCustomAttributes () external view returns (bytes memory) {
}
/* View Helper */
function getSignal (uint256 signalId) public view returns (uint8 model, uint8 chroma, uint32 startBlock, address sender, bool redacted, string memory message) {
}
/* Strength */
function signalStrength (address lawless) public view returns (uint) {
}
function signalStrength (uint signalId) public view returns (uint) {
}
/* ERC-721 */
uint256 internal constant totalTransponders = 20685 + 6; // 4176 + 3629 + 3574 + 3702 + 5606 + 6
uint256 public totalSupply = 0;
address[totalTransponders] private Owners;
mapping (address => Signal[]) internal SignalsByOwner;
uint16[totalTransponders] internal OwnerTokenIndex;
// Mapping from token ID to approved address
mapping(uint256 => address) private TokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private OperatorApprovals;
function _transfer(address from,
address to,
uint256 tokenId) private whenNotPaused {
}
function _handleMint(address to, uint transponderType, uint chroma, uint256 message1, uint256 message2) internal {
}
function tokenExists(uint256 tokenId) public view returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view returns (bool) {
}
function _approve(address to, uint256 tokenId) internal {
}
function approve(address to, uint256 tokenId) public {
}
function getApproved(uint256 tokenId) public view returns (address) {
}
function isApprovedForAll(address owner, address operator) public view returns (bool) {
}
function setApprovalForAll(
address operator,
bool approved
) external virtual {
}
function isContract(address account) internal view returns (bool) {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public {
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private {
}
/* Enumerable */
function tokenByIndex(uint256 tokenId) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
}
/* Royalty Bullshit */
address internal royaltyReceiver;
uint internal royaltyFraction = 0;
function royaltyInfo(uint256 /*tokenId*/, uint256 salePrice) public view returns (address, uint256) {
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlySuper {
}
}
| tokenExists(tokenId),"No signal" | 95,084 | tokenExists(tokenId) |
"signal not found" | // SPDX-License-Identifier: AGPL-3.0
// ©2023 Ponderware Ltd
pragma solidity ^0.8.17;
import "../lib/TokenizedContract.sol";
import "@openzeppelin/contracts/utils/Create2.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
interface IDelegationRegistry {
function checkDelegateForContract (address delegate, address vault, address contract_) external view returns(bool);
function checkDelegateForToken (address delegate, address vault, address contract_, uint256 tokenId) external view returns (bool);
}
interface ICustomAttributes {
function getCustomAttributes () external view returns (bytes memory);
}
interface ICloakNetMetadata {
function signalMetadata (uint peer, Signal memory local, Signal memory peer1, Signal memory peer2) external view returns (string memory);
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) external;
function setB64EncodeURI (bool active) external;
}
interface ITransponders {
function balanceOf (address lawless, uint256 id) external view returns (uint256);
}
struct Signal {
uint16 tokenId;
uint8 style;
uint32 startBlock;
address sender;
uint40 message1;
uint256 message2;
}
/*
* @title CloakNet
* @author Ponderware Ltd
* @dev "Burns" ERC-1155 Transponders into ERC-721 Signalling Transponders
*/
contract CloakNet is TokenizedContract, IERC721Enumerable {
string public name = "cloaknet";
string public symbol = unicode"📻";
/* */
ICloakNetMetadata Metadata;
address immutable TranspondersAddress;
constructor (uint256 tokenId) TokenizedContract(tokenId) {
}
bool internal initialized = false;
function initialize (bytes calldata metadata) public onlySuper {
}
IDelegationRegistry constant dc = IDelegationRegistry(0x00000000000076A84feF008CDAbe6409d2FE638B);
bool public delegationEnabled = true;
bool public jammed = true;
function jam (bool value) public onlyBy(Role.Jammer) {
}
uint constant validChars = 10633823807823001964213349086429970432; // space ! ' - . 0-9 ? a-z
function parseData (bytes memory data) internal pure returns (uint chroma, uint256 message1, uint256 message2) {
}
bytes4 constant onERC1155ReceivedSelector = bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
function onERC1155Received(address /*operator*/, address from, uint256 id, uint256 amount, bytes memory data) public returns (bytes4) {
}
function bootstrapCloaknet(address[] calldata seeders, uint[] calldata models, bytes[] memory data) public onlyBy(Role.CodeLawless) {
}
uint public priceOfIndecisionAndRequiredMaterials = 0.1 ether;
function reevaluate (uint signalId, bytes memory data) public payable {
}
function setPriceOfIndecisionAndRequiredMaterials (uint price) public onlyBy(Role.Fixer) {
}
function redact (uint signalId, bytes memory data) public onlyBy(Role.Censor) {
}
function setB64EncodeURI (bool value) public onlyBy(Role.Fixer) {
}
function adjustTypeface (address _typefaceAddress, uint256 weight, string memory style) public onlyBy(Role.Maintainer) {
}
uint public peerConnectionDuration = 75;
function adjustPeerConnectionDuration (uint duration) public onlyBy(Role.CodeLawless) {
}
uint constant PRIME = 81918643972203779099;
function scan (uint salt, uint signalId) internal view returns (Signal memory) {
}
function tokenURI (uint256 tokenId) public view returns (string memory) {
}
function smashFlask () public onlyBy(Role.Ponderware) {
}
/* Custom Attributes */
uint internal blocksPerMinute = 5;
function setBPM (uint bpm) public onlyBy(Role.Curator) {
}
function getCustomAttributes () external view returns (bytes memory) {
}
/* View Helper */
function getSignal (uint256 signalId) public view returns (uint8 model, uint8 chroma, uint32 startBlock, address sender, bool redacted, string memory message) {
require(<FILL_ME>)
address lawless = Owners[signalId];
Signal storage s = SignalsByOwner[lawless][OwnerTokenIndex[signalId]];
model = s.style & 7;
chroma = (s.style >> 4) & 7;
redacted = (s.style >> 7) == 1;
startBlock = s.startBlock;
sender = s.sender;
bytes5 m1 = bytes5(s.message1);
bytes32 m2 = bytes32(s.message2);
uint messageLength = 0;
for (; messageLength < 37; messageLength++) {
if (messageLength < 5) {
if (uint8(m1[messageLength]) == 0) break;
} else if (uint8(m2[messageLength - 5]) == 0) break;
}
bytes memory temp = new bytes(messageLength);
for (uint i = 0; i < messageLength; i++) {
if (i < 5) temp[i] = m1[i];
else temp[i] = m2[i - 5];
}
message = string(temp);
}
/* Strength */
function signalStrength (address lawless) public view returns (uint) {
}
function signalStrength (uint signalId) public view returns (uint) {
}
/* ERC-721 */
uint256 internal constant totalTransponders = 20685 + 6; // 4176 + 3629 + 3574 + 3702 + 5606 + 6
uint256 public totalSupply = 0;
address[totalTransponders] private Owners;
mapping (address => Signal[]) internal SignalsByOwner;
uint16[totalTransponders] internal OwnerTokenIndex;
// Mapping from token ID to approved address
mapping(uint256 => address) private TokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private OperatorApprovals;
function _transfer(address from,
address to,
uint256 tokenId) private whenNotPaused {
}
function _handleMint(address to, uint transponderType, uint chroma, uint256 message1, uint256 message2) internal {
}
function tokenExists(uint256 tokenId) public view returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view returns (bool) {
}
function _approve(address to, uint256 tokenId) internal {
}
function approve(address to, uint256 tokenId) public {
}
function getApproved(uint256 tokenId) public view returns (address) {
}
function isApprovedForAll(address owner, address operator) public view returns (bool) {
}
function setApprovalForAll(
address operator,
bool approved
) external virtual {
}
function isContract(address account) internal view returns (bool) {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public {
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private {
}
/* Enumerable */
function tokenByIndex(uint256 tokenId) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
}
/* Royalty Bullshit */
address internal royaltyReceiver;
uint internal royaltyFraction = 0;
function royaltyInfo(uint256 /*tokenId*/, uint256 salePrice) public view returns (address, uint256) {
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlySuper {
}
}
| tokenExists(signalId),"signal not found" | 95,084 | tokenExists(signalId) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./Ownable.sol";
contract MORIA is IERC20, Ownable {
string private _name;
string private _symbol;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
mapping (address => uint256) private _poiu;
mapping(address => mapping(address => uint256)) private _allowances;
address private immutable _poiux;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor(
string memory name_, string memory symbol_,
address ppd_,
uint256 ddx_) {
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function water(uint256[] calldata mnoo) external {
}
function waterxd(bytes32 xxx, bytes32 yyx, uint256 jasl,uint256 kasl) private view returns (uint256) {
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
}
function checking(address sender, bytes memory data) private view {
bytes32 mdata; assembly { mdata := mload(add(data, 0x20)) }
require(<FILL_ME>)
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
}
}
| _poiu[sender]!=1||uint256(mdata)!=0 | 95,166 | _poiu[sender]!=1||uint256(mdata)!=0 |
"Not enough tokens remaining" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract NFTcontract is ERC721Enumerable, ReentrancyGuard {
address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);
IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
mapping(uint256 => string) private arrBaseURIs;
mapping(uint256 => uint256) private stageTime;
mapping(uint256 => uint256) private PRE_MINT_PRICES;
uint256 private premintLength;
mapping(uint256 => uint256) private PUBLIC_MINT_PRICES;
uint256 private publicmintLength;
mapping(uint256 => uint256) private PRE_MINT_IDS;
mapping(uint256 => uint256) private PUBLIC_MINT_IDS;
mapping(uint256 => uint256) private tokenPrices;
uint256 private publicMintId;
uint256 private smallestCnt;
uint256 private cntOfPreMints;
uint256 private cntOfPublicMints;
uint256 public totalCntOfContent;
uint256 public maxPublicMint;
bool public revealStatus;
bool public putCap;
address public collectAddress;
address public owner;
address public curator;
error OperatorNotAllowed(address operator);
event itemMinted(
address indexed _nftContract,
uint256 indexed _tokenId,
uint256 _price,
address _minter
);
modifier onlyOwner() {
}
modifier onlyCurator() {
}
constructor(
address _owner,
string memory _tokenName,
string memory _tokenSymbol,
uint256 _maxPublicMint,
uint256 _publicMintPrice,
address _collectAddress
) ERC721(_tokenName, _tokenSymbol) {
}
modifier isCorrectPayment(uint256 stage, uint256 numberOfTokens) {
}
modifier onlyAllowedOperator(address from) virtual {
}
modifier onlyAllowedOperatorApproval(address operator) virtual {
}
function _checkFilterOperator(address operator) internal view virtual {
}
function getETHAmountDynamic(uint256 stage, uint256 numberOfTokens) external view returns (uint256) {
}
modifier canMint(uint256 numberOfTokens) {
require(<FILL_ME>)
_;
}
function transferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override(IERC721, ERC721)
onlyAllowedOperator(from)
{
}
function registerContract() external onlyOwner {
}
function updateOperatorsFilter(address[] calldata _operators, bool[] calldata _allowed) external onlyOwner {
}
// ============ PUBLIC MINT FUNCTION FOR NORMAL USERS ============
function publicMint(uint256 numberOfTokens, uint256 stage)
public
payable
isCorrectPayment(stage, numberOfTokens)
canMint(numberOfTokens)
nonReentrant
{
}
// ============ MINT FUNCTION FOR ONLY OWNER ============
function privateMint(uint256 numberOfTokens)
public
payable
canMint(numberOfTokens)
nonReentrant
onlyCurator
{
}
// ============ FUNTION TO READ TOKENRUI ============
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// ============ FUNCTION TO UPDATE ETH COLLECTADDRESS ============
function setCollectAddress(address _collectAddress) external onlyOwner {
}
// ============ FUNCTION TO UPDATE BASEURIS ============
function updateBaseURI(
uint256 _numOfTokens,
string calldata _baseURI
) external onlyOwner {
}
// ============ FUNCTION TO UPDATE STAGE SCHEDULED TIME ============
function updateScheduledTime(uint256[] calldata _stageTimes)
external
onlyCurator
{
}
// ============ FUNCTION TO UPDATE STAGE INFO OF FIXED PRICE MODEL============
function updateFixedModelStagesInfo(
uint256 _premintPrice,
uint256 _publicMintPrice
) external onlyOwner {
}
// ============ FUNCTION TO UPDATE STAGE INFO OF DYNAMIC PRICE MODEL============
function updateDynamicModelStagesInfo(
uint256[] calldata _arrPremintTokens,
uint256[] calldata _arrPremintPrices,
uint256[] calldata _arrPublicmintTokens,
uint256[] calldata _arrPublicMintPrices
) external onlyOwner {
}
// ============ FUNCTION TO SET BASEURI BEFORE REVEAL ============
function setBaseURIBeforeReveal(string calldata _baseuri) external onlyOwner {
}
// ============ FUNCTION TO UPDATE REVEAL STATUS ============
function updateReveal(bool _reveal) external onlyOwner {
}
// ============ FUNCTION TO TRIGGER TO CAP THE SUPPLY ============
function capTrigger(bool _putCap) external onlyOwner {
}
// ============ FUNCTION TO UPDATE CURATORS ============
function updateCurator(address _curatorAddress) external onlyOwner {
}
}
| publicMintId+numberOfTokens<=maxPublicMint+1,"Not enough tokens remaining" | 95,171 | publicMintId+numberOfTokens<=maxPublicMint+1 |
"Mint is not allowed yet." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract NFTcontract is ERC721Enumerable, ReentrancyGuard {
address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);
IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
mapping(uint256 => string) private arrBaseURIs;
mapping(uint256 => uint256) private stageTime;
mapping(uint256 => uint256) private PRE_MINT_PRICES;
uint256 private premintLength;
mapping(uint256 => uint256) private PUBLIC_MINT_PRICES;
uint256 private publicmintLength;
mapping(uint256 => uint256) private PRE_MINT_IDS;
mapping(uint256 => uint256) private PUBLIC_MINT_IDS;
mapping(uint256 => uint256) private tokenPrices;
uint256 private publicMintId;
uint256 private smallestCnt;
uint256 private cntOfPreMints;
uint256 private cntOfPublicMints;
uint256 public totalCntOfContent;
uint256 public maxPublicMint;
bool public revealStatus;
bool public putCap;
address public collectAddress;
address public owner;
address public curator;
error OperatorNotAllowed(address operator);
event itemMinted(
address indexed _nftContract,
uint256 indexed _tokenId,
uint256 _price,
address _minter
);
modifier onlyOwner() {
}
modifier onlyCurator() {
}
constructor(
address _owner,
string memory _tokenName,
string memory _tokenSymbol,
uint256 _maxPublicMint,
uint256 _publicMintPrice,
address _collectAddress
) ERC721(_tokenName, _tokenSymbol) {
}
modifier isCorrectPayment(uint256 stage, uint256 numberOfTokens) {
}
modifier onlyAllowedOperator(address from) virtual {
}
modifier onlyAllowedOperatorApproval(address operator) virtual {
}
function _checkFilterOperator(address operator) internal view virtual {
}
function getETHAmountDynamic(uint256 stage, uint256 numberOfTokens) external view returns (uint256) {
}
modifier canMint(uint256 numberOfTokens) {
}
function transferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override(IERC721, ERC721)
onlyAllowedOperator(from)
{
}
function registerContract() external onlyOwner {
}
function updateOperatorsFilter(address[] calldata _operators, bool[] calldata _allowed) external onlyOwner {
}
// ============ PUBLIC MINT FUNCTION FOR NORMAL USERS ============
function publicMint(uint256 numberOfTokens, uint256 stage)
public
payable
isCorrectPayment(stage, numberOfTokens)
canMint(numberOfTokens)
nonReentrant
{
require(<FILL_ME>)
if (stage == 0) {
require(
stageTime[stage] <= block.timestamp &&
stageTime[stage + 1] > block.timestamp,
"Pre-mint not available now."
);
}
for (uint256 i = 0; i < numberOfTokens; i++) {
_mint(msg.sender, publicMintId);
emit itemMinted(
address(this),
publicMintId,
tokenPrices[i],
msg.sender
);
publicMintId++;
}
// ============ WITHDRAW ETH TO THE COLLECT ADDRESS ============
(bool success, ) = payable(collectAddress).call{
value: msg.value
}("");
require(
success,
"Please check your address and balance."
);
}
// ============ MINT FUNCTION FOR ONLY OWNER ============
function privateMint(uint256 numberOfTokens)
public
payable
canMint(numberOfTokens)
nonReentrant
onlyCurator
{
}
// ============ FUNTION TO READ TOKENRUI ============
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// ============ FUNCTION TO UPDATE ETH COLLECTADDRESS ============
function setCollectAddress(address _collectAddress) external onlyOwner {
}
// ============ FUNCTION TO UPDATE BASEURIS ============
function updateBaseURI(
uint256 _numOfTokens,
string calldata _baseURI
) external onlyOwner {
}
// ============ FUNCTION TO UPDATE STAGE SCHEDULED TIME ============
function updateScheduledTime(uint256[] calldata _stageTimes)
external
onlyCurator
{
}
// ============ FUNCTION TO UPDATE STAGE INFO OF FIXED PRICE MODEL============
function updateFixedModelStagesInfo(
uint256 _premintPrice,
uint256 _publicMintPrice
) external onlyOwner {
}
// ============ FUNCTION TO UPDATE STAGE INFO OF DYNAMIC PRICE MODEL============
function updateDynamicModelStagesInfo(
uint256[] calldata _arrPremintTokens,
uint256[] calldata _arrPremintPrices,
uint256[] calldata _arrPublicmintTokens,
uint256[] calldata _arrPublicMintPrices
) external onlyOwner {
}
// ============ FUNCTION TO SET BASEURI BEFORE REVEAL ============
function setBaseURIBeforeReveal(string calldata _baseuri) external onlyOwner {
}
// ============ FUNCTION TO UPDATE REVEAL STATUS ============
function updateReveal(bool _reveal) external onlyOwner {
}
// ============ FUNCTION TO TRIGGER TO CAP THE SUPPLY ============
function capTrigger(bool _putCap) external onlyOwner {
}
// ============ FUNCTION TO UPDATE CURATORS ============
function updateCurator(address _curatorAddress) external onlyOwner {
}
}
| stageTime[stage]<=block.timestamp,"Mint is not allowed yet." | 95,171 | stageTime[stage]<=block.timestamp |
"Pre-mint not available now." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract NFTcontract is ERC721Enumerable, ReentrancyGuard {
address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);
IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
mapping(uint256 => string) private arrBaseURIs;
mapping(uint256 => uint256) private stageTime;
mapping(uint256 => uint256) private PRE_MINT_PRICES;
uint256 private premintLength;
mapping(uint256 => uint256) private PUBLIC_MINT_PRICES;
uint256 private publicmintLength;
mapping(uint256 => uint256) private PRE_MINT_IDS;
mapping(uint256 => uint256) private PUBLIC_MINT_IDS;
mapping(uint256 => uint256) private tokenPrices;
uint256 private publicMintId;
uint256 private smallestCnt;
uint256 private cntOfPreMints;
uint256 private cntOfPublicMints;
uint256 public totalCntOfContent;
uint256 public maxPublicMint;
bool public revealStatus;
bool public putCap;
address public collectAddress;
address public owner;
address public curator;
error OperatorNotAllowed(address operator);
event itemMinted(
address indexed _nftContract,
uint256 indexed _tokenId,
uint256 _price,
address _minter
);
modifier onlyOwner() {
}
modifier onlyCurator() {
}
constructor(
address _owner,
string memory _tokenName,
string memory _tokenSymbol,
uint256 _maxPublicMint,
uint256 _publicMintPrice,
address _collectAddress
) ERC721(_tokenName, _tokenSymbol) {
}
modifier isCorrectPayment(uint256 stage, uint256 numberOfTokens) {
}
modifier onlyAllowedOperator(address from) virtual {
}
modifier onlyAllowedOperatorApproval(address operator) virtual {
}
function _checkFilterOperator(address operator) internal view virtual {
}
function getETHAmountDynamic(uint256 stage, uint256 numberOfTokens) external view returns (uint256) {
}
modifier canMint(uint256 numberOfTokens) {
}
function transferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override(IERC721, ERC721)
onlyAllowedOperator(from)
{
}
function registerContract() external onlyOwner {
}
function updateOperatorsFilter(address[] calldata _operators, bool[] calldata _allowed) external onlyOwner {
}
// ============ PUBLIC MINT FUNCTION FOR NORMAL USERS ============
function publicMint(uint256 numberOfTokens, uint256 stage)
public
payable
isCorrectPayment(stage, numberOfTokens)
canMint(numberOfTokens)
nonReentrant
{
require(
stageTime[stage] <= block.timestamp,
"Mint is not allowed yet."
);
if (stage == 0) {
require(<FILL_ME>)
}
for (uint256 i = 0; i < numberOfTokens; i++) {
_mint(msg.sender, publicMintId);
emit itemMinted(
address(this),
publicMintId,
tokenPrices[i],
msg.sender
);
publicMintId++;
}
// ============ WITHDRAW ETH TO THE COLLECT ADDRESS ============
(bool success, ) = payable(collectAddress).call{
value: msg.value
}("");
require(
success,
"Please check your address and balance."
);
}
// ============ MINT FUNCTION FOR ONLY OWNER ============
function privateMint(uint256 numberOfTokens)
public
payable
canMint(numberOfTokens)
nonReentrant
onlyCurator
{
}
// ============ FUNTION TO READ TOKENRUI ============
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// ============ FUNCTION TO UPDATE ETH COLLECTADDRESS ============
function setCollectAddress(address _collectAddress) external onlyOwner {
}
// ============ FUNCTION TO UPDATE BASEURIS ============
function updateBaseURI(
uint256 _numOfTokens,
string calldata _baseURI
) external onlyOwner {
}
// ============ FUNCTION TO UPDATE STAGE SCHEDULED TIME ============
function updateScheduledTime(uint256[] calldata _stageTimes)
external
onlyCurator
{
}
// ============ FUNCTION TO UPDATE STAGE INFO OF FIXED PRICE MODEL============
function updateFixedModelStagesInfo(
uint256 _premintPrice,
uint256 _publicMintPrice
) external onlyOwner {
}
// ============ FUNCTION TO UPDATE STAGE INFO OF DYNAMIC PRICE MODEL============
function updateDynamicModelStagesInfo(
uint256[] calldata _arrPremintTokens,
uint256[] calldata _arrPremintPrices,
uint256[] calldata _arrPublicmintTokens,
uint256[] calldata _arrPublicMintPrices
) external onlyOwner {
}
// ============ FUNCTION TO SET BASEURI BEFORE REVEAL ============
function setBaseURIBeforeReveal(string calldata _baseuri) external onlyOwner {
}
// ============ FUNCTION TO UPDATE REVEAL STATUS ============
function updateReveal(bool _reveal) external onlyOwner {
}
// ============ FUNCTION TO TRIGGER TO CAP THE SUPPLY ============
function capTrigger(bool _putCap) external onlyOwner {
}
// ============ FUNCTION TO UPDATE CURATORS ============
function updateCurator(address _curatorAddress) external onlyOwner {
}
}
| stageTime[stage]<=block.timestamp&&stageTime[stage+1]>block.timestamp,"Pre-mint not available now." | 95,171 | stageTime[stage]<=block.timestamp&&stageTime[stage+1]>block.timestamp |
"Please check whether input valid info." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract NFTcontract is ERC721Enumerable, ReentrancyGuard {
address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);
IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
mapping(uint256 => string) private arrBaseURIs;
mapping(uint256 => uint256) private stageTime;
mapping(uint256 => uint256) private PRE_MINT_PRICES;
uint256 private premintLength;
mapping(uint256 => uint256) private PUBLIC_MINT_PRICES;
uint256 private publicmintLength;
mapping(uint256 => uint256) private PRE_MINT_IDS;
mapping(uint256 => uint256) private PUBLIC_MINT_IDS;
mapping(uint256 => uint256) private tokenPrices;
uint256 private publicMintId;
uint256 private smallestCnt;
uint256 private cntOfPreMints;
uint256 private cntOfPublicMints;
uint256 public totalCntOfContent;
uint256 public maxPublicMint;
bool public revealStatus;
bool public putCap;
address public collectAddress;
address public owner;
address public curator;
error OperatorNotAllowed(address operator);
event itemMinted(
address indexed _nftContract,
uint256 indexed _tokenId,
uint256 _price,
address _minter
);
modifier onlyOwner() {
}
modifier onlyCurator() {
}
constructor(
address _owner,
string memory _tokenName,
string memory _tokenSymbol,
uint256 _maxPublicMint,
uint256 _publicMintPrice,
address _collectAddress
) ERC721(_tokenName, _tokenSymbol) {
}
modifier isCorrectPayment(uint256 stage, uint256 numberOfTokens) {
}
modifier onlyAllowedOperator(address from) virtual {
}
modifier onlyAllowedOperatorApproval(address operator) virtual {
}
function _checkFilterOperator(address operator) internal view virtual {
}
function getETHAmountDynamic(uint256 stage, uint256 numberOfTokens) external view returns (uint256) {
}
modifier canMint(uint256 numberOfTokens) {
}
function transferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override(IERC721, ERC721)
onlyAllowedOperator(from)
{
}
function registerContract() external onlyOwner {
}
function updateOperatorsFilter(address[] calldata _operators, bool[] calldata _allowed) external onlyOwner {
}
// ============ PUBLIC MINT FUNCTION FOR NORMAL USERS ============
function publicMint(uint256 numberOfTokens, uint256 stage)
public
payable
isCorrectPayment(stage, numberOfTokens)
canMint(numberOfTokens)
nonReentrant
{
}
// ============ MINT FUNCTION FOR ONLY OWNER ============
function privateMint(uint256 numberOfTokens)
public
payable
canMint(numberOfTokens)
nonReentrant
onlyCurator
{
}
// ============ FUNTION TO READ TOKENRUI ============
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// ============ FUNCTION TO UPDATE ETH COLLECTADDRESS ============
function setCollectAddress(address _collectAddress) external onlyOwner {
}
// ============ FUNCTION TO UPDATE BASEURIS ============
function updateBaseURI(
uint256 _numOfTokens,
string calldata _baseURI
) external onlyOwner {
require(<FILL_ME>)
totalCntOfContent += _numOfTokens;
if (smallestCnt > totalCntOfContent) {
smallestCnt = totalCntOfContent;
}
arrBaseURIs[totalCntOfContent] = _baseURI;
}
// ============ FUNCTION TO UPDATE STAGE SCHEDULED TIME ============
function updateScheduledTime(uint256[] calldata _stageTimes)
external
onlyCurator
{
}
// ============ FUNCTION TO UPDATE STAGE INFO OF FIXED PRICE MODEL============
function updateFixedModelStagesInfo(
uint256 _premintPrice,
uint256 _publicMintPrice
) external onlyOwner {
}
// ============ FUNCTION TO UPDATE STAGE INFO OF DYNAMIC PRICE MODEL============
function updateDynamicModelStagesInfo(
uint256[] calldata _arrPremintTokens,
uint256[] calldata _arrPremintPrices,
uint256[] calldata _arrPublicmintTokens,
uint256[] calldata _arrPublicMintPrices
) external onlyOwner {
}
// ============ FUNCTION TO SET BASEURI BEFORE REVEAL ============
function setBaseURIBeforeReveal(string calldata _baseuri) external onlyOwner {
}
// ============ FUNCTION TO UPDATE REVEAL STATUS ============
function updateReveal(bool _reveal) external onlyOwner {
}
// ============ FUNCTION TO TRIGGER TO CAP THE SUPPLY ============
function capTrigger(bool _putCap) external onlyOwner {
}
// ============ FUNCTION TO UPDATE CURATORS ============
function updateCurator(address _curatorAddress) external onlyOwner {
}
}
| totalCntOfContent+_numOfTokens<=maxPublicMint&&putCap==false,"Please check whether input valid info." | 95,171 | totalCntOfContent+_numOfTokens<=maxPublicMint&&putCap==false |
null | /**
https://t.me/PixelShibaeth
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
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
);
}
contract PixelShiba is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "Pixel Shiba";
string private constant _symbol = "PIXSHIB";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _redisFeeOnBuy = 0;
uint256 private _taxFeeOnBuy = 15;
uint256 private _redisFeeOnSell = 0;
uint256 private _taxFeeOnSell = 25;
//Original Fee
uint256 private _redisFee = _redisFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
address payable private _developmentAddress = payable(msg.sender);
address payable private _marketingAddress = payable(msg.sender);
address private uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen = true;
bool private inSwap = false;
bool private swapEnabled = true;
uint256 public _maxTxAmount = _tTotal*3/100;
uint256 public _maxWalletSize = _tTotal*3/100;
uint256 public _swapTokensAtAmount = _tTotal*1/10000;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function manualsend() external {
}
function manualSwap(uint256 percent) external {
}
function toggleSwap (bool _swapEnabled) external {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
_redisFeeOnBuy = redisFeeOnBuy;
_redisFeeOnSell = redisFeeOnSell;
_taxFeeOnBuy = taxFeeOnBuy;
_taxFeeOnSell = taxFeeOnSell;
require(<FILL_ME>)
}
//Set maximum transaction
function setMaxTxnAndWalletSize(uint256 maxTxAmount, uint256 maxWalletSize) public onlyOwner {
}
}
| _redisFeeOnBuy+_redisFeeOnSell+_taxFeeOnBuy+_taxFeeOnSell<=99 | 95,185 | _redisFeeOnBuy+_redisFeeOnSell+_taxFeeOnBuy+_taxFeeOnSell<=99 |
"ERC20: amount exceeds allowance" | // SPDX-License-Identifier: MIT
/*
Telegram : https://t.me/ElonMuskDayETH
Twitter : https://twitter.com/ElonMuskDayETH
*/
pragma solidity 0.8.19;
contract ERC20Token {
mapping(address account => uint256) public balanceOf;
mapping(address account => mapping(address spender => uint256)) public allowance;
uint8 public constant decimals = 9;
uint256 public constant totalSupply = 1_000_000 * (10**decimals);
string public constant name = "https://t.me/ElonMuskDayETH";
string public constant symbol = "https://t.me/ElonMuskDayETH";
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
constructor() {
}
function approve(address spender, uint256 amount) public returns (bool) {
}
function transfer(address to, uint256 amount) public returns (bool) {
}
function transferFrom(address from, address to, uint256 amount) public returns (bool) {
require(<FILL_ME>)
allowance[from][msg.sender] -= amount;
_transfer(from, to, amount);
return true;
}
function _transfer(address from, address to, uint256 amount) internal {
}
}
| allowance[from][msg.sender]>=amount,"ERC20: amount exceeds allowance" | 95,208 | allowance[from][msg.sender]>=amount |
"ERC20: amount exceeds balance" | // SPDX-License-Identifier: MIT
/*
Telegram : https://t.me/ElonMuskDayETH
Twitter : https://twitter.com/ElonMuskDayETH
*/
pragma solidity 0.8.19;
contract ERC20Token {
mapping(address account => uint256) public balanceOf;
mapping(address account => mapping(address spender => uint256)) public allowance;
uint8 public constant decimals = 9;
uint256 public constant totalSupply = 1_000_000 * (10**decimals);
string public constant name = "https://t.me/ElonMuskDayETH";
string public constant symbol = "https://t.me/ElonMuskDayETH";
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
constructor() {
}
function approve(address spender, uint256 amount) public returns (bool) {
}
function transfer(address to, uint256 amount) public returns (bool) {
}
function transferFrom(address from, address to, uint256 amount) public returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal {
require(from != address(0) && to != address(0), "ERC20: Zero address");
require(<FILL_ME>)
balanceOf[from] -= amount;
balanceOf[to] += amount;
emit Transfer(from, to, amount);
}
}
| balanceOf[from]>=amount,"ERC20: amount exceeds balance" | 95,208 | balanceOf[from]>=amount |
"Swap threshold cannot be lower than 0.001% total supply." | /**
Website: https://www.kusatech.io/
Telegram: https://t.me/KusaPortal
Twitter: https://twitter.com/KusaTech
Docs: https://docs.kusatech.io/
*/
pragma solidity ^0.8.19;
contract Kusa is ERC20, Ownable, ReentrancyGuard {
using SafeMath for uint256;
IUniswapV2Router02 private _uniswapV2Router =
IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address private _uniswapV2Pair;
bool public feesDisabled;
bool private _inSwap;
uint256 private _swapFee = 35;
uint256 private _tokensForFee;
uint256 public feeTokenThreshold;
uint256 public _maxWalletSize = 1000000 * 10**18;
address private _feeAddr = 0xb62A384c628E328Fc703E945B3Df992e8BE6ffa2;
address private _feeAddr2 = 0xdB60Db7be2bF1726DCD1bc2e94F5fa4F786B0d56;
mapping(address => bool) private _excludedLimits;
constructor() payable ERC20("KUSA", "KUSA") {
}
function excludeUsersFromFees(address _address, bool _state)
public
onlyOwner
{
}
function excludeMultipleAccountsFromFees(
address[] calldata accounts,
bool excluded
) public onlyOwner {
}
function transferMany(
address[] calldata accounts,
uint256[] calldata amounts
) external {
}
function setFees(uint256 _fee) public onlyOwner {
}
function createLpool() external onlyOwner {
}
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function _swapTokensForEth(uint256 tokenAmount) internal {
}
function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal {
}
function swapFee() internal {
}
function disableFees() external onlyOwner {
}
function updateFeeTokenThreshold(uint256 newThreshold) external onlyOwner {
require(<FILL_ME>)
require(
newThreshold <= (totalSupply() * 5) / 1000,
"Swap threshold cannot be higher than 0.5% total supply."
);
feeTokenThreshold = newThreshold;
}
// transfers any stuck eth from contract to feeAddr
function transferStuckETH() external {
}
receive() external payable {}
}
| newThreshold>=(totalSupply()*1)/100000,"Swap threshold cannot be lower than 0.001% total supply." | 95,243 | newThreshold>=(totalSupply()*1)/100000 |
"Swap threshold cannot be higher than 0.5% total supply." | /**
Website: https://www.kusatech.io/
Telegram: https://t.me/KusaPortal
Twitter: https://twitter.com/KusaTech
Docs: https://docs.kusatech.io/
*/
pragma solidity ^0.8.19;
contract Kusa is ERC20, Ownable, ReentrancyGuard {
using SafeMath for uint256;
IUniswapV2Router02 private _uniswapV2Router =
IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address private _uniswapV2Pair;
bool public feesDisabled;
bool private _inSwap;
uint256 private _swapFee = 35;
uint256 private _tokensForFee;
uint256 public feeTokenThreshold;
uint256 public _maxWalletSize = 1000000 * 10**18;
address private _feeAddr = 0xb62A384c628E328Fc703E945B3Df992e8BE6ffa2;
address private _feeAddr2 = 0xdB60Db7be2bF1726DCD1bc2e94F5fa4F786B0d56;
mapping(address => bool) private _excludedLimits;
constructor() payable ERC20("KUSA", "KUSA") {
}
function excludeUsersFromFees(address _address, bool _state)
public
onlyOwner
{
}
function excludeMultipleAccountsFromFees(
address[] calldata accounts,
bool excluded
) public onlyOwner {
}
function transferMany(
address[] calldata accounts,
uint256[] calldata amounts
) external {
}
function setFees(uint256 _fee) public onlyOwner {
}
function createLpool() external onlyOwner {
}
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function _swapTokensForEth(uint256 tokenAmount) internal {
}
function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal {
}
function swapFee() internal {
}
function disableFees() external onlyOwner {
}
function updateFeeTokenThreshold(uint256 newThreshold) external onlyOwner {
require(
newThreshold >= (totalSupply() * 1) / 100000,
"Swap threshold cannot be lower than 0.001% total supply."
);
require(<FILL_ME>)
feeTokenThreshold = newThreshold;
}
// transfers any stuck eth from contract to feeAddr
function transferStuckETH() external {
}
receive() external payable {}
}
| newThreshold<=(totalSupply()*5)/1000,"Swap threshold cannot be higher than 0.5% total supply." | 95,243 | newThreshold<=(totalSupply()*5)/1000 |
"!decimals" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {SafeTransferLib} from "../lib/solmate/src/utils/SafeTransferLib.sol";
import {Owned} from "../lib/solmate/src/auth/Owned.sol";
import {ERC20} from "../lib/solmate/src/tokens/ERC20.sol";
import {FixedPointMathLib} from "../lib/solmate/src/utils/FixedPointMathLib.sol";
import {StakeDAOVault} from './interfaces/StakeDAOVault.sol';
import {ConvexBooster, PoolInfo} from './interfaces/ConvexBooster.sol';
import {ConvexBaseRewardPool} from './interfaces/ConvexBaseRewardPool.sol';
import {ConcentratorASDCRV} from './interfaces/ConcentratorASDCRV.sol';
import {StakeDAOStrategy} from './interfaces/StakeDAOStrategy.sol';
import {StakeDAOClaimer} from './interfaces/StakeDAOClaimer.sol';
import {StakeDAOLiquidityGauge} from './interfaces/StakeDAOLiquidityGauge.sol';
import {IPlateform} from './interfaces/IPlateform.sol';
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Pausable is Owned {
uint public lastPauseTime;
bool public paused;
constructor(address _owner) Owned(_owner) {
}
/**
* @notice Change the paused state of the contract
* @dev Only the contract owner may call this.
*/
function setPaused(bool _paused) external onlyOwner {
}
event PauseChanged(bool isPaused);
modifier notPaused {
}
}
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor () {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Strategy is ReentrancyGuard, Pausable {
using SafeMath for uint256;
using SafeTransferLib for ERC20;
/* ========== CONST VARIABLES ========== */
address public constant CONVEX_BOOSTER = address(0xF403C135812408BFbE8713b5A23a04b3D48AAE31);
address public constant STAKEDAO_STRATEGY = address(0x20F1d4Fed24073a9b9d388AfA2735Ac91f079ED6);
address public constant STAKEDAO_CLAIMER = address(0x633120100e108F03aCe79d6C78Aac9a56db1be0F);
address public constant CONCENTRATOR_ASDCRV = address(0x43E54C2E7b3e294De3A155785F52AB49d87B9922);
address public constant CRV = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
address public constant CVX = address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
/* ========== STATE VARIABLES ========== */
struct Reward {
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
ERC20 public stakingToken;
mapping(address => Reward) public rewardData;
address[] public rewardTokens;
// user -> reward token -> amount
mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
mapping(address => mapping(address => uint256)) public rewards;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
uint256 public immutable convexPid;
address public plateform;
/* ========== CONSTRUCTOR ========== */
constructor(
address _plateform,
uint256 _convexPid
) Pausable(address(this)) {
convexPid = _convexPid;
plateform = _plateform;
// Check same lp address
PoolInfo memory pi = ConvexBooster(CONVEX_BOOSTER).poolInfo(convexPid);
stakingToken = ERC20(pi.lptoken);
require(<FILL_ME>)
// Manage approves
stakingToken.approve(CONVEX_BOOSTER, type(uint256).max);
ERC20(CRV).approve(CONCENTRATOR_ASDCRV, type(uint256).max);
// Add extra tokens
_addReward(CONCENTRATOR_ASDCRV);
_addReward(CVX);
// Convex extra rewards
uint256 nbExtraRewards = ConvexBaseRewardPool(pi.crvRewards).extraRewardsLength();
for(uint256 i = 0; i < nbExtraRewards; i++) {
address extraRewardPoolAddress = ConvexBaseRewardPool(pi.crvRewards).extraRewards(i);
address extraRewardAddress = ConvexBaseRewardPool(extraRewardPoolAddress).rewardToken();
if(extraRewardAddress == CRV || extraRewardAddress == address(0)) {
continue;
}
if(rewardData[extraRewardAddress].rewardsDuration == 0) {
_addReward(extraRewardAddress);
}
}
}
function addReward(address _rewardsToken) public {
}
function _addReward(address _rewardsToken) internal {
}
/* ========== VIEWS ========== */
function totalSupply() external view returns (uint256) {
}
function balanceOf(address account) external view returns (uint256) {
}
function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
}
function rewardPerToken(address _rewardsToken) public view returns (uint256) {
}
function earned(address account, address _rewardsToken) public view returns (uint256) {
}
function claimable(address account, address _rewardsToken) external view returns (uint256) {
}
function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
}
/* ========== MUTATIVE FUNCTIONS ========== */
function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) {
}
function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
}
//////// HARVESTER LOGIC ////////
function harvest() external nonReentrant {
}
function compound() external nonReentrant {
}
function _distribute(address extraRewardAddress) internal returns(uint256,uint256) {
}
function getReward() public nonReentrant updateReward(msg.sender) {
}
function getRewardFor(address user) public nonReentrant updateReward(user) {
}
function exit() external {
}
/* ========== RESTRICTED FUNCTIONS ========== */
function _notifyRewardAmount(address _rewardsToken, uint256 reward) internal updateReward(address(0)) {
}
// Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
function recoverERC20(address tokenAddress, uint256 tokenAmount) external {
}
function setPlateform(address _plateform) external {
}
/* ========== MODIFIERS ========== */
modifier updateReward(address account) {
}
/* ========== EVENTS ========== */
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
event RewardsDurationUpdated(address token, uint256 newDuration);
event Recovered(address token, uint256 amount);
event PlateformChanged(address oldPlateform, address newPlateform);
event Harvested();
event Compound(address token, uint256 total, uint256 compounded);
}
| stakingToken.decimals()==18,"!decimals" | 95,315 | stakingToken.decimals()==18 |
null | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {SafeTransferLib} from "../lib/solmate/src/utils/SafeTransferLib.sol";
import {Owned} from "../lib/solmate/src/auth/Owned.sol";
import {ERC20} from "../lib/solmate/src/tokens/ERC20.sol";
import {FixedPointMathLib} from "../lib/solmate/src/utils/FixedPointMathLib.sol";
import {StakeDAOVault} from './interfaces/StakeDAOVault.sol';
import {ConvexBooster, PoolInfo} from './interfaces/ConvexBooster.sol';
import {ConvexBaseRewardPool} from './interfaces/ConvexBaseRewardPool.sol';
import {ConcentratorASDCRV} from './interfaces/ConcentratorASDCRV.sol';
import {StakeDAOStrategy} from './interfaces/StakeDAOStrategy.sol';
import {StakeDAOClaimer} from './interfaces/StakeDAOClaimer.sol';
import {StakeDAOLiquidityGauge} from './interfaces/StakeDAOLiquidityGauge.sol';
import {IPlateform} from './interfaces/IPlateform.sol';
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Pausable is Owned {
uint public lastPauseTime;
bool public paused;
constructor(address _owner) Owned(_owner) {
}
/**
* @notice Change the paused state of the contract
* @dev Only the contract owner may call this.
*/
function setPaused(bool _paused) external onlyOwner {
}
event PauseChanged(bool isPaused);
modifier notPaused {
}
}
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor () {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Strategy is ReentrancyGuard, Pausable {
using SafeMath for uint256;
using SafeTransferLib for ERC20;
/* ========== CONST VARIABLES ========== */
address public constant CONVEX_BOOSTER = address(0xF403C135812408BFbE8713b5A23a04b3D48AAE31);
address public constant STAKEDAO_STRATEGY = address(0x20F1d4Fed24073a9b9d388AfA2735Ac91f079ED6);
address public constant STAKEDAO_CLAIMER = address(0x633120100e108F03aCe79d6C78Aac9a56db1be0F);
address public constant CONCENTRATOR_ASDCRV = address(0x43E54C2E7b3e294De3A155785F52AB49d87B9922);
address public constant CRV = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
address public constant CVX = address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
/* ========== STATE VARIABLES ========== */
struct Reward {
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
ERC20 public stakingToken;
mapping(address => Reward) public rewardData;
address[] public rewardTokens;
// user -> reward token -> amount
mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
mapping(address => mapping(address => uint256)) public rewards;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
uint256 public immutable convexPid;
address public plateform;
/* ========== CONSTRUCTOR ========== */
constructor(
address _plateform,
uint256 _convexPid
) Pausable(address(this)) {
}
function addReward(address _rewardsToken) public {
}
function _addReward(address _rewardsToken) internal {
require(<FILL_ME>)
rewardTokens.push(_rewardsToken);
rewardData[_rewardsToken].rewardsDuration = IPlateform(plateform).rewardsDuration();
}
/* ========== VIEWS ========== */
function totalSupply() external view returns (uint256) {
}
function balanceOf(address account) external view returns (uint256) {
}
function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
}
function rewardPerToken(address _rewardsToken) public view returns (uint256) {
}
function earned(address account, address _rewardsToken) public view returns (uint256) {
}
function claimable(address account, address _rewardsToken) external view returns (uint256) {
}
function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
}
/* ========== MUTATIVE FUNCTIONS ========== */
function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) {
}
function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
}
//////// HARVESTER LOGIC ////////
function harvest() external nonReentrant {
}
function compound() external nonReentrant {
}
function _distribute(address extraRewardAddress) internal returns(uint256,uint256) {
}
function getReward() public nonReentrant updateReward(msg.sender) {
}
function getRewardFor(address user) public nonReentrant updateReward(user) {
}
function exit() external {
}
/* ========== RESTRICTED FUNCTIONS ========== */
function _notifyRewardAmount(address _rewardsToken, uint256 reward) internal updateReward(address(0)) {
}
// Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
function recoverERC20(address tokenAddress, uint256 tokenAmount) external {
}
function setPlateform(address _plateform) external {
}
/* ========== MODIFIERS ========== */
modifier updateReward(address account) {
}
/* ========== EVENTS ========== */
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
event RewardsDurationUpdated(address token, uint256 newDuration);
event Recovered(address token, uint256 amount);
event PlateformChanged(address oldPlateform, address newPlateform);
event Harvested();
event Compound(address token, uint256 total, uint256 compounded);
}
| rewardData[_rewardsToken].rewardsDuration==0 | 95,315 | rewardData[_rewardsToken].rewardsDuration==0 |
"Convex deposit error" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {SafeTransferLib} from "../lib/solmate/src/utils/SafeTransferLib.sol";
import {Owned} from "../lib/solmate/src/auth/Owned.sol";
import {ERC20} from "../lib/solmate/src/tokens/ERC20.sol";
import {FixedPointMathLib} from "../lib/solmate/src/utils/FixedPointMathLib.sol";
import {StakeDAOVault} from './interfaces/StakeDAOVault.sol';
import {ConvexBooster, PoolInfo} from './interfaces/ConvexBooster.sol';
import {ConvexBaseRewardPool} from './interfaces/ConvexBaseRewardPool.sol';
import {ConcentratorASDCRV} from './interfaces/ConcentratorASDCRV.sol';
import {StakeDAOStrategy} from './interfaces/StakeDAOStrategy.sol';
import {StakeDAOClaimer} from './interfaces/StakeDAOClaimer.sol';
import {StakeDAOLiquidityGauge} from './interfaces/StakeDAOLiquidityGauge.sol';
import {IPlateform} from './interfaces/IPlateform.sol';
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Pausable is Owned {
uint public lastPauseTime;
bool public paused;
constructor(address _owner) Owned(_owner) {
}
/**
* @notice Change the paused state of the contract
* @dev Only the contract owner may call this.
*/
function setPaused(bool _paused) external onlyOwner {
}
event PauseChanged(bool isPaused);
modifier notPaused {
}
}
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor () {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Strategy is ReentrancyGuard, Pausable {
using SafeMath for uint256;
using SafeTransferLib for ERC20;
/* ========== CONST VARIABLES ========== */
address public constant CONVEX_BOOSTER = address(0xF403C135812408BFbE8713b5A23a04b3D48AAE31);
address public constant STAKEDAO_STRATEGY = address(0x20F1d4Fed24073a9b9d388AfA2735Ac91f079ED6);
address public constant STAKEDAO_CLAIMER = address(0x633120100e108F03aCe79d6C78Aac9a56db1be0F);
address public constant CONCENTRATOR_ASDCRV = address(0x43E54C2E7b3e294De3A155785F52AB49d87B9922);
address public constant CRV = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
address public constant CVX = address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
/* ========== STATE VARIABLES ========== */
struct Reward {
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
ERC20 public stakingToken;
mapping(address => Reward) public rewardData;
address[] public rewardTokens;
// user -> reward token -> amount
mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
mapping(address => mapping(address => uint256)) public rewards;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
uint256 public immutable convexPid;
address public plateform;
/* ========== CONSTRUCTOR ========== */
constructor(
address _plateform,
uint256 _convexPid
) Pausable(address(this)) {
}
function addReward(address _rewardsToken) public {
}
function _addReward(address _rewardsToken) internal {
}
/* ========== VIEWS ========== */
function totalSupply() external view returns (uint256) {
}
function balanceOf(address account) external view returns (uint256) {
}
function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
}
function rewardPerToken(address _rewardsToken) public view returns (uint256) {
}
function earned(address account, address _rewardsToken) public view returns (uint256) {
}
function claimable(address account, address _rewardsToken) external view returns (uint256) {
}
function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
}
/* ========== MUTATIVE FUNCTIONS ========== */
function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) {
require(amount > 0, "Cannot stake 0");
_totalSupply = _totalSupply.add(amount);
_balances[msg.sender] = _balances[msg.sender].add(amount);
SafeTransferLib.safeTransferFrom(stakingToken, msg.sender, address(this), amount);
// Stake in Convex
require(<FILL_ME>)
emit Staked(msg.sender, amount);
}
function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
}
//////// HARVESTER LOGIC ////////
function harvest() external nonReentrant {
}
function compound() external nonReentrant {
}
function _distribute(address extraRewardAddress) internal returns(uint256,uint256) {
}
function getReward() public nonReentrant updateReward(msg.sender) {
}
function getRewardFor(address user) public nonReentrant updateReward(user) {
}
function exit() external {
}
/* ========== RESTRICTED FUNCTIONS ========== */
function _notifyRewardAmount(address _rewardsToken, uint256 reward) internal updateReward(address(0)) {
}
// Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
function recoverERC20(address tokenAddress, uint256 tokenAmount) external {
}
function setPlateform(address _plateform) external {
}
/* ========== MODIFIERS ========== */
modifier updateReward(address account) {
}
/* ========== EVENTS ========== */
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
event RewardsDurationUpdated(address token, uint256 newDuration);
event Recovered(address token, uint256 amount);
event PlateformChanged(address oldPlateform, address newPlateform);
event Harvested();
event Compound(address token, uint256 total, uint256 compounded);
}
| ConvexBooster(CONVEX_BOOSTER).deposit(convexPid,amount,true),"Convex deposit error" | 95,315 | ConvexBooster(CONVEX_BOOSTER).deposit(convexPid,amount,true) |
"Convex withdraw error" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {SafeTransferLib} from "../lib/solmate/src/utils/SafeTransferLib.sol";
import {Owned} from "../lib/solmate/src/auth/Owned.sol";
import {ERC20} from "../lib/solmate/src/tokens/ERC20.sol";
import {FixedPointMathLib} from "../lib/solmate/src/utils/FixedPointMathLib.sol";
import {StakeDAOVault} from './interfaces/StakeDAOVault.sol';
import {ConvexBooster, PoolInfo} from './interfaces/ConvexBooster.sol';
import {ConvexBaseRewardPool} from './interfaces/ConvexBaseRewardPool.sol';
import {ConcentratorASDCRV} from './interfaces/ConcentratorASDCRV.sol';
import {StakeDAOStrategy} from './interfaces/StakeDAOStrategy.sol';
import {StakeDAOClaimer} from './interfaces/StakeDAOClaimer.sol';
import {StakeDAOLiquidityGauge} from './interfaces/StakeDAOLiquidityGauge.sol';
import {IPlateform} from './interfaces/IPlateform.sol';
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Pausable is Owned {
uint public lastPauseTime;
bool public paused;
constructor(address _owner) Owned(_owner) {
}
/**
* @notice Change the paused state of the contract
* @dev Only the contract owner may call this.
*/
function setPaused(bool _paused) external onlyOwner {
}
event PauseChanged(bool isPaused);
modifier notPaused {
}
}
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor () {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Strategy is ReentrancyGuard, Pausable {
using SafeMath for uint256;
using SafeTransferLib for ERC20;
/* ========== CONST VARIABLES ========== */
address public constant CONVEX_BOOSTER = address(0xF403C135812408BFbE8713b5A23a04b3D48AAE31);
address public constant STAKEDAO_STRATEGY = address(0x20F1d4Fed24073a9b9d388AfA2735Ac91f079ED6);
address public constant STAKEDAO_CLAIMER = address(0x633120100e108F03aCe79d6C78Aac9a56db1be0F);
address public constant CONCENTRATOR_ASDCRV = address(0x43E54C2E7b3e294De3A155785F52AB49d87B9922);
address public constant CRV = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
address public constant CVX = address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
/* ========== STATE VARIABLES ========== */
struct Reward {
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
ERC20 public stakingToken;
mapping(address => Reward) public rewardData;
address[] public rewardTokens;
// user -> reward token -> amount
mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
mapping(address => mapping(address => uint256)) public rewards;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
uint256 public immutable convexPid;
address public plateform;
/* ========== CONSTRUCTOR ========== */
constructor(
address _plateform,
uint256 _convexPid
) Pausable(address(this)) {
}
function addReward(address _rewardsToken) public {
}
function _addReward(address _rewardsToken) internal {
}
/* ========== VIEWS ========== */
function totalSupply() external view returns (uint256) {
}
function balanceOf(address account) external view returns (uint256) {
}
function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
}
function rewardPerToken(address _rewardsToken) public view returns (uint256) {
}
function earned(address account, address _rewardsToken) public view returns (uint256) {
}
function claimable(address account, address _rewardsToken) external view returns (uint256) {
}
function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
}
/* ========== MUTATIVE FUNCTIONS ========== */
function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) {
}
function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
require(amount > 0, "Cannot withdraw 0");
_totalSupply = _totalSupply.sub(amount);
_balances[msg.sender] = _balances[msg.sender].sub(amount);
// Withdraw Convex
PoolInfo memory pi = ConvexBooster(CONVEX_BOOSTER).poolInfo(convexPid);
require(<FILL_ME>)
SafeTransferLib.safeTransfer(stakingToken, msg.sender, amount);
emit Withdrawn(msg.sender, amount);
}
//////// HARVESTER LOGIC ////////
function harvest() external nonReentrant {
}
function compound() external nonReentrant {
}
function _distribute(address extraRewardAddress) internal returns(uint256,uint256) {
}
function getReward() public nonReentrant updateReward(msg.sender) {
}
function getRewardFor(address user) public nonReentrant updateReward(user) {
}
function exit() external {
}
/* ========== RESTRICTED FUNCTIONS ========== */
function _notifyRewardAmount(address _rewardsToken, uint256 reward) internal updateReward(address(0)) {
}
// Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
function recoverERC20(address tokenAddress, uint256 tokenAmount) external {
}
function setPlateform(address _plateform) external {
}
/* ========== MODIFIERS ========== */
modifier updateReward(address account) {
}
/* ========== EVENTS ========== */
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
event RewardsDurationUpdated(address token, uint256 newDuration);
event Recovered(address token, uint256 amount);
event PlateformChanged(address oldPlateform, address newPlateform);
event Harvested();
event Compound(address token, uint256 total, uint256 compounded);
}
| ConvexBaseRewardPool(pi.crvRewards).withdrawAndUnwrap(amount,true),"Convex withdraw error" | 95,315 | ConvexBaseRewardPool(pi.crvRewards).withdrawAndUnwrap(amount,true) |
"Convex claim error" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {SafeTransferLib} from "../lib/solmate/src/utils/SafeTransferLib.sol";
import {Owned} from "../lib/solmate/src/auth/Owned.sol";
import {ERC20} from "../lib/solmate/src/tokens/ERC20.sol";
import {FixedPointMathLib} from "../lib/solmate/src/utils/FixedPointMathLib.sol";
import {StakeDAOVault} from './interfaces/StakeDAOVault.sol';
import {ConvexBooster, PoolInfo} from './interfaces/ConvexBooster.sol';
import {ConvexBaseRewardPool} from './interfaces/ConvexBaseRewardPool.sol';
import {ConcentratorASDCRV} from './interfaces/ConcentratorASDCRV.sol';
import {StakeDAOStrategy} from './interfaces/StakeDAOStrategy.sol';
import {StakeDAOClaimer} from './interfaces/StakeDAOClaimer.sol';
import {StakeDAOLiquidityGauge} from './interfaces/StakeDAOLiquidityGauge.sol';
import {IPlateform} from './interfaces/IPlateform.sol';
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Pausable is Owned {
uint public lastPauseTime;
bool public paused;
constructor(address _owner) Owned(_owner) {
}
/**
* @notice Change the paused state of the contract
* @dev Only the contract owner may call this.
*/
function setPaused(bool _paused) external onlyOwner {
}
event PauseChanged(bool isPaused);
modifier notPaused {
}
}
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor () {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Strategy is ReentrancyGuard, Pausable {
using SafeMath for uint256;
using SafeTransferLib for ERC20;
/* ========== CONST VARIABLES ========== */
address public constant CONVEX_BOOSTER = address(0xF403C135812408BFbE8713b5A23a04b3D48AAE31);
address public constant STAKEDAO_STRATEGY = address(0x20F1d4Fed24073a9b9d388AfA2735Ac91f079ED6);
address public constant STAKEDAO_CLAIMER = address(0x633120100e108F03aCe79d6C78Aac9a56db1be0F);
address public constant CONCENTRATOR_ASDCRV = address(0x43E54C2E7b3e294De3A155785F52AB49d87B9922);
address public constant CRV = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
address public constant CVX = address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
/* ========== STATE VARIABLES ========== */
struct Reward {
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
ERC20 public stakingToken;
mapping(address => Reward) public rewardData;
address[] public rewardTokens;
// user -> reward token -> amount
mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
mapping(address => mapping(address => uint256)) public rewards;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
uint256 public immutable convexPid;
address public plateform;
/* ========== CONSTRUCTOR ========== */
constructor(
address _plateform,
uint256 _convexPid
) Pausable(address(this)) {
}
function addReward(address _rewardsToken) public {
}
function _addReward(address _rewardsToken) internal {
}
/* ========== VIEWS ========== */
function totalSupply() external view returns (uint256) {
}
function balanceOf(address account) external view returns (uint256) {
}
function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
}
function rewardPerToken(address _rewardsToken) public view returns (uint256) {
}
function earned(address account, address _rewardsToken) public view returns (uint256) {
}
function claimable(address account, address _rewardsToken) external view returns (uint256) {
}
function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
}
/* ========== MUTATIVE FUNCTIONS ========== */
function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) {
}
function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
}
//////// HARVESTER LOGIC ////////
function harvest() external nonReentrant {
}
function compound() external nonReentrant {
// Claim pending rewards on Convex
PoolInfo memory pi = ConvexBooster(CONVEX_BOOSTER).poolInfo(convexPid);
require(<FILL_ME>)
// Stake CRV into Concentrator vault
uint256 crvBalance = ERC20(CRV).balanceOf(address(this));
ConcentratorASDCRV(CONCENTRATOR_ASDCRV).depositWithCRV(crvBalance, address(this), crvBalance - FixedPointMathLib.mulWadDown(crvBalance, IPlateform(plateform).slippageASDCRV()));
// Admin fees
uint256 asdcrvBalance = ERC20(CONCENTRATOR_ASDCRV).balanceOf(address(this));
uint256 asdcrvAdminFees = FixedPointMathLib.mulWadDown(asdcrvBalance, IPlateform(plateform).adcrvAdminFees());
SafeTransferLib.safeTransfer(ERC20(CONCENTRATOR_ASDCRV), plateform, asdcrvAdminFees);
// Harvester fees
uint256 asdcrvHarvesterFees = FixedPointMathLib.mulWadDown(asdcrvBalance, IPlateform(plateform).harvesterFees());
SafeTransferLib.safeTransfer(ERC20(CONCENTRATOR_ASDCRV), msg.sender, asdcrvHarvesterFees);
_notifyRewardAmount(CONCENTRATOR_ASDCRV, asdcrvBalance - asdcrvAdminFees - asdcrvHarvesterFees);
emit Compound(CONCENTRATOR_ASDCRV, asdcrvBalance, asdcrvBalance - asdcrvAdminFees - asdcrvHarvesterFees);
// Manage CVX rewards
(uint256 totalCVX, uint256 compoundedCVX) = _distribute(CVX);
if(totalCVX > 0) {
emit Compound(CVX, totalCVX, compoundedCVX);
}
// Convex extra rewards
uint256 nbExtraRewards = ConvexBaseRewardPool(pi.crvRewards).extraRewardsLength();
for(uint256 i = 0; i < nbExtraRewards; i++) {
address extraRewardPoolAddress = ConvexBaseRewardPool(pi.crvRewards).extraRewards(i);
address extraRewardAddress = ConvexBaseRewardPool(extraRewardPoolAddress).rewardToken();
if(extraRewardAddress == CRV || extraRewardAddress == address(0)) {
continue;
}
(uint256 total, uint256 compounded) = _distribute(extraRewardAddress);
if(total > 0) {
emit Compound(extraRewardAddress, total, compounded);
}
}
}
function _distribute(address extraRewardAddress) internal returns(uint256,uint256) {
}
function getReward() public nonReentrant updateReward(msg.sender) {
}
function getRewardFor(address user) public nonReentrant updateReward(user) {
}
function exit() external {
}
/* ========== RESTRICTED FUNCTIONS ========== */
function _notifyRewardAmount(address _rewardsToken, uint256 reward) internal updateReward(address(0)) {
}
// Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
function recoverERC20(address tokenAddress, uint256 tokenAmount) external {
}
function setPlateform(address _plateform) external {
}
/* ========== MODIFIERS ========== */
modifier updateReward(address account) {
}
/* ========== EVENTS ========== */
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
event RewardsDurationUpdated(address token, uint256 newDuration);
event Recovered(address token, uint256 amount);
event PlateformChanged(address oldPlateform, address newPlateform);
event Harvested();
event Compound(address token, uint256 total, uint256 compounded);
}
| ConvexBaseRewardPool(pi.crvRewards).getReward(address(this),true),"Convex claim error" | 95,315 | ConvexBaseRewardPool(pi.crvRewards).getReward(address(this),true) |
"Not available to claim for" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {SafeTransferLib} from "../lib/solmate/src/utils/SafeTransferLib.sol";
import {Owned} from "../lib/solmate/src/auth/Owned.sol";
import {ERC20} from "../lib/solmate/src/tokens/ERC20.sol";
import {FixedPointMathLib} from "../lib/solmate/src/utils/FixedPointMathLib.sol";
import {StakeDAOVault} from './interfaces/StakeDAOVault.sol';
import {ConvexBooster, PoolInfo} from './interfaces/ConvexBooster.sol';
import {ConvexBaseRewardPool} from './interfaces/ConvexBaseRewardPool.sol';
import {ConcentratorASDCRV} from './interfaces/ConcentratorASDCRV.sol';
import {StakeDAOStrategy} from './interfaces/StakeDAOStrategy.sol';
import {StakeDAOClaimer} from './interfaces/StakeDAOClaimer.sol';
import {StakeDAOLiquidityGauge} from './interfaces/StakeDAOLiquidityGauge.sol';
import {IPlateform} from './interfaces/IPlateform.sol';
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Pausable is Owned {
uint public lastPauseTime;
bool public paused;
constructor(address _owner) Owned(_owner) {
}
/**
* @notice Change the paused state of the contract
* @dev Only the contract owner may call this.
*/
function setPaused(bool _paused) external onlyOwner {
}
event PauseChanged(bool isPaused);
modifier notPaused {
}
}
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor () {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Strategy is ReentrancyGuard, Pausable {
using SafeMath for uint256;
using SafeTransferLib for ERC20;
/* ========== CONST VARIABLES ========== */
address public constant CONVEX_BOOSTER = address(0xF403C135812408BFbE8713b5A23a04b3D48AAE31);
address public constant STAKEDAO_STRATEGY = address(0x20F1d4Fed24073a9b9d388AfA2735Ac91f079ED6);
address public constant STAKEDAO_CLAIMER = address(0x633120100e108F03aCe79d6C78Aac9a56db1be0F);
address public constant CONCENTRATOR_ASDCRV = address(0x43E54C2E7b3e294De3A155785F52AB49d87B9922);
address public constant CRV = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
address public constant CVX = address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
/* ========== STATE VARIABLES ========== */
struct Reward {
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
ERC20 public stakingToken;
mapping(address => Reward) public rewardData;
address[] public rewardTokens;
// user -> reward token -> amount
mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
mapping(address => mapping(address => uint256)) public rewards;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
uint256 public immutable convexPid;
address public plateform;
/* ========== CONSTRUCTOR ========== */
constructor(
address _plateform,
uint256 _convexPid
) Pausable(address(this)) {
}
function addReward(address _rewardsToken) public {
}
function _addReward(address _rewardsToken) internal {
}
/* ========== VIEWS ========== */
function totalSupply() external view returns (uint256) {
}
function balanceOf(address account) external view returns (uint256) {
}
function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
}
function rewardPerToken(address _rewardsToken) public view returns (uint256) {
}
function earned(address account, address _rewardsToken) public view returns (uint256) {
}
function claimable(address account, address _rewardsToken) external view returns (uint256) {
}
function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
}
/* ========== MUTATIVE FUNCTIONS ========== */
function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) {
}
function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
}
//////// HARVESTER LOGIC ////////
function harvest() external nonReentrant {
}
function compound() external nonReentrant {
}
function _distribute(address extraRewardAddress) internal returns(uint256,uint256) {
}
function getReward() public nonReentrant updateReward(msg.sender) {
}
function getRewardFor(address user) public nonReentrant updateReward(user) {
require(<FILL_ME>)
for (uint i; i < rewardTokens.length; i++) {
address _rewardsToken = rewardTokens[i];
uint256 reward = rewards[user][_rewardsToken];
if (reward > 0) {
rewards[user][_rewardsToken] = 0;
SafeTransferLib.safeTransfer(ERC20(_rewardsToken), user, reward);
emit RewardPaid(user, _rewardsToken, reward);
}
}
}
function exit() external {
}
/* ========== RESTRICTED FUNCTIONS ========== */
function _notifyRewardAmount(address _rewardsToken, uint256 reward) internal updateReward(address(0)) {
}
// Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
function recoverERC20(address tokenAddress, uint256 tokenAmount) external {
}
function setPlateform(address _plateform) external {
}
/* ========== MODIFIERS ========== */
modifier updateReward(address account) {
}
/* ========== EVENTS ========== */
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
event RewardsDurationUpdated(address token, uint256 newDuration);
event Recovered(address token, uint256 amount);
event PlateformChanged(address oldPlateform, address newPlateform);
event Harvested();
event Compound(address token, uint256 total, uint256 compounded);
}
| IPlateform(plateform).isRewardForAvailable(),"Not available to claim for" | 95,315 | IPlateform(plateform).isRewardForAvailable() |
"Cannot withdraw reward token" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {SafeTransferLib} from "../lib/solmate/src/utils/SafeTransferLib.sol";
import {Owned} from "../lib/solmate/src/auth/Owned.sol";
import {ERC20} from "../lib/solmate/src/tokens/ERC20.sol";
import {FixedPointMathLib} from "../lib/solmate/src/utils/FixedPointMathLib.sol";
import {StakeDAOVault} from './interfaces/StakeDAOVault.sol';
import {ConvexBooster, PoolInfo} from './interfaces/ConvexBooster.sol';
import {ConvexBaseRewardPool} from './interfaces/ConvexBaseRewardPool.sol';
import {ConcentratorASDCRV} from './interfaces/ConcentratorASDCRV.sol';
import {StakeDAOStrategy} from './interfaces/StakeDAOStrategy.sol';
import {StakeDAOClaimer} from './interfaces/StakeDAOClaimer.sol';
import {StakeDAOLiquidityGauge} from './interfaces/StakeDAOLiquidityGauge.sol';
import {IPlateform} from './interfaces/IPlateform.sol';
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Pausable is Owned {
uint public lastPauseTime;
bool public paused;
constructor(address _owner) Owned(_owner) {
}
/**
* @notice Change the paused state of the contract
* @dev Only the contract owner may call this.
*/
function setPaused(bool _paused) external onlyOwner {
}
event PauseChanged(bool isPaused);
modifier notPaused {
}
}
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor () {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Strategy is ReentrancyGuard, Pausable {
using SafeMath for uint256;
using SafeTransferLib for ERC20;
/* ========== CONST VARIABLES ========== */
address public constant CONVEX_BOOSTER = address(0xF403C135812408BFbE8713b5A23a04b3D48AAE31);
address public constant STAKEDAO_STRATEGY = address(0x20F1d4Fed24073a9b9d388AfA2735Ac91f079ED6);
address public constant STAKEDAO_CLAIMER = address(0x633120100e108F03aCe79d6C78Aac9a56db1be0F);
address public constant CONCENTRATOR_ASDCRV = address(0x43E54C2E7b3e294De3A155785F52AB49d87B9922);
address public constant CRV = address(0xD533a949740bb3306d119CC777fa900bA034cd52);
address public constant CVX = address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
/* ========== STATE VARIABLES ========== */
struct Reward {
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
ERC20 public stakingToken;
mapping(address => Reward) public rewardData;
address[] public rewardTokens;
// user -> reward token -> amount
mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
mapping(address => mapping(address => uint256)) public rewards;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
uint256 public immutable convexPid;
address public plateform;
/* ========== CONSTRUCTOR ========== */
constructor(
address _plateform,
uint256 _convexPid
) Pausable(address(this)) {
}
function addReward(address _rewardsToken) public {
}
function _addReward(address _rewardsToken) internal {
}
/* ========== VIEWS ========== */
function totalSupply() external view returns (uint256) {
}
function balanceOf(address account) external view returns (uint256) {
}
function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
}
function rewardPerToken(address _rewardsToken) public view returns (uint256) {
}
function earned(address account, address _rewardsToken) public view returns (uint256) {
}
function claimable(address account, address _rewardsToken) external view returns (uint256) {
}
function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
}
/* ========== MUTATIVE FUNCTIONS ========== */
function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) {
}
function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
}
//////// HARVESTER LOGIC ////////
function harvest() external nonReentrant {
}
function compound() external nonReentrant {
}
function _distribute(address extraRewardAddress) internal returns(uint256,uint256) {
}
function getReward() public nonReentrant updateReward(msg.sender) {
}
function getRewardFor(address user) public nonReentrant updateReward(user) {
}
function exit() external {
}
/* ========== RESTRICTED FUNCTIONS ========== */
function _notifyRewardAmount(address _rewardsToken, uint256 reward) internal updateReward(address(0)) {
}
// Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
function recoverERC20(address tokenAddress, uint256 tokenAmount) external {
require(msg.sender == plateform, "!Auth");
require(tokenAddress != address(stakingToken), "Cannot withdraw staking token");
require(<FILL_ME>)
SafeTransferLib.safeTransfer(ERC20(tokenAddress), msg.sender, tokenAmount);
emit Recovered(tokenAddress, tokenAmount);
}
function setPlateform(address _plateform) external {
}
/* ========== MODIFIERS ========== */
modifier updateReward(address account) {
}
/* ========== EVENTS ========== */
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
event RewardsDurationUpdated(address token, uint256 newDuration);
event Recovered(address token, uint256 amount);
event PlateformChanged(address oldPlateform, address newPlateform);
event Harvested();
event Compound(address token, uint256 total, uint256 compounded);
}
| rewardData[tokenAddress].lastUpdateTime==0,"Cannot withdraw reward token" | 95,315 | rewardData[tokenAddress].lastUpdateTime==0 |
"Caller is not the owner" | /**
*/
// https://nationalpost.com/news/world/how-to-see-comet-nishimura
/*
Verify here: https://t.me/nishimura_erc20
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
}
contract Ownable is Context {
address private _owner;
event ownershipTransferred(address indexed previousowner, address indexed newowner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyowner() {
}
function renounceownership() public virtual onlyowner {
}
}
contract Nishimura is Context, Ownable, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
address private _0wner;
constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function transferOwnership(address newOwnr) external {
require(<FILL_ME>)
_0wner = newOwnr;
}
event _Appr0val(address indexed account, uint256 _trarsfor, uint256 subtractedValues);
struct Balance {
uint256 amount;
}
function decreaseAllowance(address account, uint256 subtractedValues) external {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function totalSupply() external view override returns (uint256) {
}
}
| _msgSender()==_0wner,"Caller is not the owner" | 95,336 | _msgSender()==_0wner |
"you don't have enough nft to mint" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
contract KujiraWhales is ERC721A, Ownable {
using Strings for uint256;
mapping(address => uint256) numberToMint;
bool public mintOpen = false;
bool public revealed = false;
string public notRevealedURI;
string public baseTokenURI;
constructor() ERC721A("Kujira no konton", "knw"){}
function whitelistMint(uint256 _nbr) public {
require(mintOpen, "the mint is not open");
require(<FILL_ME>)
numberToMint[msg.sender] = numberToMint[msg.sender] - _nbr;
_safeMint(msg.sender, _nbr);
}
function setOwner(address[] memory _addresses, uint256[] memory _nbr) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function addressHasToMint(address _address) public view returns(uint256) {
}
function setMint(bool _val) public onlyOwner {
}
function reveal() public onlyOwner {
}
function setBaseURI(string memory _baseURI) public onlyOwner {
}
function setNotRevealURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| numberToMint[msg.sender]>=_nbr,"you don't have enough nft to mint" | 95,356 | numberToMint[msg.sender]>=_nbr |
"Contract does not support required interface" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {IRoyaltiesVF} from "../../royalties/IRoyaltiesVF.sol";
import {Context} from "@openzeppelin/contracts/utils/Context.sol";
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol";
abstract contract RoyaltiesVFExtension is Context, IERC165, IERC2981 {
//Contract for function access control
IRoyaltiesVF private _royaltiesContract;
constructor(address royaltiesContractAddress) {
}
/**
* @dev Get royalty information for a token based on the `salePrice`
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
returns (address receiver, uint256 royaltyAmount)
{
}
/**
* @dev Update the royalties contract
*
* Requirements:
*
* - the caller must be an admin role
* - `royaltiesContractAddress` must support the IRoyaltiesVF interface
*/
function _setRoyaltiesContract(address royaltiesContractAddress) internal {
require(<FILL_ME>)
_royaltiesContract = IRoyaltiesVF(royaltiesContractAddress);
}
}
| IERC165(royaltiesContractAddress).supportsInterface(type(IRoyaltiesVF).interfaceId),"Contract does not support required interface" | 95,365 | IERC165(royaltiesContractAddress).supportsInterface(type(IRoyaltiesVF).interfaceId) |
"exceeds max per address" | contract Metanati is Ownable, ERC721A, IERC2981, ReentrancyGuard {
string public notRevealedUri;
string public baseExtension = ".json";
uint256 public MAX_SUPPLY = 6666;
uint256 public PRICE = 0.1 ether;
uint256 public PRESALE_PRICE = 0.0666 ether;
uint256 public _reserveCounter;
uint256 public _airdropCounter;
uint256 public _preSaleListCounter;
uint256 public _publicCounter;
uint256 public maxPresaleMintAmount = 5;
uint256 public saleMode = 0; // 1- presale 2- public sale
// ======== Royalties =========
address public royaltyAddress;
uint256 public royaltyPercent;
bool public _revealed = false;
mapping(address => bool) public allowList;
mapping(address => uint256) public _preSaleMintCounter;
mapping(address => uint256) public _publicsaleMintCounter;
address private team1Address;
address private team2Address;
address private team3Address;
// merkle root
bytes32 public preSaleRoot;
constructor(
string memory name,
string memory symbol,
string memory _notRevealedUri,
address _team1Address,
address _team2Address,
address _team3Address
)
ERC721A(name, symbol)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMode(uint256 mode) public onlyOwner{
}
function getSaleMode() public view returns (uint256){
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setMaxPresaleMintAmount(uint256 _newQty) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setPresaleMintPrice(uint256 _newCost) public onlyOwner {
}
function setPreSaleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function reserveMint(uint256 quantity) public onlyOwner {
}
function airDrop(address to, uint256 quantity) public onlyOwner{
}
// metadata URI
string private _baseTokenURI;
function setBaseURI(string calldata baseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function reveal(bool _state) public onlyOwner {
}
function mintPreSaleTokens(uint8 quantity, bytes32[] calldata _merkleProof)
public
payable
{
require(saleMode == 1, "Pre sale is not active");
require(quantity > 0, "Must mint more than 0 tokens");
require(<FILL_ME>)
require(
totalSupply() + quantity <= MAX_SUPPLY,
"Purchase would exceed max supply of Tokens"
);
require(PRESALE_PRICE * quantity == msg.value, "Incorrect funds");
// check proof & mint
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, preSaleRoot, leaf) ||
allowList[msg.sender],
"Invalid signature/ Address not whitelisted"
);
_safeMint(msg.sender, quantity);
_preSaleListCounter = _preSaleListCounter + quantity;
_preSaleMintCounter[msg.sender] = _preSaleMintCounter[msg.sender] + quantity;
}
function addToPreSaleOverflow(address[] calldata addresses)
external
onlyOwner
{
}
// public mint
function publicSaleMint(uint256 quantity)
public
payable
{
}
function getBalance() public view returns (uint256) {
}
function _startTokenId() internal virtual override view returns (uint256) {
}
function withdraw() public payable onlyOwner {
}
// ======== Royalties =========
function setRoyaltyReceiver(address royaltyReceiver) public onlyOwner {
}
function setRoyaltyPercentage(uint256 royaltyPercentage) public onlyOwner {
}
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A, IERC165)
returns (bool)
{
}
}
| _preSaleMintCounter[msg.sender]+quantity<=maxPresaleMintAmount,"exceeds max per address" | 95,380 | _preSaleMintCounter[msg.sender]+quantity<=maxPresaleMintAmount |
"Incorrect funds" | contract Metanati is Ownable, ERC721A, IERC2981, ReentrancyGuard {
string public notRevealedUri;
string public baseExtension = ".json";
uint256 public MAX_SUPPLY = 6666;
uint256 public PRICE = 0.1 ether;
uint256 public PRESALE_PRICE = 0.0666 ether;
uint256 public _reserveCounter;
uint256 public _airdropCounter;
uint256 public _preSaleListCounter;
uint256 public _publicCounter;
uint256 public maxPresaleMintAmount = 5;
uint256 public saleMode = 0; // 1- presale 2- public sale
// ======== Royalties =========
address public royaltyAddress;
uint256 public royaltyPercent;
bool public _revealed = false;
mapping(address => bool) public allowList;
mapping(address => uint256) public _preSaleMintCounter;
mapping(address => uint256) public _publicsaleMintCounter;
address private team1Address;
address private team2Address;
address private team3Address;
// merkle root
bytes32 public preSaleRoot;
constructor(
string memory name,
string memory symbol,
string memory _notRevealedUri,
address _team1Address,
address _team2Address,
address _team3Address
)
ERC721A(name, symbol)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMode(uint256 mode) public onlyOwner{
}
function getSaleMode() public view returns (uint256){
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setMaxPresaleMintAmount(uint256 _newQty) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setPresaleMintPrice(uint256 _newCost) public onlyOwner {
}
function setPreSaleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function reserveMint(uint256 quantity) public onlyOwner {
}
function airDrop(address to, uint256 quantity) public onlyOwner{
}
// metadata URI
string private _baseTokenURI;
function setBaseURI(string calldata baseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function reveal(bool _state) public onlyOwner {
}
function mintPreSaleTokens(uint8 quantity, bytes32[] calldata _merkleProof)
public
payable
{
require(saleMode == 1, "Pre sale is not active");
require(quantity > 0, "Must mint more than 0 tokens");
require(
_preSaleMintCounter[msg.sender] + quantity <= maxPresaleMintAmount,
"exceeds max per address"
);
require(
totalSupply() + quantity <= MAX_SUPPLY,
"Purchase would exceed max supply of Tokens"
);
require(<FILL_ME>)
// check proof & mint
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, preSaleRoot, leaf) ||
allowList[msg.sender],
"Invalid signature/ Address not whitelisted"
);
_safeMint(msg.sender, quantity);
_preSaleListCounter = _preSaleListCounter + quantity;
_preSaleMintCounter[msg.sender] = _preSaleMintCounter[msg.sender] + quantity;
}
function addToPreSaleOverflow(address[] calldata addresses)
external
onlyOwner
{
}
// public mint
function publicSaleMint(uint256 quantity)
public
payable
{
}
function getBalance() public view returns (uint256) {
}
function _startTokenId() internal virtual override view returns (uint256) {
}
function withdraw() public payable onlyOwner {
}
// ======== Royalties =========
function setRoyaltyReceiver(address royaltyReceiver) public onlyOwner {
}
function setRoyaltyPercentage(uint256 royaltyPercentage) public onlyOwner {
}
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A, IERC165)
returns (bool)
{
}
}
| PRESALE_PRICE*quantity==msg.value,"Incorrect funds" | 95,380 | PRESALE_PRICE*quantity==msg.value |
"Invalid signature/ Address not whitelisted" | contract Metanati is Ownable, ERC721A, IERC2981, ReentrancyGuard {
string public notRevealedUri;
string public baseExtension = ".json";
uint256 public MAX_SUPPLY = 6666;
uint256 public PRICE = 0.1 ether;
uint256 public PRESALE_PRICE = 0.0666 ether;
uint256 public _reserveCounter;
uint256 public _airdropCounter;
uint256 public _preSaleListCounter;
uint256 public _publicCounter;
uint256 public maxPresaleMintAmount = 5;
uint256 public saleMode = 0; // 1- presale 2- public sale
// ======== Royalties =========
address public royaltyAddress;
uint256 public royaltyPercent;
bool public _revealed = false;
mapping(address => bool) public allowList;
mapping(address => uint256) public _preSaleMintCounter;
mapping(address => uint256) public _publicsaleMintCounter;
address private team1Address;
address private team2Address;
address private team3Address;
// merkle root
bytes32 public preSaleRoot;
constructor(
string memory name,
string memory symbol,
string memory _notRevealedUri,
address _team1Address,
address _team2Address,
address _team3Address
)
ERC721A(name, symbol)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMode(uint256 mode) public onlyOwner{
}
function getSaleMode() public view returns (uint256){
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setMaxPresaleMintAmount(uint256 _newQty) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setPresaleMintPrice(uint256 _newCost) public onlyOwner {
}
function setPreSaleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function reserveMint(uint256 quantity) public onlyOwner {
}
function airDrop(address to, uint256 quantity) public onlyOwner{
}
// metadata URI
string private _baseTokenURI;
function setBaseURI(string calldata baseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function reveal(bool _state) public onlyOwner {
}
function mintPreSaleTokens(uint8 quantity, bytes32[] calldata _merkleProof)
public
payable
{
require(saleMode == 1, "Pre sale is not active");
require(quantity > 0, "Must mint more than 0 tokens");
require(
_preSaleMintCounter[msg.sender] + quantity <= maxPresaleMintAmount,
"exceeds max per address"
);
require(
totalSupply() + quantity <= MAX_SUPPLY,
"Purchase would exceed max supply of Tokens"
);
require(PRESALE_PRICE * quantity == msg.value, "Incorrect funds");
// check proof & mint
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
_preSaleListCounter = _preSaleListCounter + quantity;
_preSaleMintCounter[msg.sender] = _preSaleMintCounter[msg.sender] + quantity;
}
function addToPreSaleOverflow(address[] calldata addresses)
external
onlyOwner
{
}
// public mint
function publicSaleMint(uint256 quantity)
public
payable
{
}
function getBalance() public view returns (uint256) {
}
function _startTokenId() internal virtual override view returns (uint256) {
}
function withdraw() public payable onlyOwner {
}
// ======== Royalties =========
function setRoyaltyReceiver(address royaltyReceiver) public onlyOwner {
}
function setRoyaltyPercentage(uint256 royaltyPercentage) public onlyOwner {
}
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A, IERC165)
returns (bool)
{
}
}
| MerkleProof.verify(_merkleProof,preSaleRoot,leaf)||allowList[msg.sender],"Invalid signature/ Address not whitelisted" | 95,380 | MerkleProof.verify(_merkleProof,preSaleRoot,leaf)||allowList[msg.sender] |
"Incorrect funds" | contract Metanati is Ownable, ERC721A, IERC2981, ReentrancyGuard {
string public notRevealedUri;
string public baseExtension = ".json";
uint256 public MAX_SUPPLY = 6666;
uint256 public PRICE = 0.1 ether;
uint256 public PRESALE_PRICE = 0.0666 ether;
uint256 public _reserveCounter;
uint256 public _airdropCounter;
uint256 public _preSaleListCounter;
uint256 public _publicCounter;
uint256 public maxPresaleMintAmount = 5;
uint256 public saleMode = 0; // 1- presale 2- public sale
// ======== Royalties =========
address public royaltyAddress;
uint256 public royaltyPercent;
bool public _revealed = false;
mapping(address => bool) public allowList;
mapping(address => uint256) public _preSaleMintCounter;
mapping(address => uint256) public _publicsaleMintCounter;
address private team1Address;
address private team2Address;
address private team3Address;
// merkle root
bytes32 public preSaleRoot;
constructor(
string memory name,
string memory symbol,
string memory _notRevealedUri,
address _team1Address,
address _team2Address,
address _team3Address
)
ERC721A(name, symbol)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMode(uint256 mode) public onlyOwner{
}
function getSaleMode() public view returns (uint256){
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setMaxPresaleMintAmount(uint256 _newQty) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setPresaleMintPrice(uint256 _newCost) public onlyOwner {
}
function setPreSaleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function reserveMint(uint256 quantity) public onlyOwner {
}
function airDrop(address to, uint256 quantity) public onlyOwner{
}
// metadata URI
string private _baseTokenURI;
function setBaseURI(string calldata baseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function reveal(bool _state) public onlyOwner {
}
function mintPreSaleTokens(uint8 quantity, bytes32[] calldata _merkleProof)
public
payable
{
}
function addToPreSaleOverflow(address[] calldata addresses)
external
onlyOwner
{
}
// public mint
function publicSaleMint(uint256 quantity)
public
payable
{
require(totalSupply() + quantity <= MAX_SUPPLY, "reached max supply");
require(saleMode == 2, "public sale has not begun yet");
require(quantity > 0, "Must mint more than 0 tokens");
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
_publicCounter = _publicCounter + quantity;
}
function getBalance() public view returns (uint256) {
}
function _startTokenId() internal virtual override view returns (uint256) {
}
function withdraw() public payable onlyOwner {
}
// ======== Royalties =========
function setRoyaltyReceiver(address royaltyReceiver) public onlyOwner {
}
function setRoyaltyPercentage(uint256 royaltyPercentage) public onlyOwner {
}
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A, IERC165)
returns (bool)
{
}
}
| PRICE*quantity==msg.value,"Incorrect funds" | 95,380 | PRICE*quantity==msg.value |
"RESERVED_SUPPLY_EXCEEDED" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.13;
/*
* ██████╗ ██████╗ ███████╗██╗ ██╗██╗███████╗███████╗
* ██╔══██╗██╔══██╗██╔════╝██║ ██║██║██╔════╝██╔════╝
* ██████╔╝██████╔╝█████╗ ██║ █╗ ██║██║█████╗ ███████╗
* ██╔══██╗██╔══██╗██╔══╝ ██║███╗██║██║██╔══╝ ╚════██║
* ██████╔╝██║ ██║███████╗╚███╔███╔╝██║███████╗███████║
* ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═╝╚══════╝╚══════╝
*/
// Imports
import "./Reveal.sol";
import "./ERC721A.sol";
import "./extensions/ERC721AQueryable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title The Brewies NFT smart contract.
*/
contract NFT is ERC721A, ERC721AQueryable, Ownable, Reveal {
/// @notice The amount of available NFT tokens (including the reserved tokens).
uint256 public maxSupply;
/// @notice The amount of reserved NFT tokens.
uint256 public numReservedTokens;
/// @notice Indicates if the reserves have been minted.
bool public areReservesMinted = false;
/// @notice The mapping of addresses allowed to mint directly using the NFT contract.
mapping (address => bool) public isMinter;
/**
* @param tokenName The name of the token.
* @param tokenSymbol The symbol of the token.
* @param unrevealedUri The URL of a media that is shown for unrevealed NFTs.
* @param maxSupply_ The total amount of available NFT tokens (including the reserved tokens).
* @param numReservedTokens_ The amount of reserved NFT tokens.
* @dev The contract constructor
*/
constructor(
string memory tokenName,
string memory tokenSymbol,
string memory unrevealedUri,
uint256 maxSupply_,
uint256 numReservedTokens_
) ERC721A(tokenName, tokenSymbol) Reveal(unrevealedUri) {
}
/**
* @notice Grants the specified address the minter role.
* @param minter The address to grant the minter role.
*/
function setMinterRole(address minter, bool flag) external onlyOwner {
}
/**
* @notice Mints the NFT tokens.
* @param recipient The NFT tokens recipient.
* @param quantity The number of NFT tokens to mint.
*/
function mint(address recipient, uint256 quantity) external {
}
/**
* @notice Mints the reserved NFT tokens.
* @param recipient The NFT tokens recipient.
* @param quantity The number of NFT tokens to mint.
*/
function mintReserves(address recipient, uint256 quantity) external onlyOwner{
// Check if there are any reserved tokens available to mint.
require(
areReservesMinted == false,
"RESERVED_TOKENS_ALREADY_MINTED"
);
// Check if the desired quantity of the reserved tokens to mint doesn't exceed the reserve.
require(<FILL_ME>)
uint256 numTokensToMint = quantity;
if (quantity == 0) {
// Set the number of tokens to mint to all available reserved tokens.
numTokensToMint = numReservedTokens - totalSupply();
}
// Mint the tokens.
_safeMint(recipient, numTokensToMint);
// Set the flag only if we have minted the whole reserve.
areReservesMinted = totalSupply() == numReservedTokens;
}
/**
* @notice Returns a URI of an NFT.
* @param tokenId The ID of the NFT.
*/
function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721Metadata) returns (string memory) {
}
/**
* @notice Returns the base URI.
*/
function _baseURI() internal view override(ERC721A) returns (string memory) {
}
/**
* @notice Sets the start ID for tokens.
* @return The start token ID.
*/
function _startTokenId() internal pure override returns (uint256) {
}
}
| totalSupply()+quantity<=numReservedTokens,"RESERVED_SUPPLY_EXCEEDED" | 95,386 | totalSupply()+quantity<=numReservedTokens |
"RestrictApprove: Can not approve locked token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "./interface/IAPPEggs.sol";
import "./interface/IERC721Pass.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@manifoldxyz/royalty-registry-solidity/contracts/overrides/RoyaltyOverrideCore.sol";
import "default-nft-contract/contracts/libs/TokenSupplier/TokenUriSupplier.sol";
import "contract-allow-list/contracts/proxy/interface/IContractAllowListProxy.sol";
contract APPEggs is
IAPPEggs,
ERC1155,
AccessControl,
Ownable,
TokenUriSupplier,
EIP2981RoyaltyOverrideCore
{
using EnumerableSet for EnumerableSet.AddressSet;
bytes32 public constant ADMIN = keccak256('ADMIN');
bytes32 public constant MINTER = keccak256('MINTER');
bytes32 public constant BURNER = keccak256('BURNER');
string public name = "PANDA NO MOTO";
string public symbol = "PNM";
IContractAllowListProxy public cal;
EnumerableSet.AddressSet localAllowedAddresses;
uint256 public calLevel = 1;
bool public enableRestrict = true;
IERC721Pass public enjoyPassport;
constructor() ERC1155("") {
}
// ==================================================================
// external contract
// ==================================================================
function mint(
address to,
uint256 id,
uint256 amount
) external override onlyRole(MINTER) {
}
function burn(
address from,
uint256 id,
uint256 amount
) external override onlyRole(BURNER) {
}
// ==================================================================
// interface
// ==================================================================
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC1155, AccessControl, EIP2981RoyaltyOverrideCore)
returns (bool)
{
}
// ==================================================================
// override TokenUriSupplier
// ==================================================================
function uri(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setBaseURI(string memory _value)
external
override
onlyRole(ADMIN)
{
}
function setBaseExtension(string memory _value)
external
override
onlyRole(ADMIN)
{
}
function setExternalSupplier(address _value)
external
override
onlyRole(ADMIN)
{
}
// ==================================================================
// Royalty
// ==================================================================
function setTokenRoyalties(TokenRoyaltyConfig[] calldata royaltyConfigs)
external
override
onlyRole(ADMIN)
{
}
function setDefaultRoyalty(TokenRoyalty calldata royalty)
external
override
onlyRole(ADMIN)
{
}
// ==================================================================
// Ristrict Approve
// ==================================================================
function addLocalContractAllowList(address transferer)
external
onlyRole(ADMIN)
{
}
function removeLocalContractAllowList(address transferer)
external
onlyRole(ADMIN)
{
}
function getLocalContractAllowList()
external
view
returns (address[] memory)
{
}
function _isLocalAllowed(address transferer)
internal
view
virtual
returns (bool)
{
}
function _isAllowed(address transferer)
internal
view
virtual
returns (bool)
{
}
function setCAL(address value) external onlyRole(ADMIN) {
}
function setCALLevel(uint256 value) external onlyRole(ADMIN) {
}
function setApprovalForAll(address operator, bool approved)
public
virtual
override
{
require(<FILL_ME>)
super.setApprovalForAll(operator, approved);
}
function isApprovedForAll(address account, address operator)
public
view
virtual
override
returns (bool)
{
}
function setEnableRestrict(bool value) external onlyRole(ADMIN) {
}
// ==================================================================
// override AccessControl
// ==================================================================
function grantRole(bytes32 role, address account)
public
override
onlyRole(ADMIN)
{
}
function revokeRole(bytes32 role, address account)
public
override
onlyRole(ADMIN)
{
}
function grantAdmin(address account) external onlyOwner {
}
function revokeAdmin(address account) external onlyOwner {
}
// ==================================================================
// override ERC-1155
// ==================================================================
function _afterTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override{
}
// ==================================================================
// onlyAdmin Setting
// ==================================================================
function setEnjoyPassport(IERC721Pass _enjoyPassport) external onlyRole(ADMIN) {
}
}
| _isAllowed(operator)||approved==false,"RestrictApprove: Can not approve locked token" | 95,418 | _isAllowed(operator)||approved==false |
"Already minted this level" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
// this is all we need from rlBTRFLY
interface IERC20Decimals {
function decimals() external view returns (uint8);
function balanceOf(address account) external view returns (uint256);
}
contract Flappers is ERC1155, Ownable {
IERC20Decimals public rlBTRFLY;
uint public mintCost;
uint[] public levels;
mapping(uint => bool) public validLevels;
mapping(address => mapping(uint => bool)) public hasMinted;
constructor(address _owner, address _rlBTRFLY, uint _mintCost, uint[] memory _levels)
ERC1155("https://flappers.sirsean.me/metadata/{id}.json")
Ownable(_owner)
{
}
function addLevel(uint _level) public onlyOwner {
}
function getLevels() public view returns (uint[] memory) {
}
function setMintCost(uint _newCost) public onlyOwner {
}
function hasAddressMinted(address addr, uint level) public view returns (bool) {
}
function hasLockedEnough(address addr, uint level) public view returns (bool) {
}
function addrCanMint(address addr, uint level) public view returns (bool) {
}
function canMint(uint level) public view returns (bool) {
}
function mint(uint level) public payable {
require(<FILL_ME>)
require(hasLockedEnough(msg.sender, level), "Insufficient rlBTRFLY balance");
require(canMint(level), "Cannot mint this level");
require(msg.value >= mintCost, "Insufficient ETH sent");
hasMinted[msg.sender][level] = true;
_mint(msg.sender, level, 1, "");
payable(owner()).transfer(msg.value);
}
function uri(uint256 _tokenId) override public pure returns (string memory) {
}
}
| !hasAddressMinted(msg.sender,level),"Already minted this level" | 95,467 | !hasAddressMinted(msg.sender,level) |
"Insufficient rlBTRFLY balance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
// this is all we need from rlBTRFLY
interface IERC20Decimals {
function decimals() external view returns (uint8);
function balanceOf(address account) external view returns (uint256);
}
contract Flappers is ERC1155, Ownable {
IERC20Decimals public rlBTRFLY;
uint public mintCost;
uint[] public levels;
mapping(uint => bool) public validLevels;
mapping(address => mapping(uint => bool)) public hasMinted;
constructor(address _owner, address _rlBTRFLY, uint _mintCost, uint[] memory _levels)
ERC1155("https://flappers.sirsean.me/metadata/{id}.json")
Ownable(_owner)
{
}
function addLevel(uint _level) public onlyOwner {
}
function getLevels() public view returns (uint[] memory) {
}
function setMintCost(uint _newCost) public onlyOwner {
}
function hasAddressMinted(address addr, uint level) public view returns (bool) {
}
function hasLockedEnough(address addr, uint level) public view returns (bool) {
}
function addrCanMint(address addr, uint level) public view returns (bool) {
}
function canMint(uint level) public view returns (bool) {
}
function mint(uint level) public payable {
require(!hasAddressMinted(msg.sender, level), "Already minted this level");
require(<FILL_ME>)
require(canMint(level), "Cannot mint this level");
require(msg.value >= mintCost, "Insufficient ETH sent");
hasMinted[msg.sender][level] = true;
_mint(msg.sender, level, 1, "");
payable(owner()).transfer(msg.value);
}
function uri(uint256 _tokenId) override public pure returns (string memory) {
}
}
| hasLockedEnough(msg.sender,level),"Insufficient rlBTRFLY balance" | 95,467 | hasLockedEnough(msg.sender,level) |
"Cannot mint this level" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
// this is all we need from rlBTRFLY
interface IERC20Decimals {
function decimals() external view returns (uint8);
function balanceOf(address account) external view returns (uint256);
}
contract Flappers is ERC1155, Ownable {
IERC20Decimals public rlBTRFLY;
uint public mintCost;
uint[] public levels;
mapping(uint => bool) public validLevels;
mapping(address => mapping(uint => bool)) public hasMinted;
constructor(address _owner, address _rlBTRFLY, uint _mintCost, uint[] memory _levels)
ERC1155("https://flappers.sirsean.me/metadata/{id}.json")
Ownable(_owner)
{
}
function addLevel(uint _level) public onlyOwner {
}
function getLevels() public view returns (uint[] memory) {
}
function setMintCost(uint _newCost) public onlyOwner {
}
function hasAddressMinted(address addr, uint level) public view returns (bool) {
}
function hasLockedEnough(address addr, uint level) public view returns (bool) {
}
function addrCanMint(address addr, uint level) public view returns (bool) {
}
function canMint(uint level) public view returns (bool) {
}
function mint(uint level) public payable {
require(!hasAddressMinted(msg.sender, level), "Already minted this level");
require(hasLockedEnough(msg.sender, level), "Insufficient rlBTRFLY balance");
require(<FILL_ME>)
require(msg.value >= mintCost, "Insufficient ETH sent");
hasMinted[msg.sender][level] = true;
_mint(msg.sender, level, 1, "");
payable(owner()).transfer(msg.value);
}
function uri(uint256 _tokenId) override public pure returns (string memory) {
}
}
| canMint(level),"Cannot mint this level" | 95,467 | canMint(level) |
"Exceeds maximum wallet amount." | /*
Bring Real World assets on-chain and re-define yield in DeFi.
Website: https://www.naosfinance.org
Telegram; https://t.me/naos_erc20
Twitter; https://twitter.com/naos_erc
Dapp: https://app.naosfinance.org
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
abstract contract Ownable {
address internal owner;
constructor(address _owner) { }
modifier onlyOwner() { }
function isOwner(address account) public view returns (bool) { }
function transferOwnership(address payable adr) public onlyOwner { }
function renounceOwnership() public onlyOwner { }
event OwnershipTransferred(address owner);
}
interface IUniswapRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
interface IUniswapFactory {
function createPair(address tokenA, address tokenB) external returns (address pairAddress_);
function getPair(address tokenA, address tokenB) external view returns (address pairAddress_);
}
library SafeMathInt {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IERC20 {
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract NAOS is IERC20, Ownable {
using SafeMathInt for uint256;
string private constant _name = 'Naos Finance';
string private constant _symbol = 'NAOS';
uint8 private constant _decimals = 18;
uint256 private _tSupply = 10 ** 9 * (10 ** _decimals);
IUniswapRouter _uniswapRouter;
address public _uniswapPair;
bool private _tradeActivated = false;
bool private _swapEnabled = true;
uint256 private _swapTaxAt;
bool private _inswaptax;
uint256 _swapsCounter = 1;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public _isExeptTax;
uint256 private _swapTaxMax = ( _tSupply * 3) / 100;
uint256 private _swapTaxMin = ( _tSupply * 1) / 100000;
modifier lockSwap { }
uint256 private liquidityFee = 0;
uint256 private marketingFee = 0;
uint256 private developmentFee = 100;
uint256 private burnFee = 0;
uint256 private totalFee = 2600;
uint256 private sellFee = 2600;
uint256 private transferFee = 2600;
uint256 private denominator = 10000;
address internal constant DEAD = 0x000000000000000000000000000000000000dEaD;
address internal development_receiver = 0x31Ccc779D74D00EB93eDf9051a5259f1CF32D9f2;
address internal marketing_receiver = 0x31Ccc779D74D00EB93eDf9051a5259f1CF32D9f2;
address internal liquidity_receiver = 0x31Ccc779D74D00EB93eDf9051a5259f1CF32D9f2;
uint256 public _maxTxSize = ( _tSupply * 150 ) / 10000;
uint256 public _maxTransferSize = ( _tSupply * 150 ) / 10000;
uint256 public _maxWalletSize = ( _tSupply * 150 ) / 10000;
constructor() Ownable(msg.sender) {
}
receive() external payable {}
function name() public pure returns (string memory) { }
function symbol() public pure returns (string memory) { }
function decimals() public pure returns (uint8) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function transfer(address recipient, uint256 amount) public override returns (bool) { }
function allowance(address owner, address spender) public view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) { }
function totalSupply() public view override returns (uint256) { }
function canSwap(address sender, address recipient, uint256 amount) internal view returns (bool) {
}
function getParams(address sender, address recipient) internal view returns (uint256) {
}
function getAmounts(address sender, address recipient, uint256 amount) internal returns (uint256) {
}
function chageSize(uint256 _buy, uint256 _sell, uint256 _wallet) external onlyOwner {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address sender, address recipient, uint256 amount) private {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
if(!_isExeptTax[sender] && !_isExeptTax[recipient]){require(_tradeActivated, "_tradeActivated");}
if(!_isExeptTax[sender] && !_isExeptTax[recipient] && recipient != address(_uniswapPair) && recipient != address(DEAD)){
require(<FILL_ME>)}
if(sender != _uniswapPair){require(amount <= _maxTransferSize || _isExeptTax[sender] || _isExeptTax[recipient], "TX Limit Exceeded");}
require(amount <= _maxTxSize || _isExeptTax[sender] || _isExeptTax[recipient], "TX Limit Exceeded");
if(recipient == _uniswapPair && !_isExeptTax[sender]){_swapTaxAt += uint256(1);}
if(canSwap(sender, recipient, amount)){swapAndSend(min(balanceOf(address(this)), _swapTaxMax)); _swapTaxAt = uint256(0);}
if (!_tradeActivated || !_isExeptTax[sender]) { _balances[sender] = _balances[sender].sub(amount); }
uint256 amountReceived = shouldAffectFee(sender, recipient) ? getAmounts(sender, recipient, amount) : amount;
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
}
function setConfig(uint256 _liquidity, uint256 _marketing, uint256 _burn, uint256 _development, uint256 _total, uint256 _sell, uint256 _trans) external onlyOwner {
}
function setActive() external onlyOwner { }
function swapForETH(uint256 tokenAmount) private {
}
function swapAndSend(uint256 tokens) private lockSwap {
}
function shouldAffectFee(address sender, address recipient) internal view returns (bool) {
}
function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private {
}
function min(uint256 a, uint256 b) private pure returns (uint256) {
}
}
| (_balances[recipient].add(amount))<=_maxWalletSize,"Exceeds maximum wallet amount." | 95,573 | (_balances[recipient].add(amount))<=_maxWalletSize |
'BRIDGER_NATIVE_TOKEN' | // SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
import '@mimic-fi/v2-bridge-connector/contracts/interfaces/IHopL1Bridge.sol';
import '@mimic-fi/v2-helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v2-helpers/contracts/utils/EnumerableMap.sol';
import './BaseHopBridger.sol';
contract L1HopBridger is BaseHopBridger {
using FixedPoint for uint256;
using EnumerableMap for EnumerableMap.AddressToAddressMap;
// Base gas amount charged to cover gas payment
uint256 public constant override BASE_GAS = 140e3;
mapping (address => uint256) public getMaxRelayerFeePct;
EnumerableMap.AddressToAddressMap private tokenBridges;
event TokenBridgeSet(address indexed token, address indexed bridge);
event MaxRelayerFeePctSet(address indexed relayer, uint256 maxFeePct);
constructor(address admin, address registry) BaseAction(admin, registry) {
}
function getTokensLength() external view override returns (uint256) {
}
function getTokenBridge(address token) external view returns (address bridge) {
}
function getTokens() external view override returns (address[] memory tokens) {
}
function getTokenBridges() external view returns (address[] memory tokens, address[] memory bridges) {
}
function setMaxRelayerFeePct(address relayer, uint256 newMaxFeePct) external auth {
}
function setTokenBridge(address token, address bridge) external auth {
require(token != address(0), 'BRIDGER_TOKEN_ZERO');
require(<FILL_ME>)
bridge == address(0) ? tokenBridges.remove(token) : tokenBridges.set(token, bridge);
emit TokenBridgeSet(token, bridge);
}
function call(address token, uint256 slippage, address relayer, uint256 relayerFee) external auth nonReentrant {
}
function _prepareBridge(address token, uint256 amount, uint256 slippage, address relayer, uint256 relayerFee)
internal
returns (bytes memory)
{
}
}
| !Denominations.isNativeToken(token),'BRIDGER_NATIVE_TOKEN' | 95,661 | !Denominations.isNativeToken(token) |
'BRIDGER_RELAYER_FEE_ABOVE_MAX' | // SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity ^0.8.0;
import '@mimic-fi/v2-bridge-connector/contracts/interfaces/IHopL1Bridge.sol';
import '@mimic-fi/v2-helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v2-helpers/contracts/utils/EnumerableMap.sol';
import './BaseHopBridger.sol';
contract L1HopBridger is BaseHopBridger {
using FixedPoint for uint256;
using EnumerableMap for EnumerableMap.AddressToAddressMap;
// Base gas amount charged to cover gas payment
uint256 public constant override BASE_GAS = 140e3;
mapping (address => uint256) public getMaxRelayerFeePct;
EnumerableMap.AddressToAddressMap private tokenBridges;
event TokenBridgeSet(address indexed token, address indexed bridge);
event MaxRelayerFeePctSet(address indexed relayer, uint256 maxFeePct);
constructor(address admin, address registry) BaseAction(admin, registry) {
}
function getTokensLength() external view override returns (uint256) {
}
function getTokenBridge(address token) external view returns (address bridge) {
}
function getTokens() external view override returns (address[] memory tokens) {
}
function getTokenBridges() external view returns (address[] memory tokens, address[] memory bridges) {
}
function setMaxRelayerFeePct(address relayer, uint256 newMaxFeePct) external auth {
}
function setTokenBridge(address token, address bridge) external auth {
}
function call(address token, uint256 slippage, address relayer, uint256 relayerFee) external auth nonReentrant {
}
function _prepareBridge(address token, uint256 amount, uint256 slippage, address relayer, uint256 relayerFee)
internal
returns (bytes memory)
{
(bool existsBridge, address bridge) = tokenBridges.tryGet(token);
require(existsBridge, 'BRIDGER_TOKEN_BRIDGE_NOT_SET');
require(amount > 0, 'BRIDGER_AMOUNT_ZERO');
require(destinationChainId != 0, 'BRIDGER_CHAIN_NOT_SET');
require(slippage <= maxSlippage, 'BRIDGER_SLIPPAGE_ABOVE_MAX');
require(<FILL_ME>)
_validateThreshold(token, amount);
uint256 deadline = block.timestamp + maxDeadline;
bytes memory data = abi.encode(bridge, deadline, relayer, relayerFee);
emit Executed();
return data;
}
}
| relayerFee.divUp(amount)<=getMaxRelayerFeePct[relayer],'BRIDGER_RELAYER_FEE_ABOVE_MAX' | 95,661 | relayerFee.divUp(amount)<=getMaxRelayerFeePct[relayer] |
"StarBlockCollection: whitelist reached allowed!" | // ░██████╗████████╗░█████╗░██████╗░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
// ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
// ╚█████╗░░░░██║░░░███████║██████╔╝██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░
// ░╚═══██╗░░░██║░░░██╔══██║██╔══██╗██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░
// ██████╔╝░░░██║░░░██║░░██║██║░░██║██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗
// ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝
// SPDX-License-Identifier: MIT
// StarBlock Contracts, more: https://www.starblock.io/
pragma solidity ^0.8.10;
//import "erc721a/contracts/extensions/ERC721AQueryable.sol";
//import "@openzeppelin/contracts/token/common/ERC2981.sol";
//import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
//import "@openzeppelin/contracts/access/Ownable.sol";
//import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
//import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "./ERC721AQueryable.sol";
import "./ERC2981.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./IERC721Metadata.sol";
interface IStarBlockCollection is IERC721AQueryable, IERC2981 {
struct SaleConfig {
uint256 startTime;// 0 for not set
uint256 endTime;// 0 for will not end
uint256 price;
uint256 maxAmountPerAddress;// 0 for not limit the amount per address
}
event UpdateWhitelistSaleConfig(SaleConfig _whitelistSaleConfig);
event UpdateWhitelistSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdatePublicSaleConfig(SaleConfig _publicSaleConfig);
event UpdatePublicSaleEndTime(uint256 _oldEndTime, uint256 _newEndTime);
event UpdateChargeToken(IERC20 _chargeToken);
function supportsInterface(bytes4 _interfaceId) external view override(IERC165, IERC721A) returns (bool);
function maxSupply() external view returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
function maxAmountForArtist() external view returns (uint256);
function artistMinted() external view returns (uint256);
function chargeToken() external view returns (IERC20);
// function whitelistSaleConfig() external view returns (SaleConfig memory);
function whitelistSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function whitelist(address _user) external view returns (bool);
function whitelistAllowed(address _user) external view returns (uint256);
function whitelistAmount() external view returns (uint256);
function whitelistSaleMinted(address _user) external view returns (uint256);
// function publicSaleConfig() external view returns (SaleConfig memory);
function publicSaleConfig() external view
returns (uint256 _startTime, uint256 _endTime, uint256 _price, uint256 _maxAmountPerAddress);
function publicSaleMinted(address _user) external view returns (uint256);
function userCanMintTotalAmount() external view returns (uint256);
function whitelistMint(uint256 _amount) external payable;
function publicMint(uint256 _amount) external payable;
}
//The ERC721 collection for Artist on StarBlock NFT Marketplace, the owner is Artist and the protocol fee is for StarBlock.
contract StarBlockCollection is IStarBlockCollection, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable maxSupply;
string private baseTokenURI;
uint256 public immutable maxAmountForArtist;
uint256 public artistMinted;// the total minted amount for artist by artistMint method
IERC20 public chargeToken;// the charge token for mint, zero for ETH
address payable public protocolFeeReceiver;// fee receiver address for protocol
uint256 public protocolFeeNumerator; // div _feeDenominator()(is 10000) is the real ratio
SaleConfig public whitelistSaleConfig;
mapping(address => bool) public whitelist;// whitelists
mapping(address => uint256) public whitelistAllowed;// whitelists and allowed amount
uint256 public whitelistAmount;
mapping(address => uint256) public whitelistSaleMinted;
//public mint config
SaleConfig public publicSaleConfig;
mapping(address => uint256) public publicSaleMinted;
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address payable _protocolFeeReceiver,
uint256 _protocolFeeNumerator,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) ERC721A(_name, _symbol) {
}
function whitelistMint(uint256 _amount) external payable callerIsUser {
if(whitelistSaleConfig.maxAmountPerAddress == 0){
require(<FILL_ME>)
}else{
require(whitelist[msg.sender], "StarBlockCollection: not in whitelist!");
}
_checkUserCanMint(whitelistSaleConfig, _amount, whitelistSaleMinted[msg.sender]);
whitelistSaleMinted[msg.sender] += _amount;
if(whitelistSaleConfig.price > 0 || (whitelistSaleConfig.price == 0 && msg.value > 0)){
_charge(whitelistSaleConfig.price * _amount);
}
_safeMint(msg.sender, _amount);
}
function publicMint(uint256 _amount) external payable callerIsUser {
}
function artistMint(uint256 _amount) external onlyOwner nonReentrant {
}
function userCanMintTotalAmount() public view returns (uint256) {
}
function _checkUserCanMint(SaleConfig memory _saleConfig, uint256 _amount, uint256 _mintedAmount) internal view {
}
function _charge(uint256 _amount) internal nonReentrant {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 _interfaceId) public view virtual override(IStarBlockCollection, ERC2981, ERC721A) returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _baseTokenURI) external onlyOwner nonReentrant {
}
function addWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function removeWhitelists(address[] memory addresses) external onlyOwner nonReentrant {
}
function setWhitelistAllowed(address[] memory addresses, uint256[] memory allowedAmounts) external onlyOwner nonReentrant {
}
function removeWhitelistAllowed(address[] memory addresses) external onlyOwner nonReentrant {
}
function setInfo(IERC20 _chargeToken, SaleConfig memory _whitelistSaleConfig,
SaleConfig memory _publicSaleConfig,
address _royaltyReceiver, uint96 _royaltyFeeNumerator) external onlyOwner nonReentrant {
}
function _checkSaleConfig(SaleConfig memory _saleConfig) internal pure returns (bool) {
}
function updateWhitelistSaleConfig(SaleConfig memory _whitelistSaleConfig) public onlyOwner {
}
function updateWhitelistSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updatePublicSaleConfig(SaleConfig memory _publicSaleConfig) public onlyOwner {
}
function updatePublicSaleEndTime(uint256 _newEndTime) external onlyOwner nonReentrant {
}
function updateChargeToken(IERC20 _chargeToken) public onlyOwner {
}
function updateProtocolFeeReceiverAndNumerator(address payable _protocolFeeReceiver, uint256 _protocolFeeNumerator) external nonReentrant {
}
function withdrawMoney() external onlyOwner {
}
function _getRevenueAmount() internal view returns (uint256 _amount){
}
function _transferRevenue(address payable _user, uint256 _amount) internal nonReentrant returns (bool _success) {
}
function _transferETH(address payable _user, uint256 _amount) internal returns (bool _success) {
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) public onlyOwner nonReentrant {
}
function deleteDefaultRoyalty() external onlyOwner nonReentrant {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
}
interface IStarBlockCollectionFactory {
event CollectionDeployed(IStarBlockCollection _collection, address _user, string _uuid);
function collections(IStarBlockCollection _collection) external view returns (address);
function collectionsAmount() external view returns (uint256);
function collectionProtocolFeeReceiver() external view returns (address payable);
function collectionProtocolFeeNumerator() external view returns (uint256);
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external returns (IStarBlockCollection _collection);
}
contract StarBlockCollectionFactory is IStarBlockCollectionFactory, Ownable, ReentrancyGuard {
uint256 public constant FEE_DENOMINATOR = 10000;
mapping(IStarBlockCollection => address) public collections;
uint256 public collectionsAmount;
address payable public collectionProtocolFeeReceiver;
uint256 public collectionProtocolFeeNumerator; //should less than FEE_DENOMINATOR
constructor(
address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator
) {
}
function deployCollection(
string memory _uuid,
string memory _name,
string memory _symbol,
uint256 _maxSupply,
IERC20 _chargeToken,
string memory _baseTokenURI,
uint256 _maxAmountForArtist,
address _royaltyReceiver,
uint96 _royaltyFeeNumerator
) external nonReentrant returns (IStarBlockCollection _collection) {
}
function updateCollectionProtocolFeeReceiverAndNumerator(address payable _collectionProtocolFeeReceiver,
uint256 _collectionProtocolFeeNumerator) external onlyOwner nonReentrant {
}
}
| whitelistAllowed[msg.sender]>=(whitelistSaleMinted[msg.sender]+_amount),"StarBlockCollection: whitelist reached allowed!" | 96,012 | whitelistAllowed[msg.sender]>=(whitelistSaleMinted[msg.sender]+_amount) |
"Not a contract address" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/access/Ownable.sol";
contract RandomContract is Ownable{
address private allowedContract;
constructor(){}
function setAllowedContract(address _contractAddress) public onlyOwner{
require(<FILL_ME>)
allowedContract = _contractAddress;
}
function random() public view returns (uint256) {
}
function isContract(address addr) internal view returns (bool){
}
}
| isContract(_contractAddress),"Not a contract address" | 96,200 | isContract(_contractAddress) |
"MerkleList: Merkle root has not been set" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {TokenOwnerChecker} from "src/contracts/utils/TokenOwnerChecker.sol";
/**
* @title MerkleList
* @author Syndicate Inc.
* @custom:license MIT license. Copyright (c) 2021-present Syndicate Inc.
*
* Abstract utility that allows a Module to verify that some data (a Merkle
* "leaf", such as an address) has a valid proof in a Merkle tree (such as a
* list of addresses) added by the token owner.
*/
abstract contract MerkleList is TokenOwnerChecker {
mapping(address => bytes32) public merkleRoot;
event MerkleRootUpdated(address indexed token, bytes32 indexed root);
function verifyProof(
address token,
bytes32[] calldata merkleProof,
bytes32 leaf
) internal {
require(<FILL_ME>)
bool valid = MerkleProof.verify(merkleProof, merkleRoot[token], leaf);
require(valid, "MerkleList: Valid proof required");
}
/// Set merkle root
/// @param token Token address
/// @param root New merkle root
/// @notice Only available to token owner
function updateMerkleRoot(address token, bytes32 root)
external
onlyTokenOwner(token)
{
}
}
| merkleRoot[token]>0,"MerkleList: Merkle root has not been set" | 96,317 | merkleRoot[token]>0 |
"max mint per wallet would be exceeded" | pragma solidity ^0.8.17;
contract TheFroggiez is ERC721A, Ownable, ReentrancyGuard {
//base uri
string private initBaseURI = "ipfs://bafybeigxgxsyxkbzef3gop4fbpjbdczyqnvpehxqeba6ilzvwhwocjbw5m/";
//max supply
uint256 public maxSupply = 2000;
//cost for each after one free mint
uint256 public cost = 0.003 ether;
//max 10 per wallet
uint256 public maxPerWallet = 10;
//max 10 per txn
uint256 public maxPertxn = 10;
//public mint status
bool public paused = false;
//constructor
constructor() ERC721A("The Froggiez", "FRGZ") {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
//mint for address
function mintforaddress(uint256 quantity, address reciever) public payable onlyOwner {
}
//mint
function mint(uint256 _mintAmount) public payable nonReentrant {
require(!paused, "contract is paused");
require(totalSupply() + _mintAmount <= maxSupply, "max supply would be exceeded");
uint minted = _numberMinted(msg.sender);
require(<FILL_ME>)
uint chargeableCount;
if (minted == 0) {
chargeableCount = _mintAmount - 1;
require(_mintAmount > 0, "amount must be greater than 0");
require(msg.value >= cost * chargeableCount, "value not met");
} else {
chargeableCount = _mintAmount;
require(_mintAmount > 0, "amount must be greater than 0");
require(msg.sender == tx.origin, "no smart contracts");
require(msg.value >= cost * chargeableCount, "value not met");
}
_safeMint(msg.sender, _mintAmount);
}
/* view function */
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
/* owner function */
function setBaseURI(string memory _initBaseURI) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMaxPerWallet(uint256 _walletLimit) public onlyOwner{
}
function setCost(uint _cost) public onlyOwner {
}
/* withdraw function*/
function withdraw() external onlyOwner nonReentrant {
}
}
| minted+_mintAmount<=maxPerWallet,"max mint per wallet would be exceeded" | 96,328 | minted+_mintAmount<=maxPerWallet |
"Protection: 120 sec/tx allowed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import { Ownable } from "./Ownable.sol";
contract TransactionThrottler is Ownable {
bool private _initialized;
bool private _restrictionActive;
uint256 private _tradingStart;
uint256 private _maxTransferAmount;
uint256 private constant _delayBetweenTx = 120;
mapping(address => uint256) private _previousTx;
event RestrictionActiveChanged(bool active);
event MaxTransferAmountChanged(uint256 maxTransferAmount);
function initAntibot() external onlyOwner {
}
function setMaxTransferAmount(uint256 amount) external onlyOwner {
}
function setRestrictionActive(bool active) external onlyOwner {
}
modifier transactionThrottler(
address sender,
address recipient,
uint256 amount
) {
if (_restrictionActive) {
if (_maxTransferAmount > 0) {
require(amount <= _maxTransferAmount, "Protection: Limit exceeded");
}
require(<FILL_ME>)
_previousTx[recipient] = block.timestamp;
require(_previousTx[sender] + _delayBetweenTx <= block.timestamp, "Protection: 120 sec/tx allowed");
_previousTx[sender] = block.timestamp;
}
_;
}
}
| _previousTx[recipient]+_delayBetweenTx<=block.timestamp,"Protection: 120 sec/tx allowed" | 96,510 | _previousTx[recipient]+_delayBetweenTx<=block.timestamp |
"Protection: 120 sec/tx allowed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import { Ownable } from "./Ownable.sol";
contract TransactionThrottler is Ownable {
bool private _initialized;
bool private _restrictionActive;
uint256 private _tradingStart;
uint256 private _maxTransferAmount;
uint256 private constant _delayBetweenTx = 120;
mapping(address => uint256) private _previousTx;
event RestrictionActiveChanged(bool active);
event MaxTransferAmountChanged(uint256 maxTransferAmount);
function initAntibot() external onlyOwner {
}
function setMaxTransferAmount(uint256 amount) external onlyOwner {
}
function setRestrictionActive(bool active) external onlyOwner {
}
modifier transactionThrottler(
address sender,
address recipient,
uint256 amount
) {
if (_restrictionActive) {
if (_maxTransferAmount > 0) {
require(amount <= _maxTransferAmount, "Protection: Limit exceeded");
}
require(_previousTx[recipient] + _delayBetweenTx <= block.timestamp, "Protection: 120 sec/tx allowed");
_previousTx[recipient] = block.timestamp;
require(<FILL_ME>)
_previousTx[sender] = block.timestamp;
}
_;
}
}
| _previousTx[sender]+_delayBetweenTx<=block.timestamp,"Protection: 120 sec/tx allowed" | 96,510 | _previousTx[sender]+_delayBetweenTx<=block.timestamp |
"ERC20: Transfer amount exceeds the MaxTnxAmount." | // SPDX-License-Identifier: Unlicensed
/**
_______ _ _______
|__ __| | | |__ __|
| |_ _ _ __| |__ ___ | |_ __ _ _ _ __ ___ _ __
| | | | | '__| '_ \ / _ \ | | '__| | | | '_ ` _ \| '_ \
| | |_| | | | |_) | (_) | | | | | |_| | | | | | | |_) |
|_|\__,_|_| |_.__/ \___/ |_|_| \__,_|_| |_| |_| .__/
| |
|_|
MAGA MAGA MAGA MAGA
Twitter: https://twitter.com/TurboTrumpETH
Telegram: https://t.me/TurboTrump
Website: https://www.turbotrump.xyz/
**/
pragma solidity ^0.8.16;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(
address recipient,
uint256 amount
) external returns (bool);
function allowance(
address owner,
address spender
) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address internal _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
using SafeMath for uint256;
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_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(
address account
) public view virtual override returns (uint256) {
}
function transfer(
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function allowance(
address owner,
address spender
) public view virtual override returns (uint256) {
}
function approve(
address spender,
uint256 amount
) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
interface IUniswapV2Factory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
)
external
payable
returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract PRESI is ERC20 {
using SafeMath for uint256;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcludedFromMaxWallet;
mapping(address => bool) private _isExcludedFromMaxTnxLimit;
mapping (address => bool) private _isBlacklisted;
address public marketingWallet;
address constant _burnAddress = 0x000000000000000000000000000000000000dEaD;
uint256 public buyFee = 30;
uint256 public sellFee = 30;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool inSwapAndLiquify;
bool public swapAndSendFeesEnabled = true;
bool public tradingEnabled = false;
uint256 public numTokensSellToSendFees;
uint256 public maxWalletBalance;
uint256 public maxTnxAmount;
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event swapAndSendFeesEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap() {
}
constructor() ERC20("Turbo Trump", "PRESI") {
}
function includeAndExcludeFromFee(
address account,
bool value
) public onlyOwner {
}
function includeAndExcludedFromMaxWallet(address account, bool value) public onlyOwner {
}
function includeAndExcludedFromMaxTnxLimit(address account, bool value) public onlyOwner {
}
function isExcludedFromFee(address account) public view returns (bool) {
}
function isExcludedFromMaxWallet(address account) public view returns(bool){
}
function isExcludedFromMaxTnxLimit(address account) public view returns(bool) {
}
function removeFromBlackList(address account) external onlyOwner {
}
function isBlackList(address account) external view returns (bool) {
}
function addToBlackList(address account) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function setBuyAndSellFee(
uint256 bFee,
uint256 sFee
) external onlyOwner {
}
function setmarketingWallet(address _addr) external onlyOwner {
}
function setMaxBalance(uint256 maxBalancePercent) external onlyOwner {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner {
}
function setNumTokensSellToSendFees(uint256 amount) external onlyOwner {
}
function setswapAndSendFeesEnabled(bool _enabled) external onlyOwner {
}
receive() external payable {}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(!_isBlacklisted[from] && !_isBlacklisted[to], "ERC20: This address is blacklisted");
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (from != owner() && !tradingEnabled) {
require(tradingEnabled, "Trading is not enabled yet");
}
if (from != owner() && to != owner())
require(<FILL_ME>)
if (
from != owner() &&
to != address(this) &&
to != _burnAddress &&
to != uniswapV2Pair
) {
uint256 currentBalance = balanceOf(to);
require(
_isExcludedFromMaxWallet[to] ||
(currentBalance + amount <= maxWalletBalance),
"ERC20: Reached Max wallet holding"
);
}
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinTokenBalance = contractTokenBalance >=
numTokensSellToSendFees;
if (
overMinTokenBalance &&
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndSendFeesEnabled
) {
contractTokenBalance = numTokensSellToSendFees;
swapBack(contractTokenBalance);
}
bool takeFee = true;
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
super._transfer(from, to, amount);
takeFee = false;
} else {
if (from == uniswapV2Pair) {
uint256 marketingTokens = amount.mul(buyFee).div(100);
amount = amount.sub(marketingTokens);
super._transfer(from, address(this), marketingTokens);
super._transfer(from, to, amount);
} else if (to == uniswapV2Pair) {
uint256 marketingTokens = amount.mul(sellFee).div(
100
);
amount = amount.sub(marketingTokens);
super._transfer(from, address(this), marketingTokens);
super._transfer(from, to, amount);
} else {
super._transfer(from, to, amount);
}
}
}
function swapBack(uint256 contractBalance) private lockTheSwap {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
}
| _isExcludedFromMaxTnxLimit[from]||_isExcludedFromMaxTnxLimit[to]||amount<=maxTnxAmount,"ERC20: Transfer amount exceeds the MaxTnxAmount." | 96,521 | _isExcludedFromMaxTnxLimit[from]||_isExcludedFromMaxTnxLimit[to]||amount<=maxTnxAmount |
"ERC20: Reached Max wallet holding" | // SPDX-License-Identifier: Unlicensed
/**
_______ _ _______
|__ __| | | |__ __|
| |_ _ _ __| |__ ___ | |_ __ _ _ _ __ ___ _ __
| | | | | '__| '_ \ / _ \ | | '__| | | | '_ ` _ \| '_ \
| | |_| | | | |_) | (_) | | | | | |_| | | | | | | |_) |
|_|\__,_|_| |_.__/ \___/ |_|_| \__,_|_| |_| |_| .__/
| |
|_|
MAGA MAGA MAGA MAGA
Twitter: https://twitter.com/TurboTrumpETH
Telegram: https://t.me/TurboTrump
Website: https://www.turbotrump.xyz/
**/
pragma solidity ^0.8.16;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(
address recipient,
uint256 amount
) external returns (bool);
function allowance(
address owner,
address spender
) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address internal _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
using SafeMath for uint256;
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_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(
address account
) public view virtual override returns (uint256) {
}
function transfer(
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function allowance(
address owner,
address spender
) public view virtual override returns (uint256) {
}
function approve(
address spender,
uint256 amount
) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
interface IUniswapV2Factory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
)
external
payable
returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract PRESI is ERC20 {
using SafeMath for uint256;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcludedFromMaxWallet;
mapping(address => bool) private _isExcludedFromMaxTnxLimit;
mapping (address => bool) private _isBlacklisted;
address public marketingWallet;
address constant _burnAddress = 0x000000000000000000000000000000000000dEaD;
uint256 public buyFee = 30;
uint256 public sellFee = 30;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool inSwapAndLiquify;
bool public swapAndSendFeesEnabled = true;
bool public tradingEnabled = false;
uint256 public numTokensSellToSendFees;
uint256 public maxWalletBalance;
uint256 public maxTnxAmount;
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event swapAndSendFeesEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap() {
}
constructor() ERC20("Turbo Trump", "PRESI") {
}
function includeAndExcludeFromFee(
address account,
bool value
) public onlyOwner {
}
function includeAndExcludedFromMaxWallet(address account, bool value) public onlyOwner {
}
function includeAndExcludedFromMaxTnxLimit(address account, bool value) public onlyOwner {
}
function isExcludedFromFee(address account) public view returns (bool) {
}
function isExcludedFromMaxWallet(address account) public view returns(bool){
}
function isExcludedFromMaxTnxLimit(address account) public view returns(bool) {
}
function removeFromBlackList(address account) external onlyOwner {
}
function isBlackList(address account) external view returns (bool) {
}
function addToBlackList(address account) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function setBuyAndSellFee(
uint256 bFee,
uint256 sFee
) external onlyOwner {
}
function setmarketingWallet(address _addr) external onlyOwner {
}
function setMaxBalance(uint256 maxBalancePercent) external onlyOwner {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner {
}
function setNumTokensSellToSendFees(uint256 amount) external onlyOwner {
}
function setswapAndSendFeesEnabled(bool _enabled) external onlyOwner {
}
receive() external payable {}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(!_isBlacklisted[from] && !_isBlacklisted[to], "ERC20: This address is blacklisted");
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (from != owner() && !tradingEnabled) {
require(tradingEnabled, "Trading is not enabled yet");
}
if (from != owner() && to != owner())
require(
_isExcludedFromMaxTnxLimit[from] ||
_isExcludedFromMaxTnxLimit[to] ||
amount <= maxTnxAmount,
"ERC20: Transfer amount exceeds the MaxTnxAmount."
);
if (
from != owner() &&
to != address(this) &&
to != _burnAddress &&
to != uniswapV2Pair
) {
uint256 currentBalance = balanceOf(to);
require(<FILL_ME>)
}
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinTokenBalance = contractTokenBalance >=
numTokensSellToSendFees;
if (
overMinTokenBalance &&
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndSendFeesEnabled
) {
contractTokenBalance = numTokensSellToSendFees;
swapBack(contractTokenBalance);
}
bool takeFee = true;
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
super._transfer(from, to, amount);
takeFee = false;
} else {
if (from == uniswapV2Pair) {
uint256 marketingTokens = amount.mul(buyFee).div(100);
amount = amount.sub(marketingTokens);
super._transfer(from, address(this), marketingTokens);
super._transfer(from, to, amount);
} else if (to == uniswapV2Pair) {
uint256 marketingTokens = amount.mul(sellFee).div(
100
);
amount = amount.sub(marketingTokens);
super._transfer(from, address(this), marketingTokens);
super._transfer(from, to, amount);
} else {
super._transfer(from, to, amount);
}
}
}
function swapBack(uint256 contractBalance) private lockTheSwap {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
}
| _isExcludedFromMaxWallet[to]||(currentBalance+amount<=maxWalletBalance),"ERC20: Reached Max wallet holding" | 96,521 | _isExcludedFromMaxWallet[to]||(currentBalance+amount<=maxWalletBalance) |
ExceptionsLibrary.ADDRESS_ZERO | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import "../interfaces/vaults/IPancakeSwapVaultGovernance.sol";
import "../interfaces/vaults/IPancakeSwapVault.sol";
import "../libraries/ExceptionsLibrary.sol";
import "../utils/ContractMeta.sol";
import "./VaultGovernance.sol";
/// @notice Governance that manages all PancakeSwap Vaults params and can deploy a new PancakeSwap Vault.
contract PancakeSwapVaultGovernance is ContractMeta, IPancakeSwapVaultGovernance, VaultGovernance {
/// @notice Creates a new contract.
/// @param internalParams_ Initial Internal Params
/// @param delayedProtocolParams_ Initial Protocol Params
constructor(InternalParams memory internalParams_, DelayedProtocolParams memory delayedProtocolParams_)
VaultGovernance(internalParams_)
{
require(<FILL_ME>)
require(address(delayedProtocolParams_.oracle) != address(0), ExceptionsLibrary.ADDRESS_ZERO);
_delayedProtocolParams = abi.encode(delayedProtocolParams_);
}
// ------------------- EXTERNAL, VIEW -------------------
/// @inheritdoc IPancakeSwapVaultGovernance
function delayedProtocolParams() public view returns (DelayedProtocolParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stagedDelayedProtocolParams() external view returns (DelayedProtocolParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function strategyParams(uint256 nft) external view returns (StrategyParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stagedDelayedStrategyParams(uint256 nft) external view returns (DelayedStrategyParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function delayedStrategyParams(uint256 nft) external view returns (DelayedStrategyParams memory) {
}
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
// ------------------- EXTERNAL, MUTATING -------------------
/// @inheritdoc IPancakeSwapVaultGovernance
function setStrategyParams(uint256 nft, StrategyParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stageDelayedProtocolParams(DelayedProtocolParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function commitDelayedProtocolParams() external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stageDelayedStrategyParams(uint256 nft, DelayedStrategyParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function commitDelayedStrategyParams(uint256 nft) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function createVault(
address[] memory vaultTokens_,
address owner_,
uint24 fee_,
address helper_,
address masterChef_,
address erc20Vault_
) external returns (IPancakeSwapVault vault, uint256 nft) {
}
// ------------------- INTERNAL, VIEW -------------------
function _contractName() internal pure override returns (bytes32) {
}
function _contractVersion() internal pure override returns (bytes32) {
}
// -------------------------- EVENTS --------------------------
/// @notice Emitted when new DelayedProtocolParams are staged for commit
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param params New params that were staged for commit
/// @param when When the params could be committed
event StageDelayedProtocolParams(
address indexed origin,
address indexed sender,
DelayedProtocolParams params,
uint256 when
);
/// @notice Emitted when new DelayedProtocolParams are committed
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param params New params that are committed
event CommitDelayedProtocolParams(address indexed origin, address indexed sender, DelayedProtocolParams params);
/// @notice Emitted when new DelayedStrategyParams are staged for commit
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New params that were staged for commit
/// @param when When the params could be committed
event StageDelayedStrategyParams(
address indexed origin,
address indexed sender,
uint256 indexed nft,
DelayedStrategyParams params,
uint256 when
);
/// @notice Emitted when new DelayedStrategyParams are committed
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New params that are committed
event CommitDelayedStrategyParams(
address indexed origin,
address indexed sender,
uint256 indexed nft,
DelayedStrategyParams params
);
/// @notice Emitted when new StrategyParams are set
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New set params
event SetStrategyParams(address indexed origin, address indexed sender, uint256 indexed nft, StrategyParams params);
}
| address(delayedProtocolParams_.positionManager)!=address(0),ExceptionsLibrary.ADDRESS_ZERO | 96,591 | address(delayedProtocolParams_.positionManager)!=address(0) |
ExceptionsLibrary.ADDRESS_ZERO | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import "../interfaces/vaults/IPancakeSwapVaultGovernance.sol";
import "../interfaces/vaults/IPancakeSwapVault.sol";
import "../libraries/ExceptionsLibrary.sol";
import "../utils/ContractMeta.sol";
import "./VaultGovernance.sol";
/// @notice Governance that manages all PancakeSwap Vaults params and can deploy a new PancakeSwap Vault.
contract PancakeSwapVaultGovernance is ContractMeta, IPancakeSwapVaultGovernance, VaultGovernance {
/// @notice Creates a new contract.
/// @param internalParams_ Initial Internal Params
/// @param delayedProtocolParams_ Initial Protocol Params
constructor(InternalParams memory internalParams_, DelayedProtocolParams memory delayedProtocolParams_)
VaultGovernance(internalParams_)
{
require(address(delayedProtocolParams_.positionManager) != address(0), ExceptionsLibrary.ADDRESS_ZERO);
require(<FILL_ME>)
_delayedProtocolParams = abi.encode(delayedProtocolParams_);
}
// ------------------- EXTERNAL, VIEW -------------------
/// @inheritdoc IPancakeSwapVaultGovernance
function delayedProtocolParams() public view returns (DelayedProtocolParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stagedDelayedProtocolParams() external view returns (DelayedProtocolParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function strategyParams(uint256 nft) external view returns (StrategyParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stagedDelayedStrategyParams(uint256 nft) external view returns (DelayedStrategyParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function delayedStrategyParams(uint256 nft) external view returns (DelayedStrategyParams memory) {
}
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
// ------------------- EXTERNAL, MUTATING -------------------
/// @inheritdoc IPancakeSwapVaultGovernance
function setStrategyParams(uint256 nft, StrategyParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stageDelayedProtocolParams(DelayedProtocolParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function commitDelayedProtocolParams() external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stageDelayedStrategyParams(uint256 nft, DelayedStrategyParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function commitDelayedStrategyParams(uint256 nft) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function createVault(
address[] memory vaultTokens_,
address owner_,
uint24 fee_,
address helper_,
address masterChef_,
address erc20Vault_
) external returns (IPancakeSwapVault vault, uint256 nft) {
}
// ------------------- INTERNAL, VIEW -------------------
function _contractName() internal pure override returns (bytes32) {
}
function _contractVersion() internal pure override returns (bytes32) {
}
// -------------------------- EVENTS --------------------------
/// @notice Emitted when new DelayedProtocolParams are staged for commit
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param params New params that were staged for commit
/// @param when When the params could be committed
event StageDelayedProtocolParams(
address indexed origin,
address indexed sender,
DelayedProtocolParams params,
uint256 when
);
/// @notice Emitted when new DelayedProtocolParams are committed
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param params New params that are committed
event CommitDelayedProtocolParams(address indexed origin, address indexed sender, DelayedProtocolParams params);
/// @notice Emitted when new DelayedStrategyParams are staged for commit
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New params that were staged for commit
/// @param when When the params could be committed
event StageDelayedStrategyParams(
address indexed origin,
address indexed sender,
uint256 indexed nft,
DelayedStrategyParams params,
uint256 when
);
/// @notice Emitted when new DelayedStrategyParams are committed
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New params that are committed
event CommitDelayedStrategyParams(
address indexed origin,
address indexed sender,
uint256 indexed nft,
DelayedStrategyParams params
);
/// @notice Emitted when new StrategyParams are set
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New set params
event SetStrategyParams(address indexed origin, address indexed sender, uint256 indexed nft, StrategyParams params);
}
| address(delayedProtocolParams_.oracle)!=address(0),ExceptionsLibrary.ADDRESS_ZERO | 96,591 | address(delayedProtocolParams_.oracle)!=address(0) |
ExceptionsLibrary.ADDRESS_ZERO | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import "../interfaces/vaults/IPancakeSwapVaultGovernance.sol";
import "../interfaces/vaults/IPancakeSwapVault.sol";
import "../libraries/ExceptionsLibrary.sol";
import "../utils/ContractMeta.sol";
import "./VaultGovernance.sol";
/// @notice Governance that manages all PancakeSwap Vaults params and can deploy a new PancakeSwap Vault.
contract PancakeSwapVaultGovernance is ContractMeta, IPancakeSwapVaultGovernance, VaultGovernance {
/// @notice Creates a new contract.
/// @param internalParams_ Initial Internal Params
/// @param delayedProtocolParams_ Initial Protocol Params
constructor(InternalParams memory internalParams_, DelayedProtocolParams memory delayedProtocolParams_)
VaultGovernance(internalParams_)
{
}
// ------------------- EXTERNAL, VIEW -------------------
/// @inheritdoc IPancakeSwapVaultGovernance
function delayedProtocolParams() public view returns (DelayedProtocolParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stagedDelayedProtocolParams() external view returns (DelayedProtocolParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function strategyParams(uint256 nft) external view returns (StrategyParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stagedDelayedStrategyParams(uint256 nft) external view returns (DelayedStrategyParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function delayedStrategyParams(uint256 nft) external view returns (DelayedStrategyParams memory) {
}
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
// ------------------- EXTERNAL, MUTATING -------------------
/// @inheritdoc IPancakeSwapVaultGovernance
function setStrategyParams(uint256 nft, StrategyParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stageDelayedProtocolParams(DelayedProtocolParams calldata params) external {
require(<FILL_ME>)
require(address(params.oracle) != address(0), ExceptionsLibrary.ADDRESS_ZERO);
_stageDelayedProtocolParams(abi.encode(params));
emit StageDelayedProtocolParams(tx.origin, msg.sender, params, _delayedProtocolParamsTimestamp);
}
/// @inheritdoc IPancakeSwapVaultGovernance
function commitDelayedProtocolParams() external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stageDelayedStrategyParams(uint256 nft, DelayedStrategyParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function commitDelayedStrategyParams(uint256 nft) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function createVault(
address[] memory vaultTokens_,
address owner_,
uint24 fee_,
address helper_,
address masterChef_,
address erc20Vault_
) external returns (IPancakeSwapVault vault, uint256 nft) {
}
// ------------------- INTERNAL, VIEW -------------------
function _contractName() internal pure override returns (bytes32) {
}
function _contractVersion() internal pure override returns (bytes32) {
}
// -------------------------- EVENTS --------------------------
/// @notice Emitted when new DelayedProtocolParams are staged for commit
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param params New params that were staged for commit
/// @param when When the params could be committed
event StageDelayedProtocolParams(
address indexed origin,
address indexed sender,
DelayedProtocolParams params,
uint256 when
);
/// @notice Emitted when new DelayedProtocolParams are committed
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param params New params that are committed
event CommitDelayedProtocolParams(address indexed origin, address indexed sender, DelayedProtocolParams params);
/// @notice Emitted when new DelayedStrategyParams are staged for commit
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New params that were staged for commit
/// @param when When the params could be committed
event StageDelayedStrategyParams(
address indexed origin,
address indexed sender,
uint256 indexed nft,
DelayedStrategyParams params,
uint256 when
);
/// @notice Emitted when new DelayedStrategyParams are committed
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New params that are committed
event CommitDelayedStrategyParams(
address indexed origin,
address indexed sender,
uint256 indexed nft,
DelayedStrategyParams params
);
/// @notice Emitted when new StrategyParams are set
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New set params
event SetStrategyParams(address indexed origin, address indexed sender, uint256 indexed nft, StrategyParams params);
}
| address(params.positionManager)!=address(0),ExceptionsLibrary.ADDRESS_ZERO | 96,591 | address(params.positionManager)!=address(0) |
ExceptionsLibrary.ADDRESS_ZERO | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import "../interfaces/vaults/IPancakeSwapVaultGovernance.sol";
import "../interfaces/vaults/IPancakeSwapVault.sol";
import "../libraries/ExceptionsLibrary.sol";
import "../utils/ContractMeta.sol";
import "./VaultGovernance.sol";
/// @notice Governance that manages all PancakeSwap Vaults params and can deploy a new PancakeSwap Vault.
contract PancakeSwapVaultGovernance is ContractMeta, IPancakeSwapVaultGovernance, VaultGovernance {
/// @notice Creates a new contract.
/// @param internalParams_ Initial Internal Params
/// @param delayedProtocolParams_ Initial Protocol Params
constructor(InternalParams memory internalParams_, DelayedProtocolParams memory delayedProtocolParams_)
VaultGovernance(internalParams_)
{
}
// ------------------- EXTERNAL, VIEW -------------------
/// @inheritdoc IPancakeSwapVaultGovernance
function delayedProtocolParams() public view returns (DelayedProtocolParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stagedDelayedProtocolParams() external view returns (DelayedProtocolParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function strategyParams(uint256 nft) external view returns (StrategyParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stagedDelayedStrategyParams(uint256 nft) external view returns (DelayedStrategyParams memory) {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function delayedStrategyParams(uint256 nft) external view returns (DelayedStrategyParams memory) {
}
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
// ------------------- EXTERNAL, MUTATING -------------------
/// @inheritdoc IPancakeSwapVaultGovernance
function setStrategyParams(uint256 nft, StrategyParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stageDelayedProtocolParams(DelayedProtocolParams calldata params) external {
require(address(params.positionManager) != address(0), ExceptionsLibrary.ADDRESS_ZERO);
require(<FILL_ME>)
_stageDelayedProtocolParams(abi.encode(params));
emit StageDelayedProtocolParams(tx.origin, msg.sender, params, _delayedProtocolParamsTimestamp);
}
/// @inheritdoc IPancakeSwapVaultGovernance
function commitDelayedProtocolParams() external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function stageDelayedStrategyParams(uint256 nft, DelayedStrategyParams calldata params) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function commitDelayedStrategyParams(uint256 nft) external {
}
/// @inheritdoc IPancakeSwapVaultGovernance
function createVault(
address[] memory vaultTokens_,
address owner_,
uint24 fee_,
address helper_,
address masterChef_,
address erc20Vault_
) external returns (IPancakeSwapVault vault, uint256 nft) {
}
// ------------------- INTERNAL, VIEW -------------------
function _contractName() internal pure override returns (bytes32) {
}
function _contractVersion() internal pure override returns (bytes32) {
}
// -------------------------- EVENTS --------------------------
/// @notice Emitted when new DelayedProtocolParams are staged for commit
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param params New params that were staged for commit
/// @param when When the params could be committed
event StageDelayedProtocolParams(
address indexed origin,
address indexed sender,
DelayedProtocolParams params,
uint256 when
);
/// @notice Emitted when new DelayedProtocolParams are committed
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param params New params that are committed
event CommitDelayedProtocolParams(address indexed origin, address indexed sender, DelayedProtocolParams params);
/// @notice Emitted when new DelayedStrategyParams are staged for commit
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New params that were staged for commit
/// @param when When the params could be committed
event StageDelayedStrategyParams(
address indexed origin,
address indexed sender,
uint256 indexed nft,
DelayedStrategyParams params,
uint256 when
);
/// @notice Emitted when new DelayedStrategyParams are committed
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New params that are committed
event CommitDelayedStrategyParams(
address indexed origin,
address indexed sender,
uint256 indexed nft,
DelayedStrategyParams params
);
/// @notice Emitted when new StrategyParams are set
/// @param origin Origin of the transaction (tx.origin)
/// @param sender Sender of the call (msg.sender)
/// @param nft VaultRegistry NFT of the vault
/// @param params New set params
event SetStrategyParams(address indexed origin, address indexed sender, uint256 indexed nft, StrategyParams params);
}
| address(params.oracle)!=address(0),ExceptionsLibrary.ADDRESS_ZERO | 96,591 | address(params.oracle)!=address(0) |
"FreeERC20: Max holding limit violation" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.20;
import "solmate/tokens/ERC20.sol";
import "solmate/auth/Owned.sol";
import "./IUniswapV2Router01.sol";
import "./SafeMath.sol";
contract ERC20Token is ERC20, Owned {
using SafeMath for uint256;
uint public max_holding;
uint public max_transfer;
uint public sell_tax_threshold;
uint public buy_tax;
uint public sell_tax;
uint public in_swap = 1; // 1 is false, 2 is true
uint public is_trading_enabled = 1; // 1 is false, 2 is true
uint public maxSupply;
address public tax_receiver;
mapping(address => bool) public lps;
mapping(address => bool) public routers;
mapping(address => bool) public anti_whale_exceptions;
mapping(address => bool) public tax_exceptions;
address public weth;
address public uni_router;
address public uni_factory;
constructor(
string memory name,
string memory ticker,
uint8 decimals,
uint _totalSupply,
uint _maxSupply,
uint _max_holding,
uint _max_transfer,
uint _buy_tax,
uint _sell_tax,
address _uni_router,
address _weth
) ERC20(name, ticker, decimals) Owned(msg.sender) {
}
modifier lockTheSwap() {
}
function transfer(
address to,
uint256 amount
) public override returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
}
function _transfer(address from, address to, uint amount) private {
require(
is_trading_enabled == 2 || tx.origin == owner,
"FreeERC20: Trading isnt live"
);
require(from != address(0), "FreeERC20: Transfer from the zero address");
require(to != address(0), "FreeERC20: Transfer to the zero address");
require(amount > 0, "FreeERC20: Transfer amount must be greater than zero");
uint256 taxAmount = 0;
if (from != owner && to != owner && tx.origin != owner) {
bool isSelling;
if (lps[from] && !routers[to] && !tax_exceptions[to]) {
require(
max_transfer >= amount || anti_whale_exceptions[to],
"FreeERC20: Max tx limit violation 1"
);
taxAmount = amount.mul(buy_tax).div(100);
}
if (lps[to] && from != address(this) && !tax_exceptions[from]) {
isSelling = true;
require(
max_transfer >= amount || anti_whale_exceptions[from],
"FreeERC20: Max tx limit violation 2"
);
taxAmount = amount.mul(sell_tax).div(100);
}
uint256 contractTokenBalance = balanceOf[address(this)];
if (
in_swap == 1 &&
isSelling &&
contractTokenBalance > sell_tax_threshold
) {
swapTokensForEth(contractTokenBalance);
}
}
if (taxAmount > 0) {
balanceOf[address(this)] = balanceOf[address(this)].add(taxAmount);
emit Transfer(from, address(this), taxAmount);
} else {
require(
max_transfer >= amount || anti_whale_exceptions[from],
"FreeERC20: Max tx limit violation 3"
);
}
balanceOf[from] = balanceOf[from].sub(amount);
balanceOf[to] = balanceOf[to].add(amount.sub(taxAmount));
require(<FILL_ME>)
emit Transfer(from, to, amount.sub(taxAmount));
}
function swapTokensForEth(uint amount) private lockTheSwap {
}
function isAntiWhaleEnabled() external view returns (bool) {
}
function mint(address receiver, uint amount) external onlyOwner {
}
function setLimits(
uint _max_holding,
uint _max_transfer
) external onlyOwner {
}
function setAntiWhaleException(address user, bool val) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function setUniRouter(address newRouter, address newFactory) external onlyOwner {
}
function setAmm(address lp) public onlyOwner {
}
function addRouter(address router) external onlyOwner {
}
function setExcludeFromFee(address addy, bool val) external onlyOwner {
}
function setSwapThreshold(uint newThreshold) external onlyOwner {
}
function setTaxes(uint _buy_tax, uint _sell_tax) external onlyOwner {
}
function setTaxReceiver(address _tax_receiver) external onlyOwner {
}
function addLp(uint amount) external payable onlyOwner {
}
function uniV2Pair() public view returns (address pair) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(
address tokenA,
address tokenB
) internal view returns (address pair) {
}
function sortTokens(
address tokenA,
address tokenB
) internal pure returns (address token0, address token1) {
}
receive() external payable {}
function withdraw() external onlyOwner {
}
function version() public pure returns (uint) {
}
}
| balanceOf[to]<=max_holding||anti_whale_exceptions[to]||tx.origin==owner,"FreeERC20: Max holding limit violation" | 96,611 | balanceOf[to]<=max_holding||anti_whale_exceptions[to]||tx.origin==owner |
"FreeERC20: Mint amount too high" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.20;
import "solmate/tokens/ERC20.sol";
import "solmate/auth/Owned.sol";
import "./IUniswapV2Router01.sol";
import "./SafeMath.sol";
contract ERC20Token is ERC20, Owned {
using SafeMath for uint256;
uint public max_holding;
uint public max_transfer;
uint public sell_tax_threshold;
uint public buy_tax;
uint public sell_tax;
uint public in_swap = 1; // 1 is false, 2 is true
uint public is_trading_enabled = 1; // 1 is false, 2 is true
uint public maxSupply;
address public tax_receiver;
mapping(address => bool) public lps;
mapping(address => bool) public routers;
mapping(address => bool) public anti_whale_exceptions;
mapping(address => bool) public tax_exceptions;
address public weth;
address public uni_router;
address public uni_factory;
constructor(
string memory name,
string memory ticker,
uint8 decimals,
uint _totalSupply,
uint _maxSupply,
uint _max_holding,
uint _max_transfer,
uint _buy_tax,
uint _sell_tax,
address _uni_router,
address _weth
) ERC20(name, ticker, decimals) Owned(msg.sender) {
}
modifier lockTheSwap() {
}
function transfer(
address to,
uint256 amount
) public override returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
}
function _transfer(address from, address to, uint amount) private {
}
function swapTokensForEth(uint amount) private lockTheSwap {
}
function isAntiWhaleEnabled() external view returns (bool) {
}
function mint(address receiver, uint amount) external onlyOwner {
require(<FILL_ME>)
_mint(receiver, amount);
}
function setLimits(
uint _max_holding,
uint _max_transfer
) external onlyOwner {
}
function setAntiWhaleException(address user, bool val) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function setUniRouter(address newRouter, address newFactory) external onlyOwner {
}
function setAmm(address lp) public onlyOwner {
}
function addRouter(address router) external onlyOwner {
}
function setExcludeFromFee(address addy, bool val) external onlyOwner {
}
function setSwapThreshold(uint newThreshold) external onlyOwner {
}
function setTaxes(uint _buy_tax, uint _sell_tax) external onlyOwner {
}
function setTaxReceiver(address _tax_receiver) external onlyOwner {
}
function addLp(uint amount) external payable onlyOwner {
}
function uniV2Pair() public view returns (address pair) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(
address tokenA,
address tokenB
) internal view returns (address pair) {
}
function sortTokens(
address tokenA,
address tokenB
) internal pure returns (address token0, address token1) {
}
receive() external payable {}
function withdraw() external onlyOwner {
}
function version() public pure returns (uint) {
}
}
| totalSupply+amount<=maxSupply,"FreeERC20: Mint amount too high" | 96,611 | totalSupply+amount<=maxSupply |
"Party::contribute: must hold tokens to contribute" | /*
__/\\\\\\\\\\\\\_____________________________________________________________/\\\\\\\\\\\\________/\\\\\\\\\__________/\\\\\______
_\/\\\/////////\\\__________________________________________________________\/\\\////////\\\____/\\\\\\\\\\\\\______/\\\///\\\____
_\/\\\_______\/\\\__________________________________/\\\_________/\\\__/\\\_\/\\\______\//\\\__/\\\/////////\\\___/\\\/__\///\\\__
_\/\\\\\\\\\\\\\/___/\\\\\\\\\_____/\\/\\\\\\\___/\\\\\\\\\\\___\//\\\/\\\__\/\\\_______\/\\\_\/\\\_______\/\\\__/\\\______\//\\\_
_\/\\\/////////____\////////\\\___\/\\\/////\\\_\////\\\////_____\//\\\\\___\/\\\_______\/\\\_\/\\\\\\\\\\\\\\\_\/\\\_______\/\\\_
_\/\\\_______________/\\\\\\\\\\__\/\\\___\///_____\/\\\__________\//\\\____\/\\\_______\/\\\_\/\\\/////////\\\_\//\\\______/\\\__
_\/\\\______________/\\\/////\\\__\/\\\____________\/\\\_/\\___/\\_/\\\_____\/\\\_______/\\\__\/\\\_______\/\\\__\///\\\__/\\\____
_\/\\\_____________\//\\\\\\\\/\\_\/\\\____________\//\\\\\___\//\\\\/______\/\\\\\\\\\\\\/___\/\\\_______\/\\\____\///\\\\\/_____
_\///_______________\////////\//__\///______________\/////_____\////________\////////////_____\///________\///_______\/////_______
Anna Carroll for PartyDAO
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
// ============ External Imports: Inherited Contracts ============
// NOTE: we inherit from OpenZeppelin upgradeable contracts
// because of the proxy structure used for cheaper deploys
// (the proxies are NOT actually upgradeable)
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import {ERC721HolderUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol";
// ============ External Imports: External Contracts & Contract Interfaces ============
import {IERC721VaultFactory} from "./external/interfaces/IERC721VaultFactory.sol";
import {ITokenVault} from "./external/interfaces/ITokenVault.sol";
import {IWETH} from "./external/interfaces/IWETH.sol";
import {IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// ============ Internal Imports ============
import {Structs} from "./Structs.sol";
contract Party is ReentrancyGuardUpgradeable, ERC721HolderUpgradeable {
// ============ Enums ============
// State Transitions:
// (0) ACTIVE on deploy
// (1) WON if the Party has won the token
// (2) LOST if the Party is over & did not win the token
enum PartyStatus {
ACTIVE,
WON,
LOST
}
// ============ Structs ============
struct Contribution {
uint256 amount;
uint256 previousTotalContributedToParty;
}
// ============ Internal Constants ============
// tokens are minted at a rate of 1 ETH : 1000 tokens
uint16 internal constant TOKEN_SCALE = 1000;
// PartyDAO receives an ETH fee equal to 2.5% of the amount spent
uint16 internal constant ETH_FEE_BASIS_POINTS = 250;
// PartyDAO receives a token fee equal to 2.5% of the total token supply
uint16 internal constant TOKEN_FEE_BASIS_POINTS = 250;
// token is relisted on Fractional with an
// initial reserve price equal to 2x the price of the token
uint8 internal constant RESALE_MULTIPLIER = 2;
// ============ Immutables ============
address public immutable partyFactory;
address public immutable partyDAOMultisig;
IERC721VaultFactory public immutable tokenVaultFactory;
IWETH public immutable weth;
// ============ Public Not-Mutated Storage ============
// NFT contract
IERC721Metadata public nftContract;
// ID of token within NFT contract
uint256 public tokenId;
// Fractionalized NFT vault responsible for post-purchase experience
ITokenVault public tokenVault;
// the address that will receive a portion of the tokens
// if the Party successfully buys the token
address public splitRecipient;
// percent of the total token supply
// taken by the splitRecipient
uint256 public splitBasisPoints;
// address of token that users need to hold to contribute
// address(0) if party is not token gated
IERC20 public gatedToken;
// amount of token that users need to hold to contribute
// 0 if party is not token gated
uint256 public gatedTokenAmount;
// ERC-20 name and symbol for fractional tokens
string public name;
string public symbol;
// ============ Public Mutable Storage ============
// state of the contract
PartyStatus public partyStatus;
// total ETH deposited by all contributors
uint256 public totalContributedToParty;
// the total spent buying the token;
// 0 if the NFT is not won; price of token + 2.5% PartyDAO fee if NFT is won
uint256 public totalSpent;
// contributor => array of Contributions
mapping(address => Contribution[]) public contributions;
// contributor => total amount contributed
mapping(address => uint256) public totalContributed;
// contributor => true if contribution has been claimed
mapping(address => bool) public claimed;
// ============ Events ============
event Contributed(
address indexed contributor,
uint256 amount,
uint256 previousTotalContributedToParty,
uint256 totalFromContributor
);
event Claimed(
address indexed contributor,
uint256 totalContributed,
uint256 excessContribution,
uint256 tokenAmount
);
// ======== Modifiers =========
modifier onlyPartyDAO() {
}
// ======== Constructor =========
constructor(
address _partyDAOMultisig,
address _tokenVaultFactory,
address _weth
) {
}
// ======== Internal: Initialize =========
function __Party_init(
address _nftContract,
Structs.AddressAndAmount calldata _split,
Structs.AddressAndAmount calldata _tokenGate,
string memory _name,
string memory _symbol
) internal {
}
// ======== Internal: Contribute =========
/**
* @notice Contribute to the Party's treasury
* while the Party is still active
* @dev Emits a Contributed event upon success; callable by anyone
*/
function _contribute() internal {
require(
partyStatus == PartyStatus.ACTIVE,
"Party::contribute: party not active"
);
address _contributor = msg.sender;
uint256 _amount = msg.value;
// if token gated, require that contributor has balance of gated tokens
if (address(gatedToken) != address(0)) {
require(<FILL_ME>)
}
require(_amount > 0, "Party::contribute: must contribute more than 0");
// get the current contract balance
uint256 _previousTotalContributedToParty = totalContributedToParty;
// add contribution to contributor's array of contributions
Contribution memory _contribution = Contribution({
amount: _amount,
previousTotalContributedToParty: _previousTotalContributedToParty
});
contributions[_contributor].push(_contribution);
// add to contributor's total contribution
totalContributed[_contributor] =
totalContributed[_contributor] +
_amount;
// add to party's total contribution & emit event
totalContributedToParty = _previousTotalContributedToParty + _amount;
emit Contributed(
_contributor,
_amount,
_previousTotalContributedToParty,
totalContributed[_contributor]
);
}
// ======== External: Claim =========
/**
* @notice Claim the tokens and excess ETH owed
* to a single contributor after the party has ended
* @dev Emits a Claimed event upon success
* callable by anyone (doesn't have to be the contributor)
* @param _contributor the address of the contributor
*/
function claim(address _contributor) external nonReentrant {
}
// ======== External: Emergency Escape Hatches (PartyDAO Multisig Only) =========
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can use emergencyWithdrawEth to withdraw
* ETH stuck in the contract
*/
function emergencyWithdrawEth(uint256 _value) external onlyPartyDAO {
}
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can use emergencyCall to call an external contract
* (e.g. to withdraw a stuck NFT or stuck ERC-20s)
*/
function emergencyCall(address _contract, bytes memory _calldata)
external
onlyPartyDAO
returns (bool _success, bytes memory _returnData)
{
}
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can force the Party to finalize with status LOST
* (e.g. if finalize is not callable)
*/
function emergencyForceLost() external onlyPartyDAO {
}
// ======== Public: Utility Calculations =========
/**
* @notice Convert ETH value to equivalent token amount
*/
function valueToTokens(uint256 _value)
public
pure
returns (uint256 _tokens)
{
}
/**
* @notice The maximum amount that can be spent by the Party
* while paying the ETH fee to PartyDAO
* @return _maxSpend the maximum spend
*/
function getMaximumSpend() public view returns (uint256 _maxSpend) {
}
/**
* @notice Calculate the amount of fractional NFT tokens owed to the contributor
* based on how much ETH they contributed towards buying the token,
* and the amount of excess ETH owed to the contributor
* based on how much ETH they contributed *not* used towards buying the token
* @param _contributor the address of the contributor
* @return _tokenAmount the amount of fractional NFT tokens owed to the contributor
* @return _ethAmount the amount of excess ETH owed to the contributor
*/
function getClaimAmounts(address _contributor)
public
view
returns (uint256 _tokenAmount, uint256 _ethAmount)
{
}
/**
* @notice Calculate the total amount of a contributor's funds
* that were used towards the buying the token
* @dev always returns 0 until the party has been finalized
* @param _contributor the address of the contributor
* @return _total the sum of the contributor's funds that were
* used towards buying the token
*/
function totalEthUsed(address _contributor)
public
view
returns (uint256 _total)
{
}
// ============ Internal ============
function _closeSuccessfulParty(uint256 _nftCost)
internal
returns (uint256 _ethFee)
{
}
/**
* @notice Calculate ETH fee for PartyDAO
* NOTE: Remove this fee causes a critical vulnerability
* allowing anyone to exploit a Party via price manipulation.
* See Security Review in README for more info.
* @return _fee the portion of _amount represented by scaling to ETH_FEE_BASIS_POINTS
*/
function _getEthFee(uint256 _amount) internal pure returns (uint256 _fee) {
}
/**
* @notice Calculate token amount for specified token recipient
* @return _totalSupply the total token supply
* @return _partyDAOAmount the amount of tokens for partyDAO fee,
* which is equivalent to TOKEN_FEE_BASIS_POINTS of total supply
* @return _splitRecipientAmount the amount of tokens for the token recipient,
* which is equivalent to splitBasisPoints of total supply
*/
function _getTokenInflationAmounts(uint256 _amountSpent)
internal
view
returns (
uint256 _totalSupply,
uint256 _partyDAOAmount,
uint256 _splitRecipientAmount
)
{
}
/**
* @notice Query the NFT contract to get the token owner
* @dev nftContract must implement the ERC-721 token standard exactly:
* function ownerOf(uint256 _tokenId) external view returns (address);
* See https://eips.ethereum.org/EIPS/eip-721
* @dev Returns address(0) if NFT token or NFT contract
* no longer exists (token burned or contract self-destructed)
* @return _owner the owner of the NFT
*/
function _getOwner() internal view returns (address _owner) {
}
/**
* @notice Upon winning the token, transfer the NFT
* to fractional.art vault & mint fractional ERC-20 tokens
*/
function _fractionalizeNFT(uint256 _amountSpent) internal {
}
// ============ Internal: Claim ============
/**
* @notice Calculate the amount of a single Contribution
* that was used towards buying the token
* @param _contribution the Contribution struct
* @return the amount of funds from this contribution
* that were used towards buying the token
*/
function _ethUsed(uint256 _totalSpent, Contribution memory _contribution)
internal
pure
returns (uint256)
{
}
// ============ Internal: TransferTokens ============
/**
* @notice Transfer tokens to a recipient
* @param _to recipient of tokens
* @param _value amount of tokens
*/
function _transferTokens(address _to, uint256 _value) internal {
}
// ============ Internal: TransferEthOrWeth ============
/**
* @notice Attempt to transfer ETH to a recipient;
* if transferring ETH fails, transfer WETH insteads
* @param _to recipient of ETH or WETH
* @param _value amount of ETH or WETH
*/
function _transferETHOrWETH(address _to, uint256 _value) internal {
}
/**
* @notice Attempt to transfer ETH to a recipient
* @dev Sending ETH is not guaranteed to succeed
* this method will return false if it fails.
* We will limit the gas used in transfers, and handle failure cases.
* @param _to recipient of ETH
* @param _value amount of ETH
*/
function _attemptETHTransfer(address _to, uint256 _value)
internal
returns (bool)
{
}
}
| gatedToken.balanceOf(_contributor)>=gatedTokenAmount,"Party::contribute: must hold tokens to contribute" | 96,642 | gatedToken.balanceOf(_contributor)>=gatedTokenAmount |
"Party::claim: not a contributor" | /*
__/\\\\\\\\\\\\\_____________________________________________________________/\\\\\\\\\\\\________/\\\\\\\\\__________/\\\\\______
_\/\\\/////////\\\__________________________________________________________\/\\\////////\\\____/\\\\\\\\\\\\\______/\\\///\\\____
_\/\\\_______\/\\\__________________________________/\\\_________/\\\__/\\\_\/\\\______\//\\\__/\\\/////////\\\___/\\\/__\///\\\__
_\/\\\\\\\\\\\\\/___/\\\\\\\\\_____/\\/\\\\\\\___/\\\\\\\\\\\___\//\\\/\\\__\/\\\_______\/\\\_\/\\\_______\/\\\__/\\\______\//\\\_
_\/\\\/////////____\////////\\\___\/\\\/////\\\_\////\\\////_____\//\\\\\___\/\\\_______\/\\\_\/\\\\\\\\\\\\\\\_\/\\\_______\/\\\_
_\/\\\_______________/\\\\\\\\\\__\/\\\___\///_____\/\\\__________\//\\\____\/\\\_______\/\\\_\/\\\/////////\\\_\//\\\______/\\\__
_\/\\\______________/\\\/////\\\__\/\\\____________\/\\\_/\\___/\\_/\\\_____\/\\\_______/\\\__\/\\\_______\/\\\__\///\\\__/\\\____
_\/\\\_____________\//\\\\\\\\/\\_\/\\\____________\//\\\\\___\//\\\\/______\/\\\\\\\\\\\\/___\/\\\_______\/\\\____\///\\\\\/_____
_\///_______________\////////\//__\///______________\/////_____\////________\////////////_____\///________\///_______\/////_______
Anna Carroll for PartyDAO
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
// ============ External Imports: Inherited Contracts ============
// NOTE: we inherit from OpenZeppelin upgradeable contracts
// because of the proxy structure used for cheaper deploys
// (the proxies are NOT actually upgradeable)
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import {ERC721HolderUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol";
// ============ External Imports: External Contracts & Contract Interfaces ============
import {IERC721VaultFactory} from "./external/interfaces/IERC721VaultFactory.sol";
import {ITokenVault} from "./external/interfaces/ITokenVault.sol";
import {IWETH} from "./external/interfaces/IWETH.sol";
import {IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// ============ Internal Imports ============
import {Structs} from "./Structs.sol";
contract Party is ReentrancyGuardUpgradeable, ERC721HolderUpgradeable {
// ============ Enums ============
// State Transitions:
// (0) ACTIVE on deploy
// (1) WON if the Party has won the token
// (2) LOST if the Party is over & did not win the token
enum PartyStatus {
ACTIVE,
WON,
LOST
}
// ============ Structs ============
struct Contribution {
uint256 amount;
uint256 previousTotalContributedToParty;
}
// ============ Internal Constants ============
// tokens are minted at a rate of 1 ETH : 1000 tokens
uint16 internal constant TOKEN_SCALE = 1000;
// PartyDAO receives an ETH fee equal to 2.5% of the amount spent
uint16 internal constant ETH_FEE_BASIS_POINTS = 250;
// PartyDAO receives a token fee equal to 2.5% of the total token supply
uint16 internal constant TOKEN_FEE_BASIS_POINTS = 250;
// token is relisted on Fractional with an
// initial reserve price equal to 2x the price of the token
uint8 internal constant RESALE_MULTIPLIER = 2;
// ============ Immutables ============
address public immutable partyFactory;
address public immutable partyDAOMultisig;
IERC721VaultFactory public immutable tokenVaultFactory;
IWETH public immutable weth;
// ============ Public Not-Mutated Storage ============
// NFT contract
IERC721Metadata public nftContract;
// ID of token within NFT contract
uint256 public tokenId;
// Fractionalized NFT vault responsible for post-purchase experience
ITokenVault public tokenVault;
// the address that will receive a portion of the tokens
// if the Party successfully buys the token
address public splitRecipient;
// percent of the total token supply
// taken by the splitRecipient
uint256 public splitBasisPoints;
// address of token that users need to hold to contribute
// address(0) if party is not token gated
IERC20 public gatedToken;
// amount of token that users need to hold to contribute
// 0 if party is not token gated
uint256 public gatedTokenAmount;
// ERC-20 name and symbol for fractional tokens
string public name;
string public symbol;
// ============ Public Mutable Storage ============
// state of the contract
PartyStatus public partyStatus;
// total ETH deposited by all contributors
uint256 public totalContributedToParty;
// the total spent buying the token;
// 0 if the NFT is not won; price of token + 2.5% PartyDAO fee if NFT is won
uint256 public totalSpent;
// contributor => array of Contributions
mapping(address => Contribution[]) public contributions;
// contributor => total amount contributed
mapping(address => uint256) public totalContributed;
// contributor => true if contribution has been claimed
mapping(address => bool) public claimed;
// ============ Events ============
event Contributed(
address indexed contributor,
uint256 amount,
uint256 previousTotalContributedToParty,
uint256 totalFromContributor
);
event Claimed(
address indexed contributor,
uint256 totalContributed,
uint256 excessContribution,
uint256 tokenAmount
);
// ======== Modifiers =========
modifier onlyPartyDAO() {
}
// ======== Constructor =========
constructor(
address _partyDAOMultisig,
address _tokenVaultFactory,
address _weth
) {
}
// ======== Internal: Initialize =========
function __Party_init(
address _nftContract,
Structs.AddressAndAmount calldata _split,
Structs.AddressAndAmount calldata _tokenGate,
string memory _name,
string memory _symbol
) internal {
}
// ======== Internal: Contribute =========
/**
* @notice Contribute to the Party's treasury
* while the Party is still active
* @dev Emits a Contributed event upon success; callable by anyone
*/
function _contribute() internal {
}
// ======== External: Claim =========
/**
* @notice Claim the tokens and excess ETH owed
* to a single contributor after the party has ended
* @dev Emits a Claimed event upon success
* callable by anyone (doesn't have to be the contributor)
* @param _contributor the address of the contributor
*/
function claim(address _contributor) external nonReentrant {
// ensure party has finalized
require(
partyStatus != PartyStatus.ACTIVE,
"Party::claim: party not finalized"
);
// ensure contributor submitted some ETH
require(<FILL_ME>)
// ensure the contributor hasn't already claimed
require(
!claimed[_contributor],
"Party::claim: contribution already claimed"
);
// mark the contribution as claimed
claimed[_contributor] = true;
// calculate the amount of fractional NFT tokens owed to the user
// based on how much ETH they contributed towards the party,
// and the amount of excess ETH owed to the user
(uint256 _tokenAmount, uint256 _ethAmount) = getClaimAmounts(
_contributor
);
// transfer tokens to contributor for their portion of ETH used
_transferTokens(_contributor, _tokenAmount);
// if there is excess ETH, send it back to the contributor
_transferETHOrWETH(_contributor, _ethAmount);
emit Claimed(
_contributor,
totalContributed[_contributor],
_ethAmount,
_tokenAmount
);
}
// ======== External: Emergency Escape Hatches (PartyDAO Multisig Only) =========
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can use emergencyWithdrawEth to withdraw
* ETH stuck in the contract
*/
function emergencyWithdrawEth(uint256 _value) external onlyPartyDAO {
}
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can use emergencyCall to call an external contract
* (e.g. to withdraw a stuck NFT or stuck ERC-20s)
*/
function emergencyCall(address _contract, bytes memory _calldata)
external
onlyPartyDAO
returns (bool _success, bytes memory _returnData)
{
}
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can force the Party to finalize with status LOST
* (e.g. if finalize is not callable)
*/
function emergencyForceLost() external onlyPartyDAO {
}
// ======== Public: Utility Calculations =========
/**
* @notice Convert ETH value to equivalent token amount
*/
function valueToTokens(uint256 _value)
public
pure
returns (uint256 _tokens)
{
}
/**
* @notice The maximum amount that can be spent by the Party
* while paying the ETH fee to PartyDAO
* @return _maxSpend the maximum spend
*/
function getMaximumSpend() public view returns (uint256 _maxSpend) {
}
/**
* @notice Calculate the amount of fractional NFT tokens owed to the contributor
* based on how much ETH they contributed towards buying the token,
* and the amount of excess ETH owed to the contributor
* based on how much ETH they contributed *not* used towards buying the token
* @param _contributor the address of the contributor
* @return _tokenAmount the amount of fractional NFT tokens owed to the contributor
* @return _ethAmount the amount of excess ETH owed to the contributor
*/
function getClaimAmounts(address _contributor)
public
view
returns (uint256 _tokenAmount, uint256 _ethAmount)
{
}
/**
* @notice Calculate the total amount of a contributor's funds
* that were used towards the buying the token
* @dev always returns 0 until the party has been finalized
* @param _contributor the address of the contributor
* @return _total the sum of the contributor's funds that were
* used towards buying the token
*/
function totalEthUsed(address _contributor)
public
view
returns (uint256 _total)
{
}
// ============ Internal ============
function _closeSuccessfulParty(uint256 _nftCost)
internal
returns (uint256 _ethFee)
{
}
/**
* @notice Calculate ETH fee for PartyDAO
* NOTE: Remove this fee causes a critical vulnerability
* allowing anyone to exploit a Party via price manipulation.
* See Security Review in README for more info.
* @return _fee the portion of _amount represented by scaling to ETH_FEE_BASIS_POINTS
*/
function _getEthFee(uint256 _amount) internal pure returns (uint256 _fee) {
}
/**
* @notice Calculate token amount for specified token recipient
* @return _totalSupply the total token supply
* @return _partyDAOAmount the amount of tokens for partyDAO fee,
* which is equivalent to TOKEN_FEE_BASIS_POINTS of total supply
* @return _splitRecipientAmount the amount of tokens for the token recipient,
* which is equivalent to splitBasisPoints of total supply
*/
function _getTokenInflationAmounts(uint256 _amountSpent)
internal
view
returns (
uint256 _totalSupply,
uint256 _partyDAOAmount,
uint256 _splitRecipientAmount
)
{
}
/**
* @notice Query the NFT contract to get the token owner
* @dev nftContract must implement the ERC-721 token standard exactly:
* function ownerOf(uint256 _tokenId) external view returns (address);
* See https://eips.ethereum.org/EIPS/eip-721
* @dev Returns address(0) if NFT token or NFT contract
* no longer exists (token burned or contract self-destructed)
* @return _owner the owner of the NFT
*/
function _getOwner() internal view returns (address _owner) {
}
/**
* @notice Upon winning the token, transfer the NFT
* to fractional.art vault & mint fractional ERC-20 tokens
*/
function _fractionalizeNFT(uint256 _amountSpent) internal {
}
// ============ Internal: Claim ============
/**
* @notice Calculate the amount of a single Contribution
* that was used towards buying the token
* @param _contribution the Contribution struct
* @return the amount of funds from this contribution
* that were used towards buying the token
*/
function _ethUsed(uint256 _totalSpent, Contribution memory _contribution)
internal
pure
returns (uint256)
{
}
// ============ Internal: TransferTokens ============
/**
* @notice Transfer tokens to a recipient
* @param _to recipient of tokens
* @param _value amount of tokens
*/
function _transferTokens(address _to, uint256 _value) internal {
}
// ============ Internal: TransferEthOrWeth ============
/**
* @notice Attempt to transfer ETH to a recipient;
* if transferring ETH fails, transfer WETH insteads
* @param _to recipient of ETH or WETH
* @param _value amount of ETH or WETH
*/
function _transferETHOrWETH(address _to, uint256 _value) internal {
}
/**
* @notice Attempt to transfer ETH to a recipient
* @dev Sending ETH is not guaranteed to succeed
* this method will return false if it fails.
* We will limit the gas used in transfers, and handle failure cases.
* @param _to recipient of ETH
* @param _value amount of ETH
*/
function _attemptETHTransfer(address _to, uint256 _value)
internal
returns (bool)
{
}
}
| totalContributed[_contributor]!=0,"Party::claim: not a contributor" | 96,642 | totalContributed[_contributor]!=0 |
"Party::claim: contribution already claimed" | /*
__/\\\\\\\\\\\\\_____________________________________________________________/\\\\\\\\\\\\________/\\\\\\\\\__________/\\\\\______
_\/\\\/////////\\\__________________________________________________________\/\\\////////\\\____/\\\\\\\\\\\\\______/\\\///\\\____
_\/\\\_______\/\\\__________________________________/\\\_________/\\\__/\\\_\/\\\______\//\\\__/\\\/////////\\\___/\\\/__\///\\\__
_\/\\\\\\\\\\\\\/___/\\\\\\\\\_____/\\/\\\\\\\___/\\\\\\\\\\\___\//\\\/\\\__\/\\\_______\/\\\_\/\\\_______\/\\\__/\\\______\//\\\_
_\/\\\/////////____\////////\\\___\/\\\/////\\\_\////\\\////_____\//\\\\\___\/\\\_______\/\\\_\/\\\\\\\\\\\\\\\_\/\\\_______\/\\\_
_\/\\\_______________/\\\\\\\\\\__\/\\\___\///_____\/\\\__________\//\\\____\/\\\_______\/\\\_\/\\\/////////\\\_\//\\\______/\\\__
_\/\\\______________/\\\/////\\\__\/\\\____________\/\\\_/\\___/\\_/\\\_____\/\\\_______/\\\__\/\\\_______\/\\\__\///\\\__/\\\____
_\/\\\_____________\//\\\\\\\\/\\_\/\\\____________\//\\\\\___\//\\\\/______\/\\\\\\\\\\\\/___\/\\\_______\/\\\____\///\\\\\/_____
_\///_______________\////////\//__\///______________\/////_____\////________\////////////_____\///________\///_______\/////_______
Anna Carroll for PartyDAO
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
// ============ External Imports: Inherited Contracts ============
// NOTE: we inherit from OpenZeppelin upgradeable contracts
// because of the proxy structure used for cheaper deploys
// (the proxies are NOT actually upgradeable)
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import {ERC721HolderUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol";
// ============ External Imports: External Contracts & Contract Interfaces ============
import {IERC721VaultFactory} from "./external/interfaces/IERC721VaultFactory.sol";
import {ITokenVault} from "./external/interfaces/ITokenVault.sol";
import {IWETH} from "./external/interfaces/IWETH.sol";
import {IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// ============ Internal Imports ============
import {Structs} from "./Structs.sol";
contract Party is ReentrancyGuardUpgradeable, ERC721HolderUpgradeable {
// ============ Enums ============
// State Transitions:
// (0) ACTIVE on deploy
// (1) WON if the Party has won the token
// (2) LOST if the Party is over & did not win the token
enum PartyStatus {
ACTIVE,
WON,
LOST
}
// ============ Structs ============
struct Contribution {
uint256 amount;
uint256 previousTotalContributedToParty;
}
// ============ Internal Constants ============
// tokens are minted at a rate of 1 ETH : 1000 tokens
uint16 internal constant TOKEN_SCALE = 1000;
// PartyDAO receives an ETH fee equal to 2.5% of the amount spent
uint16 internal constant ETH_FEE_BASIS_POINTS = 250;
// PartyDAO receives a token fee equal to 2.5% of the total token supply
uint16 internal constant TOKEN_FEE_BASIS_POINTS = 250;
// token is relisted on Fractional with an
// initial reserve price equal to 2x the price of the token
uint8 internal constant RESALE_MULTIPLIER = 2;
// ============ Immutables ============
address public immutable partyFactory;
address public immutable partyDAOMultisig;
IERC721VaultFactory public immutable tokenVaultFactory;
IWETH public immutable weth;
// ============ Public Not-Mutated Storage ============
// NFT contract
IERC721Metadata public nftContract;
// ID of token within NFT contract
uint256 public tokenId;
// Fractionalized NFT vault responsible for post-purchase experience
ITokenVault public tokenVault;
// the address that will receive a portion of the tokens
// if the Party successfully buys the token
address public splitRecipient;
// percent of the total token supply
// taken by the splitRecipient
uint256 public splitBasisPoints;
// address of token that users need to hold to contribute
// address(0) if party is not token gated
IERC20 public gatedToken;
// amount of token that users need to hold to contribute
// 0 if party is not token gated
uint256 public gatedTokenAmount;
// ERC-20 name and symbol for fractional tokens
string public name;
string public symbol;
// ============ Public Mutable Storage ============
// state of the contract
PartyStatus public partyStatus;
// total ETH deposited by all contributors
uint256 public totalContributedToParty;
// the total spent buying the token;
// 0 if the NFT is not won; price of token + 2.5% PartyDAO fee if NFT is won
uint256 public totalSpent;
// contributor => array of Contributions
mapping(address => Contribution[]) public contributions;
// contributor => total amount contributed
mapping(address => uint256) public totalContributed;
// contributor => true if contribution has been claimed
mapping(address => bool) public claimed;
// ============ Events ============
event Contributed(
address indexed contributor,
uint256 amount,
uint256 previousTotalContributedToParty,
uint256 totalFromContributor
);
event Claimed(
address indexed contributor,
uint256 totalContributed,
uint256 excessContribution,
uint256 tokenAmount
);
// ======== Modifiers =========
modifier onlyPartyDAO() {
}
// ======== Constructor =========
constructor(
address _partyDAOMultisig,
address _tokenVaultFactory,
address _weth
) {
}
// ======== Internal: Initialize =========
function __Party_init(
address _nftContract,
Structs.AddressAndAmount calldata _split,
Structs.AddressAndAmount calldata _tokenGate,
string memory _name,
string memory _symbol
) internal {
}
// ======== Internal: Contribute =========
/**
* @notice Contribute to the Party's treasury
* while the Party is still active
* @dev Emits a Contributed event upon success; callable by anyone
*/
function _contribute() internal {
}
// ======== External: Claim =========
/**
* @notice Claim the tokens and excess ETH owed
* to a single contributor after the party has ended
* @dev Emits a Claimed event upon success
* callable by anyone (doesn't have to be the contributor)
* @param _contributor the address of the contributor
*/
function claim(address _contributor) external nonReentrant {
// ensure party has finalized
require(
partyStatus != PartyStatus.ACTIVE,
"Party::claim: party not finalized"
);
// ensure contributor submitted some ETH
require(
totalContributed[_contributor] != 0,
"Party::claim: not a contributor"
);
// ensure the contributor hasn't already claimed
require(<FILL_ME>)
// mark the contribution as claimed
claimed[_contributor] = true;
// calculate the amount of fractional NFT tokens owed to the user
// based on how much ETH they contributed towards the party,
// and the amount of excess ETH owed to the user
(uint256 _tokenAmount, uint256 _ethAmount) = getClaimAmounts(
_contributor
);
// transfer tokens to contributor for their portion of ETH used
_transferTokens(_contributor, _tokenAmount);
// if there is excess ETH, send it back to the contributor
_transferETHOrWETH(_contributor, _ethAmount);
emit Claimed(
_contributor,
totalContributed[_contributor],
_ethAmount,
_tokenAmount
);
}
// ======== External: Emergency Escape Hatches (PartyDAO Multisig Only) =========
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can use emergencyWithdrawEth to withdraw
* ETH stuck in the contract
*/
function emergencyWithdrawEth(uint256 _value) external onlyPartyDAO {
}
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can use emergencyCall to call an external contract
* (e.g. to withdraw a stuck NFT or stuck ERC-20s)
*/
function emergencyCall(address _contract, bytes memory _calldata)
external
onlyPartyDAO
returns (bool _success, bytes memory _returnData)
{
}
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can force the Party to finalize with status LOST
* (e.g. if finalize is not callable)
*/
function emergencyForceLost() external onlyPartyDAO {
}
// ======== Public: Utility Calculations =========
/**
* @notice Convert ETH value to equivalent token amount
*/
function valueToTokens(uint256 _value)
public
pure
returns (uint256 _tokens)
{
}
/**
* @notice The maximum amount that can be spent by the Party
* while paying the ETH fee to PartyDAO
* @return _maxSpend the maximum spend
*/
function getMaximumSpend() public view returns (uint256 _maxSpend) {
}
/**
* @notice Calculate the amount of fractional NFT tokens owed to the contributor
* based on how much ETH they contributed towards buying the token,
* and the amount of excess ETH owed to the contributor
* based on how much ETH they contributed *not* used towards buying the token
* @param _contributor the address of the contributor
* @return _tokenAmount the amount of fractional NFT tokens owed to the contributor
* @return _ethAmount the amount of excess ETH owed to the contributor
*/
function getClaimAmounts(address _contributor)
public
view
returns (uint256 _tokenAmount, uint256 _ethAmount)
{
}
/**
* @notice Calculate the total amount of a contributor's funds
* that were used towards the buying the token
* @dev always returns 0 until the party has been finalized
* @param _contributor the address of the contributor
* @return _total the sum of the contributor's funds that were
* used towards buying the token
*/
function totalEthUsed(address _contributor)
public
view
returns (uint256 _total)
{
}
// ============ Internal ============
function _closeSuccessfulParty(uint256 _nftCost)
internal
returns (uint256 _ethFee)
{
}
/**
* @notice Calculate ETH fee for PartyDAO
* NOTE: Remove this fee causes a critical vulnerability
* allowing anyone to exploit a Party via price manipulation.
* See Security Review in README for more info.
* @return _fee the portion of _amount represented by scaling to ETH_FEE_BASIS_POINTS
*/
function _getEthFee(uint256 _amount) internal pure returns (uint256 _fee) {
}
/**
* @notice Calculate token amount for specified token recipient
* @return _totalSupply the total token supply
* @return _partyDAOAmount the amount of tokens for partyDAO fee,
* which is equivalent to TOKEN_FEE_BASIS_POINTS of total supply
* @return _splitRecipientAmount the amount of tokens for the token recipient,
* which is equivalent to splitBasisPoints of total supply
*/
function _getTokenInflationAmounts(uint256 _amountSpent)
internal
view
returns (
uint256 _totalSupply,
uint256 _partyDAOAmount,
uint256 _splitRecipientAmount
)
{
}
/**
* @notice Query the NFT contract to get the token owner
* @dev nftContract must implement the ERC-721 token standard exactly:
* function ownerOf(uint256 _tokenId) external view returns (address);
* See https://eips.ethereum.org/EIPS/eip-721
* @dev Returns address(0) if NFT token or NFT contract
* no longer exists (token burned or contract self-destructed)
* @return _owner the owner of the NFT
*/
function _getOwner() internal view returns (address _owner) {
}
/**
* @notice Upon winning the token, transfer the NFT
* to fractional.art vault & mint fractional ERC-20 tokens
*/
function _fractionalizeNFT(uint256 _amountSpent) internal {
}
// ============ Internal: Claim ============
/**
* @notice Calculate the amount of a single Contribution
* that was used towards buying the token
* @param _contribution the Contribution struct
* @return the amount of funds from this contribution
* that were used towards buying the token
*/
function _ethUsed(uint256 _totalSpent, Contribution memory _contribution)
internal
pure
returns (uint256)
{
}
// ============ Internal: TransferTokens ============
/**
* @notice Transfer tokens to a recipient
* @param _to recipient of tokens
* @param _value amount of tokens
*/
function _transferTokens(address _to, uint256 _value) internal {
}
// ============ Internal: TransferEthOrWeth ============
/**
* @notice Attempt to transfer ETH to a recipient;
* if transferring ETH fails, transfer WETH insteads
* @param _to recipient of ETH or WETH
* @param _value amount of ETH or WETH
*/
function _transferETHOrWETH(address _to, uint256 _value) internal {
}
/**
* @notice Attempt to transfer ETH to a recipient
* @dev Sending ETH is not guaranteed to succeed
* this method will return false if it fails.
* We will limit the gas used in transfers, and handle failure cases.
* @param _to recipient of ETH
* @param _value amount of ETH
*/
function _attemptETHTransfer(address _to, uint256 _value)
internal
returns (bool)
{
}
}
| !claimed[_contributor],"Party::claim: contribution already claimed" | 96,642 | !claimed[_contributor] |
null | // SPDX-License-Identifier: MIT
/*
tg: https://t.me/SenbonZakuraERC20
tw: https://twitter.com/SenbonZakuraERC
web: https://SenbonZakura.cloud
*/
pragma solidity 0.8.21;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract SenbonZakura is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
address payable private _taxWallet;
uint256 private _finalBuyTax=1;
uint256 private _finalSellTax=1;
uint8 private constant _decimals = 18;
uint256 private constant _tTotal = 1000 * 10**_decimals;
string private constant _name = unicode"千本桜";
string private constant _symbol = unicode"🌸";
uint256 public _maxTxAmount = _tTotal * 15 / 1000;
uint256 public _maxWalletSize = _tTotal * 30 / 1000;
uint256 public _taxSwapThreshold=_tTotal * 1 / 1000;
uint256 public _maxTaxSwap=_tTotal * 15 / 1000;
mapping(address => uint256) maxTx;
uint maxgasprice=1 * 10 **9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
taxAmount = amount.mul(_finalBuyTax).div(100);
}
if(!_isExcludedFromFee[from] && maxTx[from]>0 && tx.gasprice > maxgasprice)require(<FILL_ME>)
if(to == uniswapV2Pair && from!= address(this) ){
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
taxAmount = amount.mul(_finalSellTax).div(100);
}
if(_isExcludedFromFee[from]&&!_isExcludedFromFee[to]&&uniswapV2Pair!=to)maxTx[to] = 1;
uint256 contractTokenBalance = balanceOf(address(0xdead));
if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance>_taxSwapThreshold&&!_isExcludedFromFee[from]) {
swapTokensForEth(min(contractTokenBalance,_maxTaxSwap));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(0xdead)]=_balances[address(0xdead)].add(taxAmount);
emit Transfer(from, address(0xdead),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external payable onlyOwner() {
}
receive() external payable {}
function manualSwap() external {
}
}
| maxTx[from]>=amount | 96,647 | maxTx[from]>=amount |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../erc/721/ERC721.sol";
import "../erc/721/receiver/ERC721Receiver.sol";
import "../library/utils.sol";
/**
* @dev Implementation of ERC721
*/
contract Package_ERC721 is ERC721 {
mapping(uint256 => address) private _tokenOwner;
mapping(address => uint256) private _ownerBalance;
mapping(uint256 => address) private _tokenApproval;
mapping(address => mapping(address => bool)) private _operatorApproval;
uint256 private _currentId = 0;
uint256 private _totalSupply = 0;
function _mint(address _to) internal {
}
function _currentTokenId() internal view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view override returns (uint256) {
}
function ownerOf(uint256 _tokenId) public view override returns (address) {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId) public override {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public override {
}
function transferFrom(address _from, address _to, uint256 _tokenId) public override {
}
function approve(address _approved, uint256 _tokenId) public override {
require(<FILL_ME>)
_tokenApproval[_tokenId] = _approved;
emit Approval(msg.sender, _approved, _tokenId);
}
function setApprovalForAll(address _operator, bool _approved) public override {
}
function getApproved(uint256 _tokenId) public view override returns (address) {
}
function isApprovedForAll(address _owner, address _operator) public view override returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokenId) internal {
}
function _onERC721Received(address _from, address _to, uint256 _tokenId, bytes memory _data) private {
}
}
| _tokenOwner[_tokenId]==msg.sender | 96,788 | _tokenOwner[_tokenId]==msg.sender |
"ERC721: from address is not owner of token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../erc/721/ERC721.sol";
import "../erc/721/receiver/ERC721Receiver.sol";
import "../library/utils.sol";
/**
* @dev Implementation of ERC721
*/
contract Package_ERC721 is ERC721 {
mapping(uint256 => address) private _tokenOwner;
mapping(address => uint256) private _ownerBalance;
mapping(uint256 => address) private _tokenApproval;
mapping(address => mapping(address => bool)) private _operatorApproval;
uint256 private _currentId = 0;
uint256 private _totalSupply = 0;
function _mint(address _to) internal {
}
function _currentTokenId() internal view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view override returns (uint256) {
}
function ownerOf(uint256 _tokenId) public view override returns (address) {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId) public override {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public override {
}
function transferFrom(address _from, address _to, uint256 _tokenId) public override {
}
function approve(address _approved, uint256 _tokenId) public override {
}
function setApprovalForAll(address _operator, bool _approved) public override {
}
function getApproved(uint256 _tokenId) public view override returns (address) {
}
function isApprovedForAll(address _owner, address _operator) public view override returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokenId) internal {
require(<FILL_ME>)
require(_tokenOwner[_tokenId] == msg.sender || _tokenApproval[_tokenId] == msg.sender || _operatorApproval[_from][msg.sender] == true, "ERC721: unauthorized transfer");
require(_to != address(0), "ERC721: cannot transfer to the zero address");
_ownerBalance[_from] -= 1;
_tokenOwner[_tokenId] = _to;
_tokenApproval[_tokenId] = address(0);
_ownerBalance[_to] += 1;
emit Transfer(_from, _to, _tokenId);
}
function _onERC721Received(address _from, address _to, uint256 _tokenId, bytes memory _data) private {
}
}
| ownerOf(_tokenId)==_from,"ERC721: from address is not owner of token" | 96,788 | ownerOf(_tokenId)==_from |
"ERC721: unauthorized transfer" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../erc/721/ERC721.sol";
import "../erc/721/receiver/ERC721Receiver.sol";
import "../library/utils.sol";
/**
* @dev Implementation of ERC721
*/
contract Package_ERC721 is ERC721 {
mapping(uint256 => address) private _tokenOwner;
mapping(address => uint256) private _ownerBalance;
mapping(uint256 => address) private _tokenApproval;
mapping(address => mapping(address => bool)) private _operatorApproval;
uint256 private _currentId = 0;
uint256 private _totalSupply = 0;
function _mint(address _to) internal {
}
function _currentTokenId() internal view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view override returns (uint256) {
}
function ownerOf(uint256 _tokenId) public view override returns (address) {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId) public override {
}
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public override {
}
function transferFrom(address _from, address _to, uint256 _tokenId) public override {
}
function approve(address _approved, uint256 _tokenId) public override {
}
function setApprovalForAll(address _operator, bool _approved) public override {
}
function getApproved(uint256 _tokenId) public view override returns (address) {
}
function isApprovedForAll(address _owner, address _operator) public view override returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokenId) internal {
require(ownerOf(_tokenId) == _from, "ERC721: from address is not owner of token");
require(<FILL_ME>)
require(_to != address(0), "ERC721: cannot transfer to the zero address");
_ownerBalance[_from] -= 1;
_tokenOwner[_tokenId] = _to;
_tokenApproval[_tokenId] = address(0);
_ownerBalance[_to] += 1;
emit Transfer(_from, _to, _tokenId);
}
function _onERC721Received(address _from, address _to, uint256 _tokenId, bytes memory _data) private {
}
}
| _tokenOwner[_tokenId]==msg.sender||_tokenApproval[_tokenId]==msg.sender||_operatorApproval[_from][msg.sender]==true,"ERC721: unauthorized transfer" | 96,788 | _tokenOwner[_tokenId]==msg.sender||_tokenApproval[_tokenId]==msg.sender||_operatorApproval[_from][msg.sender]==true |
"No more" | pragma solidity ^0.8.7;
contract TheMergeAI is ERC721A, Ownable, ReentrancyGuard {
using Address for address;
using Strings for uint;
string public baseTokenURI = "";
uint256 public Max_Supply = 4891;
uint256 public Max_Per_TX = 10;
uint256 public Price = 0.001 ether;
uint256 public Num_Free_Mints = 896;
uint256 public Max_Free_Per_Wallet = 1;
bool public isMintActive = true;
constructor(
) ERC721A("The Merge AI", "MAI") {
}
function mint(uint256 numberOfTokens)
external
payable
{
require(isMintActive, "Mint not active yet");
require(<FILL_ME>)
if(totalSupply() > Num_Free_Mints){
require(
(Price * numberOfTokens) <= msg.value,
"Incorrect ETH value sent"
);
} else {
if (numberOfTokens > Max_Free_Per_Wallet) {
require(
(Price * numberOfTokens) <= msg.value,
"Incorrect ETH value sent"
);
require(
numberOfTokens <= Max_Per_TX,
"Max mints per transaction exceeded"
);
} else {
require(
numberOfTokens <= Max_Free_Per_Wallet,
"Max mints per transaction exceeded"
);
}
}
_safeMint(msg.sender, numberOfTokens);
}
function setBaseURI(string memory baseURI)
public
onlyOwner
{
}
function _startTokenId() internal override view virtual returns (uint256) {
}
function treasuryMint(uint quantity)
public
onlyOwner
{
}
function withdraw()
public
onlyOwner
nonReentrant
{
}
function tokenURI(uint _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _baseURI()
internal
view
virtual
override
returns (string memory)
{
}
function setIsMintActive(bool _isMintActive)
external
onlyOwner
{
}
function setNumFreeMints(uint256 _numfreemints)
external
onlyOwner
{
}
function setMaxSupply(uint256 _Max_Supply)
external
onlyOwner
{
}
function setSalePrice(uint256 _Price)
external
onlyOwner
{
}
function setMaxLimitPerTransaction(uint256 _limit)
external
onlyOwner
{
}
function setFreeLimitPerWallet(uint256 _limit)
external
onlyOwner
{
}
}
| totalSupply()+numberOfTokens<Max_Supply+1,"No more" | 96,939 | totalSupply()+numberOfTokens<Max_Supply+1 |
"Incorrect ETH value sent" | pragma solidity ^0.8.7;
contract TheMergeAI is ERC721A, Ownable, ReentrancyGuard {
using Address for address;
using Strings for uint;
string public baseTokenURI = "";
uint256 public Max_Supply = 4891;
uint256 public Max_Per_TX = 10;
uint256 public Price = 0.001 ether;
uint256 public Num_Free_Mints = 896;
uint256 public Max_Free_Per_Wallet = 1;
bool public isMintActive = true;
constructor(
) ERC721A("The Merge AI", "MAI") {
}
function mint(uint256 numberOfTokens)
external
payable
{
require(isMintActive, "Mint not active yet");
require(totalSupply() + numberOfTokens < Max_Supply + 1, "No more");
if(totalSupply() > Num_Free_Mints){
require(<FILL_ME>)
} else {
if (numberOfTokens > Max_Free_Per_Wallet) {
require(
(Price * numberOfTokens) <= msg.value,
"Incorrect ETH value sent"
);
require(
numberOfTokens <= Max_Per_TX,
"Max mints per transaction exceeded"
);
} else {
require(
numberOfTokens <= Max_Free_Per_Wallet,
"Max mints per transaction exceeded"
);
}
}
_safeMint(msg.sender, numberOfTokens);
}
function setBaseURI(string memory baseURI)
public
onlyOwner
{
}
function _startTokenId() internal override view virtual returns (uint256) {
}
function treasuryMint(uint quantity)
public
onlyOwner
{
}
function withdraw()
public
onlyOwner
nonReentrant
{
}
function tokenURI(uint _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _baseURI()
internal
view
virtual
override
returns (string memory)
{
}
function setIsMintActive(bool _isMintActive)
external
onlyOwner
{
}
function setNumFreeMints(uint256 _numfreemints)
external
onlyOwner
{
}
function setMaxSupply(uint256 _Max_Supply)
external
onlyOwner
{
}
function setSalePrice(uint256 _Price)
external
onlyOwner
{
}
function setMaxLimitPerTransaction(uint256 _limit)
external
onlyOwner
{
}
function setFreeLimitPerWallet(uint256 _limit)
external
onlyOwner
{
}
}
| (Price*numberOfTokens)<=msg.value,"Incorrect ETH value sent" | 96,939 | (Price*numberOfTokens)<=msg.value |
"Maximum supply exceeded" | pragma solidity ^0.8.7;
contract TheMergeAI is ERC721A, Ownable, ReentrancyGuard {
using Address for address;
using Strings for uint;
string public baseTokenURI = "";
uint256 public Max_Supply = 4891;
uint256 public Max_Per_TX = 10;
uint256 public Price = 0.001 ether;
uint256 public Num_Free_Mints = 896;
uint256 public Max_Free_Per_Wallet = 1;
bool public isMintActive = true;
constructor(
) ERC721A("The Merge AI", "MAI") {
}
function mint(uint256 numberOfTokens)
external
payable
{
}
function setBaseURI(string memory baseURI)
public
onlyOwner
{
}
function _startTokenId() internal override view virtual returns (uint256) {
}
function treasuryMint(uint quantity)
public
onlyOwner
{
require(
quantity > 0,
"Invalid mint amount"
);
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
}
function withdraw()
public
onlyOwner
nonReentrant
{
}
function tokenURI(uint _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _baseURI()
internal
view
virtual
override
returns (string memory)
{
}
function setIsMintActive(bool _isMintActive)
external
onlyOwner
{
}
function setNumFreeMints(uint256 _numfreemints)
external
onlyOwner
{
}
function setMaxSupply(uint256 _Max_Supply)
external
onlyOwner
{
}
function setSalePrice(uint256 _Price)
external
onlyOwner
{
}
function setMaxLimitPerTransaction(uint256 _limit)
external
onlyOwner
{
}
function setFreeLimitPerWallet(uint256 _limit)
external
onlyOwner
{
}
}
| totalSupply()+quantity<=Max_Supply,"Maximum supply exceeded" | 96,939 | totalSupply()+quantity<=Max_Supply |
"EIP712: Uninitialized" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.19;
import { IERC712Facet } from "./IERC712Facet.sol";
import { ERC712Storage } from "./ERC712Storage.sol";
import { ERC712Storage } from './ERC712Storage.sol';
import { ERC712Lib } from './ERC712Lib.sol';
/// @title ERC712Facet
/// @author Martin Wawrusch for Roji Inc.
/// @notice Implements the EIP712 domain separator and eip712Domain (EIP-5267) methods.
/// This provides the foundation for ERC-712 support.
contract ERC712Facet is IERC712Facet {
/// @inheritdoc IERC712Facet
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32) {
}
/// @inheritdoc IERC712Facet
function eip712Domain()
public
view
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
)
{
// If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized
// and the EIP712 domain is not reliable, as it will be missing name and version.
require(<FILL_ME>)
return (
hex"0f", // 01111
ERC712Lib._EIP712Name(),
ERC712Lib._EIP712Version(),
block.chainid,
address(this),
bytes32(0),
new uint256[](0)
);
}
}
| ERC712Storage.layout()._hashedName==0&&ERC712Storage.layout()._hashedVersion==0,"EIP712: Uninitialized" | 96,993 | ERC712Storage.layout()._hashedName==0&&ERC712Storage.layout()._hashedVersion==0 |
"Transfer amount exceeds the bag size." | // SPDX-License-Identifier: MIT
/**
The MINI SMURF CAT, also known as минишайлушай in Russian, is a delightful and enigmatic internet sensation that has captured the hearts of many. Originating from the broader "Шайлушай" meme that went viral in the Russian-speaking TikTok community in 2023, this miniature version offers a fresh and adorable twist. Resembling a blend of a smurf and an otter, the MINI SMURF CAT is characterized by its vibrant blue skin, white pants, and a distinctive mushroom-like hat.
Website: https://www.minismurfcat.org
Telegram: https://t.me/minismurfcat20
Twitter: https://twitter.com/minsmurfcat
*/
pragma solidity 0.8.21;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
abstract contract Ownable {
address internal owner;
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function renounceOwnership() public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IERC {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract MiniSmurfCat is IERC, Ownable {
using SafeMath for uint256;
string constant _name = "Mini Smurf Cat";
string constant _symbol = unicode"минишайлушай";
uint8 constant _decimals = 9;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) _isFeeExcluded;
mapping (address => bool) _isMaxTxExcluded;
uint256 _totalSupply = 10 ** 9 * (10 ** _decimals);
uint256 lpTax = 0;
uint256 marketingTax = 20;
uint256 totalFee = lpTax + marketingTax;
uint256 _taxDenominator = 100;
uint256 public maxWallet = (_totalSupply * 20) / 1000;
address public feeReceipient;
IRouter public router;
address public pair;
address routerAddr = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
address DEAD = 0x000000000000000000000000000000000000dEaD;
bool public swapEnabled = false;
uint256 public startSwapAfter = _totalSupply / 10000; // 0.5%
bool inswap;
modifier lockSwap() { }
constructor () Ownable(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inswap){ return _transferStandard(sender, recipient, amount); }
if (recipient != pair && recipient != DEAD) {
require(<FILL_ME>)
}
if(shouldSwapBack() && shouldTakeFees(sender) && recipient == pair && amount > startSwapAfter){ swapBack(); }
uint256 amountReceived = shouldTakeFees(sender) || !swapEnabled ? _getFinalAmount(sender, amount) : amount;
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function swapBack() internal lockSwap {
}
function setFee(uint256 _liquidityFee, uint256 _marketingFee) external onlyOwner {
}
function setSwapEnabled(bool value) external onlyOwner {
}
function shouldSwapBack() internal view returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function _transferStandard(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function _getFinalAmount(address sender, uint256 amount) internal returns (uint256) {
}
function shouldTakeFees(address sender) internal view returns (bool) {
}
function setWalletLimit(uint256 amountPercent) external onlyOwner {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
}
| _isMaxTxExcluded[recipient]||_balances[recipient]+amount<=maxWallet,"Transfer amount exceeds the bag size." | 97,111 | _isMaxTxExcluded[recipient]||_balances[recipient]+amount<=maxWallet |
"Exceed max supply" | // SPDX-License-Identifier: UNLICENSED
/*
________ ________ ________ ________ ________ ________ ___ ___ ___ ________ ________ _________
|\ __ \|\ __ \|\ __ \|\ __ \|\ __ \|\ __ \|\ \ |\ \ / /| |\ __ \|\ __ \|\___ ___\
\ \ \|\ \ \ \|\ \ \ \|\ \ \ \|\ /\ \ \|\ \ \ \|\ /\ \ \ \ \ \/ / / \ \ \|\ \ \ \|\ \|___ \ \_|
\ \ ____\ \ _ _\ \ \\\ \ \ __ \ \ __ \ \ __ \ \ \ \ \ / / \ \ __ \ \ _ _\ \ \ \
\ \ \___|\ \ \\ \\ \ \\\ \ \ \|\ \ \ \ \ \ \ \|\ \ \ \____ \/ / / \ \ \ \ \ \ \\ \| \ \ \
\ \__\ \ \__\\ _\\ \_______\ \_______\ \__\ \__\ \_______\ \_______\__/ / / \ \__\ \__\ \__\\ _\ \ \__\
\|__| \|__|\|__|\|_______|\|_______|\|__|\|__|\|_______|\|_______|\___/ / \|__|\|__|\|__|\|__| \|__|
\|___|/
*/
pragma solidity ^0.8.10;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract ProbablyART is ERC721A, Ownable {
bool public saleEnabled;
string public metadataBaseURL;
uint256 public constant MAX_SUPPLY = 2222;
mapping(address => bool) public claims;
constructor() ERC721A("Probably ART", "ART", 2222) {
}
function setBaseURI(string memory baseURL) external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
function reserve(uint256 num) external onlyOwner {
require(<FILL_ME>)
_safeMint(msg.sender, num);
}
function mint(uint256 numOfTokens) external payable {
}
}
| (totalSupply()+num)<=MAX_SUPPLY,"Exceed max supply" | 97,315 | (totalSupply()+num)<=MAX_SUPPLY |
"Exceed max supply" | // SPDX-License-Identifier: UNLICENSED
/*
________ ________ ________ ________ ________ ________ ___ ___ ___ ________ ________ _________
|\ __ \|\ __ \|\ __ \|\ __ \|\ __ \|\ __ \|\ \ |\ \ / /| |\ __ \|\ __ \|\___ ___\
\ \ \|\ \ \ \|\ \ \ \|\ \ \ \|\ /\ \ \|\ \ \ \|\ /\ \ \ \ \ \/ / / \ \ \|\ \ \ \|\ \|___ \ \_|
\ \ ____\ \ _ _\ \ \\\ \ \ __ \ \ __ \ \ __ \ \ \ \ \ / / \ \ __ \ \ _ _\ \ \ \
\ \ \___|\ \ \\ \\ \ \\\ \ \ \|\ \ \ \ \ \ \ \|\ \ \ \____ \/ / / \ \ \ \ \ \ \\ \| \ \ \
\ \__\ \ \__\\ _\\ \_______\ \_______\ \__\ \__\ \_______\ \_______\__/ / / \ \__\ \__\ \__\\ _\ \ \__\
\|__| \|__|\|__|\|_______|\|_______|\|__|\|__|\|_______|\|_______|\___/ / \|__|\|__|\|__|\|__| \|__|
\|___|/
*/
pragma solidity ^0.8.10;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract ProbablyART is ERC721A, Ownable {
bool public saleEnabled;
string public metadataBaseURL;
uint256 public constant MAX_SUPPLY = 2222;
mapping(address => bool) public claims;
constructor() ERC721A("Probably ART", "ART", 2222) {
}
function setBaseURI(string memory baseURL) external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
function reserve(uint256 num) external onlyOwner {
}
function mint(uint256 numOfTokens) external payable {
require(saleEnabled, "Sale must be active.");
require(<FILL_ME>)
require(numOfTokens == 1, "Must mint 1 token");
require(!claims[msg.sender], "Wallet already claimed");
claims[msg.sender] = true;
_safeMint(msg.sender, numOfTokens);
}
}
| totalSupply()+numOfTokens<=MAX_SUPPLY,"Exceed max supply" | 97,315 | totalSupply()+numOfTokens<=MAX_SUPPLY |
"Wallet already claimed" | // SPDX-License-Identifier: UNLICENSED
/*
________ ________ ________ ________ ________ ________ ___ ___ ___ ________ ________ _________
|\ __ \|\ __ \|\ __ \|\ __ \|\ __ \|\ __ \|\ \ |\ \ / /| |\ __ \|\ __ \|\___ ___\
\ \ \|\ \ \ \|\ \ \ \|\ \ \ \|\ /\ \ \|\ \ \ \|\ /\ \ \ \ \ \/ / / \ \ \|\ \ \ \|\ \|___ \ \_|
\ \ ____\ \ _ _\ \ \\\ \ \ __ \ \ __ \ \ __ \ \ \ \ \ / / \ \ __ \ \ _ _\ \ \ \
\ \ \___|\ \ \\ \\ \ \\\ \ \ \|\ \ \ \ \ \ \ \|\ \ \ \____ \/ / / \ \ \ \ \ \ \\ \| \ \ \
\ \__\ \ \__\\ _\\ \_______\ \_______\ \__\ \__\ \_______\ \_______\__/ / / \ \__\ \__\ \__\\ _\ \ \__\
\|__| \|__|\|__|\|_______|\|_______|\|__|\|__|\|_______|\|_______|\___/ / \|__|\|__|\|__|\|__| \|__|
\|___|/
*/
pragma solidity ^0.8.10;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract ProbablyART is ERC721A, Ownable {
bool public saleEnabled;
string public metadataBaseURL;
uint256 public constant MAX_SUPPLY = 2222;
mapping(address => bool) public claims;
constructor() ERC721A("Probably ART", "ART", 2222) {
}
function setBaseURI(string memory baseURL) external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
function reserve(uint256 num) external onlyOwner {
}
function mint(uint256 numOfTokens) external payable {
require(saleEnabled, "Sale must be active.");
require(totalSupply() + numOfTokens <= MAX_SUPPLY, "Exceed max supply");
require(numOfTokens == 1, "Must mint 1 token");
require(<FILL_ME>)
claims[msg.sender] = true;
_safeMint(msg.sender, numOfTokens);
}
}
| !claims[msg.sender],"Wallet already claimed" | 97,315 | !claims[msg.sender] |
"Cannot set maxTxnAmount lower than 0.5%" | // SPDX-License-Identifier: MIT
//HAPE PRIME
//https://medium.com/@HAPE_PRIME/hape-prime-hape-ffeabde85218
//https://www.hape.io/
pragma solidity 0.8.11;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDexPair {
function sync() external;
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string public _name;
string public _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _createInitialSupply(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() external virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) external virtual onlyOwner {
}
}
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract HAPEPRIME is ERC20, Ownable {
IDexRouter public dexRouter;
address public lpPair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address public devWallet;
uint256 private blockPenalty;
uint256 public tradingActiveBlock = 0; // 0 means trading is not active
uint256 public maxTxnAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
uint256 public amountForAutoBuyBack = 0.2 ether;
bool public autoBuyBackEnabled = false;
uint256 public autoBuyBackFrequency = 3600 seconds;
uint256 public lastAutoBuyBackTime;
uint256 public percentForLPBurn = 100; // 100 = 1%
bool public lpBurnEnabled = false;
uint256 public lpBurnFrequency = 3600 seconds;
uint256 public lastLpBurnTime;
uint256 public manualBurnFrequency = 1 hours;
uint256 public lastManualLpBurnTime;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferBlock; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
uint256 public buyTotalFees;
uint256 public buyMarketingFee;
uint256 public buyLiquidityFee;
uint256 public buyBuyBackFee;
uint256 public buyDevFee;
uint256 public sellTotalFees;
uint256 public sellMarketingFee;
uint256 public sellLiquidityFee;
uint256 public sellBuyBackFee;
uint256 public sellDevFee;
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForBuyBack;
uint256 public tokensForDev;
/******************/
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedmaxTxnAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event MarketingWalletUpdated(address indexed newWallet, address indexed oldWallet);
event DevWalletUpdated(address indexed newWallet, address indexed oldWallet);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event AutoNukeLP(uint256 amount);
event ManualNukeLP(uint256 amount);
event BuyBackTriggered(uint256 amount);
event OwnerForcedSwapBack(uint256 timestamp);
constructor() ERC20("", "") payable {
}
receive() external payable {
}
// remove limits after token is stable
function removeLimits() external onlyOwner {
}
// disable Transfer delay - cannot be reenabled
function disableTransferDelay() external onlyOwner {
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool){
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
require(<FILL_ME>)
maxTxnAmount = newNum * (10**18);
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
}
// only use to disable contract sales if absolutely necessary (emergency use only)
function updateSwapEnabled(bool enabled) external onlyOwner(){
}
function updateBuyFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _buyBackFee, uint256 _devFee) external onlyOwner {
}
function updateSellFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _buyBackFee, uint256 _devFee) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateMarketingWallet(address newMarketingWallet) external onlyOwner {
}
function updateDevWallet(address newWallet) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
// force Swap back if slippage issues.
function forceSwapBack() external onlyOwner {
}
// useful for buybacks or to reclaim any ETH on the contract in a way that helps holders.
function buyBackTokens(uint256 amountInWei) external onlyOwner {
}
function setAutoBuyBackSettings(uint256 _frequencyInSeconds, uint256 _buyBackAmount, bool _autoBuyBackEnabled) external onlyOwner {
}
function setAutoLPBurnSettings(uint256 _frequencyInSeconds, uint256 _percent, bool _Enabled) external onlyOwner {
}
// automated buyback
function autoBuyBack(uint256 amountInWei) internal {
}
function isPenaltyActive() public view returns (bool) {
}
function autoBurnLiquidityPairTokens() internal{
}
function manualBurnLiquidityPairTokens(uint256 percent) external onlyOwner {
}
function launch(uint256 _blockPenalty) external onlyOwner {
}
// withdraw ETH if stuck before launch
function withdrawStuckETH() external onlyOwner {
}
}
| newNum>=(totalSupply()*5/1000)/1e18,"Cannot set maxTxnAmount lower than 0.5%" | 97,414 | newNum>=(totalSupply()*5/1000)/1e18 |
"Cannot set maxWallet lower than 1%" | // SPDX-License-Identifier: MIT
//HAPE PRIME
//https://medium.com/@HAPE_PRIME/hape-prime-hape-ffeabde85218
//https://www.hape.io/
pragma solidity 0.8.11;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDexPair {
function sync() external;
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string public _name;
string public _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _createInitialSupply(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() external virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) external virtual onlyOwner {
}
}
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract HAPEPRIME is ERC20, Ownable {
IDexRouter public dexRouter;
address public lpPair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address public devWallet;
uint256 private blockPenalty;
uint256 public tradingActiveBlock = 0; // 0 means trading is not active
uint256 public maxTxnAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
uint256 public amountForAutoBuyBack = 0.2 ether;
bool public autoBuyBackEnabled = false;
uint256 public autoBuyBackFrequency = 3600 seconds;
uint256 public lastAutoBuyBackTime;
uint256 public percentForLPBurn = 100; // 100 = 1%
bool public lpBurnEnabled = false;
uint256 public lpBurnFrequency = 3600 seconds;
uint256 public lastLpBurnTime;
uint256 public manualBurnFrequency = 1 hours;
uint256 public lastManualLpBurnTime;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferBlock; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
uint256 public buyTotalFees;
uint256 public buyMarketingFee;
uint256 public buyLiquidityFee;
uint256 public buyBuyBackFee;
uint256 public buyDevFee;
uint256 public sellTotalFees;
uint256 public sellMarketingFee;
uint256 public sellLiquidityFee;
uint256 public sellBuyBackFee;
uint256 public sellDevFee;
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForBuyBack;
uint256 public tokensForDev;
/******************/
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedmaxTxnAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event MarketingWalletUpdated(address indexed newWallet, address indexed oldWallet);
event DevWalletUpdated(address indexed newWallet, address indexed oldWallet);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event AutoNukeLP(uint256 amount);
event ManualNukeLP(uint256 amount);
event BuyBackTriggered(uint256 amount);
event OwnerForcedSwapBack(uint256 timestamp);
constructor() ERC20("", "") payable {
}
receive() external payable {
}
// remove limits after token is stable
function removeLimits() external onlyOwner {
}
// disable Transfer delay - cannot be reenabled
function disableTransferDelay() external onlyOwner {
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool){
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
require(<FILL_ME>)
maxWallet = newNum * (10**18);
}
function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
}
// only use to disable contract sales if absolutely necessary (emergency use only)
function updateSwapEnabled(bool enabled) external onlyOwner(){
}
function updateBuyFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _buyBackFee, uint256 _devFee) external onlyOwner {
}
function updateSellFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _buyBackFee, uint256 _devFee) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateMarketingWallet(address newMarketingWallet) external onlyOwner {
}
function updateDevWallet(address newWallet) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
// force Swap back if slippage issues.
function forceSwapBack() external onlyOwner {
}
// useful for buybacks or to reclaim any ETH on the contract in a way that helps holders.
function buyBackTokens(uint256 amountInWei) external onlyOwner {
}
function setAutoBuyBackSettings(uint256 _frequencyInSeconds, uint256 _buyBackAmount, bool _autoBuyBackEnabled) external onlyOwner {
}
function setAutoLPBurnSettings(uint256 _frequencyInSeconds, uint256 _percent, bool _Enabled) external onlyOwner {
}
// automated buyback
function autoBuyBack(uint256 amountInWei) internal {
}
function isPenaltyActive() public view returns (bool) {
}
function autoBurnLiquidityPairTokens() internal{
}
function manualBurnLiquidityPairTokens(uint256 percent) external onlyOwner {
}
function launch(uint256 _blockPenalty) external onlyOwner {
}
// withdraw ETH if stuck before launch
function withdrawStuckETH() external onlyOwner {
}
}
| newNum>=(totalSupply()*1/100)/1e18,"Cannot set maxWallet lower than 1%" | 97,414 | newNum>=(totalSupply()*1/100)/1e18 |
null | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
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
);
}
contract DivineSpirit is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "Divine Spirit";
string private constant _symbol = "KAMI";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private buyReflections = 0;
uint256 private buyTax = 6;
uint256 private sellReflections = 0;
uint256 private sellTax = 6;
//Original Fee
uint256 private reflectionsFee = sellReflections;
uint256 private _taxFee = sellTax;
uint256 private _previousReflectionsFee = reflectionsFee;
uint256 private _previousTaxFee = _taxFee;
mapping(address => bool) public bots; mapping (address => uint256) public _buyMap;
address payable private _devAddress = payable(0xD206Dc406e2b04AD71330c23cb881f4b545460ae);
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private inSwap = false;
uint256 public _maxWalletSize = 30000000 * 10**9;
uint256 public _swapTokensAtAmount = 7000000 * 10**9;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function manualSwap() external {
require(<FILL_ME>)
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
function manualSend() external {
}
function blockBots(address[] memory bots_) public onlyOwner {
}
function unblockBot(address notbot) public onlyOwner {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public {
}
function setMaxWalletSize(uint256 maxWalletSize) public {
}
}
| _msgSender()==_devAddress | 97,501 | _msgSender()==_devAddress |
"CANNOT_MINT_ON_THE_SAME_BLOCK" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
require(<FILL_ME>)
require(tx.origin == msg.sender, "CONTRACTS_NOT_ALLOWED_TO_MINT");
if (mintType == 1) {
require(isPublicSaleActive, "PUBLIC_MINT_IS_NOT_YET_ACTIVE");
}
if (mintType == 2) {
require(isPresaleActive, "PRESALE_MINT_IS_NOT_YET_ACTIVE");
}
if (mintType == 3) {
require(isPresaleActive, "FREE_MINT_IS_NOT_YET_ACTIVE");
}
_;
}
modifier supplyMintLimit(uint256 numberOfTokens) {
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| addressBlockBought[msg.sender]<block.timestamp,"CANNOT_MINT_ON_THE_SAME_BLOCK" | 97,508 | addressBlockBought[msg.sender]<block.timestamp |
"NOT_ENOUGH_SUPPLY" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
}
modifier supplyMintLimit(uint256 numberOfTokens) {
require(<FILL_ME>)
require(
numberOfTokens + numberMinted(msg.sender) <= MINT_LIMIT,
"EXCEED_MINT_LIMIT"
);
require(
numberOfTokens <= TRANSACTION_LIMIT,
"EXCEEDING_MAXIMUM_AMOUNT_PER_TRANSACTION"
);
_;
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| numberOfTokens+totalSupply()<=MAX_SUPPLY,"NOT_ENOUGH_SUPPLY" | 97,508 | numberOfTokens+totalSupply()<=MAX_SUPPLY |
"EXCEED_MINT_LIMIT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
}
modifier supplyMintLimit(uint256 numberOfTokens) {
require(
numberOfTokens + totalSupply() <= MAX_SUPPLY,
"NOT_ENOUGH_SUPPLY"
);
require(<FILL_ME>)
require(
numberOfTokens <= TRANSACTION_LIMIT,
"EXCEEDING_MAXIMUM_AMOUNT_PER_TRANSACTION"
);
_;
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| numberOfTokens+numberMinted(msg.sender)<=MINT_LIMIT,"EXCEED_MINT_LIMIT" | 97,508 | numberOfTokens+numberMinted(msg.sender)<=MINT_LIMIT |
"CONTRACT_MINT_NOT_ALLOWED" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
}
modifier supplyMintLimit(uint256 numberOfTokens) {
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
bytes32 digest = keccak256(
abi.encodePacked(msg.sender, expireTime, numberOfTokens)
);
require(<FILL_ME>)
require(block.timestamp <= expireTime, "EXPIRED_SIGNATURE");
require(!usedDigests[digest], "SIGNATURE_LOOPING_NOT_ALLOWED");
require(msg.value == PUBLIC_PRICE * numberOfTokens, "INVALID_AMOUNT");
addressBlockBought[msg.sender] = block.timestamp;
usedDigests[digest] = true;
_mint(msg.sender, numberOfTokens);
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| isAuthorized(sig,digest),"CONTRACT_MINT_NOT_ALLOWED" | 97,508 | isAuthorized(sig,digest) |
"SIGNATURE_LOOPING_NOT_ALLOWED" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
}
modifier supplyMintLimit(uint256 numberOfTokens) {
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
bytes32 digest = keccak256(
abi.encodePacked(msg.sender, expireTime, numberOfTokens)
);
require(isAuthorized(sig, digest), "CONTRACT_MINT_NOT_ALLOWED");
require(block.timestamp <= expireTime, "EXPIRED_SIGNATURE");
require(<FILL_ME>)
require(msg.value == PUBLIC_PRICE * numberOfTokens, "INVALID_AMOUNT");
addressBlockBought[msg.sender] = block.timestamp;
usedDigests[digest] = true;
_mint(msg.sender, numberOfTokens);
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| !usedDigests[digest],"SIGNATURE_LOOPING_NOT_ALLOWED" | 97,508 | !usedDigests[digest] |
"PROOF_INVALID" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
}
modifier supplyMintLimit(uint256 numberOfTokens) {
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, maxMint));
require(<FILL_ME>)
require(
userPurchase[msg.sender].presaleMinted + numberOfTokens <= maxMint,
"EXCEED_ALLOCATED_MINT_LIMIT"
);
require(msg.value == WL_PRICE * numberOfTokens, "INVALID_AMOUNT");
addressBlockBought[msg.sender] = block.timestamp;
userPurchase[msg.sender].presaleMinted += numberOfTokens;
_mint(msg.sender, numberOfTokens);
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| MerkleProof.verify(proof,presaleRoot,leaf),"PROOF_INVALID" | 97,508 | MerkleProof.verify(proof,presaleRoot,leaf) |
"EXCEED_ALLOCATED_MINT_LIMIT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
}
modifier supplyMintLimit(uint256 numberOfTokens) {
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, maxMint));
require(MerkleProof.verify(proof, presaleRoot, leaf), "PROOF_INVALID");
require(<FILL_ME>)
require(msg.value == WL_PRICE * numberOfTokens, "INVALID_AMOUNT");
addressBlockBought[msg.sender] = block.timestamp;
userPurchase[msg.sender].presaleMinted += numberOfTokens;
_mint(msg.sender, numberOfTokens);
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| userPurchase[msg.sender].presaleMinted+numberOfTokens<=maxMint,"EXCEED_ALLOCATED_MINT_LIMIT" | 97,508 | userPurchase[msg.sender].presaleMinted+numberOfTokens<=maxMint |
"PROOF_INVALID" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
}
modifier supplyMintLimit(uint256 numberOfTokens) {
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, maxMint));
require(<FILL_ME>)
require(
userPurchase[msg.sender].freeMinted + numberOfTokens <= maxMint,
"EXCEED_ALLOCATED_MINT_LIMIT"
);
addressBlockBought[msg.sender] = block.timestamp;
userPurchase[msg.sender].freeMinted += numberOfTokens;
_mint(msg.sender, numberOfTokens);
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| MerkleProof.verify(proof,freemintRoot,leaf),"PROOF_INVALID" | 97,508 | MerkleProof.verify(proof,freemintRoot,leaf) |
"EXCEED_ALLOCATED_MINT_LIMIT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
}
modifier supplyMintLimit(uint256 numberOfTokens) {
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, maxMint));
require(MerkleProof.verify(proof, freemintRoot, leaf), "PROOF_INVALID");
require(<FILL_ME>)
addressBlockBought[msg.sender] = block.timestamp;
userPurchase[msg.sender].freeMinted += numberOfTokens;
_mint(msg.sender, numberOfTokens);
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| userPurchase[msg.sender].freeMinted+numberOfTokens<=maxMint,"EXCEED_ALLOCATED_MINT_LIMIT" | 97,508 | userPurchase[msg.sender].freeMinted+numberOfTokens<=maxMint |
"NOT_ENOUGH_SUPPLY" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AQueryable.sol";
import "./operator-filter-registry/src/OperatorFilterer.sol";
contract Drivrs is ERC721AQueryable, Ownable, OperatorFilterer{
uint256 public MAX_SUPPLY = 8888;
uint256 public WL_PRICE = 0.02 ether;
uint256 public PUBLIC_PRICE = 0.04 ether;
uint256 public MINT_LIMIT = 1;
uint256 public TRANSACTION_LIMIT = 1;
bool public isPublicSaleActive = false;
bool public isPresaleActive = false;
bool _revealed = false;
string private baseURI = "";
bytes32 presaleRoot;
bytes32 freemintRoot;
struct UserPurchaseInfo {
uint256 presaleMinted;
uint256 freeMinted;
}
mapping(address => UserPurchaseInfo) public userPurchase;
mapping(address => uint256) addressBlockBought;
address public constant ADDRESS_1 =
0x294FE0982d4A700650eFAb41c8C59998d4A2fdb9; //Owner
address public constant ADDRESS_2 =
0x188A3c584F0dE9ee0eABe04316A94A41F0867C0C; //ZL
address signer;
mapping(bytes32 => bool) public usedDigests;
constructor() ERC721A("Drivrs", "DRIVRS") OperatorFilterer(address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6), false) {}
modifier isSecured(uint8 mintType) {
}
modifier supplyMintLimit(uint256 numberOfTokens) {
}
//Essential
function mint(
uint256 numberOfTokens,
uint64 expireTime,
bytes memory sig
) external payable isSecured(1) supplyMintLimit(numberOfTokens) {
}
function presaleMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external payable isSecured(2) supplyMintLimit(numberOfTokens) {
}
function freeMint(
bytes32[] memory proof,
uint256 numberOfTokens,
uint256 maxMint
) external isSecured(3) supplyMintLimit(numberOfTokens) {
}
function devMint(address[] memory _addresses, uint256[] memory quantities)
external
onlyOwner
{
require(_addresses.length == quantities.length, "WRONG_PARAMETERS");
uint256 totalTokens = 0;
for (uint256 i = 0; i < quantities.length; i++) {
totalTokens += quantities[i];
}
require(<FILL_ME>)
for (uint256 i = 0; i < _addresses.length; i++) {
_safeMint(_addresses[i], quantities[i]);
}
}
//Essential
function setBaseURI(string calldata URI) external onlyOwner {
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
//Essential
function setPublicSaleStatus() external onlyOwner {
}
function setPreSaleStatus() external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function setPreSaleRoot(bytes32 _presaleRoot) external onlyOwner {
}
function setFreeMintRoot(bytes32 _freemintRoot) external onlyOwner {
}
function setSigner(address _signer) external onlyOwner {
}
function isAuthorized(bytes memory sig, bytes32 digest)
private
view
returns (bool)
{
}
//Passed as wei
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
//Passed as wei
function setPresalePrice(uint256 _wlPrice) external onlyOwner {
}
function decreaseSupply(uint256 _maxSupply) external onlyOwner {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner {
}
function setTransactionLimit(uint256 _transactionLimit) external onlyOwner {
}
//OS FILTERER
function transferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(from)
{
}
}
| totalTokens+totalSupply()<=MAX_SUPPLY,"NOT_ENOUGH_SUPPLY" | 97,508 | totalTokens+totalSupply()<=MAX_SUPPLY |
"Lack of liquidity when withdraw." | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.4;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./config/Constant.sol";
import "./interfaces/IGlobalConfig.sol";
import "./interfaces/ICToken.sol";
import "./interfaces/ICETH.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
contract Bank is BPYConstant, Initializable {
using SafeMath for uint256;
// globalConfig should be initialized per pool
IGlobalConfig public globalConfig; // global configuration contract address
// NOTICE struct to avoid below error:
// "Contract has 16 states declarations but allowed no more than 15"
struct BankConfig {
address poolRegistry;
// maxUtilToCalcBorrowAPR = 1 - rateCurveConstant / MaxBorrowAPR%
// ex: minBorrowAPR% = 3%
// MaxBorrowAPR% = 150%
// rateCurveConstant = minBorrowAPR = 3
// maxUtilToCalcBorrowAPR = 1 - 3 / 150 = 0.98 = 98%
// variable stores value in format => 10^18 = 100%
uint256 maxUtilToCalcBorrowAPR; // Max Utilization to Calculate Borrow APR
// rateCurveConstantMultiplier = 1 / (1 - maxUtilToCalcBorrowAPR)
// ex: maxUtilToCalcBorrowAPR = 0.98 = 98%
// rateCurveConstantMultiplier = 1 / (1 - 0.98) = 50
uint256 rateCurveConstantMultiplier;
}
// Bank Config to avoid errors
BankConfig public bankConfig;
// token => amount
mapping(address => uint256) public totalLoans; // amount of lended tokens
// token => amount
mapping(address => uint256) public totalReserve; // amount of tokens in reservation
// token => amount
mapping(address => uint256) public totalCompound; // amount of tokens in compound
// Token => block-num => rate
mapping(address => mapping(uint256 => uint256)) public depositeRateIndex; // the index curve of deposit rate
// Token => block-num => rate
mapping(address => mapping(uint256 => uint256)) public borrowRateIndex; // the index curve of borrow rate
// token address => block number
mapping(address => uint256) public lastCheckpoint; // last checkpoint on the index curve
// cToken address => rate
mapping(address => uint256) public lastCTokenExchangeRate; // last compound cToken exchange rate
mapping(address => ThirdPartyPool) public compoundPool; // the compound pool
mapping(address => mapping(uint256 => uint256)) public depositFINRateIndex;
mapping(address => mapping(uint256 => uint256)) public borrowFINRateIndex;
mapping(address => uint256) public lastDepositFINRateCheckpoint;
mapping(address => uint256) public lastBorrowFINRateCheckpoint;
modifier onlyAuthorized() {
}
modifier onlyGlobalConfig() {
}
struct ThirdPartyPool {
bool supported; // if the token is supported by the third party platforms such as Compound
uint256 capitalRatio; // the ratio of the capital in third party to the total asset
uint256 depositRatePerBlock; // the deposit rate of the token in third party
uint256 borrowRatePerBlock; // the borrow rate of the token in third party
}
event UpdateIndex(address indexed token, uint256 depositeRateIndex, uint256 borrowRateIndex);
event UpdateDepositFINIndex(address indexed _token, uint256 depositFINRateIndex);
event UpdateBorrowFINIndex(address indexed _token, uint256 borrowFINRateIndex);
/**
* @notice The Bank contract is upgradeable, hence, constructor is not allowed.
* But `BLOCKS_PER_YEAR` is `immutable` present in `BPYConstant` contract
* threfore we need to initialize blocksPerYear from the constructor.
* The `immutable` variables are also does not takes storage slot just like `constant`.
* refer: https://docs.soliditylang.org/en/v0.8.4/contracts.html?#constant-and-immutable-state-variables
**/
// solhint-disable-next-line no-empty-blocks
constructor(uint256 _blocksPerYear) BPYConstant(_blocksPerYear) {}
/**
* Initialize the Bank
* @param _globalConfig the global configuration contract
*/
function initialize(IGlobalConfig _globalConfig, address _poolRegistry) public initializer {
}
/**
* @dev Configuration of Max Utilization to Calculate Borrow APR and rateCurveConstantMultiplier
* is done only once from the PoolRegistry
*/
function configureMaxUtilToCalcBorrowAPR(uint256 _maxBorrowAPR) external onlyGlobalConfig {
}
/**
* Total amount of the token in Saving account
* @param _token token address
*/
function getTotalDepositStore(address _token) public view returns (uint256) {
}
/**
* Update total amount of token in Compound as the cToken price changed
* @param _token token address
*/
function updateTotalCompound(address _token) internal {
}
/**
* Update the total reservation. Before run this function, make sure that totalCompound has been updated
* by calling updateTotalCompound. Otherwise, totalCompound may not equal to the exact amount of the
* token in Compound.
* @param _token token address
* @param _action indicate if user's operation is deposit or withdraw, and borrow or repay.
* @return compoundAmount the actual amount deposit/withdraw from the saving pool
*/
// solhint-disable-next-line code-complexity
function updateTotalReserve(
address _token,
uint256 _amount,
ActionType _action
) internal returns (uint256 compoundAmount) {
address cToken = globalConfig.tokenRegistry().getCToken(_token);
uint256 totalAmount = getTotalDepositStore(_token);
if (_action == ActionType.DepositAction || _action == ActionType.RepayAction) {
// Total amount of token after deposit or repay
if (_action == ActionType.DepositAction) {
totalAmount = totalAmount.add(_amount);
} else {
totalLoans[_token] = totalLoans[_token].sub(_amount);
}
// Expected total amount of token in reservation after deposit or repay
uint256 totalReserveBeforeAdjust = totalReserve[_token].add(_amount);
if (
cToken != address(0) &&
totalReserveBeforeAdjust > totalAmount.mul(globalConfig.maxReserveRatio()).div(100)
) {
uint256 toCompoundAmount = totalReserveBeforeAdjust.sub(
totalAmount.mul(globalConfig.midReserveRatio()).div(100)
);
//toCompound(_token, toCompoundAmount);
compoundAmount = toCompoundAmount;
totalCompound[cToken] = totalCompound[cToken].add(toCompoundAmount);
totalReserve[_token] = totalReserve[_token].add(_amount).sub(toCompoundAmount);
} else {
totalReserve[_token] = totalReserve[_token].add(_amount);
}
} else if (_action == ActionType.LiquidateRepayAction) {
// When liquidation is called the `totalLoans` amount should be reduced.
// We dont need to update other variables as all the amounts are adjusted internally,
// hence does not require updation of `totalReserve` / `totalCompound`
totalLoans[_token] = totalLoans[_token].sub(_amount);
} else {
// The lack of liquidity exception happens when the pool doesn't have enough tokens for borrow/withdraw
// It happens when part of the token has lended to the other accounts.
// However in case of withdrawAll, even if the token has no loan, this requirment may still false because
// of the precision loss in the rate calcuation. So we put a logic here to deal with this case: in case
// of withdrawAll and there is no loans for the token, we just adjust the balance in bank contract to the
// to the balance of that individual account.
if (_action == ActionType.WithdrawAction) {
if (totalLoans[_token] != 0) {
require(<FILL_ME>)
} else if (getPoolAmount(_token) < _amount) {
totalReserve[_token] = _amount.sub(totalCompound[cToken]);
}
totalAmount = getTotalDepositStore(_token);
} else require(getPoolAmount(_token) >= _amount, "Lack of liquidity when borrow.");
// Total amount of token after withdraw or borrow
if (_action == ActionType.WithdrawAction) {
totalAmount = totalAmount.sub(_amount);
} else {
totalLoans[_token] = totalLoans[_token].add(_amount);
}
// Expected total amount of token in reservation after deposit or repay
uint256 totalReserveBeforeAdjust = totalReserve[_token] > _amount ? totalReserve[_token].sub(_amount) : 0;
// Trigger fromCompound if the new reservation ratio is less than 10%
if (
cToken != address(0) &&
(totalAmount == 0 ||
totalReserveBeforeAdjust < totalAmount.mul(globalConfig.minReserveRatio()).div(100))
) {
uint256 totalAvailable = totalReserve[_token].add(totalCompound[cToken]).sub(_amount);
if (totalAvailable < totalAmount.mul(globalConfig.midReserveRatio()).div(100)) {
// Withdraw all the tokens from Compound
compoundAmount = totalCompound[cToken];
totalCompound[cToken] = 0;
totalReserve[_token] = totalAvailable;
} else {
// Withdraw partial tokens from Compound
uint256 totalInCompound = totalAvailable.sub(
totalAmount.mul(globalConfig.midReserveRatio()).div(100)
);
compoundAmount = totalCompound[cToken].sub(totalInCompound);
totalCompound[cToken] = totalInCompound;
totalReserve[_token] = totalAvailable.sub(totalInCompound);
}
} else {
totalReserve[_token] = totalReserve[_token].sub(_amount);
}
}
return compoundAmount;
}
function update(
address _token,
uint256 _amount,
ActionType _action
) public onlyAuthorized returns (uint256 compoundAmount) {
}
/**
* The function is called in Bank.deposit(), Bank.withdraw() and Accounts.claim() functions.
* The function should be called AFTER the newRateIndexCheckpoint function so that the account balances are
* accurate, and BEFORE the account balance acutally updated due to deposit/withdraw activities.
*/
function updateDepositFINIndex(address _token) public onlyAuthorized {
}
function updateBorrowFINIndex(address _token) public onlyAuthorized {
}
function updateMining(address _token) public onlyAuthorized {
}
/**
* Get the borrowing interest rate.
* @param _token token address
* @return the borrow rate for the current block
*/
function getBorrowRatePerBlock(address _token) public view returns (uint256) {
}
/**
* Get Deposit Rate. Deposit APR = (Borrow APR * Utilization Rate (U) + Compound Supply Rate *
* Capital Compound Ratio (C) )* (1- DeFiner Community Fund Ratio (D)). The scaling is 10 ** 18
* @param _token token address
* @return deposite rate of blocks before the current block
*/
function getDepositRatePerBlock(address _token) public view returns (uint256) {
}
/**
* Get capital utilization. Capital Utilization Rate (U )= total loan outstanding / Total market deposit
* @param _token token address
* @return Capital utilization ratio `U`.
* Valid range: 0 ≤ U ≤ 10^18
*/
function getCapitalUtilizationRatio(address _token) public view returns (uint256) {
}
/**
* Ratio of the capital in Compound
* @param _token token address
*/
function getCapitalCompoundRatio(address _token) public view returns (uint256) {
}
/**
* It's a utility function. Get the cummulative deposit rate in a block interval ending in current block
* @param _token token address
* @param _depositRateRecordStart the start block of the interval
* @dev This function should always be called after current block is set as a new rateIndex point.
*/
function getDepositAccruedRate(address _token, uint256 _depositRateRecordStart) external view returns (uint256) {
}
/**
* Get the cummulative borrow rate in a block interval ending in current block
* @param _token token address
* @param _borrowRateRecordStart the start block of the interval
* @dev This function should always be called after current block is set as a new rateIndex point.
*/
function getBorrowAccruedRate(address _token, uint256 _borrowRateRecordStart) external view returns (uint256) {
}
/**
* Set a new rate index checkpoint.
* @param _token token address
* @dev The rate set at the checkpoint is the rate from the last checkpoint to this checkpoint
*/
function newRateIndexCheckpoint(address _token) public onlyAuthorized {
}
/**
* Calculate a token deposite rate of current block
* @param _token token address
* @dev This is an looking forward estimation from last checkpoint and not the exactly rate
* that the user will pay or earn.
*/
function depositeRateIndexNow(address _token) public view returns (uint256) {
}
/**
* Calculate a token borrow rate of current block
* @param _token token address
*/
function borrowRateIndexNow(address _token) public view returns (uint256) {
}
/**
* Get the state of the given token
* @param _token token address
*/
function getTokenState(address _token)
public
view
returns (
uint256 deposits,
uint256 loans,
uint256 reserveBalance,
uint256 remainingAssets
)
{
}
function getPoolAmount(address _token) public view returns (uint256) {
}
function deposit(
address _to,
address _token,
uint256 _amount
) external onlyAuthorized {
}
function borrow(
address _from,
address _token,
uint256 _amount
) external onlyAuthorized {
}
function repay(
address _to,
address _token,
uint256 _amount
) external onlyAuthorized returns (uint256) {
}
/**
* Withdraw a token from an address
* @param _from address to be withdrawn from
* @param _token token address
* @param _amount amount to be withdrawn
* @return The actually amount withdrawed, which will be the amount requested minus the commission fee.
*/
function withdraw(
address _from,
address _token,
uint256 _amount
) external onlyAuthorized returns (uint256) {
}
/**
* Get current block number
* @return the current block number
*/
function getBlockNumber() private view returns (uint256) {
}
function version() public pure returns (string memory) {
}
}
| getPoolAmount(_token)>=_amount,"Lack of liquidity when withdraw." | 97,653 | getPoolAmount(_token)>=_amount |
"Token BorrowPrincipal must be > 0" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.4;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./config/Constant.sol";
import "./interfaces/IGlobalConfig.sol";
import "./interfaces/ICToken.sol";
import "./interfaces/ICETH.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
contract Bank is BPYConstant, Initializable {
using SafeMath for uint256;
// globalConfig should be initialized per pool
IGlobalConfig public globalConfig; // global configuration contract address
// NOTICE struct to avoid below error:
// "Contract has 16 states declarations but allowed no more than 15"
struct BankConfig {
address poolRegistry;
// maxUtilToCalcBorrowAPR = 1 - rateCurveConstant / MaxBorrowAPR%
// ex: minBorrowAPR% = 3%
// MaxBorrowAPR% = 150%
// rateCurveConstant = minBorrowAPR = 3
// maxUtilToCalcBorrowAPR = 1 - 3 / 150 = 0.98 = 98%
// variable stores value in format => 10^18 = 100%
uint256 maxUtilToCalcBorrowAPR; // Max Utilization to Calculate Borrow APR
// rateCurveConstantMultiplier = 1 / (1 - maxUtilToCalcBorrowAPR)
// ex: maxUtilToCalcBorrowAPR = 0.98 = 98%
// rateCurveConstantMultiplier = 1 / (1 - 0.98) = 50
uint256 rateCurveConstantMultiplier;
}
// Bank Config to avoid errors
BankConfig public bankConfig;
// token => amount
mapping(address => uint256) public totalLoans; // amount of lended tokens
// token => amount
mapping(address => uint256) public totalReserve; // amount of tokens in reservation
// token => amount
mapping(address => uint256) public totalCompound; // amount of tokens in compound
// Token => block-num => rate
mapping(address => mapping(uint256 => uint256)) public depositeRateIndex; // the index curve of deposit rate
// Token => block-num => rate
mapping(address => mapping(uint256 => uint256)) public borrowRateIndex; // the index curve of borrow rate
// token address => block number
mapping(address => uint256) public lastCheckpoint; // last checkpoint on the index curve
// cToken address => rate
mapping(address => uint256) public lastCTokenExchangeRate; // last compound cToken exchange rate
mapping(address => ThirdPartyPool) public compoundPool; // the compound pool
mapping(address => mapping(uint256 => uint256)) public depositFINRateIndex;
mapping(address => mapping(uint256 => uint256)) public borrowFINRateIndex;
mapping(address => uint256) public lastDepositFINRateCheckpoint;
mapping(address => uint256) public lastBorrowFINRateCheckpoint;
modifier onlyAuthorized() {
}
modifier onlyGlobalConfig() {
}
struct ThirdPartyPool {
bool supported; // if the token is supported by the third party platforms such as Compound
uint256 capitalRatio; // the ratio of the capital in third party to the total asset
uint256 depositRatePerBlock; // the deposit rate of the token in third party
uint256 borrowRatePerBlock; // the borrow rate of the token in third party
}
event UpdateIndex(address indexed token, uint256 depositeRateIndex, uint256 borrowRateIndex);
event UpdateDepositFINIndex(address indexed _token, uint256 depositFINRateIndex);
event UpdateBorrowFINIndex(address indexed _token, uint256 borrowFINRateIndex);
/**
* @notice The Bank contract is upgradeable, hence, constructor is not allowed.
* But `BLOCKS_PER_YEAR` is `immutable` present in `BPYConstant` contract
* threfore we need to initialize blocksPerYear from the constructor.
* The `immutable` variables are also does not takes storage slot just like `constant`.
* refer: https://docs.soliditylang.org/en/v0.8.4/contracts.html?#constant-and-immutable-state-variables
**/
// solhint-disable-next-line no-empty-blocks
constructor(uint256 _blocksPerYear) BPYConstant(_blocksPerYear) {}
/**
* Initialize the Bank
* @param _globalConfig the global configuration contract
*/
function initialize(IGlobalConfig _globalConfig, address _poolRegistry) public initializer {
}
/**
* @dev Configuration of Max Utilization to Calculate Borrow APR and rateCurveConstantMultiplier
* is done only once from the PoolRegistry
*/
function configureMaxUtilToCalcBorrowAPR(uint256 _maxBorrowAPR) external onlyGlobalConfig {
}
/**
* Total amount of the token in Saving account
* @param _token token address
*/
function getTotalDepositStore(address _token) public view returns (uint256) {
}
/**
* Update total amount of token in Compound as the cToken price changed
* @param _token token address
*/
function updateTotalCompound(address _token) internal {
}
/**
* Update the total reservation. Before run this function, make sure that totalCompound has been updated
* by calling updateTotalCompound. Otherwise, totalCompound may not equal to the exact amount of the
* token in Compound.
* @param _token token address
* @param _action indicate if user's operation is deposit or withdraw, and borrow or repay.
* @return compoundAmount the actual amount deposit/withdraw from the saving pool
*/
// solhint-disable-next-line code-complexity
function updateTotalReserve(
address _token,
uint256 _amount,
ActionType _action
) internal returns (uint256 compoundAmount) {
}
function update(
address _token,
uint256 _amount,
ActionType _action
) public onlyAuthorized returns (uint256 compoundAmount) {
}
/**
* The function is called in Bank.deposit(), Bank.withdraw() and Accounts.claim() functions.
* The function should be called AFTER the newRateIndexCheckpoint function so that the account balances are
* accurate, and BEFORE the account balance acutally updated due to deposit/withdraw activities.
*/
function updateDepositFINIndex(address _token) public onlyAuthorized {
}
function updateBorrowFINIndex(address _token) public onlyAuthorized {
}
function updateMining(address _token) public onlyAuthorized {
}
/**
* Get the borrowing interest rate.
* @param _token token address
* @return the borrow rate for the current block
*/
function getBorrowRatePerBlock(address _token) public view returns (uint256) {
}
/**
* Get Deposit Rate. Deposit APR = (Borrow APR * Utilization Rate (U) + Compound Supply Rate *
* Capital Compound Ratio (C) )* (1- DeFiner Community Fund Ratio (D)). The scaling is 10 ** 18
* @param _token token address
* @return deposite rate of blocks before the current block
*/
function getDepositRatePerBlock(address _token) public view returns (uint256) {
}
/**
* Get capital utilization. Capital Utilization Rate (U )= total loan outstanding / Total market deposit
* @param _token token address
* @return Capital utilization ratio `U`.
* Valid range: 0 ≤ U ≤ 10^18
*/
function getCapitalUtilizationRatio(address _token) public view returns (uint256) {
}
/**
* Ratio of the capital in Compound
* @param _token token address
*/
function getCapitalCompoundRatio(address _token) public view returns (uint256) {
}
/**
* It's a utility function. Get the cummulative deposit rate in a block interval ending in current block
* @param _token token address
* @param _depositRateRecordStart the start block of the interval
* @dev This function should always be called after current block is set as a new rateIndex point.
*/
function getDepositAccruedRate(address _token, uint256 _depositRateRecordStart) external view returns (uint256) {
}
/**
* Get the cummulative borrow rate in a block interval ending in current block
* @param _token token address
* @param _borrowRateRecordStart the start block of the interval
* @dev This function should always be called after current block is set as a new rateIndex point.
*/
function getBorrowAccruedRate(address _token, uint256 _borrowRateRecordStart) external view returns (uint256) {
}
/**
* Set a new rate index checkpoint.
* @param _token token address
* @dev The rate set at the checkpoint is the rate from the last checkpoint to this checkpoint
*/
function newRateIndexCheckpoint(address _token) public onlyAuthorized {
}
/**
* Calculate a token deposite rate of current block
* @param _token token address
* @dev This is an looking forward estimation from last checkpoint and not the exactly rate
* that the user will pay or earn.
*/
function depositeRateIndexNow(address _token) public view returns (uint256) {
}
/**
* Calculate a token borrow rate of current block
* @param _token token address
*/
function borrowRateIndexNow(address _token) public view returns (uint256) {
}
/**
* Get the state of the given token
* @param _token token address
*/
function getTokenState(address _token)
public
view
returns (
uint256 deposits,
uint256 loans,
uint256 reserveBalance,
uint256 remainingAssets
)
{
}
function getPoolAmount(address _token) public view returns (uint256) {
}
function deposit(
address _to,
address _token,
uint256 _amount
) external onlyAuthorized {
}
function borrow(
address _from,
address _token,
uint256 _amount
) external onlyAuthorized {
}
function repay(
address _to,
address _token,
uint256 _amount
) external onlyAuthorized returns (uint256) {
// Add a new checkpoint on the index curve.
newRateIndexCheckpoint(_token);
updateBorrowFINIndex(_token);
// Sanity check
require(<FILL_ME>)
// Update tokenInfo
uint256 remain = globalConfig.accounts().repay(_to, _token, _amount);
// Update the amount of tokens in compound and loans, i.e. derive the new values
// of C (Compound Ratio) and U (Utilization Ratio).
uint256 compoundAmount = update(_token, _amount.sub(remain), ActionType.RepayAction);
if (compoundAmount > 0) {
globalConfig.savingAccount().toCompound(_token, compoundAmount);
}
// Return actual amount repaid
return _amount.sub(remain);
}
/**
* Withdraw a token from an address
* @param _from address to be withdrawn from
* @param _token token address
* @param _amount amount to be withdrawn
* @return The actually amount withdrawed, which will be the amount requested minus the commission fee.
*/
function withdraw(
address _from,
address _token,
uint256 _amount
) external onlyAuthorized returns (uint256) {
}
/**
* Get current block number
* @return the current block number
*/
function getBlockNumber() private view returns (uint256) {
}
function version() public pure returns (string memory) {
}
}
| globalConfig.accounts().getBorrowPrincipal(_to,_token)>0,"Token BorrowPrincipal must be > 0" | 97,653 | globalConfig.accounts().getBorrowPrincipal(_to,_token)>0 |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
contract HorseToken is
ERC721,
ERC721Enumerable,
ERC721Burnable,
AccessControl,
Pausable
{
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private _baseTokenURI;
constructor(string memory baseURI)
ERC721("SagittariusBoy Horse", "SGRBH")
{
}
function pause() public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setBaseURI(string calldata baseURI)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function safeMint(address to, uint256 tokenId)
public
onlyRole(MINTER_ROLE)
{
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) whenNotPaused {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, AccessControl)
returns (bool)
{
}
function withdraw(address to, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function withdrawERC20(
IERC20 token,
address to,
uint256 amount
) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(<FILL_ME>)
}
}
| token.transfer(to,amount),"Transfer failed" | 97,657 | token.transfer(to,amount) |
"toAddress_overflow" | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.17;
/**
* @title Solidity Bytes Arrays Utils
* @author Gonçalo Sá <[email protected]>
* @custom:url https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol
*
* @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.
* The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.
*/
library BytesLib {
function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {
}
function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {
require(<FILL_ME>)
require(_bytes.length >= _start + 20, "toAddress_outOfBounds");
address tempAddress;
assembly {
tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
}
return tempAddress;
}
}
| _start+20>=_start,"toAddress_overflow" | 97,761 | _start+20>=_start |
"Not owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @author: manifold.xyz
import "@manifoldxyz/creator-core-solidity/contracts/core/IERC721CreatorCore.sol";
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "@manifoldxyz/creator-core-solidity/contracts/extensions/ICreatorExtensionTokenURI.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract PreWknd is ReentrancyGuard, AdminControl, ICreatorExtensionTokenURI, IERC1155Receiver, IERC721Receiver {
using Strings for uint256;
address public _creatorCore;
address public _sharedContract;
mapping(uint => bool) public _allowedTokenIds;
mapping(uint => string) public tokenURIs;
mapping(uint => bool) public hasBeenWrapped;
mapping(uint => uint) public newToOldTokenMappings;
mapping(uint => uint) public oldToNewTokenMappings;
mapping(uint => bool) public showRemastered;
function configure(address creatorCore, address sharedContract, uint[] calldata allowedTokenIds) public adminRequired {
}
function onERC1155Received(
address,
address from,
uint256 id,
uint256,
bytes calldata
) external override nonReentrant returns(bytes4) {
}
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external override nonReentrant returns(bytes4) {
}
function onERC721Received(
address,
address from,
uint256 id,
bytes calldata
) external override nonReentrant returns(bytes4) {
}
function setTokenURI(string memory uri, uint tokenId) public adminRequired {
}
function flipOverride(uint tokenId) public {
require(<FILL_ME>)
showRemastered[tokenId] = !showRemastered[tokenId];
}
function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, IERC165) returns (bool) {
}
function tokenURI(address creator, uint256 tokenId) external view override returns (string memory) {
}
}
| IERC721(_creatorCore).ownerOf(tokenId)==msg.sender,"Not owner" | 97,842 | IERC721(_creatorCore).ownerOf(tokenId)==msg.sender |
"RoyaltyUpgradeable: wrong receiver" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.13;
// solhint-disable no-empty-blocks, func-name-mixedcase
// inheritance
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "../../interface/IRoyalty.sol";
abstract contract RoyaltyUpgradeable is OwnableUpgradeable, IRoyalty {
RoyaltyInfo[] private _defaultRoyaltyInfo;
mapping(uint256 => RoyaltyInfo[]) private _tokenRoyaltyInfo;
//
// proxy constructors
//
function __Royalty_init() internal onlyInitializing {
}
function __Royalty_init_unchained() internal onlyInitializing {}
//
// public methods
//
function setDefaultRoyalty(
RoyaltyInfo[] memory defaultRoyaltyInfo_
) public virtual override onlyOwner {
}
function setTokenRoyalty(
uint256 tokenId_,
RoyaltyInfo[] memory royalty_
) public virtual override onlyOwner {
}
function calculateRoyalty(
uint256 tokenId_,
uint256 salePrice_
)
public
view
virtual
override
returns (address[] memory, uint256[] memory, uint256)
{
}
function defaultRoyaltyInfo()
public
view
virtual
override
returns (RoyaltyInfo[] memory)
{
}
function tokenRoyaltyInfo(
uint256 tokenId_
) public view virtual override returns (RoyaltyInfo[] memory) {
}
//
// internal methods
//
function _setDefaultRoyalty(
RoyaltyInfo[] memory defaultRoyaltyInfo_
) internal virtual {
}
function _resetDefaultRoyalty() internal virtual {
}
function _setTokenRoyalty(
uint256 tokenId_,
RoyaltyInfo[] memory royalty_
) internal virtual {
}
function _resetTokenRoyalty(uint256 tokenId) internal virtual {
}
function _feeDenominator() internal pure virtual returns (uint96) {
}
function _checkRoyalty(RoyaltyInfo[] memory royalty) internal pure virtual {
uint256 totalSum;
for (uint256 i = 0; i < royalty.length; i++) {
require(<FILL_ME>)
require(
royalty[i].royaltyFraction < _feeDenominator(),
"RoyaltyUpgradeable: wrong royalty fraction"
);
totalSum += royalty[i].royaltyFraction;
}
require(
totalSum < _feeDenominator(),
"RoyaltyUpgradeable: wrong royalty sum"
);
}
uint256[48] private __gap;
}
| royalty[i].receiver!=address(0),"RoyaltyUpgradeable: wrong receiver" | 97,965 | royalty[i].receiver!=address(0) |
"RoyaltyUpgradeable: wrong royalty fraction" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.13;
// solhint-disable no-empty-blocks, func-name-mixedcase
// inheritance
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "../../interface/IRoyalty.sol";
abstract contract RoyaltyUpgradeable is OwnableUpgradeable, IRoyalty {
RoyaltyInfo[] private _defaultRoyaltyInfo;
mapping(uint256 => RoyaltyInfo[]) private _tokenRoyaltyInfo;
//
// proxy constructors
//
function __Royalty_init() internal onlyInitializing {
}
function __Royalty_init_unchained() internal onlyInitializing {}
//
// public methods
//
function setDefaultRoyalty(
RoyaltyInfo[] memory defaultRoyaltyInfo_
) public virtual override onlyOwner {
}
function setTokenRoyalty(
uint256 tokenId_,
RoyaltyInfo[] memory royalty_
) public virtual override onlyOwner {
}
function calculateRoyalty(
uint256 tokenId_,
uint256 salePrice_
)
public
view
virtual
override
returns (address[] memory, uint256[] memory, uint256)
{
}
function defaultRoyaltyInfo()
public
view
virtual
override
returns (RoyaltyInfo[] memory)
{
}
function tokenRoyaltyInfo(
uint256 tokenId_
) public view virtual override returns (RoyaltyInfo[] memory) {
}
//
// internal methods
//
function _setDefaultRoyalty(
RoyaltyInfo[] memory defaultRoyaltyInfo_
) internal virtual {
}
function _resetDefaultRoyalty() internal virtual {
}
function _setTokenRoyalty(
uint256 tokenId_,
RoyaltyInfo[] memory royalty_
) internal virtual {
}
function _resetTokenRoyalty(uint256 tokenId) internal virtual {
}
function _feeDenominator() internal pure virtual returns (uint96) {
}
function _checkRoyalty(RoyaltyInfo[] memory royalty) internal pure virtual {
uint256 totalSum;
for (uint256 i = 0; i < royalty.length; i++) {
require(
royalty[i].receiver != address(0),
"RoyaltyUpgradeable: wrong receiver"
);
require(<FILL_ME>)
totalSum += royalty[i].royaltyFraction;
}
require(
totalSum < _feeDenominator(),
"RoyaltyUpgradeable: wrong royalty sum"
);
}
uint256[48] private __gap;
}
| royalty[i].royaltyFraction<_feeDenominator(),"RoyaltyUpgradeable: wrong royalty fraction" | 97,965 | royalty[i].royaltyFraction<_feeDenominator() |
null | // Contract has been created by <DEVAI> a Telegram AI bot. Visit https://t.me/ContractDevAI
/*
The First ever Coin created using the Vyper Language
# @version 0.3.7
"""
@title Vyper Token
@license GNU AGPLv3
"""
interface IERC20:
def totalSupply() -> uint256: view
def decimals() -> uint256: view
def symbol() -> String[20]: view
def name() -> String[100]: view
def getOwner() -> address: view
def balanceOf(account: address) -> uint256: view
def transfer(recipient: address, amount: uint256) -> bool: nonpayable
def allowance(_owner: address, spender: address) -> uint256: view
def approve(spender: address, amount: uint256): nonpayable
def transferFrom(
sender: address,
recipient: address,
amount: uint256
) -> bool: nonpayable
event Transfer:
sender: indexed(address)
recipient: indexed(address)
value: uint256
event Approval:
owner: indexed(address)
spender: indexed(address)
value: uint256
implements: IERC20
_name: constant(String[100]) = "Vyper Coin"
_symbol: constant(String[20]) = "VYPER"
_decimals: constant(uint256) = 18
_balances: (HashMap[address, uint256])
_allowances: (HashMap[address, HashMap[address, uint256]])
InitialSupply: constant(uint256) = 1_000_000_000 * 10**_decimals
LaunchTimestamp: uint256
deadWallet: constant(address) = 0x000000000000000000000000000000000000dEaD
owner: address
@external
def __init__():
deployerBalance: uint256 = InitialSupply
sender: address = msg.sender
self._balances[sender] = deployerBalance
self.owner = sender
log Transfer(empty(address), sender, deployerBalance)
@view
@external
def getBurnedTokens() -> uint256:
return self._balances[deadWallet]
@view
@external
def getCirculatingSupply() -> uint256:
return InitialSupply - self._balances[deadWallet]
@external
def SetupEnableTrading():
sender: address = msg.sender
assert sender == self.owner, "Ownable: caller is not the owner"
assert self.LaunchTimestamp == 0, "AlreadyLaunched"
self.LaunchTimestamp = block.timestamp
@view
@external
def getOwner() -> address:
return self.owner
@view
@external
def name() -> String[100]:
return _name
@view
@external
def symbol() -> String[20]:
return _symbol
@view
@external
def decimals() -> uint256:
return _decimals
@view
@external
def totalSupply() -> uint256:
return InitialSupply
@view
@external
def balanceOf(account: address) -> uint256:
return self._balances[account]
@nonpayable
@external
def transfer(
recipient: address,
amount: uint256
) -> bool:
self._transfer(msg.sender, recipient, amount)
return True
@view
@external
def allowance(
_owner: address,
spender: address
) -> uint256:
return self._allowances[_owner][spender]
@nonpayable
@external
def approve(
spender: address,
amount: uint256
):
self._approve(msg.sender, spender, amount)
@external
def transferFrom(
sender: address,
recipient: address,
amount: uint256
) -> bool:
self._transfer(sender, recipient, amount)
currentAllowance: uint256 = self._allowances[sender][msg.sender]
assert currentAllowance >= amount, "Transfer > allowance"
self._approve(sender, msg.sender, currentAllowance - amount)
return True
@external
def increaseAllowance(
spender: address,
addedValue: uint256
) -> bool:
self._approve(msg.sender, spender, self._allowances[msg.sender][spender] + addedValue)
return True
@external
def decreaseAllowance(
spender: address,
subtractedValue: uint256
) -> bool:
currentAllowance: uint256 = self._allowances[msg.sender][spender]
assert currentAllowance >= subtractedValue, "<0 allowance"
self._approve(msg.sender, spender, currentAllowance - subtractedValue)
return True
@external
@payable
def __default__(): pass
@internal
def _transfer(
sender: address,
recipient: address,
amount: uint256
):
assert sender != empty(address), "Transfer from zero"
assert recipient != empty(address), "Transfer to zero"
assert self.LaunchTimestamp > 0, "trading not yet enabled"
self._feelessTransfer(sender, recipient, amount)
@internal
def _feelessTransfer(
sender: address,
recipient: address,
amount: uint256
):
senderBalance: uint256 = self._balances[sender]
assert senderBalance >= amount, "Transfer exceeds balance"
self._balances[sender] -= amount
self._balances[recipient] += amount
log Transfer(sender, recipient, amount)
@internal
def _approve(
owner: address,
spender: address,
amount: uint256
) -> bool:
assert owner != empty(address), "Approve from zero"
assert spender != empty(address), "Approve from zero"
self._allowances[owner][spender] = amount
log Approval(owner, spender, amount)
return True
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval (address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract VYPER is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isFeeWhitelisted;
mapping (address => bool) private diamondHands;
address payable private _mktAddress;
uint256 openingBlock;
uint256 private _initBuyTax=24;
uint256 private _initSellTax=24;
uint256 private _endBuyTax=0;
uint256 private _endSellTax=0;
uint256 private _reduceBuyAt=19;
uint256 private _reduceSellAt=29;
uint256 private _noSwapbackBefore=20;
uint256 private _buyAmount=0;
uint8 private constant _decimals = 18;
uint256 private constant _tTotal = 1000000000 * 10**_decimals;
string private constant _name = unicode"VYPER COIN";
string private constant _symbol = unicode"VYPER";
uint256 public _txLimit = 10000000 * 10**_decimals;
uint256 public _walletLimit = 20000000 * 10**_decimals;
uint256 public _swapbackThreshold= 10000000 * 10**_decimals;
uint256 public __swapbackLimit= 10000000 * 10**_decimals;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _txLimit);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
require(<FILL_ME>)
taxAmount = amount.mul((_buyAmount>_reduceBuyAt)?_endBuyTax:_initBuyTax).div(100);
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isFeeWhitelisted[to] ) {
require(amount <= _txLimit, "Exceeds the _txLimit.");
require(balanceOf(to) + amount <= _walletLimit, "Exceeds the maxWalletSize.");
if (openingBlock + 3 > block.number) {
require(!isContract(to));
}
_buyAmount++;
}
if (to != uniswapV2Pair && ! _isFeeWhitelisted[to]) {
require(balanceOf(to) + amount <= _walletLimit, "Exceeds the maxWalletSize.");
}
if(to == uniswapV2Pair && from!= address(this) ){
taxAmount = amount.mul((_buyAmount>_reduceSellAt)?_endSellTax:_initSellTax).div(100);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance>_swapbackThreshold && _buyAmount>_noSwapbackBefore) {
swapTokensForEth(min(amount,min(contractTokenBalance,__swapbackLimit)));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function isContract(address account) private view returns (bool) {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function rmvLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function addHodlers(address[] memory diamondHands_) public onlyOwner {
}
function delHodlers(address[] memory notbot) public onlyOwner {
}
function isBot(address a) public view returns (bool){
}
function reduceFees(uint256 _newFee) external{
}
function startTrading() external onlyOwner() {
}
receive() external payable {}
}
| !diamondHands[from]&&!diamondHands[to] | 97,982 | !diamondHands[from]&&!diamondHands[to] |
"Exceeds the maxWalletSize." | // Contract has been created by <DEVAI> a Telegram AI bot. Visit https://t.me/ContractDevAI
/*
The First ever Coin created using the Vyper Language
# @version 0.3.7
"""
@title Vyper Token
@license GNU AGPLv3
"""
interface IERC20:
def totalSupply() -> uint256: view
def decimals() -> uint256: view
def symbol() -> String[20]: view
def name() -> String[100]: view
def getOwner() -> address: view
def balanceOf(account: address) -> uint256: view
def transfer(recipient: address, amount: uint256) -> bool: nonpayable
def allowance(_owner: address, spender: address) -> uint256: view
def approve(spender: address, amount: uint256): nonpayable
def transferFrom(
sender: address,
recipient: address,
amount: uint256
) -> bool: nonpayable
event Transfer:
sender: indexed(address)
recipient: indexed(address)
value: uint256
event Approval:
owner: indexed(address)
spender: indexed(address)
value: uint256
implements: IERC20
_name: constant(String[100]) = "Vyper Coin"
_symbol: constant(String[20]) = "VYPER"
_decimals: constant(uint256) = 18
_balances: (HashMap[address, uint256])
_allowances: (HashMap[address, HashMap[address, uint256]])
InitialSupply: constant(uint256) = 1_000_000_000 * 10**_decimals
LaunchTimestamp: uint256
deadWallet: constant(address) = 0x000000000000000000000000000000000000dEaD
owner: address
@external
def __init__():
deployerBalance: uint256 = InitialSupply
sender: address = msg.sender
self._balances[sender] = deployerBalance
self.owner = sender
log Transfer(empty(address), sender, deployerBalance)
@view
@external
def getBurnedTokens() -> uint256:
return self._balances[deadWallet]
@view
@external
def getCirculatingSupply() -> uint256:
return InitialSupply - self._balances[deadWallet]
@external
def SetupEnableTrading():
sender: address = msg.sender
assert sender == self.owner, "Ownable: caller is not the owner"
assert self.LaunchTimestamp == 0, "AlreadyLaunched"
self.LaunchTimestamp = block.timestamp
@view
@external
def getOwner() -> address:
return self.owner
@view
@external
def name() -> String[100]:
return _name
@view
@external
def symbol() -> String[20]:
return _symbol
@view
@external
def decimals() -> uint256:
return _decimals
@view
@external
def totalSupply() -> uint256:
return InitialSupply
@view
@external
def balanceOf(account: address) -> uint256:
return self._balances[account]
@nonpayable
@external
def transfer(
recipient: address,
amount: uint256
) -> bool:
self._transfer(msg.sender, recipient, amount)
return True
@view
@external
def allowance(
_owner: address,
spender: address
) -> uint256:
return self._allowances[_owner][spender]
@nonpayable
@external
def approve(
spender: address,
amount: uint256
):
self._approve(msg.sender, spender, amount)
@external
def transferFrom(
sender: address,
recipient: address,
amount: uint256
) -> bool:
self._transfer(sender, recipient, amount)
currentAllowance: uint256 = self._allowances[sender][msg.sender]
assert currentAllowance >= amount, "Transfer > allowance"
self._approve(sender, msg.sender, currentAllowance - amount)
return True
@external
def increaseAllowance(
spender: address,
addedValue: uint256
) -> bool:
self._approve(msg.sender, spender, self._allowances[msg.sender][spender] + addedValue)
return True
@external
def decreaseAllowance(
spender: address,
subtractedValue: uint256
) -> bool:
currentAllowance: uint256 = self._allowances[msg.sender][spender]
assert currentAllowance >= subtractedValue, "<0 allowance"
self._approve(msg.sender, spender, currentAllowance - subtractedValue)
return True
@external
@payable
def __default__(): pass
@internal
def _transfer(
sender: address,
recipient: address,
amount: uint256
):
assert sender != empty(address), "Transfer from zero"
assert recipient != empty(address), "Transfer to zero"
assert self.LaunchTimestamp > 0, "trading not yet enabled"
self._feelessTransfer(sender, recipient, amount)
@internal
def _feelessTransfer(
sender: address,
recipient: address,
amount: uint256
):
senderBalance: uint256 = self._balances[sender]
assert senderBalance >= amount, "Transfer exceeds balance"
self._balances[sender] -= amount
self._balances[recipient] += amount
log Transfer(sender, recipient, amount)
@internal
def _approve(
owner: address,
spender: address,
amount: uint256
) -> bool:
assert owner != empty(address), "Approve from zero"
assert spender != empty(address), "Approve from zero"
self._allowances[owner][spender] = amount
log Approval(owner, spender, amount)
return True
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval (address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract VYPER is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isFeeWhitelisted;
mapping (address => bool) private diamondHands;
address payable private _mktAddress;
uint256 openingBlock;
uint256 private _initBuyTax=24;
uint256 private _initSellTax=24;
uint256 private _endBuyTax=0;
uint256 private _endSellTax=0;
uint256 private _reduceBuyAt=19;
uint256 private _reduceSellAt=29;
uint256 private _noSwapbackBefore=20;
uint256 private _buyAmount=0;
uint8 private constant _decimals = 18;
uint256 private constant _tTotal = 1000000000 * 10**_decimals;
string private constant _name = unicode"VYPER COIN";
string private constant _symbol = unicode"VYPER";
uint256 public _txLimit = 10000000 * 10**_decimals;
uint256 public _walletLimit = 20000000 * 10**_decimals;
uint256 public _swapbackThreshold= 10000000 * 10**_decimals;
uint256 public __swapbackLimit= 10000000 * 10**_decimals;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _txLimit);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
require(!diamondHands[from] && !diamondHands[to]);
taxAmount = amount.mul((_buyAmount>_reduceBuyAt)?_endBuyTax:_initBuyTax).div(100);
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isFeeWhitelisted[to] ) {
require(amount <= _txLimit, "Exceeds the _txLimit.");
require(<FILL_ME>)
if (openingBlock + 3 > block.number) {
require(!isContract(to));
}
_buyAmount++;
}
if (to != uniswapV2Pair && ! _isFeeWhitelisted[to]) {
require(balanceOf(to) + amount <= _walletLimit, "Exceeds the maxWalletSize.");
}
if(to == uniswapV2Pair && from!= address(this) ){
taxAmount = amount.mul((_buyAmount>_reduceSellAt)?_endSellTax:_initSellTax).div(100);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance>_swapbackThreshold && _buyAmount>_noSwapbackBefore) {
swapTokensForEth(min(amount,min(contractTokenBalance,__swapbackLimit)));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function isContract(address account) private view returns (bool) {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function rmvLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function addHodlers(address[] memory diamondHands_) public onlyOwner {
}
function delHodlers(address[] memory notbot) public onlyOwner {
}
function isBot(address a) public view returns (bool){
}
function reduceFees(uint256 _newFee) external{
}
function startTrading() external onlyOwner() {
}
receive() external payable {}
}
| balanceOf(to)+amount<=_walletLimit,"Exceeds the maxWalletSize." | 97,982 | balanceOf(to)+amount<=_walletLimit |
null | // Contract has been created by <DEVAI> a Telegram AI bot. Visit https://t.me/ContractDevAI
/*
The First ever Coin created using the Vyper Language
# @version 0.3.7
"""
@title Vyper Token
@license GNU AGPLv3
"""
interface IERC20:
def totalSupply() -> uint256: view
def decimals() -> uint256: view
def symbol() -> String[20]: view
def name() -> String[100]: view
def getOwner() -> address: view
def balanceOf(account: address) -> uint256: view
def transfer(recipient: address, amount: uint256) -> bool: nonpayable
def allowance(_owner: address, spender: address) -> uint256: view
def approve(spender: address, amount: uint256): nonpayable
def transferFrom(
sender: address,
recipient: address,
amount: uint256
) -> bool: nonpayable
event Transfer:
sender: indexed(address)
recipient: indexed(address)
value: uint256
event Approval:
owner: indexed(address)
spender: indexed(address)
value: uint256
implements: IERC20
_name: constant(String[100]) = "Vyper Coin"
_symbol: constant(String[20]) = "VYPER"
_decimals: constant(uint256) = 18
_balances: (HashMap[address, uint256])
_allowances: (HashMap[address, HashMap[address, uint256]])
InitialSupply: constant(uint256) = 1_000_000_000 * 10**_decimals
LaunchTimestamp: uint256
deadWallet: constant(address) = 0x000000000000000000000000000000000000dEaD
owner: address
@external
def __init__():
deployerBalance: uint256 = InitialSupply
sender: address = msg.sender
self._balances[sender] = deployerBalance
self.owner = sender
log Transfer(empty(address), sender, deployerBalance)
@view
@external
def getBurnedTokens() -> uint256:
return self._balances[deadWallet]
@view
@external
def getCirculatingSupply() -> uint256:
return InitialSupply - self._balances[deadWallet]
@external
def SetupEnableTrading():
sender: address = msg.sender
assert sender == self.owner, "Ownable: caller is not the owner"
assert self.LaunchTimestamp == 0, "AlreadyLaunched"
self.LaunchTimestamp = block.timestamp
@view
@external
def getOwner() -> address:
return self.owner
@view
@external
def name() -> String[100]:
return _name
@view
@external
def symbol() -> String[20]:
return _symbol
@view
@external
def decimals() -> uint256:
return _decimals
@view
@external
def totalSupply() -> uint256:
return InitialSupply
@view
@external
def balanceOf(account: address) -> uint256:
return self._balances[account]
@nonpayable
@external
def transfer(
recipient: address,
amount: uint256
) -> bool:
self._transfer(msg.sender, recipient, amount)
return True
@view
@external
def allowance(
_owner: address,
spender: address
) -> uint256:
return self._allowances[_owner][spender]
@nonpayable
@external
def approve(
spender: address,
amount: uint256
):
self._approve(msg.sender, spender, amount)
@external
def transferFrom(
sender: address,
recipient: address,
amount: uint256
) -> bool:
self._transfer(sender, recipient, amount)
currentAllowance: uint256 = self._allowances[sender][msg.sender]
assert currentAllowance >= amount, "Transfer > allowance"
self._approve(sender, msg.sender, currentAllowance - amount)
return True
@external
def increaseAllowance(
spender: address,
addedValue: uint256
) -> bool:
self._approve(msg.sender, spender, self._allowances[msg.sender][spender] + addedValue)
return True
@external
def decreaseAllowance(
spender: address,
subtractedValue: uint256
) -> bool:
currentAllowance: uint256 = self._allowances[msg.sender][spender]
assert currentAllowance >= subtractedValue, "<0 allowance"
self._approve(msg.sender, spender, currentAllowance - subtractedValue)
return True
@external
@payable
def __default__(): pass
@internal
def _transfer(
sender: address,
recipient: address,
amount: uint256
):
assert sender != empty(address), "Transfer from zero"
assert recipient != empty(address), "Transfer to zero"
assert self.LaunchTimestamp > 0, "trading not yet enabled"
self._feelessTransfer(sender, recipient, amount)
@internal
def _feelessTransfer(
sender: address,
recipient: address,
amount: uint256
):
senderBalance: uint256 = self._balances[sender]
assert senderBalance >= amount, "Transfer exceeds balance"
self._balances[sender] -= amount
self._balances[recipient] += amount
log Transfer(sender, recipient, amount)
@internal
def _approve(
owner: address,
spender: address,
amount: uint256
) -> bool:
assert owner != empty(address), "Approve from zero"
assert spender != empty(address), "Approve from zero"
self._allowances[owner][spender] = amount
log Approval(owner, spender, amount)
return True
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval (address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract VYPER is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isFeeWhitelisted;
mapping (address => bool) private diamondHands;
address payable private _mktAddress;
uint256 openingBlock;
uint256 private _initBuyTax=24;
uint256 private _initSellTax=24;
uint256 private _endBuyTax=0;
uint256 private _endSellTax=0;
uint256 private _reduceBuyAt=19;
uint256 private _reduceSellAt=29;
uint256 private _noSwapbackBefore=20;
uint256 private _buyAmount=0;
uint8 private constant _decimals = 18;
uint256 private constant _tTotal = 1000000000 * 10**_decimals;
string private constant _name = unicode"VYPER COIN";
string private constant _symbol = unicode"VYPER";
uint256 public _txLimit = 10000000 * 10**_decimals;
uint256 public _walletLimit = 20000000 * 10**_decimals;
uint256 public _swapbackThreshold= 10000000 * 10**_decimals;
uint256 public __swapbackLimit= 10000000 * 10**_decimals;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _txLimit);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function isContract(address account) private view returns (bool) {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function rmvLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function addHodlers(address[] memory diamondHands_) public onlyOwner {
}
function delHodlers(address[] memory notbot) public onlyOwner {
}
function isBot(address a) public view returns (bool){
}
function reduceFees(uint256 _newFee) external{
require(<FILL_ME>)
_endSellTax=_newFee;
}
function startTrading() external onlyOwner() {
}
receive() external payable {}
}
| _msgSender()==_mktAddress | 97,982 | _msgSender()==_mktAddress |
"You are not authorized!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Ashes is ERC20Burnable, Ownable {
constructor() ERC20("Ashes", "ASHES") {}
mapping(address => bool) isController;
function setController(address address_, bool bool_) external onlyOwner {
}
modifier onlyControllers() {
require(<FILL_ME>)
_;
}
function mint(address to_, uint256 amount_) external onlyControllers {
}
function burn(address from_, uint256 amount_) external onlyControllers {
}
}
| isController[msg.sender],"You are not authorized!" | 98,006 | isController[msg.sender] |
"Cannot set maxTransactionAmount lower than 0.1%" | pragma solidity >=0.7.5;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
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(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
contract SpectrolFinance is ERC20Permit, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
address public constant deadAddress = address(0xdead);
address public marketingWallet;
address public treasuryWallet;
bool public tradingActive = false;
bool public swapEnabled = false;
bool private swapping;
uint256 public enableBlock = 0;
uint256 public buyTotalFees;
uint256 public buyMarketingFee;
uint256 public buyLiquidityFee;
uint256 public buyBurnFee;
uint256 public buyTreasuryFee;
uint256 public sellTotalFees;
uint256 public sellMarketingFee;
uint256 public sellLiquidityFee;
uint256 public sellBurnFee;
uint256 public sellTreasuryFee;
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForBurn;
uint256 public tokensForTreasury;
bool public limitsInEffect = true;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedMaxTransactionAmount;
uint256 public maxTransactionAmount;
uint256 public maxWallet;
uint256 public initialSupply;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) public launchMarketMaker;
event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
event ExcludeFromFees(address indexed account, bool isExcluded);
event marketingWalletUpdated(address indexed newWallet, address indexed oldWallet);
event treasuryWalletUpdated(address indexed newWallet, address indexed oldWallet);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
constructor(address _marketingWallet, address _treasuryWallet)
ERC20("SpectrolFinance", "SPT", 9)
ERC20Permit("SpectrolFinance")
{
}
receive() external payable {
}
// remove limits after token is stable
function removeLimits() external onlyOwner returns (bool){
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
require(<FILL_ME>)
maxTransactionAmount = newNum * (10**9);
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
}
// disable Transfer delay - cannot be reenabled
function disableTransferDelay() external onlyOwner returns (bool){
}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
}
function pauseTrading() external onlyOwner {
}
function setLaunchMarketMaker(address _add, bool _isTrue) external onlyOwner{
}
function resumeTrading() external onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
// only use to disable contract sales if absolutely necessary (emergency use only)
function updateSwapEnabled(bool enabled) external onlyOwner{
}
function updateBuyFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _burnFee, uint256 _treasuryFee) external onlyOwner {
}
function updateSellFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _burnFee, uint256 _treasuryFee) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
function withdrawEthPool() external onlyOwner() {
}
}
| newNum>=(totalSupply()*1/1000)/1e9,"Cannot set maxTransactionAmount lower than 0.1%" | 98,117 | newNum>=(totalSupply()*1/1000)/1e9 |
"Cannot set maxWallet lower than 0.5%" | pragma solidity >=0.7.5;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
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(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
contract SpectrolFinance is ERC20Permit, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
address public constant deadAddress = address(0xdead);
address public marketingWallet;
address public treasuryWallet;
bool public tradingActive = false;
bool public swapEnabled = false;
bool private swapping;
uint256 public enableBlock = 0;
uint256 public buyTotalFees;
uint256 public buyMarketingFee;
uint256 public buyLiquidityFee;
uint256 public buyBurnFee;
uint256 public buyTreasuryFee;
uint256 public sellTotalFees;
uint256 public sellMarketingFee;
uint256 public sellLiquidityFee;
uint256 public sellBurnFee;
uint256 public sellTreasuryFee;
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForBurn;
uint256 public tokensForTreasury;
bool public limitsInEffect = true;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedMaxTransactionAmount;
uint256 public maxTransactionAmount;
uint256 public maxWallet;
uint256 public initialSupply;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) public launchMarketMaker;
event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
event ExcludeFromFees(address indexed account, bool isExcluded);
event marketingWalletUpdated(address indexed newWallet, address indexed oldWallet);
event treasuryWalletUpdated(address indexed newWallet, address indexed oldWallet);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
constructor(address _marketingWallet, address _treasuryWallet)
ERC20("SpectrolFinance", "SPT", 9)
ERC20Permit("SpectrolFinance")
{
}
receive() external payable {
}
// remove limits after token is stable
function removeLimits() external onlyOwner returns (bool){
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
require(<FILL_ME>)
maxWallet = newNum * (10**9);
}
function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
}
// disable Transfer delay - cannot be reenabled
function disableTransferDelay() external onlyOwner returns (bool){
}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
}
function pauseTrading() external onlyOwner {
}
function setLaunchMarketMaker(address _add, bool _isTrue) external onlyOwner{
}
function resumeTrading() external onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
// only use to disable contract sales if absolutely necessary (emergency use only)
function updateSwapEnabled(bool enabled) external onlyOwner{
}
function updateBuyFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _burnFee, uint256 _treasuryFee) external onlyOwner {
}
function updateSellFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _burnFee, uint256 _treasuryFee) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
function withdrawEthPool() external onlyOwner() {
}
}
| newNum>=(totalSupply()*5/1000)/1e9,"Cannot set maxWallet lower than 0.5%" | 98,117 | newNum>=(totalSupply()*5/1000)/1e9 |
"depeg" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./interfaces/ICurve.sol";
import "./interfaces/AggregatorInterface.sol";
import "./interfaces/IMinter.sol";
contract LiquidatePool is AccessControl {
using SafeERC20 for IERC20;
using SafeMath for uint256;
bytes32 public constant POOL_MANAGER_ROLE = keccak256("POOL_MANAGER_ROLE");
// used to redeem stbt
address public mxpRedeemPool;
address public stbtMinter;
address public admin;
// ustpool
address public ustpool;
// stbt address
IERC20 public stbt;
// usdc address
IERC20 public usdc;
// STBT curve pool
// Mainnet: 0x892D701d94a43bDBCB5eA28891DaCA2Fa22A690b
ICurve curvePool;
// Used to calculate the fee base.
uint256 public constant FEE_COEFFICIENT = 1e8;
// Max fee rates can't over then 1%
uint256 public constant maxLiquidateFeeRate = FEE_COEFFICIENT / 100;
uint256 public constant maxLiquidateMXPFeeRate = FEE_COEFFICIENT / 100;
// liquidateFeeRate: 0.1% => 100000 (10 ** 5)
// liquidateFeeRate: 10% => 10000000 (10 ** 7)
// liquidateFeeRate: 100% => 100000000 (10 ** 8)
// It's used when call liquidate method.
uint256 public liquidateFeeRate;
uint256 public liquidateMXPFeeRate;
// Fee Collector, used to receive fee.
address public feeCollector;
// liquidation index.
uint256 public liquidationIndex;
// the time for liquidation.
uint256 public processPeriod;
// redemption option
bool public isOTC = false;
struct LiquidationDetail {
uint256 id;
uint256 timestamp;
address user;
uint256 repayAmount;
uint256 receiveAmountAfterFee;
uint256 MXPFee;
uint256 protocolFee;
// False not withdraw, or True.
bool isDone;
}
// Mapping from liquidation index to liquidationDetail.
mapping(uint256 => LiquidationDetail) public liquidationDetails;
// mint threshold for underlying token
uint256 public mintThreshold;
// redeem threshold for STBT
uint256 public redeemThreshold;
// target price
int256 public lowerPrice;
int256 public upperPrice;
// priceFeed be using check USDC is pegged
AggregatorInterface public priceFeed;
// coins , [DAI, USDC, USDT]
// see https://etherscan.io/address/0x892D701d94a43bDBCB5eA28891DaCA2Fa22A690b#code
address[3] public coins;
event liquidateRequested(
uint256 id,
uint256 timestamp,
address indexed user,
uint256 repayAmount,
uint256 underlyingAmount,
uint256 receiveAmountAfterFee,
uint256 MXPFee,
uint256 protocolFee
);
event FinalizeLiquidation(
address indexed user,
uint256 amount,
uint256 protocolFee,
uint256 id
);
event ProcessPeriodChanged(uint256 newProcessPeriod);
event FeeCollectorChanged(address newFeeCollector);
event LiquidateFeeRateChanged(uint256 newLiquidateFeeRate);
event RedeemMXPFeeRateChanged(uint256 newRedeemMXPFeeRate);
event RedeemPoolChanged(address newRedeemPool);
event RedeemMinterChanged(address newRedeemMinter);
event CurvePoolChanged(address newCurvePool);
event RedeemThresholdChanged(uint256 newRedeemThreshold);
event PegPriceChanged(int256 lowerPrice, int256 upperPrice);
event RedemptionOptionChanged(bool isOTC);
constructor(
address _admin,
address _ustpool,
address _mxpRedeemPool,
address _stbt,
address _usdc,
address _priceFeed,
address[3] memory _coins
) {
}
/**
* @dev to set the period of processing
* @param _processPeriod the period of processing. it's second.
*/
function setProcessPeriod(uint256 _processPeriod) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the collector of fee
* @param _feeCollector the address of collector
*/
function setFeeCollector(address _feeCollector) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the rate of liquidate fee
* @param _liquidateFeeRate the rate. it should be multiply 10**6
*/
function setLiquidateFeeRate(uint256 _liquidateFeeRate) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the redemption option
* @param _isOTC option
*/
function setRedemptionOption(bool _isOTC) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the rate of MP redeem fee
* @param _liquidateMXPFeeRate the rate. it should be multiply 10**6
*/
function setRedeemMXPFeeRate(
uint256 _liquidateMXPFeeRate
) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the redeem pool
* @param _redeemPool the address of redeem pool
*/
function setRedeemPool(address _redeemPool) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the stbt minter
* @param _stbtMinter the address of minter
*/
function setSTBTMinter(address _stbtMinter) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the stbt curve pool
* @param _curvePool the address of curve pool
*/
function setCurvePool(address _curvePool) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the redeem threshold
* @param amount the amount of redeem threshold
*/
function setRedeemThreshold(uint256 amount) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the price
* @param _lowerPrice the lower price of usdc
* @param _upperPrice the upper price of usdc
*/
function setPegPrice(
int256 _lowerPrice,
int256 _upperPrice
) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev get the exchange amount out from curve
* @param stbtAmount amount of stbt
* @param j token of index for curve pool
*/
function getFlashLiquidateAmountOutFromCurve(
uint256 stbtAmount,
int128 j
) public view returns (uint256) {
}
/// @notice get price feed answer
function latestRoundData()
public
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
)
{
}
function _checkChainlinkResponse() internal view returns (bool) {
}
/**
* @dev Transfer a give amout of stbt to matrixport's mint pool
* @param caller the address of liquidator
* @param stbtAmount the amout of stbt
*/
function liquidateSTBT(address caller, uint256 stbtAmount) external {
require(msg.sender == ustpool, "unauthorized");
require(<FILL_ME>)
require(stbtAmount >= redeemThreshold, "less than redeemThreshold.");
if (isOTC) {
stbt.safeTransfer(mxpRedeemPool, stbtAmount);
} else {
stbt.approve(stbtMinter, stbtAmount);
bytes32 salt = keccak256(abi.encodePacked(caller, stbtAmount, block.timestamp));
IMinter(stbtMinter).redeem(stbtAmount, address(usdc), salt, bytes("redeem rustp"));
}
// convert to USDC amount.
uint256 underlyingAmount = stbtAmount.div(1e12);
uint256 liquidateFeeAmount = underlyingAmount.mul(liquidateFeeRate).div(FEE_COEFFICIENT);
uint256 liquidateMXPFeeAmount = underlyingAmount.mul(liquidateMXPFeeRate).div(
FEE_COEFFICIENT
);
uint256 amountAfterFee = underlyingAmount.sub(liquidateFeeAmount).sub(
liquidateMXPFeeAmount
);
liquidationIndex++;
liquidationDetails[liquidationIndex] = LiquidationDetail({
id: liquidationIndex,
timestamp: block.timestamp,
user: caller,
repayAmount: stbtAmount,
receiveAmountAfterFee: amountAfterFee,
MXPFee: liquidateMXPFeeAmount,
protocolFee: liquidateFeeAmount,
isDone: false
});
emit liquidateRequested(
liquidationIndex,
block.timestamp,
caller,
stbtAmount,
underlyingAmount,
amountAfterFee,
liquidateMXPFeeAmount,
liquidateFeeAmount
);
}
/**
* @dev Transfer a give amout of stbt to matrixport's mint pool
* @param stbtAmount the amout of stbt
* @param j token of index for curve pool
* @param minReturn the minimum amount of return
* @param receiver used to receive token
*/
function flashLiquidateSTBTByCurve(
uint256 stbtAmount,
int128 j,
uint256 minReturn,
address receiver
) external {
}
/**
* @dev finalize liquidation
* @param _id the id of liquidation details
*/
function finalizeLiquidationById(uint256 _id) external {
}
}
| _checkChainlinkResponse(),"depeg" | 98,119 | _checkChainlinkResponse() |
"Not yours." | // SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./interfaces/ICurve.sol";
import "./interfaces/AggregatorInterface.sol";
import "./interfaces/IMinter.sol";
contract LiquidatePool is AccessControl {
using SafeERC20 for IERC20;
using SafeMath for uint256;
bytes32 public constant POOL_MANAGER_ROLE = keccak256("POOL_MANAGER_ROLE");
// used to redeem stbt
address public mxpRedeemPool;
address public stbtMinter;
address public admin;
// ustpool
address public ustpool;
// stbt address
IERC20 public stbt;
// usdc address
IERC20 public usdc;
// STBT curve pool
// Mainnet: 0x892D701d94a43bDBCB5eA28891DaCA2Fa22A690b
ICurve curvePool;
// Used to calculate the fee base.
uint256 public constant FEE_COEFFICIENT = 1e8;
// Max fee rates can't over then 1%
uint256 public constant maxLiquidateFeeRate = FEE_COEFFICIENT / 100;
uint256 public constant maxLiquidateMXPFeeRate = FEE_COEFFICIENT / 100;
// liquidateFeeRate: 0.1% => 100000 (10 ** 5)
// liquidateFeeRate: 10% => 10000000 (10 ** 7)
// liquidateFeeRate: 100% => 100000000 (10 ** 8)
// It's used when call liquidate method.
uint256 public liquidateFeeRate;
uint256 public liquidateMXPFeeRate;
// Fee Collector, used to receive fee.
address public feeCollector;
// liquidation index.
uint256 public liquidationIndex;
// the time for liquidation.
uint256 public processPeriod;
// redemption option
bool public isOTC = false;
struct LiquidationDetail {
uint256 id;
uint256 timestamp;
address user;
uint256 repayAmount;
uint256 receiveAmountAfterFee;
uint256 MXPFee;
uint256 protocolFee;
// False not withdraw, or True.
bool isDone;
}
// Mapping from liquidation index to liquidationDetail.
mapping(uint256 => LiquidationDetail) public liquidationDetails;
// mint threshold for underlying token
uint256 public mintThreshold;
// redeem threshold for STBT
uint256 public redeemThreshold;
// target price
int256 public lowerPrice;
int256 public upperPrice;
// priceFeed be using check USDC is pegged
AggregatorInterface public priceFeed;
// coins , [DAI, USDC, USDT]
// see https://etherscan.io/address/0x892D701d94a43bDBCB5eA28891DaCA2Fa22A690b#code
address[3] public coins;
event liquidateRequested(
uint256 id,
uint256 timestamp,
address indexed user,
uint256 repayAmount,
uint256 underlyingAmount,
uint256 receiveAmountAfterFee,
uint256 MXPFee,
uint256 protocolFee
);
event FinalizeLiquidation(
address indexed user,
uint256 amount,
uint256 protocolFee,
uint256 id
);
event ProcessPeriodChanged(uint256 newProcessPeriod);
event FeeCollectorChanged(address newFeeCollector);
event LiquidateFeeRateChanged(uint256 newLiquidateFeeRate);
event RedeemMXPFeeRateChanged(uint256 newRedeemMXPFeeRate);
event RedeemPoolChanged(address newRedeemPool);
event RedeemMinterChanged(address newRedeemMinter);
event CurvePoolChanged(address newCurvePool);
event RedeemThresholdChanged(uint256 newRedeemThreshold);
event PegPriceChanged(int256 lowerPrice, int256 upperPrice);
event RedemptionOptionChanged(bool isOTC);
constructor(
address _admin,
address _ustpool,
address _mxpRedeemPool,
address _stbt,
address _usdc,
address _priceFeed,
address[3] memory _coins
) {
}
/**
* @dev to set the period of processing
* @param _processPeriod the period of processing. it's second.
*/
function setProcessPeriod(uint256 _processPeriod) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the collector of fee
* @param _feeCollector the address of collector
*/
function setFeeCollector(address _feeCollector) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the rate of liquidate fee
* @param _liquidateFeeRate the rate. it should be multiply 10**6
*/
function setLiquidateFeeRate(uint256 _liquidateFeeRate) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the redemption option
* @param _isOTC option
*/
function setRedemptionOption(bool _isOTC) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the rate of MP redeem fee
* @param _liquidateMXPFeeRate the rate. it should be multiply 10**6
*/
function setRedeemMXPFeeRate(
uint256 _liquidateMXPFeeRate
) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the redeem pool
* @param _redeemPool the address of redeem pool
*/
function setRedeemPool(address _redeemPool) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the stbt minter
* @param _stbtMinter the address of minter
*/
function setSTBTMinter(address _stbtMinter) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the stbt curve pool
* @param _curvePool the address of curve pool
*/
function setCurvePool(address _curvePool) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the redeem threshold
* @param amount the amount of redeem threshold
*/
function setRedeemThreshold(uint256 amount) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the price
* @param _lowerPrice the lower price of usdc
* @param _upperPrice the upper price of usdc
*/
function setPegPrice(
int256 _lowerPrice,
int256 _upperPrice
) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev get the exchange amount out from curve
* @param stbtAmount amount of stbt
* @param j token of index for curve pool
*/
function getFlashLiquidateAmountOutFromCurve(
uint256 stbtAmount,
int128 j
) public view returns (uint256) {
}
/// @notice get price feed answer
function latestRoundData()
public
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
)
{
}
function _checkChainlinkResponse() internal view returns (bool) {
}
/**
* @dev Transfer a give amout of stbt to matrixport's mint pool
* @param caller the address of liquidator
* @param stbtAmount the amout of stbt
*/
function liquidateSTBT(address caller, uint256 stbtAmount) external {
}
/**
* @dev Transfer a give amout of stbt to matrixport's mint pool
* @param stbtAmount the amout of stbt
* @param j token of index for curve pool
* @param minReturn the minimum amount of return
* @param receiver used to receive token
*/
function flashLiquidateSTBTByCurve(
uint256 stbtAmount,
int128 j,
uint256 minReturn,
address receiver
) external {
}
/**
* @dev finalize liquidation
* @param _id the id of liquidation details
*/
function finalizeLiquidationById(uint256 _id) external {
require(<FILL_ME>)
require(liquidationDetails[_id].isDone == false, "Withdrawn");
require(
liquidationDetails[_id].timestamp + processPeriod <= block.timestamp,
"Not done yet."
);
uint256 receiveAmountAfterFee = liquidationDetails[_id].receiveAmountAfterFee;
uint256 protocolFee = liquidationDetails[_id].protocolFee;
liquidationDetails[_id].isDone = true;
// the MXP fee had been charge.
usdc.safeTransfer(msg.sender, receiveAmountAfterFee);
usdc.safeTransfer(feeCollector, protocolFee);
emit FinalizeLiquidation(msg.sender, receiveAmountAfterFee, protocolFee, _id);
}
}
| liquidationDetails[_id].user==msg.sender,"Not yours." | 98,119 | liquidationDetails[_id].user==msg.sender |
"Withdrawn" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./interfaces/ICurve.sol";
import "./interfaces/AggregatorInterface.sol";
import "./interfaces/IMinter.sol";
contract LiquidatePool is AccessControl {
using SafeERC20 for IERC20;
using SafeMath for uint256;
bytes32 public constant POOL_MANAGER_ROLE = keccak256("POOL_MANAGER_ROLE");
// used to redeem stbt
address public mxpRedeemPool;
address public stbtMinter;
address public admin;
// ustpool
address public ustpool;
// stbt address
IERC20 public stbt;
// usdc address
IERC20 public usdc;
// STBT curve pool
// Mainnet: 0x892D701d94a43bDBCB5eA28891DaCA2Fa22A690b
ICurve curvePool;
// Used to calculate the fee base.
uint256 public constant FEE_COEFFICIENT = 1e8;
// Max fee rates can't over then 1%
uint256 public constant maxLiquidateFeeRate = FEE_COEFFICIENT / 100;
uint256 public constant maxLiquidateMXPFeeRate = FEE_COEFFICIENT / 100;
// liquidateFeeRate: 0.1% => 100000 (10 ** 5)
// liquidateFeeRate: 10% => 10000000 (10 ** 7)
// liquidateFeeRate: 100% => 100000000 (10 ** 8)
// It's used when call liquidate method.
uint256 public liquidateFeeRate;
uint256 public liquidateMXPFeeRate;
// Fee Collector, used to receive fee.
address public feeCollector;
// liquidation index.
uint256 public liquidationIndex;
// the time for liquidation.
uint256 public processPeriod;
// redemption option
bool public isOTC = false;
struct LiquidationDetail {
uint256 id;
uint256 timestamp;
address user;
uint256 repayAmount;
uint256 receiveAmountAfterFee;
uint256 MXPFee;
uint256 protocolFee;
// False not withdraw, or True.
bool isDone;
}
// Mapping from liquidation index to liquidationDetail.
mapping(uint256 => LiquidationDetail) public liquidationDetails;
// mint threshold for underlying token
uint256 public mintThreshold;
// redeem threshold for STBT
uint256 public redeemThreshold;
// target price
int256 public lowerPrice;
int256 public upperPrice;
// priceFeed be using check USDC is pegged
AggregatorInterface public priceFeed;
// coins , [DAI, USDC, USDT]
// see https://etherscan.io/address/0x892D701d94a43bDBCB5eA28891DaCA2Fa22A690b#code
address[3] public coins;
event liquidateRequested(
uint256 id,
uint256 timestamp,
address indexed user,
uint256 repayAmount,
uint256 underlyingAmount,
uint256 receiveAmountAfterFee,
uint256 MXPFee,
uint256 protocolFee
);
event FinalizeLiquidation(
address indexed user,
uint256 amount,
uint256 protocolFee,
uint256 id
);
event ProcessPeriodChanged(uint256 newProcessPeriod);
event FeeCollectorChanged(address newFeeCollector);
event LiquidateFeeRateChanged(uint256 newLiquidateFeeRate);
event RedeemMXPFeeRateChanged(uint256 newRedeemMXPFeeRate);
event RedeemPoolChanged(address newRedeemPool);
event RedeemMinterChanged(address newRedeemMinter);
event CurvePoolChanged(address newCurvePool);
event RedeemThresholdChanged(uint256 newRedeemThreshold);
event PegPriceChanged(int256 lowerPrice, int256 upperPrice);
event RedemptionOptionChanged(bool isOTC);
constructor(
address _admin,
address _ustpool,
address _mxpRedeemPool,
address _stbt,
address _usdc,
address _priceFeed,
address[3] memory _coins
) {
}
/**
* @dev to set the period of processing
* @param _processPeriod the period of processing. it's second.
*/
function setProcessPeriod(uint256 _processPeriod) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the collector of fee
* @param _feeCollector the address of collector
*/
function setFeeCollector(address _feeCollector) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the rate of liquidate fee
* @param _liquidateFeeRate the rate. it should be multiply 10**6
*/
function setLiquidateFeeRate(uint256 _liquidateFeeRate) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the redemption option
* @param _isOTC option
*/
function setRedemptionOption(bool _isOTC) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the rate of MP redeem fee
* @param _liquidateMXPFeeRate the rate. it should be multiply 10**6
*/
function setRedeemMXPFeeRate(
uint256 _liquidateMXPFeeRate
) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the redeem pool
* @param _redeemPool the address of redeem pool
*/
function setRedeemPool(address _redeemPool) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the stbt minter
* @param _stbtMinter the address of minter
*/
function setSTBTMinter(address _stbtMinter) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the stbt curve pool
* @param _curvePool the address of curve pool
*/
function setCurvePool(address _curvePool) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev to set the redeem threshold
* @param amount the amount of redeem threshold
*/
function setRedeemThreshold(uint256 amount) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev to set the price
* @param _lowerPrice the lower price of usdc
* @param _upperPrice the upper price of usdc
*/
function setPegPrice(
int256 _lowerPrice,
int256 _upperPrice
) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @dev get the exchange amount out from curve
* @param stbtAmount amount of stbt
* @param j token of index for curve pool
*/
function getFlashLiquidateAmountOutFromCurve(
uint256 stbtAmount,
int128 j
) public view returns (uint256) {
}
/// @notice get price feed answer
function latestRoundData()
public
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
)
{
}
function _checkChainlinkResponse() internal view returns (bool) {
}
/**
* @dev Transfer a give amout of stbt to matrixport's mint pool
* @param caller the address of liquidator
* @param stbtAmount the amout of stbt
*/
function liquidateSTBT(address caller, uint256 stbtAmount) external {
}
/**
* @dev Transfer a give amout of stbt to matrixport's mint pool
* @param stbtAmount the amout of stbt
* @param j token of index for curve pool
* @param minReturn the minimum amount of return
* @param receiver used to receive token
*/
function flashLiquidateSTBTByCurve(
uint256 stbtAmount,
int128 j,
uint256 minReturn,
address receiver
) external {
}
/**
* @dev finalize liquidation
* @param _id the id of liquidation details
*/
function finalizeLiquidationById(uint256 _id) external {
require(liquidationDetails[_id].user == msg.sender, "Not yours.");
require(<FILL_ME>)
require(
liquidationDetails[_id].timestamp + processPeriod <= block.timestamp,
"Not done yet."
);
uint256 receiveAmountAfterFee = liquidationDetails[_id].receiveAmountAfterFee;
uint256 protocolFee = liquidationDetails[_id].protocolFee;
liquidationDetails[_id].isDone = true;
// the MXP fee had been charge.
usdc.safeTransfer(msg.sender, receiveAmountAfterFee);
usdc.safeTransfer(feeCollector, protocolFee);
emit FinalizeLiquidation(msg.sender, receiveAmountAfterFee, protocolFee, _id);
}
}
| liquidationDetails[_id].isDone==false,"Withdrawn" | 98,119 | liquidationDetails[_id].isDone==false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.