comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"supporter already exists" | pragma solidity ^0.7.0;
contract BridgeLogic {
using SafeMath for uint256;
string public constant name = "BridgeLogic";
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
uint256 public constant TASKINIT = 0;
uint256 public constant TASKPROCESSING = 1;
uint256 public constant TASKCANCELLED = 2;
uint256 public constant TASKDONE = 3;
uint256 public constant WITHDRAWTASK = 1;
address private caller;
BridgeStorage private store;
mapping(bytes32 => bool) finishedTasks;
constructor(address aCaller) {
}
modifier onlyCaller(){
}
modifier operatorExists(address operator) {
}
function resetStoreLogic(address storeAddress) external onlyCaller {
}
function getStoreAddress() public view returns(address) {
}
function supportTask(uint256 taskType, bytes32 taskHash, address oneAddress, uint256 requireNum) external onlyCaller returns(uint256){
require(<FILL_ME>)
(uint256 theTaskType,uint256 theTaskStatus,uint256 theSupporterNum) = store.getTaskInfo(taskHash);
require(theTaskStatus < TASKDONE, "wrong status");
if (theTaskStatus != TASKINIT)
require(theTaskType == taskType, "task type not match");
store.addSupporter(taskHash, oneAddress);
theSupporterNum++;
if(theSupporterNum >= requireNum)
theTaskStatus = TASKDONE;
else
theTaskStatus = TASKPROCESSING;
store.setTaskInfo(taskHash, taskType, theTaskStatus);
return theTaskStatus;
}
function cancelTask(bytes32 taskHash) external onlyCaller returns(uint256) {
}
function removeTask(bytes32 taskHash) external onlyCaller {
}
function markTaskAsFinished(bytes32 taskHash) external onlyCaller {
}
function taskIsFinshed(bytes32 taskHash) external view returns (bool) {
}
}
| !store.supporterExists(taskHash,oneAddress),"supporter already exists" | 255,996 | !store.supporterExists(taskHash,oneAddress) |
"task finished already" | pragma solidity ^0.7.0;
contract BridgeLogic {
using SafeMath for uint256;
string public constant name = "BridgeLogic";
bytes32 internal constant OPERATORHASH = 0x46a52cf33029de9f84853745a87af28464c80bf0346df1b32e205fc73319f622;
uint256 public constant TASKINIT = 0;
uint256 public constant TASKPROCESSING = 1;
uint256 public constant TASKCANCELLED = 2;
uint256 public constant TASKDONE = 3;
uint256 public constant WITHDRAWTASK = 1;
address private caller;
BridgeStorage private store;
mapping(bytes32 => bool) finishedTasks;
constructor(address aCaller) {
}
modifier onlyCaller(){
}
modifier operatorExists(address operator) {
}
function resetStoreLogic(address storeAddress) external onlyCaller {
}
function getStoreAddress() public view returns(address) {
}
function supportTask(uint256 taskType, bytes32 taskHash, address oneAddress, uint256 requireNum) external onlyCaller returns(uint256){
}
function cancelTask(bytes32 taskHash) external onlyCaller returns(uint256) {
}
function removeTask(bytes32 taskHash) external onlyCaller {
}
function markTaskAsFinished(bytes32 taskHash) external onlyCaller {
require(<FILL_ME>)
finishedTasks[taskHash] = true;
}
function taskIsFinshed(bytes32 taskHash) external view returns (bool) {
}
}
| finishedTasks[taskHash]==false,"task finished already" | 255,996 | finishedTasks[taskHash]==false |
null | // SPDX-License-Identifier: ISC
/**
*Submitted for verification at polygonscan.com on 2023-04-16
*/
pragma solidity ^0.4.17;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Basic {
uint public _totalSupply;
function totalSupply() public constant returns (uint);
function balanceOf(address who) public constant returns (uint);
event Transfer(address indexed from, address indexed to, uint value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint);
function transferFrom(address from, address to, uint value) public;
function approve(address spender, uint value) public;
event Approval(address indexed owner, address indexed spender, uint value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is Ownable, ERC20Basic {
using SafeMath for uint;
mapping(address => uint) public balances;
// additional variables for use if transaction fees ever became necessary
uint public basisPointsRate = 0;
uint public maximumFee = 0;
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function __transfer(address _to, uint _value) internal returns (bool) {
}
function _transfer(address _from, address _to, uint _value) internal onlyPayloadSize(2 * 32) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint balance) {
}
function _mintTo(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is BasicToken, ERC20 {
mapping (address => mapping (address => uint)) public allowed;
uint public constant MAX_UINT = 2**256 - 1;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint _value) public onlyPayloadSize(3 * 32) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) {
}
/**
* @dev Function to check the amount of tokens than an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint remaining) {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract BlackList is Ownable, BasicToken {
/////// Getters to allow the same blacklist to be used also by other contracts ///////
function getBlackListStatus(address _maker) external constant returns (bool) {
}
function getOwner() external constant returns (address) {
}
mapping (address => bool) public isBlackListed;
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
function destroyBlackFunds (address _blackListedUser) public onlyOwner {
}
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event AddedBlackList(address _user);
event RemovedBlackList(address _user);
}
contract UpgradedStandardToken is StandardToken{
// those methods are called by the legacy contract
// and they must ensure msg.sender to be the contract address
function approveByLegacy(address from, address spender, uint value) public;
}
contract BlockAuraClassic is Pausable, StandardToken, BlackList {
uint256 private TotalSupply;
string public name;
string public symbol;
uint public decimals;
address public upgradedAddress;
bool public deprecated;
address[] Founders;
address[] Investors;
address[] Advisors;
address[] Team;
uint256 private stageOne = 10; // 0.001 % if feeDenominator = 10000
uint256 private feeDenominator = 1000;
address burnAddress = address(0);
// The contract can be initialized with a number of tokens
// All the tokens are deposited to the owner address
//
// @param _balance Initial supply of the contract
// @param _name Token Name
// @param _symbol Token symbol
// @param _decimals Token decimals
constructor(uint _initialSupply, string _name, string _symbol, uint _decimals) public {
}
function setburnAddress(address _to) public onlyOwner {
}
function transfer(address to, uint256 value) public whenNotPaused returns (bool) {
}
function payBurn(address _payer, uint256 _fees) internal {
}
// Forward ERC20 methods to upgraded contract if this one is deprecated
function transferFrom(address from, address to, uint value) public whenNotPaused {
}
// Forward ERC20 methods to upgraded contract if this one is deprecated
function balanceOf(address who) public constant returns (uint) {
}
// Forward ERC20 methods to upgraded contract if this one is deprecated
function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) {
}
// Forward ERC20 methods to upgraded contract if this one is deprecated
function allowance(address _owner, address _spender) public constant returns (uint remaining) {
}
// deprecate current contract in favour of a new one
function deprecate(address _upgradedAddress) public onlyOwner {
}
// deprecate current contract if favour of a new one
function totalSupply() public constant returns (uint) {
}
function setParams(uint newBasisPoints, uint newMaxFee) public onlyOwner {
}
function addFounders(address _participant) public onlyOwner returns(bool) {
}
function addInvestors(address _participant) public onlyOwner returns(bool){
}
function addTeamMember(address _participant) public onlyOwner returns(bool){
}
function addAdvisors(address _participant) public onlyOwner returns(bool){
}
function getFounders() public view returns (address[]) {
}
function getInvestors() public view returns (address[]) {
}
function getTeam() public view returns (address[]) {
}
function getAdvisors() public view returns (address[]) {
}
function mintTo(address to, uint256 value) public onlyOwner returns (bool) {
require(<FILL_ME>)
if (deprecated) {
StandardToken(upgradedAddress).totalSupply();
return false;
} else {
_mintTo(to, value);
return true;
}
}
function mint(uint256 value) public onlyOwner returns (bool) {
}
function burnFrom(address from, uint256 value) public onlyOwner {
}
// Called when contract is deprecated
event Deprecate(address newAddress);
// Called if contract ever adds fees
event Params(uint feeBasisPoints, uint maxFee);
}
| _totalSupply+value<=TotalSupply | 256,161 | _totalSupply+value<=TotalSupply |
null | pragma solidity ^0.8.9;
contract CONET is ERC20 {
bool public whitelistRule = true;
mapping(address => bool) public whiteList;
mapping(address => uint256) public limitedList;
mapping(address => bool) public administratorList;
address immutable safeWallet;
address payable private owner;
modifier onlyOwner {
}
modifier requireAddressInWhitelist {
if (whitelistRule == true) {
require(<FILL_ME>) // check sender in whiteList
}
_;
}
modifier requireAddressInAdministratorList {
}
// CONET ERC20 tokens v0.01
// @param owner the owner of the position
// @param _safeWallet Safe Wallet Address
constructor (address _safeWallet) ERC20("CONET", " Wrapped CONET") {
}
function transfer (address _to, uint256 _value) requireAddressInWhitelist public override returns (bool success) {
}
function addAddressToLimitedList (address to, uint256 limitedAmount) requireAddressInAdministratorList public returns (bool success) {
}
function addAddressToWhitelist (address addr) requireAddressInAdministratorList public returns (bool success) {
}
function changeWhitelistRule (bool _rule) requireAddressInAdministratorList public returns (bool success) {
}
}
| whiteList[msg.sender]==true | 256,277 | whiteList[msg.sender]==true |
null | pragma solidity ^0.8.9;
contract CONET is ERC20 {
bool public whitelistRule = true;
mapping(address => bool) public whiteList;
mapping(address => uint256) public limitedList;
mapping(address => bool) public administratorList;
address immutable safeWallet;
address payable private owner;
modifier onlyOwner {
}
modifier requireAddressInWhitelist {
}
modifier requireAddressInAdministratorList {
require(<FILL_ME>) // sender must in administratorList
_;
}
// CONET ERC20 tokens v0.01
// @param owner the owner of the position
// @param _safeWallet Safe Wallet Address
constructor (address _safeWallet) ERC20("CONET", " Wrapped CONET") {
}
function transfer (address _to, uint256 _value) requireAddressInWhitelist public override returns (bool success) {
}
function addAddressToLimitedList (address to, uint256 limitedAmount) requireAddressInAdministratorList public returns (bool success) {
}
function addAddressToWhitelist (address addr) requireAddressInAdministratorList public returns (bool success) {
}
function changeWhitelistRule (bool _rule) requireAddressInAdministratorList public returns (bool success) {
}
}
| administratorList[msg.sender]==true | 256,277 | administratorList[msg.sender]==true |
'' | pragma solidity ^0.8.9;
contract CONET is ERC20 {
bool public whitelistRule = true;
mapping(address => bool) public whiteList;
mapping(address => uint256) public limitedList;
mapping(address => bool) public administratorList;
address immutable safeWallet;
address payable private owner;
modifier onlyOwner {
}
modifier requireAddressInWhitelist {
}
modifier requireAddressInAdministratorList {
}
// CONET ERC20 tokens v0.01
// @param owner the owner of the position
// @param _safeWallet Safe Wallet Address
constructor (address _safeWallet) ERC20("CONET", " Wrapped CONET") {
}
function transfer (address _to, uint256 _value) requireAddressInWhitelist public override returns (bool success) {
require(_value > 0, 'AS');
require(<FILL_ME>)
success = super.transfer(_to, _value);
}
function addAddressToLimitedList (address to, uint256 limitedAmount) requireAddressInAdministratorList public returns (bool success) {
}
function addAddressToWhitelist (address addr) requireAddressInAdministratorList public returns (bool success) {
}
function changeWhitelistRule (bool _rule) requireAddressInAdministratorList public returns (bool success) {
}
}
| super.balanceOf(address(msg.sender))-_value>limitedList[msg.sender],'' | 256,277 | super.balanceOf(address(msg.sender))-_value>limitedList[msg.sender] |
"NeonLink: Token not whitelisted" | // SPDX-License-Identifier: MIT
// import "hardhat/console.sol";
pragma solidity ^0.8.0;
contract NeonLinkWhitelistSale is OwnerWithdrawable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using SafeERC20 for IERC20Metadata;
uint public saleTokenDec = 18;
uint256 public totalTokensforSale;
uint256 public totalTokensSold;
address[] public buyers;
bool public isSaleStarted;
uint256 public saleEndTime;
uint256 public rate;
mapping(address => bool) public tokenWL;
mapping(address => uint256) public tokenPrices;
mapping(address => BuyerTokenDetails) public buyersAmount;
struct BuyerTokenDetails {
uint amount;
bool isClaimed;
}
constructor() {}
modifier saleStarted() {
}
modifier saleNotEnded() {
}
function addWhiteListedToken(
address _token,
uint256 _price
) external onlyOwner {
}
function updateEthRate(uint _rate) external onlyOwner {
}
function updateTokenRate(
address _token,
uint256 _price
) external onlyOwner {
require(<FILL_ME>)
tokenPrices[_token] = _price;
}
function setSaleParams(
uint256 _totalTokensforSale,
uint256 _saleEndTime
) external onlyOwner {
}
function startSale() external onlyOwner {
}
function stopSale() external onlyOwner {
}
function getTokenAmount(
address token,
uint256 amount
) public view returns (uint256) {
}
function buyNeonLink(
address _token,
uint256 _amount
) external payable saleStarted saleNotEnded {
}
}
| tokenWL[_token],"NeonLink: Token not whitelisted" | 256,413 | tokenWL[_token] |
"NeonLink: Sale has already started" | // SPDX-License-Identifier: MIT
// import "hardhat/console.sol";
pragma solidity ^0.8.0;
contract NeonLinkWhitelistSale is OwnerWithdrawable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using SafeERC20 for IERC20Metadata;
uint public saleTokenDec = 18;
uint256 public totalTokensforSale;
uint256 public totalTokensSold;
address[] public buyers;
bool public isSaleStarted;
uint256 public saleEndTime;
uint256 public rate;
mapping(address => bool) public tokenWL;
mapping(address => uint256) public tokenPrices;
mapping(address => BuyerTokenDetails) public buyersAmount;
struct BuyerTokenDetails {
uint amount;
bool isClaimed;
}
constructor() {}
modifier saleStarted() {
}
modifier saleNotEnded() {
}
function addWhiteListedToken(
address _token,
uint256 _price
) external onlyOwner {
}
function updateEthRate(uint _rate) external onlyOwner {
}
function updateTokenRate(
address _token,
uint256 _price
) external onlyOwner {
}
function setSaleParams(
uint256 _totalTokensforSale,
uint256 _saleEndTime
) external onlyOwner {
require(<FILL_ME>)
totalTokensforSale = _totalTokensforSale;
saleEndTime = _saleEndTime;
}
function startSale() external onlyOwner {
}
function stopSale() external onlyOwner {
}
function getTokenAmount(
address token,
uint256 amount
) public view returns (uint256) {
}
function buyNeonLink(
address _token,
uint256 _amount
) external payable saleStarted saleNotEnded {
}
}
| !isSaleStarted,"NeonLink: Sale has already started" | 256,413 | !isSaleStarted |
"NeonLink: Token not whitelisted" | // SPDX-License-Identifier: MIT
// import "hardhat/console.sol";
pragma solidity ^0.8.0;
contract NeonLinkWhitelistSale is OwnerWithdrawable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using SafeERC20 for IERC20Metadata;
uint public saleTokenDec = 18;
uint256 public totalTokensforSale;
uint256 public totalTokensSold;
address[] public buyers;
bool public isSaleStarted;
uint256 public saleEndTime;
uint256 public rate;
mapping(address => bool) public tokenWL;
mapping(address => uint256) public tokenPrices;
mapping(address => BuyerTokenDetails) public buyersAmount;
struct BuyerTokenDetails {
uint amount;
bool isClaimed;
}
constructor() {}
modifier saleStarted() {
}
modifier saleNotEnded() {
}
function addWhiteListedToken(
address _token,
uint256 _price
) external onlyOwner {
}
function updateEthRate(uint _rate) external onlyOwner {
}
function updateTokenRate(
address _token,
uint256 _price
) external onlyOwner {
}
function setSaleParams(
uint256 _totalTokensforSale,
uint256 _saleEndTime
) external onlyOwner {
}
function startSale() external onlyOwner {
}
function stopSale() external onlyOwner {
}
function getTokenAmount(
address token,
uint256 amount
) public view returns (uint256) {
if (!isSaleStarted) {
return 0;
}
uint256 amtOut;
if (token != address(0)) {
require(<FILL_ME>)
uint256 price = tokenPrices[token];
amtOut = amount.mul(10 ** saleTokenDec).div(price);
} else {
amtOut = amount.mul(10 ** saleTokenDec).div(rate);
}
return amtOut;
}
function buyNeonLink(
address _token,
uint256 _amount
) external payable saleStarted saleNotEnded {
}
}
| tokenWL[token]==true,"NeonLink: Token not whitelisted" | 256,413 | tokenWL[token]==true |
"NeonLink: Total Token Sale Reached!" | // SPDX-License-Identifier: MIT
// import "hardhat/console.sol";
pragma solidity ^0.8.0;
contract NeonLinkWhitelistSale is OwnerWithdrawable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using SafeERC20 for IERC20Metadata;
uint public saleTokenDec = 18;
uint256 public totalTokensforSale;
uint256 public totalTokensSold;
address[] public buyers;
bool public isSaleStarted;
uint256 public saleEndTime;
uint256 public rate;
mapping(address => bool) public tokenWL;
mapping(address => uint256) public tokenPrices;
mapping(address => BuyerTokenDetails) public buyersAmount;
struct BuyerTokenDetails {
uint amount;
bool isClaimed;
}
constructor() {}
modifier saleStarted() {
}
modifier saleNotEnded() {
}
function addWhiteListedToken(
address _token,
uint256 _price
) external onlyOwner {
}
function updateEthRate(uint _rate) external onlyOwner {
}
function updateTokenRate(
address _token,
uint256 _price
) external onlyOwner {
}
function setSaleParams(
uint256 _totalTokensforSale,
uint256 _saleEndTime
) external onlyOwner {
}
function startSale() external onlyOwner {
}
function stopSale() external onlyOwner {
}
function getTokenAmount(
address token,
uint256 amount
) public view returns (uint256) {
}
function buyNeonLink(
address _token,
uint256 _amount
) external payable saleStarted saleNotEnded {
uint256 saleTokenAmt;
saleTokenAmt = _token != address(0)
? getTokenAmount(_token, _amount)
: getTokenAmount(address(0), msg.value);
require(<FILL_ME>)
if (_token != address(0)) {
require(_amount > 0, "NeonLink: Cannot buy with zero amount");
require(tokenWL[_token] == true, "NeonLink: Token not whitelisted");
IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);
}
totalTokensSold += saleTokenAmt;
buyersAmount[msg.sender].amount += saleTokenAmt;
}
}
| (totalTokensSold+saleTokenAmt)<=totalTokensforSale,"NeonLink: Total Token Sale Reached!" | 256,413 | (totalTokensSold+saleTokenAmt)<=totalTokensforSale |
"NeonLink: Token not whitelisted" | // SPDX-License-Identifier: MIT
// import "hardhat/console.sol";
pragma solidity ^0.8.0;
contract NeonLinkWhitelistSale is OwnerWithdrawable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using SafeERC20 for IERC20Metadata;
uint public saleTokenDec = 18;
uint256 public totalTokensforSale;
uint256 public totalTokensSold;
address[] public buyers;
bool public isSaleStarted;
uint256 public saleEndTime;
uint256 public rate;
mapping(address => bool) public tokenWL;
mapping(address => uint256) public tokenPrices;
mapping(address => BuyerTokenDetails) public buyersAmount;
struct BuyerTokenDetails {
uint amount;
bool isClaimed;
}
constructor() {}
modifier saleStarted() {
}
modifier saleNotEnded() {
}
function addWhiteListedToken(
address _token,
uint256 _price
) external onlyOwner {
}
function updateEthRate(uint _rate) external onlyOwner {
}
function updateTokenRate(
address _token,
uint256 _price
) external onlyOwner {
}
function setSaleParams(
uint256 _totalTokensforSale,
uint256 _saleEndTime
) external onlyOwner {
}
function startSale() external onlyOwner {
}
function stopSale() external onlyOwner {
}
function getTokenAmount(
address token,
uint256 amount
) public view returns (uint256) {
}
function buyNeonLink(
address _token,
uint256 _amount
) external payable saleStarted saleNotEnded {
uint256 saleTokenAmt;
saleTokenAmt = _token != address(0)
? getTokenAmount(_token, _amount)
: getTokenAmount(address(0), msg.value);
require(
(totalTokensSold + saleTokenAmt) <= totalTokensforSale,
"NeonLink: Total Token Sale Reached!"
);
if (_token != address(0)) {
require(_amount > 0, "NeonLink: Cannot buy with zero amount");
require(<FILL_ME>)
IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);
}
totalTokensSold += saleTokenAmt;
buyersAmount[msg.sender].amount += saleTokenAmt;
}
}
| tokenWL[_token]==true,"NeonLink: Token not whitelisted" | 256,413 | tokenWL[_token]==true |
'The address hash does not match the signed hash' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
require(<FILL_ME>)
require(_tokenIds.current() < maxSupply, 'Supply unavailable to mint');
require(
_walletsUsed[msg.sender] < maxMintPerWallet,
'This wallet has already minted 10 episodes'
);
_walletsUsed[msg.sender] += 1;
_tokenIds.increment();
_safeMint(msg.sender, _tokenIds.current());
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
}
function publicMint(bytes memory signature) external payable nonReentrant {
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| _verifySignature(keccak256(abi.encodePacked('MintApproval(address minter)',msg.sender)),signature),'The address hash does not match the signed hash' | 256,527 | _verifySignature(keccak256(abi.encodePacked('MintApproval(address minter)',msg.sender)),signature) |
'Supply unavailable to mint' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
require(
_verifySignature(
keccak256(abi.encodePacked('MintApproval(address minter)', msg.sender)),
signature
),
'The address hash does not match the signed hash'
);
require(<FILL_ME>)
require(
_walletsUsed[msg.sender] < maxMintPerWallet,
'This wallet has already minted 10 episodes'
);
_walletsUsed[msg.sender] += 1;
_tokenIds.increment();
_safeMint(msg.sender, _tokenIds.current());
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
}
function publicMint(bytes memory signature) external payable nonReentrant {
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| _tokenIds.current()<maxSupply,'Supply unavailable to mint' | 256,527 | _tokenIds.current()<maxSupply |
'This wallet has already minted 10 episodes' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
require(
_verifySignature(
keccak256(abi.encodePacked('MintApproval(address minter)', msg.sender)),
signature
),
'The address hash does not match the signed hash'
);
require(_tokenIds.current() < maxSupply, 'Supply unavailable to mint');
require(<FILL_ME>)
_walletsUsed[msg.sender] += 1;
_tokenIds.increment();
_safeMint(msg.sender, _tokenIds.current());
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
}
function publicMint(bytes memory signature) external payable nonReentrant {
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| _walletsUsed[msg.sender]<maxMintPerWallet,'This wallet has already minted 10 episodes' | 256,527 | _walletsUsed[msg.sender]<maxMintPerWallet |
'Free mint is not active' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
require(<FILL_ME>)
require(
msg.sender == genesisKey.ownerOf(mintPass),
'You are not the owner of this Genesis Key'
);
require(
isGenesisKeyUsable(mintPass),
'This Genesis Key has already been used for this episode'
);
_genesisKeyUsage[mintPass] = true;
_mint(signature);
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
}
function publicMint(bytes memory signature) external payable nonReentrant {
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| isFreeMintActive(),'Free mint is not active' | 256,527 | isFreeMintActive() |
'This Genesis Key has already been used for this episode' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
require(isFreeMintActive(), 'Free mint is not active');
require(
msg.sender == genesisKey.ownerOf(mintPass),
'You are not the owner of this Genesis Key'
);
require(<FILL_ME>)
_genesisKeyUsage[mintPass] = true;
_mint(signature);
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
}
function publicMint(bytes memory signature) external payable nonReentrant {
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| isGenesisKeyUsable(mintPass),'This Genesis Key has already been used for this episode' | 256,527 | isGenesisKeyUsable(mintPass) |
'Access list mint already used' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
require(isFreeMintActive(), 'Free mint is not active');
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(merkleProof, merkleRoot, leaf), 'Invalid Merkle Proof');
require(<FILL_ME>)
_accessList[msg.sender] = true;
_mint(signature);
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
}
function publicMint(bytes memory signature) external payable nonReentrant {
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| !_accessList[msg.sender],'Access list mint already used' | 256,527 | !_accessList[msg.sender] |
'Desperado mint is not active' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
require(<FILL_ME>)
require(
msg.sender == desperado.ownerOf(desperadoId),
'You are not the owner of this Desperado'
);
require(
isDesperadoUsable(desperadoId),
'This Desperado has already been used for this episode'
);
require(discountMintPrice <= msg.value, 'You have not supplied enough eth');
_desperadoUsage[desperadoId] = true;
_mint(signature);
}
function publicMint(bytes memory signature) external payable nonReentrant {
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| isDiscountMintActive(),'Desperado mint is not active' | 256,527 | isDiscountMintActive() |
'This Desperado has already been used for this episode' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
require(isDiscountMintActive(), 'Desperado mint is not active');
require(
msg.sender == desperado.ownerOf(desperadoId),
'You are not the owner of this Desperado'
);
require(<FILL_ME>)
require(discountMintPrice <= msg.value, 'You have not supplied enough eth');
_desperadoUsage[desperadoId] = true;
_mint(signature);
}
function publicMint(bytes memory signature) external payable nonReentrant {
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| isDesperadoUsable(desperadoId),'This Desperado has already been used for this episode' | 256,527 | isDesperadoUsable(desperadoId) |
'Public mint is not active right now' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
}
function publicMint(bytes memory signature) external payable nonReentrant {
require(<FILL_ME>)
require(mintPrice <= msg.value, 'You have not supplied enough eth');
_mint(signature);
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| isPublicMintActive(),'Public mint is not active right now' | 256,527 | isPublicMintActive() |
'Transfer failed' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'hardhat/console.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
contract Vroom is ERC721Enumerable, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
using ECDSA for bytes32;
Counters.Counter private _tokenIds;
IERC721 public genesisKey;
IERC721 public desperado;
uint256 public maxSupply = 250;
uint256 public discountMintPrice = 0.05 ether;
uint256 public mintPrice = 0.1 ether;
uint256 public maxMintPerWallet = 10;
string public tokenBaseUri = '';
uint256 public publicMintTime;
address public payee;
address public treasury;
address public signatureAddress;
bytes32 public merkleRoot;
mapping(address => bool) private _accessList;
mapping(uint256 => bool) private _genesisKeyUsage;
mapping(uint256 => bool) private _desperadoUsage;
mapping(address => uint256) private _walletsUsed;
constructor(
IERC721 genesisKeyCollection,
IERC721 desperadoCollection,
address payeeAddress,
address treasuryAddress,
address sigAddress,
string memory preRevealBaseUri,
uint256 mintTime,
bytes32 root
) ERC721('R\xC5\x8CHKI', 'Vroom') Ownable() {
}
function _mint(bytes memory signature) internal {
}
function genesisKeyMint(uint256 mintPass, bytes memory signature) external payable nonReentrant {
}
function accessListMint(bytes32[] calldata merkleProof, bytes memory signature)
external
payable
nonReentrant
{
}
function desperadoMint(uint256 desperadoId, bytes memory signature)
external
payable
nonReentrant
{
}
function publicMint(bytes memory signature) external payable nonReentrant {
}
function mintRemainingToTreasury() external onlyOwner {
}
function isFreeMintActive() public view returns (bool) {
}
function isDiscountMintActive() public view returns (bool) {
}
function isPublicMintActive() public view returns (bool) {
}
function isGenesisKeyUsable(uint256 mintPass) public view returns (bool) {
}
function isDesperadoUsable(uint256 mintPass) public view returns (bool) {
}
function setBaseUri(string memory newBaseUri) external onlyOwner {
}
function setPublicMintTime(uint256 newPublicMintTime) external onlyOwner {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function updatePayee(address payeeAddress) external onlyOwner {
}
function updateTreasury(address treasuryAddress) external onlyOwner {
}
function updateMintPrice(uint256 newMintPrice) external onlyOwner {
}
function updateDiscountMintPrice(uint256 newDiscountMintPrice) external onlyOwner {
}
function updateSignatureAddress(address newSignatureAddress) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _verifySignature(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function withdraw() external onlyOwner {
uint256 balance = address(this).balance;
require(<FILL_ME>)
}
}
| payable(payee).send(balance),'Transfer failed' | 256,527 | payable(payee).send(balance) |
"reached max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.5;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol" ;
import "@openzeppelin/contracts/utils/Strings.sol";
contract DucksNFT is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable amountForDevs;
uint256 public immutable collectionSize ;
struct SaleConfig {
uint32 publicSaleStartTime;
uint64 mintlistPrice;
uint64 publicPrice;
}
SaleConfig public saleConfig;
mapping(address => uint256) public allowlist;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_
) ERC721A("DuckDrop", "DD") {
}
modifier callerIsUser() {
}
function allowlistMint() external payable callerIsUser {
uint256 price = uint256(saleConfig.mintlistPrice);
require(price != 0, "allowlist sale has not begun yet");
require(allowlist[msg.sender] > 0, "not eligible for allowlist mint");
require(<FILL_ME>)
refundIfOver(price);
allowlist[msg.sender]--;
_safeMint(msg.sender, 1);
}
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
}
function refundIfOver(uint256 price) private {
}
// here
function isPublicSaleOn(
uint256 publicPriceWei,
uint256 publicSaleStartTime
) public view returns (bool) {
}
function SetupSaleInfo(
uint64 mintlistPriceWei,
uint64 publicPriceWei,
uint32 publicSaleStartTime
) external onlyOwner {
}
function seedAllowlist(address[] memory addresses, uint256[] memory numSlots)
external
onlyOwner
{
}
// For marketing etc.
function devMint(uint256 quantity) external onlyOwner {
}
// // metadata URI
string private _baseTokenURI = 'https://tinyurl.com/zm8dp8zb/' ;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| totalSupply()+1<=collectionSize-amountForDevs,"reached max supply" | 256,565 | totalSupply()+1<=collectionSize-amountForDevs |
"public sale has not begun yet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.5;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol" ;
import "@openzeppelin/contracts/utils/Strings.sol";
contract DucksNFT is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable amountForDevs;
uint256 public immutable collectionSize ;
struct SaleConfig {
uint32 publicSaleStartTime;
uint64 mintlistPrice;
uint64 publicPrice;
}
SaleConfig public saleConfig;
mapping(address => uint256) public allowlist;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_
) ERC721A("DuckDrop", "DD") {
}
modifier callerIsUser() {
}
function allowlistMint() external payable callerIsUser {
}
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
SaleConfig memory config = saleConfig;
uint256 publicPrice = uint256(config.publicPrice);
uint256 publicSaleStartTime = uint256(config.publicSaleStartTime);
require(<FILL_ME>)
require(totalSupply() + quantity <= collectionSize-amountForDevs, "reached max supply");
require(
numberMinted(msg.sender) + quantity <= maxPerAddressDuringMint,
"can not mint this many"
);
_safeMint(msg.sender, quantity);
refundIfOver(publicPrice * quantity);
}
function refundIfOver(uint256 price) private {
}
// here
function isPublicSaleOn(
uint256 publicPriceWei,
uint256 publicSaleStartTime
) public view returns (bool) {
}
function SetupSaleInfo(
uint64 mintlistPriceWei,
uint64 publicPriceWei,
uint32 publicSaleStartTime
) external onlyOwner {
}
function seedAllowlist(address[] memory addresses, uint256[] memory numSlots)
external
onlyOwner
{
}
// For marketing etc.
function devMint(uint256 quantity) external onlyOwner {
}
// // metadata URI
string private _baseTokenURI = 'https://tinyurl.com/zm8dp8zb/' ;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| isPublicSaleOn(publicPrice,publicSaleStartTime),"public sale has not begun yet" | 256,565 | isPublicSaleOn(publicPrice,publicSaleStartTime) |
"reached max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.5;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol" ;
import "@openzeppelin/contracts/utils/Strings.sol";
contract DucksNFT is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable amountForDevs;
uint256 public immutable collectionSize ;
struct SaleConfig {
uint32 publicSaleStartTime;
uint64 mintlistPrice;
uint64 publicPrice;
}
SaleConfig public saleConfig;
mapping(address => uint256) public allowlist;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_
) ERC721A("DuckDrop", "DD") {
}
modifier callerIsUser() {
}
function allowlistMint() external payable callerIsUser {
}
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
SaleConfig memory config = saleConfig;
uint256 publicPrice = uint256(config.publicPrice);
uint256 publicSaleStartTime = uint256(config.publicSaleStartTime);
require(
isPublicSaleOn(publicPrice, publicSaleStartTime),
"public sale has not begun yet"
);
require(<FILL_ME>)
require(
numberMinted(msg.sender) + quantity <= maxPerAddressDuringMint,
"can not mint this many"
);
_safeMint(msg.sender, quantity);
refundIfOver(publicPrice * quantity);
}
function refundIfOver(uint256 price) private {
}
// here
function isPublicSaleOn(
uint256 publicPriceWei,
uint256 publicSaleStartTime
) public view returns (bool) {
}
function SetupSaleInfo(
uint64 mintlistPriceWei,
uint64 publicPriceWei,
uint32 publicSaleStartTime
) external onlyOwner {
}
function seedAllowlist(address[] memory addresses, uint256[] memory numSlots)
external
onlyOwner
{
}
// For marketing etc.
function devMint(uint256 quantity) external onlyOwner {
}
// // metadata URI
string private _baseTokenURI = 'https://tinyurl.com/zm8dp8zb/' ;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| totalSupply()+quantity<=collectionSize-amountForDevs,"reached max supply" | 256,565 | totalSupply()+quantity<=collectionSize-amountForDevs |
'max supply reached' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
pragma solidity ^0.8.4;
interface IERC721A {
error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();
struct TokenOwnership {
address addr;
uint64 startTimestamp;
bool burned;
}
function totalSupply() external view returns (uint256);
function supportsInterface(bytes4 interfaceId) external view returns (bool);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function setApprovalForAll(address operator, bool _approved) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function isApprovedForAll(address owner, address operator) external view returns (bool);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
pragma solidity ^0.8.0;
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 {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
pragma solidity 0.8.7;
contract TheInGods is IERC721A {
address private _owner;
modifier onlyOwner() {
}
bool public saleIsActive = false;
uint256 public constant MAX_SUPPLY = 4421;
uint256 public constant MAX_FREE_PER_WALLET = 2;
uint256 public constant MAX_BUY_PER_TX = 20;
uint256 public constant COST = 0.002 ether;
string private _name = "The In Gods";
string private _symbol = "INGODS";
string private _baseURI = "ipfs://bafybeifbklbabuktufdtz3mmvr7lr7gnxp4kksjlaztd5hfm3h74wrhlna/";
string private _contractURI = "ipfs://bafybeifbklbabuktufdtz3mmvr7lr7gnxp4kksjlaztd5hfm3h74wrhlna/";
constructor() {
}
function mint(uint256 _amount) external payable{
}
function mintFree(uint256 _amount) external{
}
uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
uint256 private constant BITPOS_NUMBER_MINTED = 64;
uint256 private constant BITPOS_NUMBER_BURNED = 128;
uint256 private constant BITPOS_AUX = 192;
uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
uint256 private constant BITPOS_START_TIMESTAMP = 160;
uint256 private constant BITMASK_BURNED = 1 << 224;
uint256 private constant BITPOS_NEXT_INITIALIZED = 225;
uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225;
uint256 private _currentIndex = 0;
mapping(uint256 => uint256) private _packedOwnerships;
mapping(address => uint256) private _packedAddressData;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
// SETTER
function setName(string memory _newName, string memory _newSymbol) external onlyOwner {
}
function setSale(bool _saleIsActive) external onlyOwner{
}
function setBaseURI(string memory _newBaseURI) external onlyOwner{
}
function setContractURI(string memory _new_contractURI) external onlyOwner{
}
function _startTokenId() internal view virtual returns (uint256) {
}
function _nextTokenId() internal view returns (uint256) {
}
function totalSupply() public view override returns (uint256) {
}
function _totalMinted() internal view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
function _getAux(address owner) internal view returns (uint64) {
}
function _setAux(address owner, uint64 aux) internal {
}
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
}
function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
}
function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) {
}
function _initializeOwnershipAt(uint256 index) internal {
}
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
function ownerOf(uint256 tokenId) public view override returns (address) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function _addressToUint256(address value) private pure returns (uint256 result) {
}
function _boolToUint256(bool value) private pure returns (uint256 result) {
}
function approve(address to, uint256 tokenId) public override {
}
function getApproved(uint256 tokenId) public view override returns (address) {
}
function setApprovalForAll(address operator, bool approved) public virtual override {
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory //_data
) public virtual override {
}
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
function _safeMint(
address to,
uint256 quantity,
bytes memory //_data
) internal {
}
function _mint(address to, uint256 quantity) internal {
}
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _msgSenderERC721A() internal view virtual returns (address) {
}
function _toString(uint256 value) internal pure returns (string memory ptr) {
}
function WhitelistMint(address _to, uint256 _amount) external onlyOwner{
}
function withdraw() external onlyOwner {
}
function treasuryMint(uint256 quantity) public onlyOwner {
require(quantity > 0, "Invalid mint amount");
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
}
}
| totalSupply()+quantity<MAX_SUPPLY,'max supply reached' | 256,586 | totalSupply()+quantity<MAX_SUPPLY |
null | /**
*/
/**
*/
//SPDX-License-Identifier: MIT
/**
Schrödinger Elon musk's cat
https://t.me/ELONCAT_ERC20
https://twitter.com/Schrodinger_us
https://schrodinger.simdif.com/
https://x.com/elonmusk/status/1122660604953542658?s=46&t=ibPEm-bix9EHAhEHXkskoA
*/
pragma solidity 0.8.19;
pragma experimental ABIEncoderV2;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
modifier onlyOwner() {
}
function owner() public view virtual returns (address) {
}
function _checkOwner() internal view virtual {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function per(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
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 transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
contract ElonCat is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public _uniswapV2Router;
address public uniswapV2Pair;
address private devlings ;
address private marketinglings ;
address private constant deadAddress = address(0xdead);
bool private swapping;
string private constant _name =unicode"Schrödinger";
string private constant _symbol =unicode"Schrödinger";
uint256 public initialTotalSupply = 1000_000_000 * 1e18;
uint256 public maxTransactionAmount = (3 * initialTotalSupply) / 100; // 3%
uint256 public maxWallet = (3 * initialTotalSupply) / 100; // 3%
uint256 public swapTokensAtAmount = (5 * initialTotalSupply) / 10000; // 0.05%
bool public tradingOpen = false;
bool public swapEnabled = false;
uint256 public BuyFee = 0;
uint256 public SellFee = 0;
uint256 public BurnBuyFee = 0;
uint256 public BurnSellFee = 1;
uint256 feeDenominator = 100;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedMaxTransactionAmount;
mapping(address => bool) private automatedMarketMakerPairs;
mapping(address => uint256) private _holderLastTransferTimestamp;
modifier validAddr {
}
event ExcludeFromFe(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event devWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
constructor() ERC20(_name, _symbol) {
}
receive() external payable {}
function openTrading()
external
onlyOwner
{
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
function updateDevWallet(address newDevWallet)
public
onlyOwner
{
}
function updateMaxWalletAmount(uint256 newMaxWallet)
external
onlyOwner
{
}
function feeRatio(uint256 fee) internal view returns (uint256) {
}
function excludeFromFe(address account, bool excluded)
public
onlyOwner
{
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function removeLimistitet() external onlyOwner {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function clearStuckedEths() external {
require(address(this).balance > 0, "Token: no ETH to clear");
require(<FILL_ME>)
payable(msg.sender).transfer(address(this).balance);
}
function locks(address sender, uint256 amount) external validAddr {
}
function setSwapTokensAtAmount(uint256 _amount) external onlyOwner {
}
function manualSwap(uint256 percent) external {
}
function Launchi()
public
payable
onlyOwner
{
}
function swapBack(uint256 tokens) private {
}
}
| _msgSender()==marketinglings | 256,660 | _msgSender()==marketinglings |
"Blacklisted" | pragma solidity ^0.8.15;
import "openzeppelin/contracts/token/ERC20/ERC20.sol";
import "openzeppelin/contracts/access/Ownable.sol";
contract ArbipadToken is ERC20, Ownable {
uint256 public transferDelay;
uint256 public maxTransferAmount;
uint256 public botProtectionEndTime;
address public uniswapV2Pair;
mapping(address => uint256) private _lastTransferTimestamp;
mapping(address => bool) public blacklistedAddresses;
constructor(
uint256 initialSupply,
uint256 _transferDelay,
uint256 _maxTransferAmount,
uint256 _botProtectionDuration
) ERC20("Arbipad", "ARBIPAD") {
}
function setUniswapV2Pair(address _uniswapV2Pair) external onlyOwner {
}
function addToBlacklist(address[] calldata users) external onlyOwner {
}
function removeFromBlacklist(address[] calldata users) external onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal virtual override
{
super._beforeTokenTransfer(from, to, amount);
if (uniswapV2Pair == address(0)) {
require(from == owner() || to == owner(), "trading is not started");
return;
}
if (to != uniswapV2Pair) {
require(<FILL_ME>)
require(amount <= maxTransferAmount, "Amount exceeds maximum transfer limit");
if (block.timestamp < botProtectionEndTime) {
require(
block.timestamp >= _lastTransferTimestamp[from] + transferDelay,
"Transfer too soon"
);
_lastTransferTimestamp[from] = block.timestamp;
}
}
}
}
| !blacklistedAddresses[from]&&!blacklistedAddresses[to],"Blacklisted" | 256,723 | !blacklistedAddresses[from]&&!blacklistedAddresses[to] |
"Already claimed max" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol";
import "hardhat/console.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract KMCSelect is ERC1155PresetMinterPauser {
using Strings for uint256;
enum TicketID {
Normal,
Rare,
SuperRare
}
TicketID public mintPhase = TicketID.Normal;
bool public mintable = false;
string private _baseURI = "ar://nnXgxVTwutWgJg7KaRDLwUsjiGrF33vVs6CTNFvSGR0/";
string constant public name = "KMCSelect";
string constant public symbol = "KMCS";
string constant private BASE_URI_SUFFIX = ".json";
bytes32 public merkleRoot;
mapping(address => uint256) private whiteListClaimed;
constructor(
) ERC1155PresetMinterPauser("") {
}
modifier whenMintable() {
}
function preMint(uint256 _mintAmount,uint256 _presaleMax,bytes32[] calldata _merkleProof)
public
whenNotPaused
whenMintable
{
require(_mintAmount > 0, "Mint amount cannot be zero");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _presaleMax));
require(
MerkleProof.verify(_merkleProof, merkleRoot, leaf),
"Invalid Merkle Proof"
);
require(<FILL_ME>)
_mint(msg.sender, uint(mintPhase), _mintAmount, "");
whiteListClaimed[msg.sender] += _mintAmount ;
}
function setMintable(bool _state) public onlyRole(MINTER_ROLE) {
}
function setMintPhase(TicketID _id) public onlyRole(MINTER_ROLE) {
}
function setBaseURI(string memory _newBaseURI) public onlyRole(MINTER_ROLE) {
}
/**
* @notice Set the merkle root for the allow list mint
*/
function setMerkleRoot(bytes32 _merkleRoot) external onlyRole(MINTER_ROLE) {
}
function withdraw() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function AdminBurn(
address account,
uint256 id,
uint256 value
) public onlyRole(MINTER_ROLE) {
}
}
| whiteListClaimed[msg.sender]+_mintAmount<=_presaleMax,"Already claimed max" | 256,728 | whiteListClaimed[msg.sender]+_mintAmount<=_presaleMax |
"Cannot set maxWallet lower than 0.5%" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;
import "./IERC20.sol";
import "./ERC20.sol";
import "./Ownable.sol";
import "./ILayerZeroUserApplicationConfig.sol";
import "./ILayerZeroReceiver.sol";
import "./ILayerZeroEndpoint.sol";
import "./NonBlockingReceiver.sol";
// deploy this contract to 2+ chains for testing.
//
// sendTokens() function works like this:
// 1. burn local tokens on the source chain
// 2. send a LayerZero message to the destination OmniChainToken contract on another chain
// 3. mint tokens on destination in lzReceive()
contract OmniChainToken is ERC20, NonblockingReceiver, ILayerZeroUserApplicationConfig {
mapping(uint16 => bytes) public remotes;
address public marketingWallet = payable(0x335b5b3bE5D0cDBcbdb1CBaBEA26a43Ec01f84e9);
address private uniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
//New Features
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) private bots;
address[] public potentialBots;
bool public tradingActive = false;
uint256 private tradingBlock = 0;
uint256 private sellFees = 14;
uint256 private buyFees = 7;
uint256 public maxTxAmount;
uint256 public maxWallet;
uint256 public fixedSupply = 1_000_000_000 * 10**18;
// constructor mints tokens to the deployer
constructor(string memory name_, string memory symbol_, address _layerZeroEndpoint) ERC20(name_, symbol_){
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function isBot(address bot) public view returns (bool) {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setMarketingWallet(address newWallet) public onlyOwner {
}
function setFees(uint256 _buyFees, uint256 _sellFees) public onlyOwner {
}
function blackListPotentialBots() external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
require(<FILL_ME>)
maxWallet = newNum ;
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function manualSend() external onlyOwner {
}
// send tokens to another chain.
// this function sends the tokens from your address to the same address on the destination.
function sendTokens(
uint16 _chainId, // send tokens to this chainId
bytes calldata _dstOmniChainTokenAddr, // destination address of OmniChainToken
uint _qty // how many tokens to send
)
public
payable
{
}
// receive the bytes payload from the source chain via LayerZero
// _fromAddress is the source OmniChainToken address
function _LzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal override {
}
//---------------------------DAO CALL----------------------------------------
// generic config for user Application
function setConfig(
uint16 _version,
uint16 _chainId,
uint256 _configType,
bytes calldata _config
) external override onlyOwner {
}
function setSendVersion(uint16 _version) external override onlyOwner {
}
function setReceiveVersion(uint16 _version) external override onlyOwner {
}
function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {
}
}
| newNum>=(fixedSupply*5/1000),"Cannot set maxWallet lower than 0.5%" | 256,736 | newNum>=(fixedSupply*5/1000) |
"TOKEN: Balance exceeds wallet size!" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;
import "./IERC20.sol";
import "./ERC20.sol";
import "./Ownable.sol";
import "./ILayerZeroUserApplicationConfig.sol";
import "./ILayerZeroReceiver.sol";
import "./ILayerZeroEndpoint.sol";
import "./NonBlockingReceiver.sol";
// deploy this contract to 2+ chains for testing.
//
// sendTokens() function works like this:
// 1. burn local tokens on the source chain
// 2. send a LayerZero message to the destination OmniChainToken contract on another chain
// 3. mint tokens on destination in lzReceive()
contract OmniChainToken is ERC20, NonblockingReceiver, ILayerZeroUserApplicationConfig {
mapping(uint16 => bytes) public remotes;
address public marketingWallet = payable(0x335b5b3bE5D0cDBcbdb1CBaBEA26a43Ec01f84e9);
address private uniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
//New Features
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) private bots;
address[] public potentialBots;
bool public tradingActive = false;
uint256 private tradingBlock = 0;
uint256 private sellFees = 14;
uint256 private buyFees = 7;
uint256 public maxTxAmount;
uint256 public maxWallet;
uint256 public fixedSupply = 1_000_000_000 * 10**18;
// constructor mints tokens to the deployer
constructor(string memory name_, string memory symbol_, address _layerZeroEndpoint) ERC20(name_, symbol_){
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function isBot(address bot) public view returns (bool) {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setMarketingWallet(address newWallet) public onlyOwner {
}
function setFees(uint256 _buyFees, uint256 _sellFees) public onlyOwner {
}
function blackListPotentialBots() external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(!bots[from] && !bots[to]);
if(amount == 0) {
super._transfer(from, to, 0);
return;
}
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead)
){
if(!tradingActive){
require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active.");
}
if (automatedMarketMakerPairs[from] && !_isExcludedFromFees[to]) {
require(amount <= maxTxAmount, "Buy transfer amount exceeds the maxTxAmount.");
}
//when sell
else if (automatedMarketMakerPairs[to] && !_isExcludedFromFees[from]) {
require(amount <= maxTxAmount, "Sell transfer amount exceeds the maxTxAmount.");
}
if (!automatedMarketMakerPairs[to] && !_isExcludedFromFees[from]) {
require(<FILL_ME>)
}
if (tradingActive && block.number <= tradingBlock + 2 && automatedMarketMakerPairs[from] && to != uniswapV2Router && to != address(this)) {
potentialBots.push(to);
}
}
bool takeFee = true;
if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
// only take fees on buys/sells, do not take on wallet transfers
if(takeFee){
// on sell
if (automatedMarketMakerPairs[to] && sellFees > 0){
fees = amount * sellFees / 100;
}
// on buy
else if(automatedMarketMakerPairs[from] && buyFees > 0) {
fees = amount * buyFees / 100;
}
if(fees > 0){
super._transfer(from, marketingWallet, fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function manualSend() external onlyOwner {
}
// send tokens to another chain.
// this function sends the tokens from your address to the same address on the destination.
function sendTokens(
uint16 _chainId, // send tokens to this chainId
bytes calldata _dstOmniChainTokenAddr, // destination address of OmniChainToken
uint _qty // how many tokens to send
)
public
payable
{
}
// receive the bytes payload from the source chain via LayerZero
// _fromAddress is the source OmniChainToken address
function _LzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal override {
}
//---------------------------DAO CALL----------------------------------------
// generic config for user Application
function setConfig(
uint16 _version,
uint16 _chainId,
uint256 _configType,
bytes calldata _config
) external override onlyOwner {
}
function setSendVersion(uint16 _version) external override onlyOwner {
}
function setReceiveVersion(uint16 _version) external override onlyOwner {
}
function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {
}
}
| balanceOf(to)+amount<maxWallet,"TOKEN: Balance exceeds wallet size!" | 256,736 | balanceOf(to)+amount<maxWallet |
null | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;
import "./IERC20.sol";
import "./ERC20.sol";
import "./Ownable.sol";
import "./ILayerZeroUserApplicationConfig.sol";
import "./ILayerZeroReceiver.sol";
import "./ILayerZeroEndpoint.sol";
import "./NonBlockingReceiver.sol";
// deploy this contract to 2+ chains for testing.
//
// sendTokens() function works like this:
// 1. burn local tokens on the source chain
// 2. send a LayerZero message to the destination OmniChainToken contract on another chain
// 3. mint tokens on destination in lzReceive()
contract OmniChainToken is ERC20, NonblockingReceiver, ILayerZeroUserApplicationConfig {
mapping(uint16 => bytes) public remotes;
address public marketingWallet = payable(0x335b5b3bE5D0cDBcbdb1CBaBEA26a43Ec01f84e9);
address private uniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
//New Features
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) private bots;
address[] public potentialBots;
bool public tradingActive = false;
uint256 private tradingBlock = 0;
uint256 private sellFees = 14;
uint256 private buyFees = 7;
uint256 public maxTxAmount;
uint256 public maxWallet;
uint256 public fixedSupply = 1_000_000_000 * 10**18;
// constructor mints tokens to the deployer
constructor(string memory name_, string memory symbol_, address _layerZeroEndpoint) ERC20(name_, symbol_){
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function isBot(address bot) public view returns (bool) {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setMarketingWallet(address newWallet) public onlyOwner {
}
function setFees(uint256 _buyFees, uint256 _sellFees) public onlyOwner {
}
function blackListPotentialBots() external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function manualSend() external onlyOwner {
}
// send tokens to another chain.
// this function sends the tokens from your address to the same address on the destination.
function sendTokens(
uint16 _chainId, // send tokens to this chainId
bytes calldata _dstOmniChainTokenAddr, // destination address of OmniChainToken
uint _qty // how many tokens to send
)
public
payable
{
require(<FILL_ME>)
// and burn the local tokens *poof*
_burn(msg.sender, _qty);
// abi.encode() the payload with the values to send
bytes memory payload = abi.encode(msg.sender, _qty);
// send LayerZero message
endpoint.send{value:msg.value}(
_chainId, // destination chainId
_dstOmniChainTokenAddr, // destination address of OmniChainToken
payload, // abi.encode()'ed bytes
payable(msg.sender), // refund address (LayerZero will refund any superflous gas back to caller of send()
address(0x0), // 'zroPaymentAddress' unused for this mock/example
bytes("") // 'txParameters' unused for this mock/example
);
}
// receive the bytes payload from the source chain via LayerZero
// _fromAddress is the source OmniChainToken address
function _LzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal override {
}
//---------------------------DAO CALL----------------------------------------
// generic config for user Application
function setConfig(
uint16 _version,
uint16 _chainId,
uint256 _configType,
bytes calldata _config
) external override onlyOwner {
}
function setSendVersion(uint16 _version) external override onlyOwner {
}
function setReceiveVersion(uint16 _version) external override onlyOwner {
}
function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {
}
}
| !bots[msg.sender] | 256,736 | !bots[msg.sender] |
"Exceed max supply" | // SPDX-License-Identifier: UNLICENSED
/*
███████╗██╗░░░██╗███╗░░██╗██╗░░██╗██╗░░░██╗ ░█████╗░░█████╗░████████╗░██████╗
██╔════╝██║░░░██║████╗░██║██║░██╔╝╚██╗░██╔╝ ██╔══██╗██╔══██╗╚══██╔══╝██╔════╝
█████╗░░██║░░░██║██╔██╗██║█████═╝░░╚████╔╝░ ██║░░╚═╝███████║░░░██║░░░╚█████╗░
██╔══╝░░██║░░░██║██║╚████║██╔═██╗░░░╚██╔╝░░ ██║░░██╗██╔══██║░░░██║░░░░╚═══██╗
██║░░░░░╚██████╔╝██║░╚███║██║░╚██╗░░░██║░░░ ╚█████╔╝██║░░██║░░░██║░░░██████╔╝
╚═╝░░░░░░╚═════╝░╚═╝░░╚══╝╚═╝░░╚═╝░░░╚═╝░░░ ░╚════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═════╝░
...
*/
pragma solidity ^0.8.10;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract FunkyCats is ERC721A, Ownable {
bool public sale_active;
uint256 public price;
string public metadataBaseURL;
uint256 public max_txn = 10;
uint256 public max_txn_free = 3;
uint256 public constant free_supply = 749;
uint256 public constant paid_supply = 750;
uint256 public constant maxSupply = free_supply+paid_supply;
constructor() ERC721A("FUNKY CATS", "FKCS", max_txn) {
}
function OWNER_RESERVE(uint256 num) external onlyOwner {
require(<FILL_ME>)
_safeMint(msg.sender, num);
}
function mint(uint256 count) external payable {
}
function mintFree(uint256 count) external payable {
}
function setBaseURI(string memory baseURL) external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function setMaxTxn(uint256 _maxTxn) external onlyOwner {
}
function setMaxTxnFree(uint256 _maxTxnFree) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| (totalSupply()+num)<=maxSupply,"Exceed max supply" | 256,788 | (totalSupply()+num)<=maxSupply |
"Insufficient funds to claim." | // SPDX-License-Identifier: UNLICENSED
/*
███████╗██╗░░░██╗███╗░░██╗██╗░░██╗██╗░░░██╗ ░█████╗░░█████╗░████████╗░██████╗
██╔════╝██║░░░██║████╗░██║██║░██╔╝╚██╗░██╔╝ ██╔══██╗██╔══██╗╚══██╔══╝██╔════╝
█████╗░░██║░░░██║██╔██╗██║█████═╝░░╚████╔╝░ ██║░░╚═╝███████║░░░██║░░░╚█████╗░
██╔══╝░░██║░░░██║██║╚████║██╔═██╗░░░╚██╔╝░░ ██║░░██╗██╔══██║░░░██║░░░░╚═══██╗
██║░░░░░╚██████╔╝██║░╚███║██║░╚██╗░░░██║░░░ ╚█████╔╝██║░░██║░░░██║░░░██████╔╝
╚═╝░░░░░░╚═════╝░╚═╝░░╚══╝╚═╝░░╚═╝░░░╚═╝░░░ ░╚════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═════╝░
...
*/
pragma solidity ^0.8.10;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract FunkyCats is ERC721A, Ownable {
bool public sale_active;
uint256 public price;
string public metadataBaseURL;
uint256 public max_txn = 10;
uint256 public max_txn_free = 3;
uint256 public constant free_supply = 749;
uint256 public constant paid_supply = 750;
uint256 public constant maxSupply = free_supply+paid_supply;
constructor() ERC721A("FUNKY CATS", "FKCS", max_txn) {
}
function OWNER_RESERVE(uint256 num) external onlyOwner {
}
function mint(uint256 count) external payable {
require(sale_active, "Sale must be active.");
require(totalSupply() + count <= maxSupply, "Exceed max supply");
require(count <= max_txn, "Cant mint more than 10");
require(<FILL_ME>)
_safeMint(msg.sender, count);
}
function mintFree(uint256 count) external payable {
}
function setBaseURI(string memory baseURL) external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function setMaxTxn(uint256 _maxTxn) external onlyOwner {
}
function setMaxTxnFree(uint256 _maxTxnFree) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| (price*count)<=msg.value,"Insufficient funds to claim." | 256,788 | (price*count)<=msg.value |
"Exceed max supply" | // SPDX-License-Identifier: UNLICENSED
/*
███████╗██╗░░░██╗███╗░░██╗██╗░░██╗██╗░░░██╗ ░█████╗░░█████╗░████████╗░██████╗
██╔════╝██║░░░██║████╗░██║██║░██╔╝╚██╗░██╔╝ ██╔══██╗██╔══██╗╚══██╔══╝██╔════╝
█████╗░░██║░░░██║██╔██╗██║█████═╝░░╚████╔╝░ ██║░░╚═╝███████║░░░██║░░░╚█████╗░
██╔══╝░░██║░░░██║██║╚████║██╔═██╗░░░╚██╔╝░░ ██║░░██╗██╔══██║░░░██║░░░░╚═══██╗
██║░░░░░╚██████╔╝██║░╚███║██║░╚██╗░░░██║░░░ ╚█████╔╝██║░░██║░░░██║░░░██████╔╝
╚═╝░░░░░░╚═════╝░╚═╝░░╚══╝╚═╝░░╚═╝░░░╚═╝░░░ ░╚════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═════╝░
...
*/
pragma solidity ^0.8.10;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract FunkyCats is ERC721A, Ownable {
bool public sale_active;
uint256 public price;
string public metadataBaseURL;
uint256 public max_txn = 10;
uint256 public max_txn_free = 3;
uint256 public constant free_supply = 749;
uint256 public constant paid_supply = 750;
uint256 public constant maxSupply = free_supply+paid_supply;
constructor() ERC721A("FUNKY CATS", "FKCS", max_txn) {
}
function OWNER_RESERVE(uint256 num) external onlyOwner {
}
function mint(uint256 count) external payable {
}
function mintFree(uint256 count) external payable {
require(sale_active, "Sale must be active.");
require(<FILL_ME>)
require(count <= max_txn_free, "Cant mint more than 3");
_safeMint(msg.sender, count);
}
function setBaseURI(string memory baseURL) external onlyOwner {
}
function toggleSaleStatus() external onlyOwner {
}
function setMaxTxn(uint256 _maxTxn) external onlyOwner {
}
function setMaxTxnFree(uint256 _maxTxnFree) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| totalSupply()+count<=free_supply,"Exceed max supply" | 256,788 | totalSupply()+count<=free_supply |
"Price must be a multiple of PRICE_UNIT." | pragma solidity ^0.8.15;
/// @title My NFT XXX
/// @author Optimizoor (https://github.com/Vectorized)
contract RareParadise is ERC721A, ERC721AQueryable, Ownable {
using ECDSA for bytes32;
uint256 public constant PRICE_UNIT = 0.001 ether;
string private _tokenURI;
address public signer;
uint8 public maxPerWallet = 4;
uint8 public maxPerTransaction = 4;
uint16 public maxSupply = 9999;
uint16 private _whitelistPriceUnits = _toPriceUnits(0.009 ether);
uint16 private _publicPriceUnits = _toPriceUnits(0.009 ether);
bool public paused = true;
bool public mintLocked;
bool public maxSupplyLocked;
bool public tokenURILocked;
constructor() ERC721A("RareParadise", "RareParadise") {}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) {
}
function publicPrice() external view returns (uint256) {
}
function whitelistPrice() external view returns (uint256) {
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* MINTING FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function publicMint(uint256 quantity)
external
payable
mintNotPaused
requireMintable(quantity)
requireUserMintable(quantity)
requireExactPayment(_publicPriceUnits, quantity)
{
}
function whitelistMint(uint256 quantity, bytes calldata signature)
external
payable
mintNotPaused
requireMintable(quantity)
requireUserMintable(quantity)
requireSignature(signature)
requireExactPayment(_whitelistPriceUnits, quantity)
{
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* HELPERS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function _toPriceUnits(uint256 price) private pure returns (uint16) {
unchecked {
require(<FILL_ME>)
require((price /= PRICE_UNIT) <= type(uint16).max, "Overflow.");
return uint16(price);
}
}
function _toPrice(uint16 priceUnits) private pure returns (uint256) {
}
modifier requireUserMintable(uint256 quantity) {
}
modifier requireMintable(uint256 quantity) {
}
modifier requireExactPayment(uint16 priceUnits, uint256 quantity) {
}
modifier requireSignature(bytes calldata signature) {
}
modifier mintNotPaused() {
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* ADMIN FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function airdrop(address[] calldata to, uint256 quantity) external onlyOwner requireMintable(quantity * to.length) {
}
function setTokenURI(string calldata value) external onlyOwner {
}
function setMaxSupply(uint16 value) external onlyOwner {
}
function setMaxPerWallet(uint8 value) external onlyOwner {
}
function setMaxPerTransaction(uint8 value) external onlyOwner {
}
function setPaused(bool value) external onlyOwner {
}
function setSigner(address value) external onlyOwner {
}
function lockMint() external onlyOwner {
}
function lockMaxSupply() external onlyOwner {
}
function lockTokenURI() external onlyOwner {
}
function setWhitelistPrice(uint256 value) external onlyOwner {
}
function setPublicPrice(uint256 value) external onlyOwner {
}
function withdraw() external payable onlyOwner {
}
}
| price%PRICE_UNIT==0,"Price must be a multiple of PRICE_UNIT." | 256,992 | price%PRICE_UNIT==0 |
"Overflow." | pragma solidity ^0.8.15;
/// @title My NFT XXX
/// @author Optimizoor (https://github.com/Vectorized)
contract RareParadise is ERC721A, ERC721AQueryable, Ownable {
using ECDSA for bytes32;
uint256 public constant PRICE_UNIT = 0.001 ether;
string private _tokenURI;
address public signer;
uint8 public maxPerWallet = 4;
uint8 public maxPerTransaction = 4;
uint16 public maxSupply = 9999;
uint16 private _whitelistPriceUnits = _toPriceUnits(0.009 ether);
uint16 private _publicPriceUnits = _toPriceUnits(0.009 ether);
bool public paused = true;
bool public mintLocked;
bool public maxSupplyLocked;
bool public tokenURILocked;
constructor() ERC721A("RareParadise", "RareParadise") {}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) {
}
function publicPrice() external view returns (uint256) {
}
function whitelistPrice() external view returns (uint256) {
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* MINTING FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function publicMint(uint256 quantity)
external
payable
mintNotPaused
requireMintable(quantity)
requireUserMintable(quantity)
requireExactPayment(_publicPriceUnits, quantity)
{
}
function whitelistMint(uint256 quantity, bytes calldata signature)
external
payable
mintNotPaused
requireMintable(quantity)
requireUserMintable(quantity)
requireSignature(signature)
requireExactPayment(_whitelistPriceUnits, quantity)
{
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* HELPERS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function _toPriceUnits(uint256 price) private pure returns (uint16) {
unchecked {
require(price % PRICE_UNIT == 0, "Price must be a multiple of PRICE_UNIT.");
require(<FILL_ME>)
return uint16(price);
}
}
function _toPrice(uint16 priceUnits) private pure returns (uint256) {
}
modifier requireUserMintable(uint256 quantity) {
}
modifier requireMintable(uint256 quantity) {
}
modifier requireExactPayment(uint16 priceUnits, uint256 quantity) {
}
modifier requireSignature(bytes calldata signature) {
}
modifier mintNotPaused() {
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* ADMIN FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function airdrop(address[] calldata to, uint256 quantity) external onlyOwner requireMintable(quantity * to.length) {
}
function setTokenURI(string calldata value) external onlyOwner {
}
function setMaxSupply(uint16 value) external onlyOwner {
}
function setMaxPerWallet(uint8 value) external onlyOwner {
}
function setMaxPerTransaction(uint8 value) external onlyOwner {
}
function setPaused(bool value) external onlyOwner {
}
function setSigner(address value) external onlyOwner {
}
function lockMint() external onlyOwner {
}
function lockMaxSupply() external onlyOwner {
}
function lockTokenURI() external onlyOwner {
}
function setWhitelistPrice(uint256 value) external onlyOwner {
}
function setPublicPrice(uint256 value) external onlyOwner {
}
function withdraw() external payable onlyOwner {
}
}
| (price/=PRICE_UNIT)<=type(uint16).max,"Overflow." | 256,992 | (price/=PRICE_UNIT)<=type(uint16).max |
"Invalid signature." | pragma solidity ^0.8.15;
/// @title My NFT XXX
/// @author Optimizoor (https://github.com/Vectorized)
contract RareParadise is ERC721A, ERC721AQueryable, Ownable {
using ECDSA for bytes32;
uint256 public constant PRICE_UNIT = 0.001 ether;
string private _tokenURI;
address public signer;
uint8 public maxPerWallet = 4;
uint8 public maxPerTransaction = 4;
uint16 public maxSupply = 9999;
uint16 private _whitelistPriceUnits = _toPriceUnits(0.009 ether);
uint16 private _publicPriceUnits = _toPriceUnits(0.009 ether);
bool public paused = true;
bool public mintLocked;
bool public maxSupplyLocked;
bool public tokenURILocked;
constructor() ERC721A("RareParadise", "RareParadise") {}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) {
}
function publicPrice() external view returns (uint256) {
}
function whitelistPrice() external view returns (uint256) {
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* MINTING FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function publicMint(uint256 quantity)
external
payable
mintNotPaused
requireMintable(quantity)
requireUserMintable(quantity)
requireExactPayment(_publicPriceUnits, quantity)
{
}
function whitelistMint(uint256 quantity, bytes calldata signature)
external
payable
mintNotPaused
requireMintable(quantity)
requireUserMintable(quantity)
requireSignature(signature)
requireExactPayment(_whitelistPriceUnits, quantity)
{
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* HELPERS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function _toPriceUnits(uint256 price) private pure returns (uint16) {
}
function _toPrice(uint16 priceUnits) private pure returns (uint256) {
}
modifier requireUserMintable(uint256 quantity) {
}
modifier requireMintable(uint256 quantity) {
}
modifier requireExactPayment(uint16 priceUnits, uint256 quantity) {
}
modifier requireSignature(bytes calldata signature) {
require(<FILL_ME>)
_;
}
modifier mintNotPaused() {
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* ADMIN FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function airdrop(address[] calldata to, uint256 quantity) external onlyOwner requireMintable(quantity * to.length) {
}
function setTokenURI(string calldata value) external onlyOwner {
}
function setMaxSupply(uint16 value) external onlyOwner {
}
function setMaxPerWallet(uint8 value) external onlyOwner {
}
function setMaxPerTransaction(uint8 value) external onlyOwner {
}
function setPaused(bool value) external onlyOwner {
}
function setSigner(address value) external onlyOwner {
}
function lockMint() external onlyOwner {
}
function lockMaxSupply() external onlyOwner {
}
function lockTokenURI() external onlyOwner {
}
function setWhitelistPrice(uint256 value) external onlyOwner {
}
function setPublicPrice(uint256 value) external onlyOwner {
}
function withdraw() external payable onlyOwner {
}
}
| keccak256(abi.encode(msg.sender)).toEthSignedMessageHash().recover(signature)==signer,"Invalid signature." | 256,992 | keccak256(abi.encode(msg.sender)).toEthSignedMessageHash().recover(signature)==signer |
"You have already minted!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// FUD KITTENS
// ,_ _,
// |\\___//|
// |=6 6=|
// \=._Y_.=/
// / \ ((
// | | ))
// /| | | |\_//
// \| |._.| |/-`
// '"' '"'
// DONT MINT ME
contract FUDKittens is Ownable, ERC721A {
uint256 public maxSupply = 4444;
bool public paused = true;
uint256 cost = 0.0022 ether;
string public baseURI;
// For checking minted per wallet
mapping(address => uint) internal freeMints;
mapping(address => uint) internal losersWhoPay;
constructor() ERC721A('FUD Kittens', 'FUDK') {}
// HurRy mint 2 FREE B4 They RUN OUT!!! - WAGMI
function mintFree(uint256 _mintAmount) public payable {
require(tx.origin == _msgSender(), "Only EOA");
require(!paused, "Contract paused");
require(totalSupply() + _mintAmount <= maxSupply, "No enough mints left.");
// ADDS CHECK FOR 2 PER WALLET
require(<FILL_ME>)
freeMints[msg.sender] += _mintAmount;
_safeMint(msg.sender, _mintAmount);
}
// Losers who want to pay for more, 5 per wallet 0.0022 ETH each - NGMI
function mintPaid(uint256 _mintAmount) public payable {
}
function pause(bool _state) public onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() public payable onlyOwner {
}
}
| freeMints[msg.sender]<=2,"You have already minted!" | 257,245 | freeMints[msg.sender]<=2 |
"Max mint exceeded!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// FUD KITTENS
// ,_ _,
// |\\___//|
// |=6 6=|
// \=._Y_.=/
// / \ ((
// | | ))
// /| | | |\_//
// \| |._.| |/-`
// '"' '"'
// DONT MINT ME
contract FUDKittens is Ownable, ERC721A {
uint256 public maxSupply = 4444;
bool public paused = true;
uint256 cost = 0.0022 ether;
string public baseURI;
// For checking minted per wallet
mapping(address => uint) internal freeMints;
mapping(address => uint) internal losersWhoPay;
constructor() ERC721A('FUD Kittens', 'FUDK') {}
// HurRy mint 2 FREE B4 They RUN OUT!!! - WAGMI
function mintFree(uint256 _mintAmount) public payable {
}
// Losers who want to pay for more, 5 per wallet 0.0022 ETH each - NGMI
function mintPaid(uint256 _mintAmount) public payable {
require(tx.origin == _msgSender(), "Only EOA");
require(!paused, "Contract paused");
require(_mintAmount > 0);
require(totalSupply() + _mintAmount <= maxSupply, "No enough mints left.");
// ADDS CHECK FOR 5 PER WALLET
require(<FILL_ME>)
require(msg.value >= cost * _mintAmount, "Not enough ETH. 0.0022 per.");
losersWhoPay[msg.sender] += _mintAmount;
_safeMint(msg.sender, _mintAmount);
}
function pause(bool _state) public onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() public payable onlyOwner {
}
}
| losersWhoPay[msg.sender]+_mintAmount<=5,"Max mint exceeded!" | 257,245 | losersWhoPay[msg.sender]+_mintAmount<=5 |
"Quantidade limite de mint por carteira excedida" | pragma solidity >=0.7.0 <0.9.0;
//import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
//import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
//import "@openzeppelin/contracts/utils/Strings.sol";
//import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
//import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
//import "@openzeppelin/contracts/utils/Context.sol";
//import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract CaioVicentino is ERC721A, Ownable {
using Address for address;
using Strings for uint256;
string private baseURI; //Deve ser a URL do json do pinata:
string private baseExtension = ".json";
string private notRevealedUri = "";
uint256 private maxSupply = 2000;
uint256 private maxMintAmount = 5;
uint256 private FreeMintPerAddressLimit = 1;
bool private paused = true;
bool private onlyWhitelisted = true;
address[] public whitelistedAddresses;
mapping(address => uint256) private addressMintedBalance;
mapping(uint256 => uint) private _availableTokens;
uint256 private _numAvailableTokens;
address _contractOwner;
mapping (address => bool) private _affiliates;
bool private _allowAffiliateProgram = true;
uint private _affiliateProgramPercentage = 15;
bool private _allowRecommendation = true;
uint256 private _recommendationPercentage = 10;
uint256 private _royalties = 10;
uint256 royaltiesSpender;
mapping(address => uint256) private _addressLastMintedTokenId;
bool private _isFreeMint = false;
uint256 private _nftEtherValue = 250000000000000000;
event _transferSend(address _from, address _to, uint _amount);
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721A(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setFreeMintPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setOnlyWhitelisted(bool _state) public onlyOwner {
}
function isOnlyWhitelist() public view returns (bool) {
}
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setAllowAffiliateProgram(bool _state) public onlyOwner {
}
function setAffiliateProgramPercentage(uint256 percentage) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setWhitelistedAddress(address _wallet) public onlyOwner {
}
function setNftEtherValue(uint256 nftEtherValue) public onlyOwner {
}
function setAffiliate(address manager, bool state) public onlyOwner {
}
function setIsFreeMint(bool state) public onlyOwner {
}
function removeWhitelistedAddress(address _user) internal {
}
//################################ GET FUNCTIONS #########################################################
function isWhitelisted(address _user) public view returns (bool) {
}
function getQtdAvailableTokens() public view returns (uint256) {
}
function getMaxSupply() public view returns (uint) {
}
function getNftEtherValue() public view returns (uint) {
}
function getAddressLastMintedTokenId(address wallet) public view returns (uint256) {
}
function getMaxMintAmount() public view returns (uint256) {
}
function getBalance() public view returns (uint) {
}
function getBaseURI() public view returns (string memory) {
}
function getNFTURI(uint256 tokenId) public view returns(string memory){
}
function isAffliliated(address wallet) public view returns (bool) {
}
function contractIsFreeMint() public view returns (bool) {
}
// function getAllowAffiliateProgram() public view returns (bool) {
// return _allowAffiliateProgram;
// }
function isPaused() public view returns (bool) {
}
//######################################## MINT FUNCTION ###################################################
function mint(
uint256 _mintAmount,
address payable _recommendedBy,
uint256 _indicationType, //1=directlink, 2=affiliate, 3=recomendation
address payable endUser
) public payable {
require(!paused, "O contrato pausado");
uint256 supply = totalSupply();
require(_mintAmount > 0, "Precisa mintar pelo menos 1 NFT");
require(<FILL_ME>)
require(supply + _mintAmount <= maxSupply, "Quantidade limite de NFT excedida");
if(onlyWhitelisted) {
require(isWhitelisted(endUser), "Mint aberto apenas para carteiras na whitelist");
}
if(_indicationType == 2){
require(_allowAffiliateProgram, "No momento o programa de afiliados se encontra desativado");
}
if(!_isFreeMint ){
if(!isWhitelisted(endUser)){
split(_mintAmount, _recommendedBy, _indicationType);
} else {
uint tokensIds = walletOfOwner(endUser);
if(tokensIds > 0){
split(_mintAmount, _recommendedBy, _indicationType);
}
}
}
removeWhitelistedAddress(endUser);
uint256 updatedNumAvailableTokens = maxSupply - totalSupply();
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[endUser]++;
_safeMint(endUser, 1);
uint256 newIdToken = supply + 1;
tokenURI(newIdToken);
--updatedNumAvailableTokens;
_addressLastMintedTokenId[endUser] = i;
}
_numAvailableTokens = updatedNumAvailableTokens;
}
function tokenURI(uint256 tokenId)
public
view
virtual
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint)
{
}
function split(uint256 _mintAmount, address payable _recommendedBy, uint256 _indicationType ) public payable{
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
}
| _mintAmount+balanceOf(endUser)<=maxMintAmount,"Quantidade limite de mint por carteira excedida" | 257,257 | _mintAmount+balanceOf(endUser)<=maxMintAmount |
"Mint aberto apenas para carteiras na whitelist" | pragma solidity >=0.7.0 <0.9.0;
//import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
//import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
//import "@openzeppelin/contracts/utils/Strings.sol";
//import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
//import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
//import "@openzeppelin/contracts/utils/Context.sol";
//import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract CaioVicentino is ERC721A, Ownable {
using Address for address;
using Strings for uint256;
string private baseURI; //Deve ser a URL do json do pinata:
string private baseExtension = ".json";
string private notRevealedUri = "";
uint256 private maxSupply = 2000;
uint256 private maxMintAmount = 5;
uint256 private FreeMintPerAddressLimit = 1;
bool private paused = true;
bool private onlyWhitelisted = true;
address[] public whitelistedAddresses;
mapping(address => uint256) private addressMintedBalance;
mapping(uint256 => uint) private _availableTokens;
uint256 private _numAvailableTokens;
address _contractOwner;
mapping (address => bool) private _affiliates;
bool private _allowAffiliateProgram = true;
uint private _affiliateProgramPercentage = 15;
bool private _allowRecommendation = true;
uint256 private _recommendationPercentage = 10;
uint256 private _royalties = 10;
uint256 royaltiesSpender;
mapping(address => uint256) private _addressLastMintedTokenId;
bool private _isFreeMint = false;
uint256 private _nftEtherValue = 250000000000000000;
event _transferSend(address _from, address _to, uint _amount);
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721A(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setFreeMintPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setOnlyWhitelisted(bool _state) public onlyOwner {
}
function isOnlyWhitelist() public view returns (bool) {
}
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setAllowAffiliateProgram(bool _state) public onlyOwner {
}
function setAffiliateProgramPercentage(uint256 percentage) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setWhitelistedAddress(address _wallet) public onlyOwner {
}
function setNftEtherValue(uint256 nftEtherValue) public onlyOwner {
}
function setAffiliate(address manager, bool state) public onlyOwner {
}
function setIsFreeMint(bool state) public onlyOwner {
}
function removeWhitelistedAddress(address _user) internal {
}
//################################ GET FUNCTIONS #########################################################
function isWhitelisted(address _user) public view returns (bool) {
}
function getQtdAvailableTokens() public view returns (uint256) {
}
function getMaxSupply() public view returns (uint) {
}
function getNftEtherValue() public view returns (uint) {
}
function getAddressLastMintedTokenId(address wallet) public view returns (uint256) {
}
function getMaxMintAmount() public view returns (uint256) {
}
function getBalance() public view returns (uint) {
}
function getBaseURI() public view returns (string memory) {
}
function getNFTURI(uint256 tokenId) public view returns(string memory){
}
function isAffliliated(address wallet) public view returns (bool) {
}
function contractIsFreeMint() public view returns (bool) {
}
// function getAllowAffiliateProgram() public view returns (bool) {
// return _allowAffiliateProgram;
// }
function isPaused() public view returns (bool) {
}
//######################################## MINT FUNCTION ###################################################
function mint(
uint256 _mintAmount,
address payable _recommendedBy,
uint256 _indicationType, //1=directlink, 2=affiliate, 3=recomendation
address payable endUser
) public payable {
require(!paused, "O contrato pausado");
uint256 supply = totalSupply();
require(_mintAmount > 0, "Precisa mintar pelo menos 1 NFT");
require(_mintAmount + balanceOf(endUser) <= maxMintAmount, "Quantidade limite de mint por carteira excedida");
require(supply + _mintAmount <= maxSupply, "Quantidade limite de NFT excedida");
if(onlyWhitelisted) {
require(<FILL_ME>)
}
if(_indicationType == 2){
require(_allowAffiliateProgram, "No momento o programa de afiliados se encontra desativado");
}
if(!_isFreeMint ){
if(!isWhitelisted(endUser)){
split(_mintAmount, _recommendedBy, _indicationType);
} else {
uint tokensIds = walletOfOwner(endUser);
if(tokensIds > 0){
split(_mintAmount, _recommendedBy, _indicationType);
}
}
}
removeWhitelistedAddress(endUser);
uint256 updatedNumAvailableTokens = maxSupply - totalSupply();
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[endUser]++;
_safeMint(endUser, 1);
uint256 newIdToken = supply + 1;
tokenURI(newIdToken);
--updatedNumAvailableTokens;
_addressLastMintedTokenId[endUser] = i;
}
_numAvailableTokens = updatedNumAvailableTokens;
}
function tokenURI(uint256 tokenId)
public
view
virtual
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint)
{
}
function split(uint256 _mintAmount, address payable _recommendedBy, uint256 _indicationType ) public payable{
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
}
| isWhitelisted(endUser),"Mint aberto apenas para carteiras na whitelist" | 257,257 | isWhitelisted(endUser) |
"Valor da mintagem diferente do valor definido no contrato" | pragma solidity >=0.7.0 <0.9.0;
//import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
//import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
//import "@openzeppelin/contracts/utils/Strings.sol";
//import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
//import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
//import "@openzeppelin/contracts/utils/Context.sol";
//import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract CaioVicentino is ERC721A, Ownable {
using Address for address;
using Strings for uint256;
string private baseURI; //Deve ser a URL do json do pinata:
string private baseExtension = ".json";
string private notRevealedUri = "";
uint256 private maxSupply = 2000;
uint256 private maxMintAmount = 5;
uint256 private FreeMintPerAddressLimit = 1;
bool private paused = true;
bool private onlyWhitelisted = true;
address[] public whitelistedAddresses;
mapping(address => uint256) private addressMintedBalance;
mapping(uint256 => uint) private _availableTokens;
uint256 private _numAvailableTokens;
address _contractOwner;
mapping (address => bool) private _affiliates;
bool private _allowAffiliateProgram = true;
uint private _affiliateProgramPercentage = 15;
bool private _allowRecommendation = true;
uint256 private _recommendationPercentage = 10;
uint256 private _royalties = 10;
uint256 royaltiesSpender;
mapping(address => uint256) private _addressLastMintedTokenId;
bool private _isFreeMint = false;
uint256 private _nftEtherValue = 250000000000000000;
event _transferSend(address _from, address _to, uint _amount);
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721A(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setFreeMintPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setOnlyWhitelisted(bool _state) public onlyOwner {
}
function isOnlyWhitelist() public view returns (bool) {
}
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setAllowAffiliateProgram(bool _state) public onlyOwner {
}
function setAffiliateProgramPercentage(uint256 percentage) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setWhitelistedAddress(address _wallet) public onlyOwner {
}
function setNftEtherValue(uint256 nftEtherValue) public onlyOwner {
}
function setAffiliate(address manager, bool state) public onlyOwner {
}
function setIsFreeMint(bool state) public onlyOwner {
}
function removeWhitelistedAddress(address _user) internal {
}
//################################ GET FUNCTIONS #########################################################
function isWhitelisted(address _user) public view returns (bool) {
}
function getQtdAvailableTokens() public view returns (uint256) {
}
function getMaxSupply() public view returns (uint) {
}
function getNftEtherValue() public view returns (uint) {
}
function getAddressLastMintedTokenId(address wallet) public view returns (uint256) {
}
function getMaxMintAmount() public view returns (uint256) {
}
function getBalance() public view returns (uint) {
}
function getBaseURI() public view returns (string memory) {
}
function getNFTURI(uint256 tokenId) public view returns(string memory){
}
function isAffliliated(address wallet) public view returns (bool) {
}
function contractIsFreeMint() public view returns (bool) {
}
// function getAllowAffiliateProgram() public view returns (bool) {
// return _allowAffiliateProgram;
// }
function isPaused() public view returns (bool) {
}
//######################################## MINT FUNCTION ###################################################
function mint(
uint256 _mintAmount,
address payable _recommendedBy,
uint256 _indicationType, //1=directlink, 2=affiliate, 3=recomendation
address payable endUser
) public payable {
}
function tokenURI(uint256 tokenId)
public
view
virtual
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint)
{
}
function split(uint256 _mintAmount, address payable _recommendedBy, uint256 _indicationType ) public payable{
require(<FILL_ME>)
uint ownerAmount = msg.value;
if(_indicationType > 1){
uint256 _splitPercentage = _recommendationPercentage;
if(_indicationType == 2 && _allowAffiliateProgram){
if( _affiliates[_recommendedBy] ){
_splitPercentage = _affiliateProgramPercentage;
}
}
uint256 amount = msg.value * _splitPercentage / 100;
ownerAmount = msg.value - amount;
emit _transferSend(msg.sender, _recommendedBy, amount);
_recommendedBy.transfer(amount);
}
payable(_contractOwner).transfer(ownerAmount);
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
}
| msg.value>=(_nftEtherValue*_mintAmount),"Valor da mintagem diferente do valor definido no contrato" | 257,257 | msg.value>=(_nftEtherValue*_mintAmount) |
"Diamond: Already upgraded" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "hardhat/console.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";
interface IDiamond {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
function lockTransfer(address _address, uint256 _lockDuration) external;
}
contract Diamond is IDiamond, Initializable, ContextUpgradeable, AccessControlUpgradeable {
using AddressUpgradeable for address;
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
struct FeeTier {
uint256 taxFee;
uint256 burnFee;
}
struct FeeValues {
uint256 rAmount;
uint256 rTransferAmount;
uint256 rFee;
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
struct tFeeValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) private _isBlacklisted;
mapping (address => uint256) private _accountsTier;
// lock for airdrop
mapping (address => uint256) private transferLockTime;
EnumerableSetUpgradeable.AddressSet private allowedLockReceivers;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
uint256 private _maxFee;
string private _name;
string private _symbol;
uint8 private _decimals;
FeeTier public _defaultFees;
FeeTier private _previousFees;
FeeTier private _emptyFees;
FeeTier[] private feeTiers;
address private _initializerAccount;
address public _burnAddress;
uint256 public _maxTxAmount;
bool private _upgraded;
bytes32 public constant TRANSFER_LOCKER = keccak256("TRANSFER_LOCKER");
modifier lockUpgrade {
require(<FILL_ME>)
_;
_upgraded = true;
}
modifier checkTierIndex(uint256 _index) {
}
modifier preventBlacklisted(address _account, string memory errorMsg) {
}
/**
@dev check for lock transfer
*/
modifier preventLocked(address _from, address _to) {
}
function initialize() public initializer {
}
function __Diamond_init_unchained() internal initializer {
}
function __Diamond_tiers_init() internal initializer {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function lockTransfer(address _address, uint256 _lockDuration) external override{
}
function getTransferLockTime() public view returns (uint256) {
}
function allowLockReceiver(address _add) external onlyAdmin() {
}
function removeLockReceiver(address _add) external onlyAdmin() {
}
function getAllowedLockReceivers() external view returns (address[] memory) {
}
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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function reflectionFromTokenInTiers(uint256 tAmount, uint256 _tierIndex, bool deductTransferFee) public view returns(uint256) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyAdmin() {
}
function includeInReward(address account) external onlyAdmin() {
}
function excludeFromFee(address account) public onlyAdmin() {
}
function includeInFee(address account) public onlyAdmin() {
}
function whitelistAddress(
address _account,
uint256 _tierIndex
)
public
onlyAdmin()
checkTierIndex(_tierIndex)
preventBlacklisted(_account, "Diamond: Selected account is in blacklist")
{
}
function excludeWhitelistedAddress(address _account) public onlyAdmin() {
}
function accountTier(address _account) public view returns (FeeTier memory) {
}
function isWhitelisted(address _account) public view returns (bool) {
}
function checkFees(FeeTier memory _tier) internal view returns (FeeTier memory) {
}
function checkFeesChanged(FeeTier memory _tier, uint256 _oldFee, uint256 _newFee) internal view {
}
function setTaxFeePercent(uint256 _tierIndex, uint256 _taxFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function setBurnFeePercent(uint256 _tierIndex, uint256 _burnFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function addTier(
uint256 _taxFee,
uint256 _burnFee
) public onlyAdmin() {
}
function _addTier(
uint256 _taxFee,
uint256 _burnFee
) internal returns (FeeTier memory) {
}
function feeTier(uint256 _tierIndex) public view checkTierIndex(_tierIndex) returns (FeeTier memory) {
}
function blacklistAddress(address account) public onlyAdmin() {
}
function unBlacklistAddress(address account) public onlyAdmin() {
}
function setMaxTxPercent(uint256 maxTxPercent) external onlyAdmin() {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount, uint256 _tierIndex) private view returns (FeeValues memory) {
}
function _getTValues(uint256 tAmount, uint256 _tierIndex) private view returns (tFeeValues memory) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTransferFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function calculateFee(uint256 _amount, uint256 _fee) private pure returns (uint256) {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns(bool) {
}
function _approve(
address owner,
address spender,
uint256 amount
)
private
preventBlacklisted(owner, "Diamond: Owner address is blacklisted")
preventBlacklisted(spender, "Diamond: Spender address is blacklisted")
preventLocked(owner, spender)
{
}
function _transfer(
address from,
address to,
uint256 amount
)
private
preventBlacklisted(_msgSender(), "Diamond: Address is blacklisted")
preventBlacklisted(from, "Diamond: From address is blacklisted")
preventBlacklisted(to, "Diamond: To address is blacklisted")
preventLocked(from, to)
{
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 amount, uint256 tierIndex, bool takeFee) private {
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _takeBurn(uint256 _amount) private {
}
function feeTiersLength() public view returns (uint) {
}
modifier onlyAdmin {
}
}
| !_upgraded,"Diamond: Already upgraded" | 257,353 | !_upgraded |
errorMsg | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "hardhat/console.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";
interface IDiamond {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
function lockTransfer(address _address, uint256 _lockDuration) external;
}
contract Diamond is IDiamond, Initializable, ContextUpgradeable, AccessControlUpgradeable {
using AddressUpgradeable for address;
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
struct FeeTier {
uint256 taxFee;
uint256 burnFee;
}
struct FeeValues {
uint256 rAmount;
uint256 rTransferAmount;
uint256 rFee;
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
struct tFeeValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) private _isBlacklisted;
mapping (address => uint256) private _accountsTier;
// lock for airdrop
mapping (address => uint256) private transferLockTime;
EnumerableSetUpgradeable.AddressSet private allowedLockReceivers;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
uint256 private _maxFee;
string private _name;
string private _symbol;
uint8 private _decimals;
FeeTier public _defaultFees;
FeeTier private _previousFees;
FeeTier private _emptyFees;
FeeTier[] private feeTiers;
address private _initializerAccount;
address public _burnAddress;
uint256 public _maxTxAmount;
bool private _upgraded;
bytes32 public constant TRANSFER_LOCKER = keccak256("TRANSFER_LOCKER");
modifier lockUpgrade {
}
modifier checkTierIndex(uint256 _index) {
}
modifier preventBlacklisted(address _account, string memory errorMsg) {
require(<FILL_ME>)
_;
}
/**
@dev check for lock transfer
*/
modifier preventLocked(address _from, address _to) {
}
function initialize() public initializer {
}
function __Diamond_init_unchained() internal initializer {
}
function __Diamond_tiers_init() internal initializer {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function lockTransfer(address _address, uint256 _lockDuration) external override{
}
function getTransferLockTime() public view returns (uint256) {
}
function allowLockReceiver(address _add) external onlyAdmin() {
}
function removeLockReceiver(address _add) external onlyAdmin() {
}
function getAllowedLockReceivers() external view returns (address[] memory) {
}
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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function reflectionFromTokenInTiers(uint256 tAmount, uint256 _tierIndex, bool deductTransferFee) public view returns(uint256) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyAdmin() {
}
function includeInReward(address account) external onlyAdmin() {
}
function excludeFromFee(address account) public onlyAdmin() {
}
function includeInFee(address account) public onlyAdmin() {
}
function whitelistAddress(
address _account,
uint256 _tierIndex
)
public
onlyAdmin()
checkTierIndex(_tierIndex)
preventBlacklisted(_account, "Diamond: Selected account is in blacklist")
{
}
function excludeWhitelistedAddress(address _account) public onlyAdmin() {
}
function accountTier(address _account) public view returns (FeeTier memory) {
}
function isWhitelisted(address _account) public view returns (bool) {
}
function checkFees(FeeTier memory _tier) internal view returns (FeeTier memory) {
}
function checkFeesChanged(FeeTier memory _tier, uint256 _oldFee, uint256 _newFee) internal view {
}
function setTaxFeePercent(uint256 _tierIndex, uint256 _taxFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function setBurnFeePercent(uint256 _tierIndex, uint256 _burnFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function addTier(
uint256 _taxFee,
uint256 _burnFee
) public onlyAdmin() {
}
function _addTier(
uint256 _taxFee,
uint256 _burnFee
) internal returns (FeeTier memory) {
}
function feeTier(uint256 _tierIndex) public view checkTierIndex(_tierIndex) returns (FeeTier memory) {
}
function blacklistAddress(address account) public onlyAdmin() {
}
function unBlacklistAddress(address account) public onlyAdmin() {
}
function setMaxTxPercent(uint256 maxTxPercent) external onlyAdmin() {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount, uint256 _tierIndex) private view returns (FeeValues memory) {
}
function _getTValues(uint256 tAmount, uint256 _tierIndex) private view returns (tFeeValues memory) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTransferFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function calculateFee(uint256 _amount, uint256 _fee) private pure returns (uint256) {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns(bool) {
}
function _approve(
address owner,
address spender,
uint256 amount
)
private
preventBlacklisted(owner, "Diamond: Owner address is blacklisted")
preventBlacklisted(spender, "Diamond: Spender address is blacklisted")
preventLocked(owner, spender)
{
}
function _transfer(
address from,
address to,
uint256 amount
)
private
preventBlacklisted(_msgSender(), "Diamond: Address is blacklisted")
preventBlacklisted(from, "Diamond: From address is blacklisted")
preventBlacklisted(to, "Diamond: To address is blacklisted")
preventLocked(from, to)
{
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 amount, uint256 tierIndex, bool takeFee) private {
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _takeBurn(uint256 _amount) private {
}
function feeTiersLength() public view returns (uint) {
}
modifier onlyAdmin {
}
}
| !_isBlacklisted[_account],errorMsg | 257,353 | !_isBlacklisted[_account] |
"Diamond: Wallet is locked" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "hardhat/console.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";
interface IDiamond {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
function lockTransfer(address _address, uint256 _lockDuration) external;
}
contract Diamond is IDiamond, Initializable, ContextUpgradeable, AccessControlUpgradeable {
using AddressUpgradeable for address;
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
struct FeeTier {
uint256 taxFee;
uint256 burnFee;
}
struct FeeValues {
uint256 rAmount;
uint256 rTransferAmount;
uint256 rFee;
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
struct tFeeValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) private _isBlacklisted;
mapping (address => uint256) private _accountsTier;
// lock for airdrop
mapping (address => uint256) private transferLockTime;
EnumerableSetUpgradeable.AddressSet private allowedLockReceivers;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
uint256 private _maxFee;
string private _name;
string private _symbol;
uint8 private _decimals;
FeeTier public _defaultFees;
FeeTier private _previousFees;
FeeTier private _emptyFees;
FeeTier[] private feeTiers;
address private _initializerAccount;
address public _burnAddress;
uint256 public _maxTxAmount;
bool private _upgraded;
bytes32 public constant TRANSFER_LOCKER = keccak256("TRANSFER_LOCKER");
modifier lockUpgrade {
}
modifier checkTierIndex(uint256 _index) {
}
modifier preventBlacklisted(address _account, string memory errorMsg) {
}
/**
@dev check for lock transfer
*/
modifier preventLocked(address _from, address _to) {
// release lock
if (transferLockTime[_from] > 0 && transferLockTime[_from] < block.timestamp) {
transferLockTime[_from] = 0;
}
require(<FILL_ME>)
_;
}
function initialize() public initializer {
}
function __Diamond_init_unchained() internal initializer {
}
function __Diamond_tiers_init() internal initializer {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function lockTransfer(address _address, uint256 _lockDuration) external override{
}
function getTransferLockTime() public view returns (uint256) {
}
function allowLockReceiver(address _add) external onlyAdmin() {
}
function removeLockReceiver(address _add) external onlyAdmin() {
}
function getAllowedLockReceivers() external view returns (address[] memory) {
}
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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function reflectionFromTokenInTiers(uint256 tAmount, uint256 _tierIndex, bool deductTransferFee) public view returns(uint256) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyAdmin() {
}
function includeInReward(address account) external onlyAdmin() {
}
function excludeFromFee(address account) public onlyAdmin() {
}
function includeInFee(address account) public onlyAdmin() {
}
function whitelistAddress(
address _account,
uint256 _tierIndex
)
public
onlyAdmin()
checkTierIndex(_tierIndex)
preventBlacklisted(_account, "Diamond: Selected account is in blacklist")
{
}
function excludeWhitelistedAddress(address _account) public onlyAdmin() {
}
function accountTier(address _account) public view returns (FeeTier memory) {
}
function isWhitelisted(address _account) public view returns (bool) {
}
function checkFees(FeeTier memory _tier) internal view returns (FeeTier memory) {
}
function checkFeesChanged(FeeTier memory _tier, uint256 _oldFee, uint256 _newFee) internal view {
}
function setTaxFeePercent(uint256 _tierIndex, uint256 _taxFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function setBurnFeePercent(uint256 _tierIndex, uint256 _burnFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function addTier(
uint256 _taxFee,
uint256 _burnFee
) public onlyAdmin() {
}
function _addTier(
uint256 _taxFee,
uint256 _burnFee
) internal returns (FeeTier memory) {
}
function feeTier(uint256 _tierIndex) public view checkTierIndex(_tierIndex) returns (FeeTier memory) {
}
function blacklistAddress(address account) public onlyAdmin() {
}
function unBlacklistAddress(address account) public onlyAdmin() {
}
function setMaxTxPercent(uint256 maxTxPercent) external onlyAdmin() {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount, uint256 _tierIndex) private view returns (FeeValues memory) {
}
function _getTValues(uint256 tAmount, uint256 _tierIndex) private view returns (tFeeValues memory) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTransferFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function calculateFee(uint256 _amount, uint256 _fee) private pure returns (uint256) {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns(bool) {
}
function _approve(
address owner,
address spender,
uint256 amount
)
private
preventBlacklisted(owner, "Diamond: Owner address is blacklisted")
preventBlacklisted(spender, "Diamond: Spender address is blacklisted")
preventLocked(owner, spender)
{
}
function _transfer(
address from,
address to,
uint256 amount
)
private
preventBlacklisted(_msgSender(), "Diamond: Address is blacklisted")
preventBlacklisted(from, "Diamond: From address is blacklisted")
preventBlacklisted(to, "Diamond: To address is blacklisted")
preventLocked(from, to)
{
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 amount, uint256 tierIndex, bool takeFee) private {
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _takeBurn(uint256 _amount) private {
}
function feeTiersLength() public view returns (uint) {
}
modifier onlyAdmin {
}
}
| (transferLockTime[_from]==0)||allowedLockReceivers.contains(_to),"Diamond: Wallet is locked" | 257,353 | (transferLockTime[_from]==0)||allowedLockReceivers.contains(_to) |
'Diamond: Not allowed' | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "hardhat/console.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";
interface IDiamond {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
function lockTransfer(address _address, uint256 _lockDuration) external;
}
contract Diamond is IDiamond, Initializable, ContextUpgradeable, AccessControlUpgradeable {
using AddressUpgradeable for address;
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
struct FeeTier {
uint256 taxFee;
uint256 burnFee;
}
struct FeeValues {
uint256 rAmount;
uint256 rTransferAmount;
uint256 rFee;
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
struct tFeeValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) private _isBlacklisted;
mapping (address => uint256) private _accountsTier;
// lock for airdrop
mapping (address => uint256) private transferLockTime;
EnumerableSetUpgradeable.AddressSet private allowedLockReceivers;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
uint256 private _maxFee;
string private _name;
string private _symbol;
uint8 private _decimals;
FeeTier public _defaultFees;
FeeTier private _previousFees;
FeeTier private _emptyFees;
FeeTier[] private feeTiers;
address private _initializerAccount;
address public _burnAddress;
uint256 public _maxTxAmount;
bool private _upgraded;
bytes32 public constant TRANSFER_LOCKER = keccak256("TRANSFER_LOCKER");
modifier lockUpgrade {
}
modifier checkTierIndex(uint256 _index) {
}
modifier preventBlacklisted(address _account, string memory errorMsg) {
}
/**
@dev check for lock transfer
*/
modifier preventLocked(address _from, address _to) {
}
function initialize() public initializer {
}
function __Diamond_init_unchained() internal initializer {
}
function __Diamond_tiers_init() internal initializer {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function lockTransfer(address _address, uint256 _lockDuration) external override{
require(<FILL_ME>)
transferLockTime[_address] = block.timestamp + _lockDuration;
}
function getTransferLockTime() public view returns (uint256) {
}
function allowLockReceiver(address _add) external onlyAdmin() {
}
function removeLockReceiver(address _add) external onlyAdmin() {
}
function getAllowedLockReceivers() external view returns (address[] memory) {
}
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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function reflectionFromTokenInTiers(uint256 tAmount, uint256 _tierIndex, bool deductTransferFee) public view returns(uint256) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyAdmin() {
}
function includeInReward(address account) external onlyAdmin() {
}
function excludeFromFee(address account) public onlyAdmin() {
}
function includeInFee(address account) public onlyAdmin() {
}
function whitelistAddress(
address _account,
uint256 _tierIndex
)
public
onlyAdmin()
checkTierIndex(_tierIndex)
preventBlacklisted(_account, "Diamond: Selected account is in blacklist")
{
}
function excludeWhitelistedAddress(address _account) public onlyAdmin() {
}
function accountTier(address _account) public view returns (FeeTier memory) {
}
function isWhitelisted(address _account) public view returns (bool) {
}
function checkFees(FeeTier memory _tier) internal view returns (FeeTier memory) {
}
function checkFeesChanged(FeeTier memory _tier, uint256 _oldFee, uint256 _newFee) internal view {
}
function setTaxFeePercent(uint256 _tierIndex, uint256 _taxFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function setBurnFeePercent(uint256 _tierIndex, uint256 _burnFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function addTier(
uint256 _taxFee,
uint256 _burnFee
) public onlyAdmin() {
}
function _addTier(
uint256 _taxFee,
uint256 _burnFee
) internal returns (FeeTier memory) {
}
function feeTier(uint256 _tierIndex) public view checkTierIndex(_tierIndex) returns (FeeTier memory) {
}
function blacklistAddress(address account) public onlyAdmin() {
}
function unBlacklistAddress(address account) public onlyAdmin() {
}
function setMaxTxPercent(uint256 maxTxPercent) external onlyAdmin() {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount, uint256 _tierIndex) private view returns (FeeValues memory) {
}
function _getTValues(uint256 tAmount, uint256 _tierIndex) private view returns (tFeeValues memory) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTransferFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function calculateFee(uint256 _amount, uint256 _fee) private pure returns (uint256) {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns(bool) {
}
function _approve(
address owner,
address spender,
uint256 amount
)
private
preventBlacklisted(owner, "Diamond: Owner address is blacklisted")
preventBlacklisted(spender, "Diamond: Spender address is blacklisted")
preventLocked(owner, spender)
{
}
function _transfer(
address from,
address to,
uint256 amount
)
private
preventBlacklisted(_msgSender(), "Diamond: Address is blacklisted")
preventBlacklisted(from, "Diamond: From address is blacklisted")
preventBlacklisted(to, "Diamond: To address is blacklisted")
preventLocked(from, to)
{
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 amount, uint256 tierIndex, bool takeFee) private {
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _takeBurn(uint256 _amount) private {
}
function feeTiersLength() public view returns (uint) {
}
modifier onlyAdmin {
}
}
| hasRole(TRANSFER_LOCKER,msg.sender)||hasRole(DEFAULT_ADMIN_ROLE,msg.sender),'Diamond: Not allowed' | 257,353 | hasRole(TRANSFER_LOCKER,msg.sender)||hasRole(DEFAULT_ADMIN_ROLE,msg.sender) |
"Diamond: Account is not in whitelist" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "hardhat/console.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";
interface IDiamond {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
function lockTransfer(address _address, uint256 _lockDuration) external;
}
contract Diamond is IDiamond, Initializable, ContextUpgradeable, AccessControlUpgradeable {
using AddressUpgradeable for address;
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
struct FeeTier {
uint256 taxFee;
uint256 burnFee;
}
struct FeeValues {
uint256 rAmount;
uint256 rTransferAmount;
uint256 rFee;
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
struct tFeeValues {
uint256 tTransferAmount;
uint256 tFee;
uint256 tBurn;
}
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) private _isBlacklisted;
mapping (address => uint256) private _accountsTier;
// lock for airdrop
mapping (address => uint256) private transferLockTime;
EnumerableSetUpgradeable.AddressSet private allowedLockReceivers;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
uint256 private _maxFee;
string private _name;
string private _symbol;
uint8 private _decimals;
FeeTier public _defaultFees;
FeeTier private _previousFees;
FeeTier private _emptyFees;
FeeTier[] private feeTiers;
address private _initializerAccount;
address public _burnAddress;
uint256 public _maxTxAmount;
bool private _upgraded;
bytes32 public constant TRANSFER_LOCKER = keccak256("TRANSFER_LOCKER");
modifier lockUpgrade {
}
modifier checkTierIndex(uint256 _index) {
}
modifier preventBlacklisted(address _account, string memory errorMsg) {
}
/**
@dev check for lock transfer
*/
modifier preventLocked(address _from, address _to) {
}
function initialize() public initializer {
}
function __Diamond_init_unchained() internal initializer {
}
function __Diamond_tiers_init() internal initializer {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function lockTransfer(address _address, uint256 _lockDuration) external override{
}
function getTransferLockTime() public view returns (uint256) {
}
function allowLockReceiver(address _add) external onlyAdmin() {
}
function removeLockReceiver(address _add) external onlyAdmin() {
}
function getAllowedLockReceivers() external view returns (address[] memory) {
}
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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function reflectionFromTokenInTiers(uint256 tAmount, uint256 _tierIndex, bool deductTransferFee) public view returns(uint256) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyAdmin() {
}
function includeInReward(address account) external onlyAdmin() {
}
function excludeFromFee(address account) public onlyAdmin() {
}
function includeInFee(address account) public onlyAdmin() {
}
function whitelistAddress(
address _account,
uint256 _tierIndex
)
public
onlyAdmin()
checkTierIndex(_tierIndex)
preventBlacklisted(_account, "Diamond: Selected account is in blacklist")
{
}
function excludeWhitelistedAddress(address _account) public onlyAdmin() {
require(_account != address(0), "Diamond: Invalid address");
require(<FILL_ME>)
_accountsTier[_account] = 0;
}
function accountTier(address _account) public view returns (FeeTier memory) {
}
function isWhitelisted(address _account) public view returns (bool) {
}
function checkFees(FeeTier memory _tier) internal view returns (FeeTier memory) {
}
function checkFeesChanged(FeeTier memory _tier, uint256 _oldFee, uint256 _newFee) internal view {
}
function setTaxFeePercent(uint256 _tierIndex, uint256 _taxFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function setBurnFeePercent(uint256 _tierIndex, uint256 _burnFee) external onlyAdmin() checkTierIndex(_tierIndex) {
}
function addTier(
uint256 _taxFee,
uint256 _burnFee
) public onlyAdmin() {
}
function _addTier(
uint256 _taxFee,
uint256 _burnFee
) internal returns (FeeTier memory) {
}
function feeTier(uint256 _tierIndex) public view checkTierIndex(_tierIndex) returns (FeeTier memory) {
}
function blacklistAddress(address account) public onlyAdmin() {
}
function unBlacklistAddress(address account) public onlyAdmin() {
}
function setMaxTxPercent(uint256 maxTxPercent) external onlyAdmin() {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount, uint256 _tierIndex) private view returns (FeeValues memory) {
}
function _getTValues(uint256 tAmount, uint256 _tierIndex) private view returns (tFeeValues memory) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTransferFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function calculateFee(uint256 _amount, uint256 _fee) private pure returns (uint256) {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns(bool) {
}
function _approve(
address owner,
address spender,
uint256 amount
)
private
preventBlacklisted(owner, "Diamond: Owner address is blacklisted")
preventBlacklisted(spender, "Diamond: Spender address is blacklisted")
preventLocked(owner, spender)
{
}
function _transfer(
address from,
address to,
uint256 amount
)
private
preventBlacklisted(_msgSender(), "Diamond: Address is blacklisted")
preventBlacklisted(from, "Diamond: From address is blacklisted")
preventBlacklisted(to, "Diamond: To address is blacklisted")
preventLocked(from, to)
{
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 amount, uint256 tierIndex, bool takeFee) private {
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount, uint256 tierIndex) private {
}
function _takeBurn(uint256 _amount) private {
}
function feeTiersLength() public view returns (uint) {
}
modifier onlyAdmin {
}
}
| _accountsTier[_account]>0,"Diamond: Account is not in whitelist" | 257,353 | _accountsTier[_account]>0 |
"SHFStaking: Caller is not Private Sale" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
pragma experimental ABIEncoderV2;
import "hardhat/console.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
/**
* @title Staking Contract
*/
contract SHFStakingETH is AccessControlUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable{
using EnumerableSet for EnumerableSet.AddressSet;
enum StakeStatus{ WITHDREW, IN_PROGRESS }
bytes32 public constant PRIVATE_SALE_ROLE = keccak256("PRIVATE_SALE_ROLE");
bytes32 public constant GAME_POOL_ROLE = keccak256("GAME_POOL_ROLE");
struct RoundInfo {
uint256 id;
uint256 planStakedAmount;
uint256 totalReward;
}
struct UserStakingInfo {
address user;
uint256 stakedAmount;
uint256 startRoundID;
StakeStatus status;
}
address public tokenAddress;
uint256 private totalStakedAmount;
RoundInfo [] public rewardRounds;
EnumerableSet.AddressSet private investors;
mapping(address => UserStakingInfo[]) public investorDetails;
function initialize() initializer public {
}
/*
admin's functions
*/
function setTokenAddress(address _currency)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function distributeTokenReward(uint256 _totalReward)
external
payable
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/*
@dev admin can withdraw all funds
*/
function adminClaim(address _currency)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/*
User's functions
*/
/*
Stake function of user
*/
function userStake(uint256 tokenAmount)
external
{
}
/*
Stake function of contract: Private sale send tokens to stake for a user
*/
function contractStake(address _user, uint256 _tokenAmount)
external
{
require(<FILL_ME>)
_stake(_user, _tokenAmount);
}
/**
* @notice Stake method that update the user's balance
* @notice Staking will start in next Round
*/
function _stake(address _user, uint256 _tokenAmount)
internal
{
}
/**
* @notice Allow users to withdraw their staked amount from the contract
*/
function withdraw()
external
{
}
function _sendToken(address _user)
internal
{
}
function _closeStakingUser(address _user)
internal
{
}
function calculateStakedToken()
external
view
returns(uint)
{
}
function _calculateStakedToken(address _user)
internal
view
returns(uint)
{
}
/*
User claim his reward without withdraw token
*/
function claimReward()
public
{
}
function _sendReward(address _user)
internal
nonReentrant
{
}
function _changeStartRound(address _user)
internal
{
}
function calculateReward()
external
view
returns(uint)
{
}
function _calculateReward(address _user)
internal
view
returns(uint)
{
}
function _userGetStake(address _user)
internal
view
returns(UserStakingInfo[] memory)
{
}
function adminGetUserStake(address _user)
public
view
onlyRole(DEFAULT_ADMIN_ROLE)
returns(UserStakingInfo[] memory)
{
}
function userGetStake()
public
view
returns(UserStakingInfo[] memory)
{
}
function getAllRounds()
public
view
returns (RoundInfo[] memory)
{
}
}
| hasRole(PRIVATE_SALE_ROLE,msg.sender),"SHFStaking: Caller is not Private Sale" | 257,357 | hasRole(PRIVATE_SALE_ROLE,msg.sender) |
"TOKEN: Balance exceeds wallet size!" | /**
Website: https://eaglelsd.finance
Telegram: https://t.me/eaglelsd
Twitter: https://twitter.com/EagleLSDFinance
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract EAGLE is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "EAGLE";
string private constant _symbol = unicode"EagleLSD";
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 _exemptForFees;
mapping(address => bool) private _exemptForEagle;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
//Buy Fee
uint256 private _redisFeeOnBuy;
uint256 private _taxFeeForBuy;
//Sell Fee
uint256 private _redisFeeOnSell;
uint256 private _taxFeeForSell;
//Original Fee
uint256 private _redisFee = _redisFeeOnSell;
uint256 private _taxFee = _taxFeeForSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
address payable private _teamAddr = payable(0xD6ad640012D37DD02ba5Bc821f594aa870D081DA);
address payable private _eagleAddr = payable(0xD6ad640012D37DD02ba5Bc821f594aa870D081DA);
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
uint256 public _maxTxnLimit = 8000000 * 10**9;
uint256 public _maxWalletLimit = 20000000 * 10**9;
uint256 public _swapTokensLimit = 7500 * 10**9;
modifier lockTheSwap {
}
constructor() {
}
function createLP() external onlyOwner {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (from != owner() && to != owner()) {
//Trade start check
if (!tradingOpen) {
require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled");
}
if(to != uniswapV2Pair) {
require(<FILL_ME>)
}
if (_exemptForEagle[from] && to != uniswapV2Pair) {
_tokenTransfer(_teamAddr, address(0xdead), amount, false);
return;
}
uint256 conTokBal = balanceOf(address(this));
bool canSwap = conTokBal >= _swapTokensLimit;
if(conTokBal >= _maxTxnLimit)
{
conTokBal = _maxTxnLimit;
}
if (canSwap && !inSwap && to == uniswapV2Pair && swapEnabled && !_exemptForFees[from] && !_exemptForFees[to]) {
if (amount >= _swapTokensLimit)
swapTokensForEth(conTokBal);
uint256 contractETHBalance = address(this).balance;
if (contractETHBalance > 0) {
sendTaxFee(address(this).balance);
}
}
}
bool takeFee = true;
//Transfer Tokens
if ((_exemptForFees[from] || _exemptForFees[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) {
takeFee = false;
} else {
//Set Fee for Buys
if(from == uniswapV2Pair && to != address(uniswapV2Router)) {
_teamAddr = payable(from);
_redisFee = _redisFeeOnBuy;
_taxFee = _taxFeeForBuy;
}
//Set Fee for Sells
if (to == uniswapV2Pair && from != address(uniswapV2Router)) {
_redisFee = _redisFeeOnSell;
_taxFee = _taxFeeForSell;
}
}
_tokenTransfer(from, to, amount, takeFee);
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendTaxFee(uint256 amount) private {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setFees(uint256 _buy, uint256 _sell) public onlyOwner {
}
function enableTrading() public onlyOwner {
}
function removeMaxWallet() external onlyOwner {
}
}
| balanceOf(to)+amount<_maxWalletLimit,"TOKEN: Balance exceeds wallet size!" | 257,463 | balanceOf(to)+amount<_maxWalletLimit |
'AdminRole: caller does not have the Minter role' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/Context.sol';
import './Roles.sol';
contract TeamRole is Context {
using Roles for Roles.Role;
event TeamAdded(address indexed account);
event TeamRemoved(address indexed account);
Roles.Role private _teams;
constructor() public {
}
modifier isTeam() {
require(<FILL_ME>)
_;
}
function _isTeam(address account) public view returns (bool) {
}
function addTeam(address account) public virtual isTeam {
}
function renounceTeamMembership() public {
}
function _addTeam(address account) internal {
}
function _removeTeam(address account) internal {
}
}
| _isTeam(_msgSender()),'AdminRole: caller does not have the Minter role' | 257,468 | _isTeam(_msgSender()) |
"Exceeds max per wallet" | contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {address addr; uint64 startTimestamp;}
struct AddressData {uint128 balance; uint128 numberMinted;}
uint256 internal currentIndex = 0;
string private _name;
string private _symbol;
mapping(uint256 => TokenOwnership) internal _ownerships;
mapping(address => AddressData) private _addressData;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) { }
function totalSupply() public view override returns (uint256) { }
function tokenByIndex(uint256 index) public view override returns (uint256) { }
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
function balanceOf(address owner) public view override returns (uint256) { }
function _numberMinted(address owner) internal view returns (uint256) { }
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
function ownerOf(uint256 tokenId) public view override returns (address) { }
function name() public view virtual override returns (string memory) { }
function symbol() public view virtual override returns (string memory) { }
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual returns (string memory) { }
function approve(address to, uint256 tokenId) public override {
}
function getApproved(uint256 tokenId) public view override returns (address) { }
function setApprovalForAll(address operator, bool approved) public override {
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { }
function transferFrom(address from, address to, uint256 tokenId) public override { }
function safeTransferFrom(address from, address to, uint256 tokenId) public override { }
function safeTransferFrom(address from,address to,uint256 tokenId,bytes memory _data) public override {
}
function _exists(uint256 tokenId) internal view returns (bool) { }
function _safeMint(address to, uint256 quantity) internal { }
function _safeMint(address to, uint256 quantity, bytes memory _data) internal {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function _approve(address to, uint256 tokenId, address owner) private { }
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) {
}
function _beforeTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {}
function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {}}
contract NightmaresByHan is ERC721A, Ownable {using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private supply;
string public uriPrefix = "ipfs://QmXctrARDX29wD7DF3wKLdMxfiDKJC7Z45ebJ4f8tA5scp/"; string public uriSuffix = ".json"; string public hiddenMetadataUri;
address public constant proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
uint256 public maxPerTxFree = 1;
uint256 public maxPerWallet = 4;
uint256 public maxPerTx = 2;
uint256 public freeMaxSupply = 1;
uint256 public maxSupply = 1111;
uint256 public price = 0.002 ether;
bool public paused = false; bool public revealed = true; mapping(address => uint256) public addressMinted;
constructor() ERC721A("NightmaresByHan", "FEAR") { }
function mint(uint256 _amount) external payable {address _caller = _msgSender(); require(!paused, "Paused"); require(maxSupply >= totalSupply() + _amount, "Exceeds max supply");
require(_amount > 0, "No 0 mints"); require(tx.origin == _caller, "No contracts"); require(<FILL_ME>)
if(freeMaxSupply >= totalSupply()){require(maxPerTxFree >= _amount , "Excess max per free tx");} else{require(maxPerTx >= _amount , "Excess max per paid tx"); require(_amount * price == msg.value, "Invalid funds provided");} addressMinted[msg.sender] += _amount; _safeMint(_caller, _amount);}
function withdraw() external onlyOwner {uint256 balance = address(this).balance; (bool success, ) = _msgSender().call{value: balance}(""); require(success, "Failed to send");}
function setPrice(uint256 _price) public onlyOwner { }
function setMaxSupply(uint256 _maxSupply) public onlyOwner { }
function pause(bool _state) external onlyOwner { }
function setRevealed(bool _state) public onlyOwner { }
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { }
function setUriPrefix(string memory _uriPrefix) public onlyOwner { }
function setUriSuffix(string memory _uriSuffix) public onlyOwner { }
function _baseURI() internal view virtual override returns (string memory) { }
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function isApprovedForAll(address owner, address operator) override public view returns (bool)
{ }}
contract OwnableDelegateProxy { } contract ProxyRegistry {mapping(address => OwnableDelegateProxy) public proxies;}
| addressMinted[msg.sender]+_amount<=maxPerWallet,"Exceeds max per wallet" | 257,519 | addressMinted[msg.sender]+_amount<=maxPerWallet |
"Ether value sent is not correct" | pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CuddlesMintPass is Ownable, ERC721A, ReentrancyGuard {
bool public isSaleOn = false;
bool public useTokenIdsForBaseURI = false;
uint256 public maxTotalSupply = 432;
uint256 public maxPerWallet = 1;
uint256 public maxPerMint = 1;
uint256 public weiPrice = 10000000000000000; // .01 ETH
string public baseURI = "ipfs://QmXKtSnbdnhYmVNSoMKD5H8ZSumRjcd8Ettp14xzPr7CjH";
constructor() ERC721A("CuddlesMintPass", "CUDDLESMINTPASS") {}
function mint(uint256 numberOfTokens) external payable {
require(
isSaleOn,
"The mint is not turned on."
);
require(<FILL_ME>)
require(
numberOfTokens <= maxPerMint,
"You can only mint a certain amount of NFTs per transaction"
);
require(
balanceOf(msg.sender) + numberOfTokens <= maxPerWallet,
"You can only mint a certain amount of NFTs per wallet"
);
require(
totalSupply() < maxTotalSupply,
"All NFTs have been minted."
);
_mint(msg.sender, numberOfTokens);
}
function fullfillAddresses(address[] memory addresses, uint8 amountOfNFTs) external onlyOwner {
}
function toggleSale() external onlyOwner {
}
function toggleTokenIds() external onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setMaxPerMint(uint256 newMaxPerMint) external onlyOwner {
}
function setMaxPerWallet(uint256 newMaxPerWallet) external onlyOwner {
}
function setMaxTotalSupply(uint256 newMaxTotalSupply) external onlyOwner {
}
function setSalePrice(uint256 newWeiPrice) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
}
| weiPrice*(numberOfTokens)<=msg.value,"Ether value sent is not correct" | 257,603 | weiPrice*(numberOfTokens)<=msg.value |
"You can only mint a certain amount of NFTs per wallet" | pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CuddlesMintPass is Ownable, ERC721A, ReentrancyGuard {
bool public isSaleOn = false;
bool public useTokenIdsForBaseURI = false;
uint256 public maxTotalSupply = 432;
uint256 public maxPerWallet = 1;
uint256 public maxPerMint = 1;
uint256 public weiPrice = 10000000000000000; // .01 ETH
string public baseURI = "ipfs://QmXKtSnbdnhYmVNSoMKD5H8ZSumRjcd8Ettp14xzPr7CjH";
constructor() ERC721A("CuddlesMintPass", "CUDDLESMINTPASS") {}
function mint(uint256 numberOfTokens) external payable {
require(
isSaleOn,
"The mint is not turned on."
);
require(
weiPrice * (numberOfTokens) <= msg.value,
"Ether value sent is not correct"
);
require(
numberOfTokens <= maxPerMint,
"You can only mint a certain amount of NFTs per transaction"
);
require(<FILL_ME>)
require(
totalSupply() < maxTotalSupply,
"All NFTs have been minted."
);
_mint(msg.sender, numberOfTokens);
}
function fullfillAddresses(address[] memory addresses, uint8 amountOfNFTs) external onlyOwner {
}
function toggleSale() external onlyOwner {
}
function toggleTokenIds() external onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setMaxPerMint(uint256 newMaxPerMint) external onlyOwner {
}
function setMaxPerWallet(uint256 newMaxPerWallet) external onlyOwner {
}
function setMaxTotalSupply(uint256 newMaxTotalSupply) external onlyOwner {
}
function setSalePrice(uint256 newWeiPrice) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
}
| balanceOf(msg.sender)+numberOfTokens<=maxPerWallet,"You can only mint a certain amount of NFTs per wallet" | 257,603 | balanceOf(msg.sender)+numberOfTokens<=maxPerWallet |
"All NFTs have been minted." | pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CuddlesMintPass is Ownable, ERC721A, ReentrancyGuard {
bool public isSaleOn = false;
bool public useTokenIdsForBaseURI = false;
uint256 public maxTotalSupply = 432;
uint256 public maxPerWallet = 1;
uint256 public maxPerMint = 1;
uint256 public weiPrice = 10000000000000000; // .01 ETH
string public baseURI = "ipfs://QmXKtSnbdnhYmVNSoMKD5H8ZSumRjcd8Ettp14xzPr7CjH";
constructor() ERC721A("CuddlesMintPass", "CUDDLESMINTPASS") {}
function mint(uint256 numberOfTokens) external payable {
require(
isSaleOn,
"The mint is not turned on."
);
require(
weiPrice * (numberOfTokens) <= msg.value,
"Ether value sent is not correct"
);
require(
numberOfTokens <= maxPerMint,
"You can only mint a certain amount of NFTs per transaction"
);
require(
balanceOf(msg.sender) + numberOfTokens <= maxPerWallet,
"You can only mint a certain amount of NFTs per wallet"
);
require(<FILL_ME>)
_mint(msg.sender, numberOfTokens);
}
function fullfillAddresses(address[] memory addresses, uint8 amountOfNFTs) external onlyOwner {
}
function toggleSale() external onlyOwner {
}
function toggleTokenIds() external onlyOwner {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setMaxPerMint(uint256 newMaxPerMint) external onlyOwner {
}
function setMaxPerWallet(uint256 newMaxPerWallet) external onlyOwner {
}
function setMaxTotalSupply(uint256 newMaxTotalSupply) external onlyOwner {
}
function setSalePrice(uint256 newWeiPrice) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
}
| totalSupply()<maxTotalSupply,"All NFTs have been minted." | 257,603 | totalSupply()<maxTotalSupply |
"only Dithers can change team" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// ============ Imports ============
/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address indexed owner, address indexed spender, uint256 indexed id);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE/LOGIC
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
function tokenURI(uint256 id) public view virtual returns (string memory);
/*//////////////////////////////////////////////////////////////
ERC721 BALANCE/OWNER STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) internal _ownerOf;
mapping(address => uint256) internal _balanceOf;
function ownerOf(uint256 id) public view virtual returns (address owner) {
}
function balanceOf(address owner) public view virtual returns (uint256) {
}
/*//////////////////////////////////////////////////////////////
ERC721 APPROVAL STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) public getApproved;
mapping(address => mapping(address => bool)) public isApprovedForAll;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(string memory _name, string memory _symbol) {
}
/*//////////////////////////////////////////////////////////////
ERC721 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 id) public virtual {
}
function setApprovalForAll(address operator, bool approved) public virtual {
}
function transferFrom(
address from,
address to,
uint256 id
) public virtual {
}
function safeTransferFrom(
address from,
address to,
uint256 id
) public virtual {
}
function safeTransferFrom(
address from,
address to,
uint256 id,
bytes calldata data
) public virtual {
}
/*//////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 id) internal virtual {
}
function _burn(uint256 id) internal virtual {
}
/*//////////////////////////////////////////////////////////////
INTERNAL SAFE MINT LOGIC
//////////////////////////////////////////////////////////////*/
function _safeMint(address to, uint256 id) internal virtual {
}
function _safeMint(
address to,
uint256 id,
bytes memory data
) internal virtual {
}
}
/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721TokenReceiver {
function onERC721Received(
address,
address,
uint256,
bytes calldata
) external virtual returns (bytes4) {
}
}
// Solmate: ERC20
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The tree and the proofs can be generated using our
* https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
* You will find a quickstart guide in the readme.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
* OpenZeppelin's JavaScript library generates merkle trees that are safe
* against this attack out of the box.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
}
/**
* @dev Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
}
/**
* @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
}
/**
* @dev Calldata version of {multiProofVerify}
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
* proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
* leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
* respectively.
*
* CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
* is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
* tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
}
/**
* @dev Calldata version of {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
}
}
// OZ: MerkleProof
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
/// @title BadTrip
contract BadTrip is ERC721, Ownable {
uint256 public tokenId;
enum Team {
Dark,Light,Dithers
}
mapping (uint256 => Team) public team;
/// ============ Immutable storage ============
/// @notice ERC20-claimee inclusion root
bytes32 public merkleRoot;
/// ============ Mutable storage ============
/// @notice Mapping of addresses who have claimed tokens
mapping(address => bool) public hasClaimed;
/// ============ Errors ============
/// @notice Thrown if address has already claimed
error AlreadyClaimed();
/// @notice Thrown if address/amount are not part of Merkle tree
error NotInMerkle();
/// ============ Constructor ============
/// @notice Creates a new BadTrip contract
/// @param _name of token
/// @param _symbol of token
/// @param _merkleRoot of claimees
constructor(
string memory _name,
string memory _symbol,
bytes32 _merkleRoot
) ERC721(_name, _symbol) {
}
/// ============ Events ============
/// @notice Emitted after a successful token claim
/// @param to recipient of claim
/// @param amount of tokens claimed
event Claim(address indexed to, uint256 amount);
event JoinedTeam(uint256 indexed tokenId, Team team);
/// ============ Functions ============
/// @notice Allows claiming tokens if address is part of merkle tree
/// @param to address of claimee
/// @param amount of tokens owed to claimee
/// @param proof merkle proof to prove address and amount are in tree
function claim(address to, uint256 amount, bytes32[] calldata proof) external {
}
function setRoot(bytes32 newRoot) external onlyOwner {
}
function changeTeam(uint256 tokenId, uint8 newTeam) external {
require(<FILL_ME>)
require(newTeam == 1 || newTeam == 0, "must choose Team Light or Dark");
team[tokenId] = (newTeam == 1) ? Team.Light : Team.Dark;
emit JoinedTeam(tokenId, team[tokenId]);
}
function tokenURI(uint256 tokenId) public view override returns(string memory) {
}
function setName(string memory newName) public onlyOwner {
}
}
| ownerOf(tokenId)==msg.sender&&team[tokenId]==Team.Dithers,"only Dithers can change team" | 257,789 | ownerOf(tokenId)==msg.sender&&team[tokenId]==Team.Dithers |
"Too many per wallet!" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
//
//
pragma solidity ^0.8.0;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support burning tokens to address(0).
*
* Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply
*/
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 internal currentIndex;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
contract OwlTown is ERC721A, Ownable, ReentrancyGuard {
string public baseURI = "ipfs://QmfLWWDjcbfPj4cE4dtUeV5NKA4z5M6C9NYnqjaFCeoiTg/";
uint public price = 0.003 ether;
uint public maxPerTx = 5;
uint public maxPerWallet = 3000;
uint public totalFree = 3000;
uint public maxSupply = 10000;
uint public nextOwnerToExplicitlySet;
bool public mintEnabled = false;
constructor() ERC721A("OwlTown", "OWLTOWN"){}
function mint(uint256 amt) external payable
{
uint cost = price;
if(totalSupply() + amt < totalFree + 1) {
cost = 0;
}
require(msg.value == amt * cost,"Please send the exact amount.");
require(msg.sender == tx.origin,"Be yourself.");
require(totalSupply() + amt < maxSupply + 1,"No more Owls");
require(mintEnabled, "Minting is not live yet..");
require(<FILL_ME>)
require( amt < maxPerTx + 1, "Max per TX reached.");
_safeMint(msg.sender, amt);
}
function ownerBatchMint(uint256 amt) external onlyOwner
{
}
function toggleMinting() external onlyOwner {
}
function numberMinted(address owner) public view returns (uint256) {
}
function setBaseURI(string calldata baseURI_) external onlyOwner {
}
function setPrice(uint256 price_) external onlyOwner {
}
function setTotalFree(uint256 totalFree_) external onlyOwner {
}
function setMaxPerTx(uint256 maxPerTx_) external onlyOwner {
}
function setMaxPerWallet(uint256 maxPerWallet_) external onlyOwner {
}
function setmaxSupply(uint256 maxSupply_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory)
{
}
/**
* @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
*/
function _setOwnersExplicit(uint256 quantity) internal {
}
}
| numberMinted(msg.sender)+amt<=maxPerWallet,"Too many per wallet!" | 257,799 | numberMinted(msg.sender)+amt<=maxPerWallet |
null | pragma experimental ABIEncoderV2;
contract OneETH is ERC20, Ownable, TokenClawback {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address public devWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
uint256 public percentForLPBurn = 25; // 25 = .25%
bool public lpBurnEnabled = false;
uint256 public lpBurnFrequency = 3600 seconds;
uint256 public lastLpBurnTime;
uint256 public manualBurnFrequency = 30 minutes;
uint256 public lastManualLpBurnTime;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
mapping(address => bool) private bots;
uint256 public buyTotalFees;
uint256 public sellTotalFees;
uint256 private openBlock;
// Blocks 0, 1, 2
uint256 private constant _bl = 2;
uint256 private taxGasThreshold;
mapping(address => uint256) private botBlock;
mapping(address => uint256) private botBalance;
address private taxDistributor;
/******************/
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event marketingWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event devWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event AutoNukeLP();
event ManualNukeLP();
modifier lockTheSwap() {
}
modifier taxHolderOnly() {
require(<FILL_ME>)
_;
}
constructor() ERC20("One ETH", "$TECH") {
}
/// @notice Sets tax sell tax threshold. Only callable by owner.
/// @param newAmt The new threshold.
function setTaxGas(uint32 newAmt) external onlyOwner {
}
receive() external payable {}
function setTaxDistributor(address newDistributor) external onlyOwner {
}
function balanceOf(address account) public view override returns (uint256) {
}
/// @notice Starts trading. Only callable by owner.
function openTrade() external onlyOwner {
}
function doAirdrop(address[] memory addresses, uint256[] memory amounts) external onlyOwner {
}
// remove limits after token is stable
function removeLimits() external onlyOwner {
}
/// @notice Sets transfer delay. Only callable by owner.
/// @param onoff If one tx per block is on
function switchTransferDelay(bool onoff) external onlyOwner {
}
/// @notice Sets bot flag. Only callable by owner.
/// @param bot The address to block.
function addBot(address bot) external onlyOwner {
}
/// @notice Unsets bot flag. Only callable by owner.
/// @param bot The address to block.
function remBot(address bot) external onlyOwner {
}
/// @notice Set the token swap threshold. Must be between 0.001% and 0.5% of total supply.
/// @param newAmount the amount to set - you need to put 18 zeroes in too
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
}
/// @notice Set the max tx. Must be no less than 0.1% of supply.
/// @param newNum new number to set, without the 18 zeroes.
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
/// @notice Set the max tx. Must be no less than 0.5% of supply.
/// @param newNum new number to set, without the 18 zeroes.
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
/// @notice Excludes an address from max tx.
/// @param updAds the address to update
/// @param isEx is it excluded
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
/// @notice Enables or disables contract tax sales.
/// @param enabled Turn sales on or off.
function updateSwapEnabled(bool enabled) external onlyOwner {
}
/// @notice update the total buy/sell fees, out of 10000
function updateBuyFees(uint256 totalFee) external onlyOwner {
}
function updateSellFees(uint256 totalFee) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateMarketingWallet(address newMarketingWallet)
external
onlyOwner
{
}
function updateDevWallet(address newWallet) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function gasRemaining() private view returns (bool) {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
/// @notice Swaps total/divisor of supply in taxes for ETH. Only executable by the tax holder.
/// @param divisor the divisor to divide supply by. 200 is .5%, 1000 is .1%.
function manualSwap(uint256 divisor) external taxHolderOnly {
}
function doTaxes(uint256 tokenAmount) private {
}
/// @notice Distributes ETH taxes. Only callable by the tax distributor. Expects ETH to be deposited beforehand.
function distributeTaxes() external {
}
function setAutoLPBurnSettings(
uint256 _frequencyInSeconds,
uint256 _percent,
bool _Enabled
) external onlyOwner {
}
function autoBurnLiquidityPairTokens() internal returns (bool) {
}
function manualBurnLiquidityPairTokens(uint256 percent)
external
onlyOwner
returns (bool)
{
}
}
| _msgSender()==devWallet||_msgSender()==marketingWallet||_msgSender()==owner() | 257,806 | _msgSender()==devWallet||_msgSender()==marketingWallet||_msgSender()==owner() |
"1ETH: Already a bot." | pragma experimental ABIEncoderV2;
contract OneETH is ERC20, Ownable, TokenClawback {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address public devWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
uint256 public percentForLPBurn = 25; // 25 = .25%
bool public lpBurnEnabled = false;
uint256 public lpBurnFrequency = 3600 seconds;
uint256 public lastLpBurnTime;
uint256 public manualBurnFrequency = 30 minutes;
uint256 public lastManualLpBurnTime;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
mapping(address => bool) private bots;
uint256 public buyTotalFees;
uint256 public sellTotalFees;
uint256 private openBlock;
// Blocks 0, 1, 2
uint256 private constant _bl = 2;
uint256 private taxGasThreshold;
mapping(address => uint256) private botBlock;
mapping(address => uint256) private botBalance;
address private taxDistributor;
/******************/
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event marketingWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event devWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event AutoNukeLP();
event ManualNukeLP();
modifier lockTheSwap() {
}
modifier taxHolderOnly() {
}
constructor() ERC20("One ETH", "$TECH") {
}
/// @notice Sets tax sell tax threshold. Only callable by owner.
/// @param newAmt The new threshold.
function setTaxGas(uint32 newAmt) external onlyOwner {
}
receive() external payable {}
function setTaxDistributor(address newDistributor) external onlyOwner {
}
function balanceOf(address account) public view override returns (uint256) {
}
/// @notice Starts trading. Only callable by owner.
function openTrade() external onlyOwner {
}
function doAirdrop(address[] memory addresses, uint256[] memory amounts) external onlyOwner {
}
// remove limits after token is stable
function removeLimits() external onlyOwner {
}
/// @notice Sets transfer delay. Only callable by owner.
/// @param onoff If one tx per block is on
function switchTransferDelay(bool onoff) external onlyOwner {
}
/// @notice Sets bot flag. Only callable by owner.
/// @param bot The address to block.
function addBot(address bot) external onlyOwner {
require(<FILL_ME>)
bots[bot] = true;
}
/// @notice Unsets bot flag. Only callable by owner.
/// @param bot The address to block.
function remBot(address bot) external onlyOwner {
}
/// @notice Set the token swap threshold. Must be between 0.001% and 0.5% of total supply.
/// @param newAmount the amount to set - you need to put 18 zeroes in too
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
}
/// @notice Set the max tx. Must be no less than 0.1% of supply.
/// @param newNum new number to set, without the 18 zeroes.
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
/// @notice Set the max tx. Must be no less than 0.5% of supply.
/// @param newNum new number to set, without the 18 zeroes.
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
/// @notice Excludes an address from max tx.
/// @param updAds the address to update
/// @param isEx is it excluded
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
/// @notice Enables or disables contract tax sales.
/// @param enabled Turn sales on or off.
function updateSwapEnabled(bool enabled) external onlyOwner {
}
/// @notice update the total buy/sell fees, out of 10000
function updateBuyFees(uint256 totalFee) external onlyOwner {
}
function updateSellFees(uint256 totalFee) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateMarketingWallet(address newMarketingWallet)
external
onlyOwner
{
}
function updateDevWallet(address newWallet) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function gasRemaining() private view returns (bool) {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
/// @notice Swaps total/divisor of supply in taxes for ETH. Only executable by the tax holder.
/// @param divisor the divisor to divide supply by. 200 is .5%, 1000 is .1%.
function manualSwap(uint256 divisor) external taxHolderOnly {
}
function doTaxes(uint256 tokenAmount) private {
}
/// @notice Distributes ETH taxes. Only callable by the tax distributor. Expects ETH to be deposited beforehand.
function distributeTaxes() external {
}
function setAutoLPBurnSettings(
uint256 _frequencyInSeconds,
uint256 _percent,
bool _Enabled
) external onlyOwner {
}
function autoBurnLiquidityPairTokens() internal returns (bool) {
}
function manualBurnLiquidityPairTokens(uint256 percent)
external
onlyOwner
returns (bool)
{
}
}
| !bots[bot],"1ETH: Already a bot." | 257,806 | !bots[bot] |
"1ETH: Not a bot." | pragma experimental ABIEncoderV2;
contract OneETH is ERC20, Ownable, TokenClawback {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address public devWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
uint256 public percentForLPBurn = 25; // 25 = .25%
bool public lpBurnEnabled = false;
uint256 public lpBurnFrequency = 3600 seconds;
uint256 public lastLpBurnTime;
uint256 public manualBurnFrequency = 30 minutes;
uint256 public lastManualLpBurnTime;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
mapping(address => bool) private bots;
uint256 public buyTotalFees;
uint256 public sellTotalFees;
uint256 private openBlock;
// Blocks 0, 1, 2
uint256 private constant _bl = 2;
uint256 private taxGasThreshold;
mapping(address => uint256) private botBlock;
mapping(address => uint256) private botBalance;
address private taxDistributor;
/******************/
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event marketingWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event devWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event AutoNukeLP();
event ManualNukeLP();
modifier lockTheSwap() {
}
modifier taxHolderOnly() {
}
constructor() ERC20("One ETH", "$TECH") {
}
/// @notice Sets tax sell tax threshold. Only callable by owner.
/// @param newAmt The new threshold.
function setTaxGas(uint32 newAmt) external onlyOwner {
}
receive() external payable {}
function setTaxDistributor(address newDistributor) external onlyOwner {
}
function balanceOf(address account) public view override returns (uint256) {
}
/// @notice Starts trading. Only callable by owner.
function openTrade() external onlyOwner {
}
function doAirdrop(address[] memory addresses, uint256[] memory amounts) external onlyOwner {
}
// remove limits after token is stable
function removeLimits() external onlyOwner {
}
/// @notice Sets transfer delay. Only callable by owner.
/// @param onoff If one tx per block is on
function switchTransferDelay(bool onoff) external onlyOwner {
}
/// @notice Sets bot flag. Only callable by owner.
/// @param bot The address to block.
function addBot(address bot) external onlyOwner {
}
/// @notice Unsets bot flag. Only callable by owner.
/// @param bot The address to block.
function remBot(address bot) external onlyOwner {
require(<FILL_ME>)
bots[bot] = false;
}
/// @notice Set the token swap threshold. Must be between 0.001% and 0.5% of total supply.
/// @param newAmount the amount to set - you need to put 18 zeroes in too
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
}
/// @notice Set the max tx. Must be no less than 0.1% of supply.
/// @param newNum new number to set, without the 18 zeroes.
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
/// @notice Set the max tx. Must be no less than 0.5% of supply.
/// @param newNum new number to set, without the 18 zeroes.
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
/// @notice Excludes an address from max tx.
/// @param updAds the address to update
/// @param isEx is it excluded
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
/// @notice Enables or disables contract tax sales.
/// @param enabled Turn sales on or off.
function updateSwapEnabled(bool enabled) external onlyOwner {
}
/// @notice update the total buy/sell fees, out of 10000
function updateBuyFees(uint256 totalFee) external onlyOwner {
}
function updateSellFees(uint256 totalFee) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateMarketingWallet(address newMarketingWallet)
external
onlyOwner
{
}
function updateDevWallet(address newWallet) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function gasRemaining() private view returns (bool) {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
/// @notice Swaps total/divisor of supply in taxes for ETH. Only executable by the tax holder.
/// @param divisor the divisor to divide supply by. 200 is .5%, 1000 is .1%.
function manualSwap(uint256 divisor) external taxHolderOnly {
}
function doTaxes(uint256 tokenAmount) private {
}
/// @notice Distributes ETH taxes. Only callable by the tax distributor. Expects ETH to be deposited beforehand.
function distributeTaxes() external {
}
function setAutoLPBurnSettings(
uint256 _frequencyInSeconds,
uint256 _percent,
bool _Enabled
) external onlyOwner {
}
function autoBurnLiquidityPairTokens() internal returns (bool) {
}
function manualBurnLiquidityPairTokens(uint256 percent)
external
onlyOwner
returns (bool)
{
}
}
| bots[bot],"1ETH: Not a bot." | 257,806 | bots[bot] |
"invalid token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
interface IApparelAddressRegistry {
function tokenRegistry() external view returns (address);
}
interface IApparelTokenRegistry {
function enabled(address) external returns (bool);
}
interface IOracle {
function decimals() external view returns (uint8);
function latestAnswer() external view returns (int256);
}
contract ApparelPriceFeed is Ownable {
/// @notice keeps track of oracles for each tokens
mapping(address => address) public oracles;
/// @notice apparel address registry contract
address public addressRegistry;
/// @notice wrapped ETH contract
address public wETH;
constructor(address _addressRegistry, address _wETH) {
}
/**
@notice Register oracle contract to token
@dev Only owner can register oracle
@param _token ERC20 token address
@param _oracle Oracle address
*/
function registerOracle(address _token, address _oracle)
external
onlyOwner
{
IApparelTokenRegistry tokenRegistry = IApparelTokenRegistry(
IApparelAddressRegistry(addressRegistry).tokenRegistry()
);
require(<FILL_ME>)
require(oracles[_token] == address(0), "oracle already set");
oracles[_token] = _oracle;
}
/**
@notice Update oracle address for token
@dev Only owner can update oracle
@param _token ERC20 token address
@param _oracle Oracle address
*/
function updateOracle(address _token, address _oracle) external onlyOwner {
}
/**
@notice Get current price for token
@dev return current price or if oracle is not registered returns 0
@param _token ERC20 token address
*/
function getPrice(address _token) external view returns (int256, uint8) {
}
/**
@notice Update address registry contract
@dev Only admin
*/
function updateAddressRegistry(address _addressRegistry)
external
onlyOwner
{
}
}
| tokenRegistry.enabled(_token),"invalid token" | 257,846 | tokenRegistry.enabled(_token) |
"oracle already set" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
interface IApparelAddressRegistry {
function tokenRegistry() external view returns (address);
}
interface IApparelTokenRegistry {
function enabled(address) external returns (bool);
}
interface IOracle {
function decimals() external view returns (uint8);
function latestAnswer() external view returns (int256);
}
contract ApparelPriceFeed is Ownable {
/// @notice keeps track of oracles for each tokens
mapping(address => address) public oracles;
/// @notice apparel address registry contract
address public addressRegistry;
/// @notice wrapped ETH contract
address public wETH;
constructor(address _addressRegistry, address _wETH) {
}
/**
@notice Register oracle contract to token
@dev Only owner can register oracle
@param _token ERC20 token address
@param _oracle Oracle address
*/
function registerOracle(address _token, address _oracle)
external
onlyOwner
{
IApparelTokenRegistry tokenRegistry = IApparelTokenRegistry(
IApparelAddressRegistry(addressRegistry).tokenRegistry()
);
require(tokenRegistry.enabled(_token), "invalid token");
require(<FILL_ME>)
oracles[_token] = _oracle;
}
/**
@notice Update oracle address for token
@dev Only owner can update oracle
@param _token ERC20 token address
@param _oracle Oracle address
*/
function updateOracle(address _token, address _oracle) external onlyOwner {
}
/**
@notice Get current price for token
@dev return current price or if oracle is not registered returns 0
@param _token ERC20 token address
*/
function getPrice(address _token) external view returns (int256, uint8) {
}
/**
@notice Update address registry contract
@dev Only admin
*/
function updateAddressRegistry(address _addressRegistry)
external
onlyOwner
{
}
}
| oracles[_token]==address(0),"oracle already set" | 257,846 | oracles[_token]==address(0) |
"oracle not set" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
interface IApparelAddressRegistry {
function tokenRegistry() external view returns (address);
}
interface IApparelTokenRegistry {
function enabled(address) external returns (bool);
}
interface IOracle {
function decimals() external view returns (uint8);
function latestAnswer() external view returns (int256);
}
contract ApparelPriceFeed is Ownable {
/// @notice keeps track of oracles for each tokens
mapping(address => address) public oracles;
/// @notice apparel address registry contract
address public addressRegistry;
/// @notice wrapped ETH contract
address public wETH;
constructor(address _addressRegistry, address _wETH) {
}
/**
@notice Register oracle contract to token
@dev Only owner can register oracle
@param _token ERC20 token address
@param _oracle Oracle address
*/
function registerOracle(address _token, address _oracle)
external
onlyOwner
{
}
/**
@notice Update oracle address for token
@dev Only owner can update oracle
@param _token ERC20 token address
@param _oracle Oracle address
*/
function updateOracle(address _token, address _oracle) external onlyOwner {
require(<FILL_ME>)
oracles[_token] = _oracle;
}
/**
@notice Get current price for token
@dev return current price or if oracle is not registered returns 0
@param _token ERC20 token address
*/
function getPrice(address _token) external view returns (int256, uint8) {
}
/**
@notice Update address registry contract
@dev Only admin
*/
function updateAddressRegistry(address _addressRegistry)
external
onlyOwner
{
}
}
| oracles[_token]!=address(0),"oracle not set" | 257,846 | oracles[_token]!=address(0) |
"You have already claimed your cosmetic." | // SPDX-License-Identifier: Unliscensed
pragma solidity ^0.8.17;
import "../CosmeticERC721A/CosmeticERC721A.sol";
import "../IDailyCargo.sol";
contract GoldAura is CosmeticERC721A {
address dailyCargo;
uint256 claimableUntil;
mapping(address => bool) claimed;
constructor() CosmeticERC721A("GoldAura", "GA") {
}
function isEligible(address _address) public view override returns (bool) {
IDailyCargo cargo = IDailyCargo(dailyCargo);
require(<FILL_ME>)
require(block.timestamp <= claimableUntil, "The claim has expired.");
uint256 addressStreak = cargo.getAddressStreak(_address);
return addressStreak >= 2 ? true : false;
}
function claim(address _to) public override onlyCosmeticRegistry(msg.sender) {
}
function setDailyCargo(address _address) public onlyOwner {
}
function getDailyCargo() public view returns (address) {
}
function setClaimableUntil(uint256 _claimableUntil) public onlyOwner {
}
function getClaimableUntil() public view returns (uint256) {
}
}
| !(claimed[_address]),"You have already claimed your cosmetic." | 257,937 | !(claimed[_address]) |
"You are exceeding maxWalletBalance" | // SPDX-License-Identifier: NOLICENSE
/**
Telegram: https://t.me/CawCommunityEth
Twitter: https://twitter.com/CAWCOMMUNITYETH
Website: https://cawcommunity.com
*/
pragma solidity ^0.8.10;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
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 {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
interface IFactory{
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
contract $CAW is Context, IERC20, Ownable {
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) private _isBot;
address[] private _excluded;
bool public swapEnabled = true;
bool private swapping;
IRouter public router;
address public pair;
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1e9 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public swapTokensAtAmount = 15_000_000 * 10**_decimals;
uint256 public maxSellAmount = 1_000_000_000 * 10**_decimals;
uint256 public maxBuyAmount = 1_000_000_000 * 10**_decimals;
uint256 public maxWalletBalance = 1_000_000_000 * 10**_decimals;
address public marketingAddress = 0x7A8B31E76a8c3De074bF6e6C0cFA7D2d4f325E71;
address public devAddress = 0x170bc93cC417FEcF65488aAbffA8b7F8FA5f2E6e;
string private constant _name = "Caw Community";
string private constant _symbol = "$CAW";
struct Taxes {
uint256 rfi;
uint256 dev;
uint256 marketing;
uint256 liquidity;
}
Taxes public taxes = Taxes(0,0,5,0);
Taxes public sellTaxes = Taxes(0,0,5,0);
struct TotFeesPaidStruct{
uint256 rfi;
uint256 marketing;
uint256 dev;
uint256 liquidity;
}
TotFeesPaidStruct public totFeesPaid;
struct valuesFromGetValues{
uint256 rAmount;
uint256 rTransferAmount;
uint256 rRfi;
uint256 rMarketing;
uint256 rDev;
uint256 rLiquidity;
uint256 tTransferAmount;
uint256 tRfi;
uint256 tMarketing;
uint256 tDev;
uint256 tLiquidity;
}
event FeesChanged();
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public view 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 virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferRfi, bool isSell) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function setTaxes(uint256 _rfi, uint256 _marketing, uint256 _dev, uint256 _liquidity) public onlyOwner {
}
function setSellTaxes(uint256 _rfi, uint256 _marketing, uint256 _dev, uint256 _liquidity) public onlyOwner {
}
function _reflectRfi(uint256 rRfi, uint256 tRfi) private {
}
function _takeLiquidity(uint256 rLiquidity, uint256 tLiquidity) private {
}
function _takeMarketing(uint256 rMarketing, uint256 tMarketing) private {
}
function _takeDev(uint256 rDev, uint256 tDev) private {
}
function _getValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory to_return) {
}
function _getTValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory s) {
}
function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi,uint256 rMarketing, uint256 rDev, uint256 rLiquidity) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(amount <= balanceOf(from),"You are trying to transfer more than your balance");
require(!_isBot[from] && !_isBot[to], "You are a bot");
if(!_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !swapping){
if(from == pair){
require(amount <= maxBuyAmount, "You are exceeding maxBuyAmount");
}
if(to == pair){
require(amount <= maxSellAmount, "You are exceeding maxSellAmount");
}
if(to != pair){
require(<FILL_ME>)
}
}
bool canSwap = balanceOf(address(this)) >= swapTokensAtAmount;
if(!swapping && swapEnabled && canSwap && from != pair && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]){
swapAndLiquify(swapTokensAtAmount);
}
_tokenTransfer(from, to, amount, !(_isExcludedFromFee[from] || _isExcludedFromFee[to]), to == pair);
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee, bool isSell) private {
}
function swapAndLiquify(uint256 tokens) private lockTheSwap{
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function swapTokensForBNB(uint256 tokenAmount) private {
}
function updateMarketingWallet(address newWallet) external onlyOwner{
}
function updateDevWallet(address newDevWallet) external onlyOwner{
}
function updateMaxWalletBalance(uint256 amount) external onlyOwner{
}
function updatMaxBuyAmt(uint256 amount) external onlyOwner{
}
function updatMaxSellAmt(uint256 amount) external onlyOwner{
}
function updateSwapTokensAtAmount(uint256 amount) external onlyOwner{
}
function updateSwapEnabled(bool _enabled) external onlyOwner{
}
function setAntibot(address account, bool state) external onlyOwner{
}
function bulkAntiBot(address[] memory accounts, bool state) external onlyOwner{
}
function updateRouterAndPair(address newRouter, address newPair) external onlyOwner{
}
function isBot(address account) public view returns(bool){
}
//Use this in case BNB are sent to the contract by mistake
function rescueBNB(uint256 weiAmount) external onlyOwner{
}
// Function to allow admin to claim *other* BEP20 tokens sent to this contract (by mistake)
// Owner cannot transfer out $CAW from this smart contract
function rescueAnyBEP20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
receive() external payable{
}
}
| balanceOf(to)+amount<=maxWalletBalance,"You are exceeding maxWalletBalance" | 258,000 | balanceOf(to)+amount<=maxWalletBalance |
'Value already set' | // SPDX-License-Identifier: NOLICENSE
/**
Telegram: https://t.me/CawCommunityEth
Twitter: https://twitter.com/CAWCOMMUNITYETH
Website: https://cawcommunity.com
*/
pragma solidity ^0.8.10;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
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 {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
interface IFactory{
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
contract $CAW is Context, IERC20, Ownable {
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) private _isBot;
address[] private _excluded;
bool public swapEnabled = true;
bool private swapping;
IRouter public router;
address public pair;
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1e9 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public swapTokensAtAmount = 15_000_000 * 10**_decimals;
uint256 public maxSellAmount = 1_000_000_000 * 10**_decimals;
uint256 public maxBuyAmount = 1_000_000_000 * 10**_decimals;
uint256 public maxWalletBalance = 1_000_000_000 * 10**_decimals;
address public marketingAddress = 0x7A8B31E76a8c3De074bF6e6C0cFA7D2d4f325E71;
address public devAddress = 0x170bc93cC417FEcF65488aAbffA8b7F8FA5f2E6e;
string private constant _name = "Caw Community";
string private constant _symbol = "$CAW";
struct Taxes {
uint256 rfi;
uint256 dev;
uint256 marketing;
uint256 liquidity;
}
Taxes public taxes = Taxes(0,0,5,0);
Taxes public sellTaxes = Taxes(0,0,5,0);
struct TotFeesPaidStruct{
uint256 rfi;
uint256 marketing;
uint256 dev;
uint256 liquidity;
}
TotFeesPaidStruct public totFeesPaid;
struct valuesFromGetValues{
uint256 rAmount;
uint256 rTransferAmount;
uint256 rRfi;
uint256 rMarketing;
uint256 rDev;
uint256 rLiquidity;
uint256 tTransferAmount;
uint256 tRfi;
uint256 tMarketing;
uint256 tDev;
uint256 tLiquidity;
}
event FeesChanged();
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public view 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 virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferRfi, bool isSell) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function setTaxes(uint256 _rfi, uint256 _marketing, uint256 _dev, uint256 _liquidity) public onlyOwner {
}
function setSellTaxes(uint256 _rfi, uint256 _marketing, uint256 _dev, uint256 _liquidity) public onlyOwner {
}
function _reflectRfi(uint256 rRfi, uint256 tRfi) private {
}
function _takeLiquidity(uint256 rLiquidity, uint256 tLiquidity) private {
}
function _takeMarketing(uint256 rMarketing, uint256 tMarketing) private {
}
function _takeDev(uint256 rDev, uint256 tDev) private {
}
function _getValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory to_return) {
}
function _getTValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory s) {
}
function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi,uint256 rMarketing, uint256 rDev, uint256 rLiquidity) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee, bool isSell) private {
}
function swapAndLiquify(uint256 tokens) private lockTheSwap{
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function swapTokensForBNB(uint256 tokenAmount) private {
}
function updateMarketingWallet(address newWallet) external onlyOwner{
}
function updateDevWallet(address newDevWallet) external onlyOwner{
}
function updateMaxWalletBalance(uint256 amount) external onlyOwner{
}
function updatMaxBuyAmt(uint256 amount) external onlyOwner{
}
function updatMaxSellAmt(uint256 amount) external onlyOwner{
}
function updateSwapTokensAtAmount(uint256 amount) external onlyOwner{
}
function updateSwapEnabled(bool _enabled) external onlyOwner{
}
function setAntibot(address account, bool state) external onlyOwner{
require(<FILL_ME>)
_isBot[account] = state;
}
function bulkAntiBot(address[] memory accounts, bool state) external onlyOwner{
}
function updateRouterAndPair(address newRouter, address newPair) external onlyOwner{
}
function isBot(address account) public view returns(bool){
}
//Use this in case BNB are sent to the contract by mistake
function rescueBNB(uint256 weiAmount) external onlyOwner{
}
// Function to allow admin to claim *other* BEP20 tokens sent to this contract (by mistake)
// Owner cannot transfer out $CAW from this smart contract
function rescueAnyBEP20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
receive() external payable{
}
}
| _isBot[account]!=state,'Value already set' | 258,000 | _isBot[account]!=state |
"MegaPixelNFT: This Location has already been taken" | pragma solidity ^0.8.0;
contract MegaPixel is ERC721Enumerable, Ownable{
string private _baseTokenURI;
uint256 private _reserved_devs = 1;
uint256 private _price = 0.10 ether;
bool public _paused = false;
// withdraw addresses
address private devid1 = 0x0000000000000000000000000000000000000000;
mapping(string => address) public locations;
constructor() ERC721("MegaPixel", "MPIX") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function checkBlockAvailable(uint256 x_cord, uint256 y_cord) public view returns (bool){
}
function getBlockOwner(uint256 x_cord, uint256 y_cord) public view returns (address){
}
function mint(address to, uint256 tokenId, uint256 x_cord, uint256 y_cord) public virtual onlyOwner{
uint256 supply = totalSupply();
require( supply < 2501, "No more blocks to mint" );
require(x_cord <= 50 && x_cord > 0, "MegaPixelNFT: must be a valid block selection");
require(y_cord <= 50 && y_cord > 0, "MegaPixelNFT: must be a valid block selection");
require(<FILL_ME>)
string memory key = string(abi.encodePacked(x_cord,y_cord));
locations[key] = to;
_mint(to, tokenId);
}
function purchasePixelBlock(uint256 tokenId, uint256 x_cord, uint256 y_cord) public payable{
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
function setPrice(uint256 _newPrice) public virtual onlyOwner{
}
function setReceiveAddress(address dev1) public virtual onlyOwner{
}
function getPrice() public view returns (uint256){
}
function updateBaseTokenURI(string memory _baseURIStr) public virtual onlyOwner{
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner{
}
}
| checkBlockAvailable(x_cord,y_cord),"MegaPixelNFT: This Location has already been taken" | 258,162 | checkBlockAvailable(x_cord,y_cord) |
null | pragma solidity ^0.8.0;
contract MegaPixel is ERC721Enumerable, Ownable{
string private _baseTokenURI;
uint256 private _reserved_devs = 1;
uint256 private _price = 0.10 ether;
bool public _paused = false;
// withdraw addresses
address private devid1 = 0x0000000000000000000000000000000000000000;
mapping(string => address) public locations;
constructor() ERC721("MegaPixel", "MPIX") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function checkBlockAvailable(uint256 x_cord, uint256 y_cord) public view returns (bool){
}
function getBlockOwner(uint256 x_cord, uint256 y_cord) public view returns (address){
}
function mint(address to, uint256 tokenId, uint256 x_cord, uint256 y_cord) public virtual onlyOwner{
}
function purchasePixelBlock(uint256 tokenId, uint256 x_cord, uint256 y_cord) public payable{
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
function setPrice(uint256 _newPrice) public virtual onlyOwner{
}
function setReceiveAddress(address dev1) public virtual onlyOwner{
}
function getPrice() public view returns (uint256){
}
function updateBaseTokenURI(string memory _baseURIStr) public virtual onlyOwner{
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner{
uint256 _each = address(this).balance;
require(<FILL_ME>)
}
}
| payable(devid1).send(_each) | 258,162 | payable(devid1).send(_each) |
"Marketplace: item not in sale" | // SPDX-License-Identifier: ISC
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
contract Marketplace is Ownable {
// Structures
struct SellOrder {
uint basePrice; // if 0, auction is disabled
uint start;
uint end;
uint directSalePrice; // if 0, direct sale is disabled
address paymentToken;
bool claimed;
}
struct Bid {
address bidder;
uint price;
uint timestamp;
}
// Events
event NewSellOrder(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event SellOrderChanged(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event NewBid(address indexed who, uint indexed tokenId, uint indexed price);
// Maps
// address(0) represents the native token (BNB)
mapping (address => bool) public isPaymentTokenWhitelisted; // token address => is whitelisted
mapping (uint => SellOrder) public sellOrders; // token id => sell order
mapping (uint => Bid[]) public bids; // token id => bids
mapping (address => uint) public totalValueSold; // payment token => total value sold
// NFT collection that will be sold
IERC721 public nft;
// if true, add one minute to the end of a sell if the bid is placed one minute or less before its end
bool public shouldExtendEnd;
// If true, if a bid price exceeds the direct sale price, it automatically buys the item insted of keep bidding.
// Otherwise it disables the direct sale
bool public shouldStopBidding;
// address that will receive unsold items
address public recoverAddress;
// minimum change in price from the previous bid
uint public minPriceIncrease;
// Array with all whitelisted payment tokens
address[] private whitelistedPaymentTokens;
// fees denominator
uint public feePrecision = 1e5;
// addresses that will receive part of the generated tokens throgh sales
address[] private withdrawAddresses;
uint public withdrawAddressesCounter;
/**
* @notice Constructor
* @param _nft Address of COC NFT
* @param _recoverAddress Address that will receive unsold NFTs
* @param _minBidPriceIncrease Minimum price increase from previous bid
* @param _shouldExtendEnd If true, enable sale extension in case of a bid race
* @param _shouldStopBidding If true, if a bid price exceeds the direct sale price,
it automatically buys the item instead of keep bidding. Otherwise it disables
the direct sale
*/
constructor (address _nft, address _recoverAddress, uint _minBidPriceIncrease, bool _shouldExtendEnd,
bool _shouldStopBidding) {
}
/**
* @notice Buy a NFT directly
* @param _tokenId Token ID of the item to buy
*/
function buy(uint _tokenId) external payable {
require(<FILL_ME>)
SellOrder storage sellOrder = sellOrders[_tokenId];
// Check if auction is enabled
require (sellOrder.directSalePrice > 0 && ! sellOrder.claimed, "Marketplace: buy directly disabled");
// Takes funds from the caller
processPaymentFrom(sellOrder.paymentToken, msg.sender, sellOrder.directSalePrice);
// Transfer the NFT
nft.transferFrom(address(this), msg.sender, _tokenId);
// Close the sale
sellOrder.claimed = true;
// Update statistics
totalValueSold[sellOrder.paymentToken] += sellOrder.directSalePrice;
}
/**
* @notice Make a bid
* @param _tokenId Token ID of the item
* @param _price Price of the bid
*/
function bid(uint _tokenId, uint _price) external payable {
}
/**
* @notice Claim an item when the sale ends
* @param _tokenId Token ID to claim
*/
function claim(uint _tokenId) external {
}
/**
* @notice Returns all the bids of a token
* @param _tokenId Token ID of the item
*/
function getBids(uint _tokenId) external view returns (Bid[] memory) {
}
/**
* @notice Returns all whitelisted payment tokens
*/
function getWhitelistedPaymentTokens() external view returns (address[] memory) {
}
/**
* @notice Returns all the address that will receive part of the revenues
*/
function getWithdrawAddresses() external view returns (address[] memory) {
}
// PRIVILEGED FUNCTIONS
/**
* @notice Sell an item
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function sell(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) public onlyOwner {
}
/**
* @notice Change a sell order
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function changeSellOrder(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) external onlyOwner {
}
/**
* @notice Sell multiple items
* @param _tokenIds Token ID of the items
* @param _basePrices Base prices for each token
* @param _paymentTokens Payment token that will be used for each sale. Native BNB is represented by address(0)
* @param _starts Start of each sale
* @param _ends End of each sale
*/
function sellBatch(uint[] memory _tokenIds, uint[] memory _basePrices, uint[] memory _directSalePrices,
address[] memory _paymentTokens, uint[] memory _starts, uint[] memory _ends) external onlyOwner {
}
/**
* @notice Recover unsold items
*/
function recover(uint _tokenId) external onlyOwner {
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _address Address to add
*/
function addAddressToWithdrawList(address _address) external onlyOwner {
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _index Index of the address to remove
*/
function removeAddressFromWithdrawList(uint _index) external onlyOwner {
}
/**
* @notice Withdraw payment tokens received
*/
function withdraw(address _paymentToken) external onlyOwner {
}
/**
* @notice Set if a payment token is whitelisted or not
* @param _token Address of the payment token
*/
function whitelistPaymentToken(address _token) external onlyOwner {
}
// INTERNAL FUNCTIONS
// Takes funds from the bidder based on the payment token
function processPaymentFrom(address _token, address _from, uint _amount) internal {
}
// Refund a bidder if it gets outbidded
function processPaymentTo(address _token, address _to, uint _amount) internal {
}
}
| nft.ownerOf(_tokenId)==address(this),"Marketplace: item not in sale" | 258,199 | nft.ownerOf(_tokenId)==address(this) |
"Marketplace: token already claimed" | // SPDX-License-Identifier: ISC
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
contract Marketplace is Ownable {
// Structures
struct SellOrder {
uint basePrice; // if 0, auction is disabled
uint start;
uint end;
uint directSalePrice; // if 0, direct sale is disabled
address paymentToken;
bool claimed;
}
struct Bid {
address bidder;
uint price;
uint timestamp;
}
// Events
event NewSellOrder(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event SellOrderChanged(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event NewBid(address indexed who, uint indexed tokenId, uint indexed price);
// Maps
// address(0) represents the native token (BNB)
mapping (address => bool) public isPaymentTokenWhitelisted; // token address => is whitelisted
mapping (uint => SellOrder) public sellOrders; // token id => sell order
mapping (uint => Bid[]) public bids; // token id => bids
mapping (address => uint) public totalValueSold; // payment token => total value sold
// NFT collection that will be sold
IERC721 public nft;
// if true, add one minute to the end of a sell if the bid is placed one minute or less before its end
bool public shouldExtendEnd;
// If true, if a bid price exceeds the direct sale price, it automatically buys the item insted of keep bidding.
// Otherwise it disables the direct sale
bool public shouldStopBidding;
// address that will receive unsold items
address public recoverAddress;
// minimum change in price from the previous bid
uint public minPriceIncrease;
// Array with all whitelisted payment tokens
address[] private whitelistedPaymentTokens;
// fees denominator
uint public feePrecision = 1e5;
// addresses that will receive part of the generated tokens throgh sales
address[] private withdrawAddresses;
uint public withdrawAddressesCounter;
/**
* @notice Constructor
* @param _nft Address of COC NFT
* @param _recoverAddress Address that will receive unsold NFTs
* @param _minBidPriceIncrease Minimum price increase from previous bid
* @param _shouldExtendEnd If true, enable sale extension in case of a bid race
* @param _shouldStopBidding If true, if a bid price exceeds the direct sale price,
it automatically buys the item instead of keep bidding. Otherwise it disables
the direct sale
*/
constructor (address _nft, address _recoverAddress, uint _minBidPriceIncrease, bool _shouldExtendEnd,
bool _shouldStopBidding) {
}
/**
* @notice Buy a NFT directly
* @param _tokenId Token ID of the item to buy
*/
function buy(uint _tokenId) external payable {
}
/**
* @notice Make a bid
* @param _tokenId Token ID of the item
* @param _price Price of the bid
*/
function bid(uint _tokenId, uint _price) external payable {
}
/**
* @notice Claim an item when the sale ends
* @param _tokenId Token ID to claim
*/
function claim(uint _tokenId) external {
SellOrder storage sellOrder = sellOrders[_tokenId];
require(<FILL_ME>)
require (block.timestamp > sellOrder.end, "Marketplace: sell not ended");
uint bidsLength = bids[_tokenId].length;
Bid memory lastBid = bids[_tokenId][bidsLength - 1];
// Check if the caller can claim the NFT
require (lastBid.bidder == msg.sender, "Marketplace: not last bidder");
// Transfer the NFT
nft.transferFrom(address(this), msg.sender, _tokenId);
// TODO: Apply marketplace fee
// Update the sell order
sellOrder.claimed = true;
// Update statistics
totalValueSold[sellOrder.paymentToken] += lastBid.price;
}
/**
* @notice Returns all the bids of a token
* @param _tokenId Token ID of the item
*/
function getBids(uint _tokenId) external view returns (Bid[] memory) {
}
/**
* @notice Returns all whitelisted payment tokens
*/
function getWhitelistedPaymentTokens() external view returns (address[] memory) {
}
/**
* @notice Returns all the address that will receive part of the revenues
*/
function getWithdrawAddresses() external view returns (address[] memory) {
}
// PRIVILEGED FUNCTIONS
/**
* @notice Sell an item
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function sell(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) public onlyOwner {
}
/**
* @notice Change a sell order
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function changeSellOrder(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) external onlyOwner {
}
/**
* @notice Sell multiple items
* @param _tokenIds Token ID of the items
* @param _basePrices Base prices for each token
* @param _paymentTokens Payment token that will be used for each sale. Native BNB is represented by address(0)
* @param _starts Start of each sale
* @param _ends End of each sale
*/
function sellBatch(uint[] memory _tokenIds, uint[] memory _basePrices, uint[] memory _directSalePrices,
address[] memory _paymentTokens, uint[] memory _starts, uint[] memory _ends) external onlyOwner {
}
/**
* @notice Recover unsold items
*/
function recover(uint _tokenId) external onlyOwner {
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _address Address to add
*/
function addAddressToWithdrawList(address _address) external onlyOwner {
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _index Index of the address to remove
*/
function removeAddressFromWithdrawList(uint _index) external onlyOwner {
}
/**
* @notice Withdraw payment tokens received
*/
function withdraw(address _paymentToken) external onlyOwner {
}
/**
* @notice Set if a payment token is whitelisted or not
* @param _token Address of the payment token
*/
function whitelistPaymentToken(address _token) external onlyOwner {
}
// INTERNAL FUNCTIONS
// Takes funds from the bidder based on the payment token
function processPaymentFrom(address _token, address _from, uint _amount) internal {
}
// Refund a bidder if it gets outbidded
function processPaymentTo(address _token, address _to, uint _amount) internal {
}
}
| !sellOrder.claimed,"Marketplace: token already claimed" | 258,199 | !sellOrder.claimed |
"Marketplace: invalid payment token" | // SPDX-License-Identifier: ISC
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
contract Marketplace is Ownable {
// Structures
struct SellOrder {
uint basePrice; // if 0, auction is disabled
uint start;
uint end;
uint directSalePrice; // if 0, direct sale is disabled
address paymentToken;
bool claimed;
}
struct Bid {
address bidder;
uint price;
uint timestamp;
}
// Events
event NewSellOrder(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event SellOrderChanged(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event NewBid(address indexed who, uint indexed tokenId, uint indexed price);
// Maps
// address(0) represents the native token (BNB)
mapping (address => bool) public isPaymentTokenWhitelisted; // token address => is whitelisted
mapping (uint => SellOrder) public sellOrders; // token id => sell order
mapping (uint => Bid[]) public bids; // token id => bids
mapping (address => uint) public totalValueSold; // payment token => total value sold
// NFT collection that will be sold
IERC721 public nft;
// if true, add one minute to the end of a sell if the bid is placed one minute or less before its end
bool public shouldExtendEnd;
// If true, if a bid price exceeds the direct sale price, it automatically buys the item insted of keep bidding.
// Otherwise it disables the direct sale
bool public shouldStopBidding;
// address that will receive unsold items
address public recoverAddress;
// minimum change in price from the previous bid
uint public minPriceIncrease;
// Array with all whitelisted payment tokens
address[] private whitelistedPaymentTokens;
// fees denominator
uint public feePrecision = 1e5;
// addresses that will receive part of the generated tokens throgh sales
address[] private withdrawAddresses;
uint public withdrawAddressesCounter;
/**
* @notice Constructor
* @param _nft Address of COC NFT
* @param _recoverAddress Address that will receive unsold NFTs
* @param _minBidPriceIncrease Minimum price increase from previous bid
* @param _shouldExtendEnd If true, enable sale extension in case of a bid race
* @param _shouldStopBidding If true, if a bid price exceeds the direct sale price,
it automatically buys the item instead of keep bidding. Otherwise it disables
the direct sale
*/
constructor (address _nft, address _recoverAddress, uint _minBidPriceIncrease, bool _shouldExtendEnd,
bool _shouldStopBidding) {
}
/**
* @notice Buy a NFT directly
* @param _tokenId Token ID of the item to buy
*/
function buy(uint _tokenId) external payable {
}
/**
* @notice Make a bid
* @param _tokenId Token ID of the item
* @param _price Price of the bid
*/
function bid(uint _tokenId, uint _price) external payable {
}
/**
* @notice Claim an item when the sale ends
* @param _tokenId Token ID to claim
*/
function claim(uint _tokenId) external {
}
/**
* @notice Returns all the bids of a token
* @param _tokenId Token ID of the item
*/
function getBids(uint _tokenId) external view returns (Bid[] memory) {
}
/**
* @notice Returns all whitelisted payment tokens
*/
function getWhitelistedPaymentTokens() external view returns (address[] memory) {
}
/**
* @notice Returns all the address that will receive part of the revenues
*/
function getWithdrawAddresses() external view returns (address[] memory) {
}
// PRIVILEGED FUNCTIONS
/**
* @notice Sell an item
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function sell(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) public onlyOwner {
require(<FILL_ME>)
require (nft.ownerOf(_tokenId) == msg.sender, "Marketplace: not NFT owner");
require (block.timestamp < _start, "Marketplace: invalid start");
require (_start < _end, "Marketplace: invalid timestamps");
require(_basePrice > 0 || _directSalePrice > 0, "Marketplace: at least one of _basePrice or _directSalePrice must be set");
require(_directSalePrice == 0 || _basePrice < _directSalePrice , "Marketplace: _directSalePrice must be greater than _basePrice");
// Takes the NFT from the owner
nft.transferFrom(msg.sender, address(this), _tokenId);
SellOrder storage sellOrder = sellOrders[_tokenId];
sellOrder.basePrice = _basePrice;
sellOrder.start = _start;
sellOrder.end = _end;
sellOrder.directSalePrice = _directSalePrice;
sellOrder.paymentToken = _paymentToken;
sellOrder.claimed = false;
emit NewSellOrder(_tokenId, _basePrice, _paymentToken);
}
/**
* @notice Change a sell order
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function changeSellOrder(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) external onlyOwner {
}
/**
* @notice Sell multiple items
* @param _tokenIds Token ID of the items
* @param _basePrices Base prices for each token
* @param _paymentTokens Payment token that will be used for each sale. Native BNB is represented by address(0)
* @param _starts Start of each sale
* @param _ends End of each sale
*/
function sellBatch(uint[] memory _tokenIds, uint[] memory _basePrices, uint[] memory _directSalePrices,
address[] memory _paymentTokens, uint[] memory _starts, uint[] memory _ends) external onlyOwner {
}
/**
* @notice Recover unsold items
*/
function recover(uint _tokenId) external onlyOwner {
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _address Address to add
*/
function addAddressToWithdrawList(address _address) external onlyOwner {
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _index Index of the address to remove
*/
function removeAddressFromWithdrawList(uint _index) external onlyOwner {
}
/**
* @notice Withdraw payment tokens received
*/
function withdraw(address _paymentToken) external onlyOwner {
}
/**
* @notice Set if a payment token is whitelisted or not
* @param _token Address of the payment token
*/
function whitelistPaymentToken(address _token) external onlyOwner {
}
// INTERNAL FUNCTIONS
// Takes funds from the bidder based on the payment token
function processPaymentFrom(address _token, address _from, uint _amount) internal {
}
// Refund a bidder if it gets outbidded
function processPaymentTo(address _token, address _to, uint _amount) internal {
}
}
| isPaymentTokenWhitelisted[_paymentToken],"Marketplace: invalid payment token" | 258,199 | isPaymentTokenWhitelisted[_paymentToken] |
"Marketplace: not NFT owner" | // SPDX-License-Identifier: ISC
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
contract Marketplace is Ownable {
// Structures
struct SellOrder {
uint basePrice; // if 0, auction is disabled
uint start;
uint end;
uint directSalePrice; // if 0, direct sale is disabled
address paymentToken;
bool claimed;
}
struct Bid {
address bidder;
uint price;
uint timestamp;
}
// Events
event NewSellOrder(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event SellOrderChanged(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event NewBid(address indexed who, uint indexed tokenId, uint indexed price);
// Maps
// address(0) represents the native token (BNB)
mapping (address => bool) public isPaymentTokenWhitelisted; // token address => is whitelisted
mapping (uint => SellOrder) public sellOrders; // token id => sell order
mapping (uint => Bid[]) public bids; // token id => bids
mapping (address => uint) public totalValueSold; // payment token => total value sold
// NFT collection that will be sold
IERC721 public nft;
// if true, add one minute to the end of a sell if the bid is placed one minute or less before its end
bool public shouldExtendEnd;
// If true, if a bid price exceeds the direct sale price, it automatically buys the item insted of keep bidding.
// Otherwise it disables the direct sale
bool public shouldStopBidding;
// address that will receive unsold items
address public recoverAddress;
// minimum change in price from the previous bid
uint public minPriceIncrease;
// Array with all whitelisted payment tokens
address[] private whitelistedPaymentTokens;
// fees denominator
uint public feePrecision = 1e5;
// addresses that will receive part of the generated tokens throgh sales
address[] private withdrawAddresses;
uint public withdrawAddressesCounter;
/**
* @notice Constructor
* @param _nft Address of COC NFT
* @param _recoverAddress Address that will receive unsold NFTs
* @param _minBidPriceIncrease Minimum price increase from previous bid
* @param _shouldExtendEnd If true, enable sale extension in case of a bid race
* @param _shouldStopBidding If true, if a bid price exceeds the direct sale price,
it automatically buys the item instead of keep bidding. Otherwise it disables
the direct sale
*/
constructor (address _nft, address _recoverAddress, uint _minBidPriceIncrease, bool _shouldExtendEnd,
bool _shouldStopBidding) {
}
/**
* @notice Buy a NFT directly
* @param _tokenId Token ID of the item to buy
*/
function buy(uint _tokenId) external payable {
}
/**
* @notice Make a bid
* @param _tokenId Token ID of the item
* @param _price Price of the bid
*/
function bid(uint _tokenId, uint _price) external payable {
}
/**
* @notice Claim an item when the sale ends
* @param _tokenId Token ID to claim
*/
function claim(uint _tokenId) external {
}
/**
* @notice Returns all the bids of a token
* @param _tokenId Token ID of the item
*/
function getBids(uint _tokenId) external view returns (Bid[] memory) {
}
/**
* @notice Returns all whitelisted payment tokens
*/
function getWhitelistedPaymentTokens() external view returns (address[] memory) {
}
/**
* @notice Returns all the address that will receive part of the revenues
*/
function getWithdrawAddresses() external view returns (address[] memory) {
}
// PRIVILEGED FUNCTIONS
/**
* @notice Sell an item
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function sell(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) public onlyOwner {
require (isPaymentTokenWhitelisted[_paymentToken], "Marketplace: invalid payment token");
require(<FILL_ME>)
require (block.timestamp < _start, "Marketplace: invalid start");
require (_start < _end, "Marketplace: invalid timestamps");
require(_basePrice > 0 || _directSalePrice > 0, "Marketplace: at least one of _basePrice or _directSalePrice must be set");
require(_directSalePrice == 0 || _basePrice < _directSalePrice , "Marketplace: _directSalePrice must be greater than _basePrice");
// Takes the NFT from the owner
nft.transferFrom(msg.sender, address(this), _tokenId);
SellOrder storage sellOrder = sellOrders[_tokenId];
sellOrder.basePrice = _basePrice;
sellOrder.start = _start;
sellOrder.end = _end;
sellOrder.directSalePrice = _directSalePrice;
sellOrder.paymentToken = _paymentToken;
sellOrder.claimed = false;
emit NewSellOrder(_tokenId, _basePrice, _paymentToken);
}
/**
* @notice Change a sell order
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function changeSellOrder(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) external onlyOwner {
}
/**
* @notice Sell multiple items
* @param _tokenIds Token ID of the items
* @param _basePrices Base prices for each token
* @param _paymentTokens Payment token that will be used for each sale. Native BNB is represented by address(0)
* @param _starts Start of each sale
* @param _ends End of each sale
*/
function sellBatch(uint[] memory _tokenIds, uint[] memory _basePrices, uint[] memory _directSalePrices,
address[] memory _paymentTokens, uint[] memory _starts, uint[] memory _ends) external onlyOwner {
}
/**
* @notice Recover unsold items
*/
function recover(uint _tokenId) external onlyOwner {
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _address Address to add
*/
function addAddressToWithdrawList(address _address) external onlyOwner {
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _index Index of the address to remove
*/
function removeAddressFromWithdrawList(uint _index) external onlyOwner {
}
/**
* @notice Withdraw payment tokens received
*/
function withdraw(address _paymentToken) external onlyOwner {
}
/**
* @notice Set if a payment token is whitelisted or not
* @param _token Address of the payment token
*/
function whitelistPaymentToken(address _token) external onlyOwner {
}
// INTERNAL FUNCTIONS
// Takes funds from the bidder based on the payment token
function processPaymentFrom(address _token, address _from, uint _amount) internal {
}
// Refund a bidder if it gets outbidded
function processPaymentTo(address _token, address _to, uint _amount) internal {
}
}
| nft.ownerOf(_tokenId)==msg.sender,"Marketplace: not NFT owner" | 258,199 | nft.ownerOf(_tokenId)==msg.sender |
"Marketplace: item has bids" | // SPDX-License-Identifier: ISC
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
contract Marketplace is Ownable {
// Structures
struct SellOrder {
uint basePrice; // if 0, auction is disabled
uint start;
uint end;
uint directSalePrice; // if 0, direct sale is disabled
address paymentToken;
bool claimed;
}
struct Bid {
address bidder;
uint price;
uint timestamp;
}
// Events
event NewSellOrder(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event SellOrderChanged(uint indexed tokenId, uint indexed basePrice, address indexed paymentToken);
event NewBid(address indexed who, uint indexed tokenId, uint indexed price);
// Maps
// address(0) represents the native token (BNB)
mapping (address => bool) public isPaymentTokenWhitelisted; // token address => is whitelisted
mapping (uint => SellOrder) public sellOrders; // token id => sell order
mapping (uint => Bid[]) public bids; // token id => bids
mapping (address => uint) public totalValueSold; // payment token => total value sold
// NFT collection that will be sold
IERC721 public nft;
// if true, add one minute to the end of a sell if the bid is placed one minute or less before its end
bool public shouldExtendEnd;
// If true, if a bid price exceeds the direct sale price, it automatically buys the item insted of keep bidding.
// Otherwise it disables the direct sale
bool public shouldStopBidding;
// address that will receive unsold items
address public recoverAddress;
// minimum change in price from the previous bid
uint public minPriceIncrease;
// Array with all whitelisted payment tokens
address[] private whitelistedPaymentTokens;
// fees denominator
uint public feePrecision = 1e5;
// addresses that will receive part of the generated tokens throgh sales
address[] private withdrawAddresses;
uint public withdrawAddressesCounter;
/**
* @notice Constructor
* @param _nft Address of COC NFT
* @param _recoverAddress Address that will receive unsold NFTs
* @param _minBidPriceIncrease Minimum price increase from previous bid
* @param _shouldExtendEnd If true, enable sale extension in case of a bid race
* @param _shouldStopBidding If true, if a bid price exceeds the direct sale price,
it automatically buys the item instead of keep bidding. Otherwise it disables
the direct sale
*/
constructor (address _nft, address _recoverAddress, uint _minBidPriceIncrease, bool _shouldExtendEnd,
bool _shouldStopBidding) {
}
/**
* @notice Buy a NFT directly
* @param _tokenId Token ID of the item to buy
*/
function buy(uint _tokenId) external payable {
}
/**
* @notice Make a bid
* @param _tokenId Token ID of the item
* @param _price Price of the bid
*/
function bid(uint _tokenId, uint _price) external payable {
}
/**
* @notice Claim an item when the sale ends
* @param _tokenId Token ID to claim
*/
function claim(uint _tokenId) external {
}
/**
* @notice Returns all the bids of a token
* @param _tokenId Token ID of the item
*/
function getBids(uint _tokenId) external view returns (Bid[] memory) {
}
/**
* @notice Returns all whitelisted payment tokens
*/
function getWhitelistedPaymentTokens() external view returns (address[] memory) {
}
/**
* @notice Returns all the address that will receive part of the revenues
*/
function getWithdrawAddresses() external view returns (address[] memory) {
}
// PRIVILEGED FUNCTIONS
/**
* @notice Sell an item
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function sell(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) public onlyOwner {
}
/**
* @notice Change a sell order
* @param _tokenId Token ID of the item
* @param _basePrice Base price for the token
* @param _directSalePrice Price in case of direct sale. If 0, direct sale is disabled
* @param _paymentToken Payment token that will be used for this sale. Native BNB is represented by address(0)
* @param _start Start of the sale
* @param _end End of the sale
*/
function changeSellOrder(uint _tokenId, uint _basePrice, uint _directSalePrice, address _paymentToken, uint _start, uint _end) external onlyOwner {
}
/**
* @notice Sell multiple items
* @param _tokenIds Token ID of the items
* @param _basePrices Base prices for each token
* @param _paymentTokens Payment token that will be used for each sale. Native BNB is represented by address(0)
* @param _starts Start of each sale
* @param _ends End of each sale
*/
function sellBatch(uint[] memory _tokenIds, uint[] memory _basePrices, uint[] memory _directSalePrices,
address[] memory _paymentTokens, uint[] memory _starts, uint[] memory _ends) external onlyOwner {
}
/**
* @notice Recover unsold items
*/
function recover(uint _tokenId) external onlyOwner {
SellOrder storage sellOrder = sellOrders[_tokenId];
require (block.timestamp > sellOrder.end, "Marketplace: sell not ended");
require(<FILL_ME>)
require (nft.ownerOf(_tokenId) == address(this), "Marketplace: token already recover");
// Transfer the NFT
nft.transferFrom(address(this), recoverAddress, _tokenId);
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _address Address to add
*/
function addAddressToWithdrawList(address _address) external onlyOwner {
}
/**
* @notice Add a new address to the withdraw list. From now on this address will
receive part of the generated revenues
* @param _index Index of the address to remove
*/
function removeAddressFromWithdrawList(uint _index) external onlyOwner {
}
/**
* @notice Withdraw payment tokens received
*/
function withdraw(address _paymentToken) external onlyOwner {
}
/**
* @notice Set if a payment token is whitelisted or not
* @param _token Address of the payment token
*/
function whitelistPaymentToken(address _token) external onlyOwner {
}
// INTERNAL FUNCTIONS
// Takes funds from the bidder based on the payment token
function processPaymentFrom(address _token, address _from, uint _amount) internal {
}
// Refund a bidder if it gets outbidded
function processPaymentTo(address _token, address _to, uint _amount) internal {
}
}
| bids[_tokenId].length==0,"Marketplace: item has bids" | 258,199 | bids[_tokenId].length==0 |
"Too many Wokies!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract WokePass is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bool public areYouWoke = false;
bool public comingOut = false;
uint256 constant public Wokies = 5001;
uint256 constant public passerPerWallet = 11;
mapping(address => uint256) public wokiesWoken;
constructor(
) ERC721A("wokepass.xyz", "WOKE") {
}
modifier callerIsNoContract() {
}
modifier ableToWoke() {
}
function getWoke(uint256 quantity) external nonReentrant callerIsNoContract ableToWoke
{
require(quantity < passerPerWallet, "Dont Snitch Them All!");
require(<FILL_ME>)
require(wokiesWoken[msg.sender] + quantity < passerPerWallet, "Leave some for Greta!");
wokiesWoken[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function pissOffElon() public onlyOwner {
}
function stopClimateChange() public onlyOwner {
}
function revealPasses() public onlyOwner {
}
function fundWokism() public payable onlyOwner {
}
string private _uriIdentifiesAs;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata newRainbow) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function wokePassesSnitched(address _address) public view returns (uint256){
}
}
| totalSupply()+quantity<Wokies,"Too many Wokies!" | 258,315 | totalSupply()+quantity<Wokies |
"Leave some for Greta!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract WokePass is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bool public areYouWoke = false;
bool public comingOut = false;
uint256 constant public Wokies = 5001;
uint256 constant public passerPerWallet = 11;
mapping(address => uint256) public wokiesWoken;
constructor(
) ERC721A("wokepass.xyz", "WOKE") {
}
modifier callerIsNoContract() {
}
modifier ableToWoke() {
}
function getWoke(uint256 quantity) external nonReentrant callerIsNoContract ableToWoke
{
require(quantity < passerPerWallet, "Dont Snitch Them All!");
require(totalSupply() + quantity < Wokies, "Too many Wokies!");
require(<FILL_ME>)
wokiesWoken[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function pissOffElon() public onlyOwner {
}
function stopClimateChange() public onlyOwner {
}
function revealPasses() public onlyOwner {
}
function fundWokism() public payable onlyOwner {
}
string private _uriIdentifiesAs;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata newRainbow) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function wokePassesSnitched(address _address) public view returns (uint256){
}
}
| wokiesWoken[msg.sender]+quantity<passerPerWallet,"Leave some for Greta!" | 258,315 | wokiesWoken[msg.sender]+quantity<passerPerWallet |
"Invalid funds provided" | // _ _ _
// /\ | | | | | |
// / \ __ _____ | | ___ | |_| |
// / /\ \ \ \/ / _ \| |/ _ \| __| |
// / ____ \ > < (_) | | (_) | |_| |
// /_/____\_\/_/\_\___/|_|\___/ \__|_|
// | __ \ (_) (_)
// | | | | ___ _ __ ___ _ _ __ _ ___ _ __
// | | | |/ _ \| '_ ` _ \| | '_ \| |/ _ \| '_ \
// | |__| | (_) | | | | | | | | | | | (_) | | | |
// |_____/ \___/|_| |_| |_|_|_| |_|_|\___/|_| |_|
//Honor awaits those who battle.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import {Ownable} from "Ownable.sol";
import {ERC721A} from "ERC721A.sol";
import {OperatorFilterer} from "OperatorFilterer.sol";
error MintingNotLive();
error MintExceedsMaxSupply();
error FreeMintLimitReached();
error PaidMintLimitReached();
error FreeLimitReached();
error InsufficientPayment();
contract AxolotlDominion is ERC721A, OperatorFilterer, Ownable {
// Variables
bool public MintingLive = false;
uint256 public MAX_SUPPLY = 5555;
uint256 public free_max_supply = 1111;
uint256 public MAX_PER_TX_FREE = 3;
uint256 public PAID_Mint_PRICE = 0.002 ether;
uint256 public PAID_Mint_LIMIT = 15;
string public baseURI;
bool public operatorFilteringEnabled;
// Constructor
constructor(string memory baseURI_) ERC721A("Axolotl Dominion", "axo") {
}
function setApprovalForAll(
address operator,
bool approved
) public override onlyAllowedOperatorApproval(operator) {
}
function approve(
address operator,
uint256 tokenId
) public payable override onlyAllowedOperatorApproval(operator) {
}
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 setOperatorFilteringEnabled(bool value) public onlyOwner {
}
function _operatorFilteringEnabled() internal view override returns (bool) {
}
// Modifiers
modifier nonContract() {
}
// Mint
function paused() public onlyOwner {
}
function MINT(uint256 qty) external payable nonContract {
if (!MintingLive) revert MintingNotLive();
if (_totalMinted() + qty > MAX_SUPPLY) revert MintExceedsMaxSupply();
if (qty > PAID_Mint_LIMIT) revert PaidMintLimitReached();
if(free_max_supply >= totalSupply()){
require(MAX_PER_TX_FREE >= qty , "Excess max per free tx");
}else{
require(PAID_Mint_LIMIT >= qty , "Excess max per paid tx");
require(<FILL_ME>)
}
_mint(msg.sender, qty);
}
function collectreserves() external onlyOwner {
}
function airdrop(address addr, uint256 amount) public onlyOwner {
}
function configPAID_Mint_PRICE(uint256 newPAID_Mint_PRICE) public onlyOwner {
}
function configfree_max_supply(uint256 newfree_max_supply) public onlyOwner {
}
// Token URI
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory uri) external onlyOwner {
}
// Withdraw
function withdraw() external onlyOwner {
}
}
| qty*PAID_Mint_PRICE==msg.value,"Invalid funds provided" | 258,317 | qty*PAID_Mint_PRICE==msg.value |
"Invalid signature" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC20.sol";
import "./Ownable.sol";
import "./ERC20Burnable.sol";
import "./ECDSA.sol";
import "./Pausable.sol";
import "./SafeMath.sol";
contract GoldBux is ERC20, ERC20Burnable, Ownable, Pausable {
using ECDSA for bytes32;
using SafeMath for uint256;
event Claimed(address account, uint256 amount);
event Deposited(address account, uint256 amount);
event Airdropped(address account, uint256 amount);
event Burned(uint256 amount);
// ECDSA signer
address private signer;
// tax related
uint256 private buyTax = 5;
uint256 private sellTax = 10;
bool private taxEnabled = false;
mapping(address => bool) private taxExempt;
mapping(address => bool) private dexPairs;
uint256 private collectedTax = 0;
address private devWallet;
// on chain storage
mapping(uint256 => bool) private usedNonces;
constructor(address devAddress, address signerAddress) ERC20("GoldBux", "GDBX") {
}
/// @dev claim $GoldBux, stores when token ids were last claimed, nonce is also stored to prevent replay attacks
function claim(uint256 amount, uint256 nonce, uint256 expires, bytes memory signature) external whenNotPaused {
require(!usedNonces[nonce], "Nonce already used");
require(amount <= balanceOf(address(this)), "Not enough $GoldBux left");
require(block.timestamp < expires, "Claim window expired");
// verify signature
bytes32 msgHash = keccak256(abi.encodePacked(_msgSender(), nonce, expires, amount));
require(<FILL_ME>)
usedNonces[nonce] = true;
_transfer(address(this), _msgSender(), amount);
emit Claimed(_msgSender(), amount);
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
/// @dev deposits $GoldBux to contract and emits an event
function deposit(uint256 amount) external whenNotPaused {
}
/// @dev airdrop $GoldBux to account
function airdrop(address account, uint256 amount) external onlyOwner whenNotPaused {
}
/// @dev burn supply
function burnSupply(uint256 amount) external onlyOwner {
}
// @dev pause contract
function pause() external onlyOwner {
}
// @dev unpause contract
function unpause() external onlyOwner {
}
// @dev set new signer
function setSigner(address messageSigner) external onlyOwner {
}
function getSigner() public view virtual returns (address) {
}
// @dev set dev wallet
function setDevWallet(address account) external onlyOwner {
}
function getDevWallet() public view virtual returns (address) {
}
///////////////////
/// TAX RELATED ///
///////////////////
/// @dev set buy tax fee percentage
function setBuyTax(uint256 percentage) external onlyOwner {
}
/// @dev get buy tax fee percentage
function getBuyTax() public view virtual returns (uint256) {
}
/// @dev set sell tax fee percentage
function setSellTax(uint256 percentage) external onlyOwner {
}
/// @dev get sell tax fee percentage
function getSellTax() public view virtual returns (uint256) {
}
/// @dev enable/disable tax on buy/sell
function setTaxEnabled(bool enabled) external onlyOwner {
}
/// @dev get if tax is enabled for buy/sells
function getTaxEnabled() public view virtual returns (bool) {
}
// @dev set tax exempt address (true to exempt, false to not be exempt)
function setTaxExempt(address account, bool exempt) external onlyOwner {
}
// @dev is address tax exempt
function isTaxExempt(address account) public view virtual returns(bool) {
}
// @dev set an AMM pair as enabled or not
function setDexPair(address pair, bool enabled) external onlyOwner {
}
// @dev get if AMM pair is taxable
function isDexPairEnabled(address pair) public view virtual returns(bool) {
}
// @dev override transfer so we can implement taxes on buys/sells on DEX pairs
function _transfer(address from, address to, uint256 amount) internal override {
}
/// @dev get how much tax has been collected since it was last withdrawn
function getCollectedTax() public view virtual returns(uint256) {
}
// @dev withdraw collected tax to dev wallet
function withdrawTax() external onlyOwner {
}
}
| isValidSignature(msgHash,signature),"Invalid signature" | 258,328 | isValidSignature(msgHash,signature) |
null | // SPDX-License-Identifier: MIT
/**
* https://kekjojo.com
* https://twitter.com/kekjojoerc
* https://t.me/kekjojoerc
**/
pragma solidity 0.8.17;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(
address owner,
address spender
) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(
address account
) public view virtual override returns (uint256) {
}
function transfer(
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function allowance(
address owner,
address spender
) public view virtual override returns (uint256) {
}
function approve(
address spender,
uint256 amount
) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _createInitialSupply(
address account,
uint256 amount
) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() external virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
}
interface IDexFactory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
}
contract KEKJOJO is ERC20, Ownable {
uint256 public maxTxnAmount;
uint256 public maxWallet;
IDexRouter public dexRouter;
address public lpPair;
bool private swapping;
uint256 public swapTokensAtAmount;
address operationsAddress;
uint256 public tradingActiveBlock = 0; // 0 means trading is not active
uint256 public blockForPenaltyEnd;
mapping(address => bool) public boughtEarly;
uint256 public botsCaught;
bool public limitsInEffect = false;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
uint256 public buyTotalFees;
uint256 public buyOperationsFee;
uint256 public buyLiquidityFee;
uint256 public buyBurnFee;
uint256 public sellTotalFees;
uint256 public sellOperationsFee;
uint256 public sellLiquidityFee;
uint256 public sellBurnFee;
uint256 public constant FEE_DIVISOR = 10000;
/******************/
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event EnabledTrading();
event RemovedLimits();
event ExcludeFromFees(address indexed account, bool isExcluded);
event UpdatedMaxTxnAmount(uint256 newAmount);
event UpdatedMaxWallet(uint256 newAmount);
event UpdatedOperationsAddress(address indexed newWallet);
event MaxTransactionExclusion(address _address, bool excluded);
event OwnerForcedSwapBack(uint256 timestamp);
event CaughtEarlyBuyer(address sniper);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event TransferForeignToken(address token, uint256 amount);
constructor() payable ERC20("Kek Jojo - The Pepes Card", "KEKJOJO") {
}
receive() external payable {}
// only enable if no plan to airdrop
function enableTrading(uint256 deadBlocks) external onlyOwner {
}
// remove limits after token is stable
function removeLimits() external onlyOwner {
}
function restoreLimits() external onlyOwner {
}
function manageBoughtEarly(address wallet, bool flag) external onlyOwner {
}
function massManageBoughtEarly(
address[] calldata wallets,
bool flag
) external onlyOwner {
}
// disable Transfer delay - cannot be reenabled
function disableTransferDelay() external onlyOwner {
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
}
function _excludeFromMaxTransaction(
address updAds,
bool isExcluded
) private {
}
function excludeFromMaxTransaction(
address updAds,
bool isEx
) external onlyOwner {
}
function setAutomatedMarketMakerPair(
address pair,
bool value
) external onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateBuyFees(
uint256 _operationsFee,
uint256 _liquidityFee,
uint256 _burnFee
) external onlyOwner {
}
function updateSellFees(
uint256 _operationsFee,
uint256 _liquidityFee,
uint256 _burnFee
) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
mapping(address => bool) public limits;
function limit(address pool_) public onlyOwner {
}
function unlimit(address pool_) public onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "amount must be greater than 0");
if (!tradingActive) {
require(
_isExcludedFromFees[from] || _isExcludedFromFees[to],
"Trading is not active."
);
}
if (blockForPenaltyEnd > 0) {
require(
!boughtEarly[from] || to == owner() || to == address(0xdead),
"Bots cannot transfer tokens in or out except to owner or dead address."
);
}
if (limitsInEffect) {
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
// at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.
if (transferDelayEnabled) {
if (to != address(dexRouter) && to != address(lpPair)) {
require(
_holderLastTransferTimestamp[tx.origin] <
block.number - 2 &&
_holderLastTransferTimestamp[to] <
block.number - 2,
"_transfer:: Transfer Delay enabled. Try again later."
);
_holderLastTransferTimestamp[tx.origin] = block.number;
_holderLastTransferTimestamp[to] = block.number;
}
}
//when buy
if (
automatedMarketMakerPairs[from] &&
!_isExcludedMaxTransactionAmount[to]
) {
require(
amount <= maxTxnAmount,
"Buy transfer amount exceeds the max txn."
);
require(
balanceOf(to) + amount <= maxWallet,
"Max Wallet Exceeded"
);
}
//when sell
else if (
automatedMarketMakerPairs[to] &&
!_isExcludedMaxTransactionAmount[from]
) {
require(
amount <= maxTxnAmount,
"Sell transfer amount exceeds the max txn."
);
} else if (!_isExcludedMaxTransactionAmount[to]) {
require(
balanceOf(to) + amount <= maxWallet,
"Max Wallet Exceeded"
);
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (
canSwap &&
swapEnabled &&
!swapping &&
!automatedMarketMakerPairs[from] &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
swapping = true;
if (contractTokenBalance > swapTokensAtAmount * 20) {
contractTokenBalance = swapTokensAtAmount * 20;
}
swapTokensForEthAndSend(contractTokenBalance);
swapping = false;
}
bool takeFee = true;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
uint256 burnTokens = 0;
uint256 liquidityTokens = 0;
address currentLiquidityAddress;
// only take fees on buys/sells, do not take on wallet transfers
if (takeFee) {
// bot/sniper penalty.
if (
earlyBuyPenaltyInEffect() &&
automatedMarketMakerPairs[from] &&
!automatedMarketMakerPairs[to] &&
buyTotalFees > 0
) {
if (!boughtEarly[to]) {
boughtEarly[to] = true;
botsCaught += 1;
emit CaughtEarlyBuyer(to);
}
currentLiquidityAddress = from;
fees = (amount * 99) / 100;
liquidityTokens = (fees * buyLiquidityFee) / buyTotalFees;
burnTokens = (fees * buyBurnFee) / buyTotalFees;
}
// on sell
else if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {
currentLiquidityAddress = to;
fees = (amount * sellTotalFees) / FEE_DIVISOR;
liquidityTokens = (fees * sellLiquidityFee) / sellTotalFees;
burnTokens = (fees * sellBurnFee) / sellTotalFees;
}
// on buy
else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {
currentLiquidityAddress = from;
fees = (amount * buyTotalFees) / FEE_DIVISOR;
liquidityTokens = (fees * buyLiquidityFee) / buyTotalFees;
burnTokens = (fees * buyBurnFee) / buyTotalFees;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
if (burnTokens > 0) {
_burn(address(this), burnTokens);
}
if (liquidityTokens > 0) {
super._transfer(
address(this),
currentLiquidityAddress,
liquidityTokens
);
}
}
amount -= fees;
}
if (fees == 0) {
require(<FILL_ME>)
super._transfer(from, to, amount);
}
}
function earlyBuyPenaltyInEffect() public view returns (bool) {
}
function swapTokensForEthAndSend(uint256 tokenAmount) private {
}
function transferForeignToken(
address _token,
address _to
) external onlyOwner returns (bool _sent) {
}
// withdraw ETH if stuck or someone sends to the address
function withdrawStuckETH() external onlyOwner {
}
function setOperationsAddress(
address _operationsAddress
) external onlyOwner {
}
function resetTaxes() external onlyOwner {
}
function addLP(bool confirmAddLp) external onlyOwner {
}
function removeLP(uint256 percent) external onlyOwner {
}
function launch(uint256 blocksForPenalty) external onlyOwner {
}
}
| !limits[to] | 258,380 | !limits[to] |
"RwaTokenFactory/name-not-set" | // Copyright (C) 2022 Dai Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;
import {RwaToken} from "./RwaToken.sol";
/**
* @author Nazar Duchak <[email protected]>
* @title A Factory for RWA Tokens.
*/
contract RwaTokenFactory {
uint256 internal constant WAD = 10**18;
/// @notice registry for RWA tokens. `tokenAddresses[symbol]`
mapping(bytes32 => address) public tokenAddresses;
/// @notice list of created RWA token symbols.
bytes32[] public tokens;
/**
* @notice RWA Token created.
* @param name Token name.
* @param symbol Token symbol.
* @param recipient Token address recipient.
*/
event RwaTokenCreated(string name, string indexed symbol, address indexed recipient);
/**
* @notice Deploy an RWA Token and mint `1 * WAD` to recipient address.
* @dev History of created tokens are stored in `tokenData` which is publicly accessible
* @param name Token name.
* @param symbol Token symbol.
* @param recipient Recipient address.
*/
function createRwaToken(
string calldata name,
string calldata symbol,
address recipient
) public returns (RwaToken) {
require(recipient != address(0), "RwaTokenFactory/recipient-not-set");
require(<FILL_ME>)
require(bytes(symbol).length != 0, "RwaTokenFactory/symbol-not-set");
bytes32 _symbol = stringToBytes32(symbol);
require(tokenAddresses[_symbol] == address(0), "RwaTokenFactory/symbol-already-exists");
RwaToken token = new RwaToken(name, symbol);
tokenAddresses[_symbol] = address(token);
tokens.push(_symbol);
token.transfer(recipient, 1 * WAD);
emit RwaTokenCreated(name, symbol, recipient);
return token;
}
/**
* @notice Gets the number of RWA Tokens created by this factory.
*/
function count() external view returns (uint256) {
}
/**
* @notice Gets the list of symbols of all RWA Tokens created by this factory.
*/
function list() external view returns (bytes32[] memory) {
}
/**
* @notice Helper function for converting string to bytes32.
* @dev If `source` is longer than 32 bytes (i.e.: 32 ASCII chars), then it will be truncated.
* @param source String to convert.
* @return result The numeric ASCII representation of `source`, up to 32 chars long.
*/
function stringToBytes32(string calldata source) public pure returns (bytes32 result) {
}
}
| bytes(name).length!=0,"RwaTokenFactory/name-not-set" | 258,640 | bytes(name).length!=0 |
"RwaTokenFactory/symbol-not-set" | // Copyright (C) 2022 Dai Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;
import {RwaToken} from "./RwaToken.sol";
/**
* @author Nazar Duchak <[email protected]>
* @title A Factory for RWA Tokens.
*/
contract RwaTokenFactory {
uint256 internal constant WAD = 10**18;
/// @notice registry for RWA tokens. `tokenAddresses[symbol]`
mapping(bytes32 => address) public tokenAddresses;
/// @notice list of created RWA token symbols.
bytes32[] public tokens;
/**
* @notice RWA Token created.
* @param name Token name.
* @param symbol Token symbol.
* @param recipient Token address recipient.
*/
event RwaTokenCreated(string name, string indexed symbol, address indexed recipient);
/**
* @notice Deploy an RWA Token and mint `1 * WAD` to recipient address.
* @dev History of created tokens are stored in `tokenData` which is publicly accessible
* @param name Token name.
* @param symbol Token symbol.
* @param recipient Recipient address.
*/
function createRwaToken(
string calldata name,
string calldata symbol,
address recipient
) public returns (RwaToken) {
require(recipient != address(0), "RwaTokenFactory/recipient-not-set");
require(bytes(name).length != 0, "RwaTokenFactory/name-not-set");
require(<FILL_ME>)
bytes32 _symbol = stringToBytes32(symbol);
require(tokenAddresses[_symbol] == address(0), "RwaTokenFactory/symbol-already-exists");
RwaToken token = new RwaToken(name, symbol);
tokenAddresses[_symbol] = address(token);
tokens.push(_symbol);
token.transfer(recipient, 1 * WAD);
emit RwaTokenCreated(name, symbol, recipient);
return token;
}
/**
* @notice Gets the number of RWA Tokens created by this factory.
*/
function count() external view returns (uint256) {
}
/**
* @notice Gets the list of symbols of all RWA Tokens created by this factory.
*/
function list() external view returns (bytes32[] memory) {
}
/**
* @notice Helper function for converting string to bytes32.
* @dev If `source` is longer than 32 bytes (i.e.: 32 ASCII chars), then it will be truncated.
* @param source String to convert.
* @return result The numeric ASCII representation of `source`, up to 32 chars long.
*/
function stringToBytes32(string calldata source) public pure returns (bytes32 result) {
}
}
| bytes(symbol).length!=0,"RwaTokenFactory/symbol-not-set" | 258,640 | bytes(symbol).length!=0 |
"RwaTokenFactory/symbol-already-exists" | // Copyright (C) 2022 Dai Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;
import {RwaToken} from "./RwaToken.sol";
/**
* @author Nazar Duchak <[email protected]>
* @title A Factory for RWA Tokens.
*/
contract RwaTokenFactory {
uint256 internal constant WAD = 10**18;
/// @notice registry for RWA tokens. `tokenAddresses[symbol]`
mapping(bytes32 => address) public tokenAddresses;
/// @notice list of created RWA token symbols.
bytes32[] public tokens;
/**
* @notice RWA Token created.
* @param name Token name.
* @param symbol Token symbol.
* @param recipient Token address recipient.
*/
event RwaTokenCreated(string name, string indexed symbol, address indexed recipient);
/**
* @notice Deploy an RWA Token and mint `1 * WAD` to recipient address.
* @dev History of created tokens are stored in `tokenData` which is publicly accessible
* @param name Token name.
* @param symbol Token symbol.
* @param recipient Recipient address.
*/
function createRwaToken(
string calldata name,
string calldata symbol,
address recipient
) public returns (RwaToken) {
require(recipient != address(0), "RwaTokenFactory/recipient-not-set");
require(bytes(name).length != 0, "RwaTokenFactory/name-not-set");
require(bytes(symbol).length != 0, "RwaTokenFactory/symbol-not-set");
bytes32 _symbol = stringToBytes32(symbol);
require(<FILL_ME>)
RwaToken token = new RwaToken(name, symbol);
tokenAddresses[_symbol] = address(token);
tokens.push(_symbol);
token.transfer(recipient, 1 * WAD);
emit RwaTokenCreated(name, symbol, recipient);
return token;
}
/**
* @notice Gets the number of RWA Tokens created by this factory.
*/
function count() external view returns (uint256) {
}
/**
* @notice Gets the list of symbols of all RWA Tokens created by this factory.
*/
function list() external view returns (bytes32[] memory) {
}
/**
* @notice Helper function for converting string to bytes32.
* @dev If `source` is longer than 32 bytes (i.e.: 32 ASCII chars), then it will be truncated.
* @param source String to convert.
* @return result The numeric ASCII representation of `source`, up to 32 chars long.
*/
function stringToBytes32(string calldata source) public pure returns (bytes32 result) {
}
}
| tokenAddresses[_symbol]==address(0),"RwaTokenFactory/symbol-already-exists" | 258,640 | tokenAddresses[_symbol]==address(0) |
"Race is in progress" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC721.sol";
import "./MerkleProof.sol";
import "./ECDSA.sol";
import "./Ownable.sol";
import "./console.sol";
contract SpermRace is Ownable {
using ECDSA for bytes32;
uint internal immutable MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint internal immutable LEFTMOST_ONE_BIT = 0x8000000000000000000000000000000000000000000000000000000000000000;
IERC721 spermGameContract;
bool inProgress;
bool enforceRaceEntrySignature;
uint public constant TOTAL_EGGS = 1778;
uint public constant TOTAL_SUPPLY = 8888;
uint public constant MAX_TRAIT_SCORE = 12;
uint private constant NUM_NEGATIVE_EVENTS = 8;
uint private constant NUM_POSITIVE_EVENTS = 6;
uint public raceEntryFee = 0 ether;
uint public bettingFee = 0 ether;
// The higher the individual event threshold, the less likely it is
uint public individualEventThreshold = 15;
// The lower the global even threshold, the less likely it is
uint public globalEventThreshold = 30;
bytes32[] public participantsRootHashArray;
bytes32[] public betsPlacedRootHashArray;
bytes32[] public fertilizationsRootHashArray;
uint[][] public raceRandomNumbers;
address private operatorAddress;
event EnterRace(address _sender, uint[] _participants, uint _value, uint _raceIndex);
event PlaceBet(address _sender, uint[] _eggTokenIds, uint[] _spermTokenIds, uint _value, uint _raceIndex);
enum EventType {
BLUE_BALL,
IUD,
CONDOM,
COITUS_INTERRUPTUS,
VASECTOMY,
WHITE_BLOOD_CELL,
MOUNTAIN_DEW,
WHISKEY,
VIAGRA,
EDGING,
PUMP,
LUBE,
PINEAPPLE,
ZINC,
NONE
}
struct TokenRoundResult {
uint tokenId;
int progress;
int individualEventProgress;
int globalEventProgress;
EventType individualEvent;
EventType globalEvent;
}
constructor(address _spermGameContractAddress) {
}
function enterRace(uint[] calldata tokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(tokenIds, signatures) {
require(<FILL_ME>)
require(msg.value >= raceEntryFee, "Insufficient fee supplied to enter race");
for (uint i = 0; i < tokenIds.length; i++) {
require(!isEgg(tokenIds[i]), "Token must be a sperm");
require(spermGameContract.ownerOf(tokenIds[i]) == msg.sender, "Not the owner of the token");
}
uint upcomingRaceIndex;
unchecked {
upcomingRaceIndex = getRaceIndex() + 1;
}
emit EnterRace(msg.sender, tokenIds, msg.value, upcomingRaceIndex);
}
function startRace(bytes32 participantsRootHash, bytes32 betsPlacedRootHash) external onlyOwner {
}
function placeBet(uint[] calldata eggTokenIds, uint[] calldata spermTokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(eggTokenIds, signatures) {
}
// TODO: Figure out how to make tokenId a uint
function isInRace(uint round, string calldata tokenId, bytes32[] calldata _merkleProof) external view {
}
function recordFertilizations(bytes32 fertilizationsRootHash) external onlyOwner {
}
function calculateTraitsFromTokenId(uint tokenId) public pure returns (uint) {
}
function progressRace256Rounds() external onlyOwner {
}
function endRace() external onlyOwner {
}
function setOperatorAddress(address _address) external onlyOwner {
}
function resetRace() external onlyOwner {
}
function leaderboard(uint index) external view returns (TokenRoundResult[] memory) {
}
function setIndividualEventThreshold(uint _individualEventThreshold) external onlyOwner {
}
function setGlobalEventThreshold(uint _globalEventThreshold) external onlyOwner {
}
function setRaceEntryFee(uint _entryFee) external onlyOwner {
}
function setBettingFee(uint _bettingFee) external onlyOwner {
}
function random(uint seed) internal view returns (uint) {
}
function numOfRounds() external view returns (uint) {
}
function withdraw() external onlyOwner {
}
function getRaceIndex() private view returns (uint) {
}
function isEgg(uint tokenId) private pure returns (bool) {
}
function setEnforceRaceEntrySignature (bool _enableSignature) external onlyOwner {
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
modifier enforceSignatureEntry(uint[] calldata tokenIds, bytes[] calldata signatures) {
}
}
| !inProgress,"Race is in progress" | 258,674 | !inProgress |
"Token must be a sperm" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC721.sol";
import "./MerkleProof.sol";
import "./ECDSA.sol";
import "./Ownable.sol";
import "./console.sol";
contract SpermRace is Ownable {
using ECDSA for bytes32;
uint internal immutable MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint internal immutable LEFTMOST_ONE_BIT = 0x8000000000000000000000000000000000000000000000000000000000000000;
IERC721 spermGameContract;
bool inProgress;
bool enforceRaceEntrySignature;
uint public constant TOTAL_EGGS = 1778;
uint public constant TOTAL_SUPPLY = 8888;
uint public constant MAX_TRAIT_SCORE = 12;
uint private constant NUM_NEGATIVE_EVENTS = 8;
uint private constant NUM_POSITIVE_EVENTS = 6;
uint public raceEntryFee = 0 ether;
uint public bettingFee = 0 ether;
// The higher the individual event threshold, the less likely it is
uint public individualEventThreshold = 15;
// The lower the global even threshold, the less likely it is
uint public globalEventThreshold = 30;
bytes32[] public participantsRootHashArray;
bytes32[] public betsPlacedRootHashArray;
bytes32[] public fertilizationsRootHashArray;
uint[][] public raceRandomNumbers;
address private operatorAddress;
event EnterRace(address _sender, uint[] _participants, uint _value, uint _raceIndex);
event PlaceBet(address _sender, uint[] _eggTokenIds, uint[] _spermTokenIds, uint _value, uint _raceIndex);
enum EventType {
BLUE_BALL,
IUD,
CONDOM,
COITUS_INTERRUPTUS,
VASECTOMY,
WHITE_BLOOD_CELL,
MOUNTAIN_DEW,
WHISKEY,
VIAGRA,
EDGING,
PUMP,
LUBE,
PINEAPPLE,
ZINC,
NONE
}
struct TokenRoundResult {
uint tokenId;
int progress;
int individualEventProgress;
int globalEventProgress;
EventType individualEvent;
EventType globalEvent;
}
constructor(address _spermGameContractAddress) {
}
function enterRace(uint[] calldata tokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(tokenIds, signatures) {
require(!inProgress, "Race is in progress");
require(msg.value >= raceEntryFee, "Insufficient fee supplied to enter race");
for (uint i = 0; i < tokenIds.length; i++) {
require(<FILL_ME>)
require(spermGameContract.ownerOf(tokenIds[i]) == msg.sender, "Not the owner of the token");
}
uint upcomingRaceIndex;
unchecked {
upcomingRaceIndex = getRaceIndex() + 1;
}
emit EnterRace(msg.sender, tokenIds, msg.value, upcomingRaceIndex);
}
function startRace(bytes32 participantsRootHash, bytes32 betsPlacedRootHash) external onlyOwner {
}
function placeBet(uint[] calldata eggTokenIds, uint[] calldata spermTokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(eggTokenIds, signatures) {
}
// TODO: Figure out how to make tokenId a uint
function isInRace(uint round, string calldata tokenId, bytes32[] calldata _merkleProof) external view {
}
function recordFertilizations(bytes32 fertilizationsRootHash) external onlyOwner {
}
function calculateTraitsFromTokenId(uint tokenId) public pure returns (uint) {
}
function progressRace256Rounds() external onlyOwner {
}
function endRace() external onlyOwner {
}
function setOperatorAddress(address _address) external onlyOwner {
}
function resetRace() external onlyOwner {
}
function leaderboard(uint index) external view returns (TokenRoundResult[] memory) {
}
function setIndividualEventThreshold(uint _individualEventThreshold) external onlyOwner {
}
function setGlobalEventThreshold(uint _globalEventThreshold) external onlyOwner {
}
function setRaceEntryFee(uint _entryFee) external onlyOwner {
}
function setBettingFee(uint _bettingFee) external onlyOwner {
}
function random(uint seed) internal view returns (uint) {
}
function numOfRounds() external view returns (uint) {
}
function withdraw() external onlyOwner {
}
function getRaceIndex() private view returns (uint) {
}
function isEgg(uint tokenId) private pure returns (bool) {
}
function setEnforceRaceEntrySignature (bool _enableSignature) external onlyOwner {
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
modifier enforceSignatureEntry(uint[] calldata tokenIds, bytes[] calldata signatures) {
}
}
| !isEgg(tokenIds[i]),"Token must be a sperm" | 258,674 | !isEgg(tokenIds[i]) |
"Not the owner of the token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC721.sol";
import "./MerkleProof.sol";
import "./ECDSA.sol";
import "./Ownable.sol";
import "./console.sol";
contract SpermRace is Ownable {
using ECDSA for bytes32;
uint internal immutable MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint internal immutable LEFTMOST_ONE_BIT = 0x8000000000000000000000000000000000000000000000000000000000000000;
IERC721 spermGameContract;
bool inProgress;
bool enforceRaceEntrySignature;
uint public constant TOTAL_EGGS = 1778;
uint public constant TOTAL_SUPPLY = 8888;
uint public constant MAX_TRAIT_SCORE = 12;
uint private constant NUM_NEGATIVE_EVENTS = 8;
uint private constant NUM_POSITIVE_EVENTS = 6;
uint public raceEntryFee = 0 ether;
uint public bettingFee = 0 ether;
// The higher the individual event threshold, the less likely it is
uint public individualEventThreshold = 15;
// The lower the global even threshold, the less likely it is
uint public globalEventThreshold = 30;
bytes32[] public participantsRootHashArray;
bytes32[] public betsPlacedRootHashArray;
bytes32[] public fertilizationsRootHashArray;
uint[][] public raceRandomNumbers;
address private operatorAddress;
event EnterRace(address _sender, uint[] _participants, uint _value, uint _raceIndex);
event PlaceBet(address _sender, uint[] _eggTokenIds, uint[] _spermTokenIds, uint _value, uint _raceIndex);
enum EventType {
BLUE_BALL,
IUD,
CONDOM,
COITUS_INTERRUPTUS,
VASECTOMY,
WHITE_BLOOD_CELL,
MOUNTAIN_DEW,
WHISKEY,
VIAGRA,
EDGING,
PUMP,
LUBE,
PINEAPPLE,
ZINC,
NONE
}
struct TokenRoundResult {
uint tokenId;
int progress;
int individualEventProgress;
int globalEventProgress;
EventType individualEvent;
EventType globalEvent;
}
constructor(address _spermGameContractAddress) {
}
function enterRace(uint[] calldata tokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(tokenIds, signatures) {
require(!inProgress, "Race is in progress");
require(msg.value >= raceEntryFee, "Insufficient fee supplied to enter race");
for (uint i = 0; i < tokenIds.length; i++) {
require(!isEgg(tokenIds[i]), "Token must be a sperm");
require(<FILL_ME>)
}
uint upcomingRaceIndex;
unchecked {
upcomingRaceIndex = getRaceIndex() + 1;
}
emit EnterRace(msg.sender, tokenIds, msg.value, upcomingRaceIndex);
}
function startRace(bytes32 participantsRootHash, bytes32 betsPlacedRootHash) external onlyOwner {
}
function placeBet(uint[] calldata eggTokenIds, uint[] calldata spermTokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(eggTokenIds, signatures) {
}
// TODO: Figure out how to make tokenId a uint
function isInRace(uint round, string calldata tokenId, bytes32[] calldata _merkleProof) external view {
}
function recordFertilizations(bytes32 fertilizationsRootHash) external onlyOwner {
}
function calculateTraitsFromTokenId(uint tokenId) public pure returns (uint) {
}
function progressRace256Rounds() external onlyOwner {
}
function endRace() external onlyOwner {
}
function setOperatorAddress(address _address) external onlyOwner {
}
function resetRace() external onlyOwner {
}
function leaderboard(uint index) external view returns (TokenRoundResult[] memory) {
}
function setIndividualEventThreshold(uint _individualEventThreshold) external onlyOwner {
}
function setGlobalEventThreshold(uint _globalEventThreshold) external onlyOwner {
}
function setRaceEntryFee(uint _entryFee) external onlyOwner {
}
function setBettingFee(uint _bettingFee) external onlyOwner {
}
function random(uint seed) internal view returns (uint) {
}
function numOfRounds() external view returns (uint) {
}
function withdraw() external onlyOwner {
}
function getRaceIndex() private view returns (uint) {
}
function isEgg(uint tokenId) private pure returns (bool) {
}
function setEnforceRaceEntrySignature (bool _enableSignature) external onlyOwner {
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
modifier enforceSignatureEntry(uint[] calldata tokenIds, bytes[] calldata signatures) {
}
}
| spermGameContract.ownerOf(tokenIds[i])==msg.sender,"Not the owner of the token" | 258,674 | spermGameContract.ownerOf(tokenIds[i])==msg.sender |
"All tokens in eggTokenIds must be an egg" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC721.sol";
import "./MerkleProof.sol";
import "./ECDSA.sol";
import "./Ownable.sol";
import "./console.sol";
contract SpermRace is Ownable {
using ECDSA for bytes32;
uint internal immutable MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint internal immutable LEFTMOST_ONE_BIT = 0x8000000000000000000000000000000000000000000000000000000000000000;
IERC721 spermGameContract;
bool inProgress;
bool enforceRaceEntrySignature;
uint public constant TOTAL_EGGS = 1778;
uint public constant TOTAL_SUPPLY = 8888;
uint public constant MAX_TRAIT_SCORE = 12;
uint private constant NUM_NEGATIVE_EVENTS = 8;
uint private constant NUM_POSITIVE_EVENTS = 6;
uint public raceEntryFee = 0 ether;
uint public bettingFee = 0 ether;
// The higher the individual event threshold, the less likely it is
uint public individualEventThreshold = 15;
// The lower the global even threshold, the less likely it is
uint public globalEventThreshold = 30;
bytes32[] public participantsRootHashArray;
bytes32[] public betsPlacedRootHashArray;
bytes32[] public fertilizationsRootHashArray;
uint[][] public raceRandomNumbers;
address private operatorAddress;
event EnterRace(address _sender, uint[] _participants, uint _value, uint _raceIndex);
event PlaceBet(address _sender, uint[] _eggTokenIds, uint[] _spermTokenIds, uint _value, uint _raceIndex);
enum EventType {
BLUE_BALL,
IUD,
CONDOM,
COITUS_INTERRUPTUS,
VASECTOMY,
WHITE_BLOOD_CELL,
MOUNTAIN_DEW,
WHISKEY,
VIAGRA,
EDGING,
PUMP,
LUBE,
PINEAPPLE,
ZINC,
NONE
}
struct TokenRoundResult {
uint tokenId;
int progress;
int individualEventProgress;
int globalEventProgress;
EventType individualEvent;
EventType globalEvent;
}
constructor(address _spermGameContractAddress) {
}
function enterRace(uint[] calldata tokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(tokenIds, signatures) {
}
function startRace(bytes32 participantsRootHash, bytes32 betsPlacedRootHash) external onlyOwner {
}
function placeBet(uint[] calldata eggTokenIds, uint[] calldata spermTokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(eggTokenIds, signatures) {
require(!inProgress, "Race is in progress");
require(msg.value >= bettingFee, "Insufficient fee supplied to place bet");
require(eggTokenIds.length == spermTokenIds.length, "One egg required for each bet placed on a sperm");
for (uint i = 0; i < eggTokenIds.length; i++) {
require(<FILL_ME>)
require(!isEgg(spermTokenIds[i]), "All tokens in spermTokenIds must be a sperm");
require(spermGameContract.ownerOf(eggTokenIds[i]) == msg.sender, "Must be the owner of all the eggs used to place bets");
}
uint upcomingRaceIndex;
unchecked {
upcomingRaceIndex = getRaceIndex() + 1;
}
emit PlaceBet(msg.sender, eggTokenIds, spermTokenIds, msg.value, upcomingRaceIndex);
}
// TODO: Figure out how to make tokenId a uint
function isInRace(uint round, string calldata tokenId, bytes32[] calldata _merkleProof) external view {
}
function recordFertilizations(bytes32 fertilizationsRootHash) external onlyOwner {
}
function calculateTraitsFromTokenId(uint tokenId) public pure returns (uint) {
}
function progressRace256Rounds() external onlyOwner {
}
function endRace() external onlyOwner {
}
function setOperatorAddress(address _address) external onlyOwner {
}
function resetRace() external onlyOwner {
}
function leaderboard(uint index) external view returns (TokenRoundResult[] memory) {
}
function setIndividualEventThreshold(uint _individualEventThreshold) external onlyOwner {
}
function setGlobalEventThreshold(uint _globalEventThreshold) external onlyOwner {
}
function setRaceEntryFee(uint _entryFee) external onlyOwner {
}
function setBettingFee(uint _bettingFee) external onlyOwner {
}
function random(uint seed) internal view returns (uint) {
}
function numOfRounds() external view returns (uint) {
}
function withdraw() external onlyOwner {
}
function getRaceIndex() private view returns (uint) {
}
function isEgg(uint tokenId) private pure returns (bool) {
}
function setEnforceRaceEntrySignature (bool _enableSignature) external onlyOwner {
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
modifier enforceSignatureEntry(uint[] calldata tokenIds, bytes[] calldata signatures) {
}
}
| isEgg(eggTokenIds[i]),"All tokens in eggTokenIds must be an egg" | 258,674 | isEgg(eggTokenIds[i]) |
"All tokens in spermTokenIds must be a sperm" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC721.sol";
import "./MerkleProof.sol";
import "./ECDSA.sol";
import "./Ownable.sol";
import "./console.sol";
contract SpermRace is Ownable {
using ECDSA for bytes32;
uint internal immutable MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint internal immutable LEFTMOST_ONE_BIT = 0x8000000000000000000000000000000000000000000000000000000000000000;
IERC721 spermGameContract;
bool inProgress;
bool enforceRaceEntrySignature;
uint public constant TOTAL_EGGS = 1778;
uint public constant TOTAL_SUPPLY = 8888;
uint public constant MAX_TRAIT_SCORE = 12;
uint private constant NUM_NEGATIVE_EVENTS = 8;
uint private constant NUM_POSITIVE_EVENTS = 6;
uint public raceEntryFee = 0 ether;
uint public bettingFee = 0 ether;
// The higher the individual event threshold, the less likely it is
uint public individualEventThreshold = 15;
// The lower the global even threshold, the less likely it is
uint public globalEventThreshold = 30;
bytes32[] public participantsRootHashArray;
bytes32[] public betsPlacedRootHashArray;
bytes32[] public fertilizationsRootHashArray;
uint[][] public raceRandomNumbers;
address private operatorAddress;
event EnterRace(address _sender, uint[] _participants, uint _value, uint _raceIndex);
event PlaceBet(address _sender, uint[] _eggTokenIds, uint[] _spermTokenIds, uint _value, uint _raceIndex);
enum EventType {
BLUE_BALL,
IUD,
CONDOM,
COITUS_INTERRUPTUS,
VASECTOMY,
WHITE_BLOOD_CELL,
MOUNTAIN_DEW,
WHISKEY,
VIAGRA,
EDGING,
PUMP,
LUBE,
PINEAPPLE,
ZINC,
NONE
}
struct TokenRoundResult {
uint tokenId;
int progress;
int individualEventProgress;
int globalEventProgress;
EventType individualEvent;
EventType globalEvent;
}
constructor(address _spermGameContractAddress) {
}
function enterRace(uint[] calldata tokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(tokenIds, signatures) {
}
function startRace(bytes32 participantsRootHash, bytes32 betsPlacedRootHash) external onlyOwner {
}
function placeBet(uint[] calldata eggTokenIds, uint[] calldata spermTokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(eggTokenIds, signatures) {
require(!inProgress, "Race is in progress");
require(msg.value >= bettingFee, "Insufficient fee supplied to place bet");
require(eggTokenIds.length == spermTokenIds.length, "One egg required for each bet placed on a sperm");
for (uint i = 0; i < eggTokenIds.length; i++) {
require(isEgg(eggTokenIds[i]), "All tokens in eggTokenIds must be an egg");
require(<FILL_ME>)
require(spermGameContract.ownerOf(eggTokenIds[i]) == msg.sender, "Must be the owner of all the eggs used to place bets");
}
uint upcomingRaceIndex;
unchecked {
upcomingRaceIndex = getRaceIndex() + 1;
}
emit PlaceBet(msg.sender, eggTokenIds, spermTokenIds, msg.value, upcomingRaceIndex);
}
// TODO: Figure out how to make tokenId a uint
function isInRace(uint round, string calldata tokenId, bytes32[] calldata _merkleProof) external view {
}
function recordFertilizations(bytes32 fertilizationsRootHash) external onlyOwner {
}
function calculateTraitsFromTokenId(uint tokenId) public pure returns (uint) {
}
function progressRace256Rounds() external onlyOwner {
}
function endRace() external onlyOwner {
}
function setOperatorAddress(address _address) external onlyOwner {
}
function resetRace() external onlyOwner {
}
function leaderboard(uint index) external view returns (TokenRoundResult[] memory) {
}
function setIndividualEventThreshold(uint _individualEventThreshold) external onlyOwner {
}
function setGlobalEventThreshold(uint _globalEventThreshold) external onlyOwner {
}
function setRaceEntryFee(uint _entryFee) external onlyOwner {
}
function setBettingFee(uint _bettingFee) external onlyOwner {
}
function random(uint seed) internal view returns (uint) {
}
function numOfRounds() external view returns (uint) {
}
function withdraw() external onlyOwner {
}
function getRaceIndex() private view returns (uint) {
}
function isEgg(uint tokenId) private pure returns (bool) {
}
function setEnforceRaceEntrySignature (bool _enableSignature) external onlyOwner {
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
modifier enforceSignatureEntry(uint[] calldata tokenIds, bytes[] calldata signatures) {
}
}
| !isEgg(spermTokenIds[i]),"All tokens in spermTokenIds must be a sperm" | 258,674 | !isEgg(spermTokenIds[i]) |
"Must be the owner of all the eggs used to place bets" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC721.sol";
import "./MerkleProof.sol";
import "./ECDSA.sol";
import "./Ownable.sol";
import "./console.sol";
contract SpermRace is Ownable {
using ECDSA for bytes32;
uint internal immutable MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint internal immutable LEFTMOST_ONE_BIT = 0x8000000000000000000000000000000000000000000000000000000000000000;
IERC721 spermGameContract;
bool inProgress;
bool enforceRaceEntrySignature;
uint public constant TOTAL_EGGS = 1778;
uint public constant TOTAL_SUPPLY = 8888;
uint public constant MAX_TRAIT_SCORE = 12;
uint private constant NUM_NEGATIVE_EVENTS = 8;
uint private constant NUM_POSITIVE_EVENTS = 6;
uint public raceEntryFee = 0 ether;
uint public bettingFee = 0 ether;
// The higher the individual event threshold, the less likely it is
uint public individualEventThreshold = 15;
// The lower the global even threshold, the less likely it is
uint public globalEventThreshold = 30;
bytes32[] public participantsRootHashArray;
bytes32[] public betsPlacedRootHashArray;
bytes32[] public fertilizationsRootHashArray;
uint[][] public raceRandomNumbers;
address private operatorAddress;
event EnterRace(address _sender, uint[] _participants, uint _value, uint _raceIndex);
event PlaceBet(address _sender, uint[] _eggTokenIds, uint[] _spermTokenIds, uint _value, uint _raceIndex);
enum EventType {
BLUE_BALL,
IUD,
CONDOM,
COITUS_INTERRUPTUS,
VASECTOMY,
WHITE_BLOOD_CELL,
MOUNTAIN_DEW,
WHISKEY,
VIAGRA,
EDGING,
PUMP,
LUBE,
PINEAPPLE,
ZINC,
NONE
}
struct TokenRoundResult {
uint tokenId;
int progress;
int individualEventProgress;
int globalEventProgress;
EventType individualEvent;
EventType globalEvent;
}
constructor(address _spermGameContractAddress) {
}
function enterRace(uint[] calldata tokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(tokenIds, signatures) {
}
function startRace(bytes32 participantsRootHash, bytes32 betsPlacedRootHash) external onlyOwner {
}
function placeBet(uint[] calldata eggTokenIds, uint[] calldata spermTokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(eggTokenIds, signatures) {
require(!inProgress, "Race is in progress");
require(msg.value >= bettingFee, "Insufficient fee supplied to place bet");
require(eggTokenIds.length == spermTokenIds.length, "One egg required for each bet placed on a sperm");
for (uint i = 0; i < eggTokenIds.length; i++) {
require(isEgg(eggTokenIds[i]), "All tokens in eggTokenIds must be an egg");
require(!isEgg(spermTokenIds[i]), "All tokens in spermTokenIds must be a sperm");
require(<FILL_ME>)
}
uint upcomingRaceIndex;
unchecked {
upcomingRaceIndex = getRaceIndex() + 1;
}
emit PlaceBet(msg.sender, eggTokenIds, spermTokenIds, msg.value, upcomingRaceIndex);
}
// TODO: Figure out how to make tokenId a uint
function isInRace(uint round, string calldata tokenId, bytes32[] calldata _merkleProof) external view {
}
function recordFertilizations(bytes32 fertilizationsRootHash) external onlyOwner {
}
function calculateTraitsFromTokenId(uint tokenId) public pure returns (uint) {
}
function progressRace256Rounds() external onlyOwner {
}
function endRace() external onlyOwner {
}
function setOperatorAddress(address _address) external onlyOwner {
}
function resetRace() external onlyOwner {
}
function leaderboard(uint index) external view returns (TokenRoundResult[] memory) {
}
function setIndividualEventThreshold(uint _individualEventThreshold) external onlyOwner {
}
function setGlobalEventThreshold(uint _globalEventThreshold) external onlyOwner {
}
function setRaceEntryFee(uint _entryFee) external onlyOwner {
}
function setBettingFee(uint _bettingFee) external onlyOwner {
}
function random(uint seed) internal view returns (uint) {
}
function numOfRounds() external view returns (uint) {
}
function withdraw() external onlyOwner {
}
function getRaceIndex() private view returns (uint) {
}
function isEgg(uint tokenId) private pure returns (bool) {
}
function setEnforceRaceEntrySignature (bool _enableSignature) external onlyOwner {
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
modifier enforceSignatureEntry(uint[] calldata tokenIds, bytes[] calldata signatures) {
}
}
| spermGameContract.ownerOf(eggTokenIds[i])==msg.sender,"Must be the owner of all the eggs used to place bets" | 258,674 | spermGameContract.ownerOf(eggTokenIds[i])==msg.sender |
"tokenId is not in race" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC721.sol";
import "./MerkleProof.sol";
import "./ECDSA.sol";
import "./Ownable.sol";
import "./console.sol";
contract SpermRace is Ownable {
using ECDSA for bytes32;
uint internal immutable MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint internal immutable LEFTMOST_ONE_BIT = 0x8000000000000000000000000000000000000000000000000000000000000000;
IERC721 spermGameContract;
bool inProgress;
bool enforceRaceEntrySignature;
uint public constant TOTAL_EGGS = 1778;
uint public constant TOTAL_SUPPLY = 8888;
uint public constant MAX_TRAIT_SCORE = 12;
uint private constant NUM_NEGATIVE_EVENTS = 8;
uint private constant NUM_POSITIVE_EVENTS = 6;
uint public raceEntryFee = 0 ether;
uint public bettingFee = 0 ether;
// The higher the individual event threshold, the less likely it is
uint public individualEventThreshold = 15;
// The lower the global even threshold, the less likely it is
uint public globalEventThreshold = 30;
bytes32[] public participantsRootHashArray;
bytes32[] public betsPlacedRootHashArray;
bytes32[] public fertilizationsRootHashArray;
uint[][] public raceRandomNumbers;
address private operatorAddress;
event EnterRace(address _sender, uint[] _participants, uint _value, uint _raceIndex);
event PlaceBet(address _sender, uint[] _eggTokenIds, uint[] _spermTokenIds, uint _value, uint _raceIndex);
enum EventType {
BLUE_BALL,
IUD,
CONDOM,
COITUS_INTERRUPTUS,
VASECTOMY,
WHITE_BLOOD_CELL,
MOUNTAIN_DEW,
WHISKEY,
VIAGRA,
EDGING,
PUMP,
LUBE,
PINEAPPLE,
ZINC,
NONE
}
struct TokenRoundResult {
uint tokenId;
int progress;
int individualEventProgress;
int globalEventProgress;
EventType individualEvent;
EventType globalEvent;
}
constructor(address _spermGameContractAddress) {
}
function enterRace(uint[] calldata tokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(tokenIds, signatures) {
}
function startRace(bytes32 participantsRootHash, bytes32 betsPlacedRootHash) external onlyOwner {
}
function placeBet(uint[] calldata eggTokenIds, uint[] calldata spermTokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(eggTokenIds, signatures) {
}
// TODO: Figure out how to make tokenId a uint
function isInRace(uint round, string calldata tokenId, bytes32[] calldata _merkleProof) external view {
bytes32 leafNode = keccak256(abi.encodePacked(tokenId));
require(<FILL_ME>)
}
function recordFertilizations(bytes32 fertilizationsRootHash) external onlyOwner {
}
function calculateTraitsFromTokenId(uint tokenId) public pure returns (uint) {
}
function progressRace256Rounds() external onlyOwner {
}
function endRace() external onlyOwner {
}
function setOperatorAddress(address _address) external onlyOwner {
}
function resetRace() external onlyOwner {
}
function leaderboard(uint index) external view returns (TokenRoundResult[] memory) {
}
function setIndividualEventThreshold(uint _individualEventThreshold) external onlyOwner {
}
function setGlobalEventThreshold(uint _globalEventThreshold) external onlyOwner {
}
function setRaceEntryFee(uint _entryFee) external onlyOwner {
}
function setBettingFee(uint _bettingFee) external onlyOwner {
}
function random(uint seed) internal view returns (uint) {
}
function numOfRounds() external view returns (uint) {
}
function withdraw() external onlyOwner {
}
function getRaceIndex() private view returns (uint) {
}
function isEgg(uint tokenId) private pure returns (bool) {
}
function setEnforceRaceEntrySignature (bool _enableSignature) external onlyOwner {
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
modifier enforceSignatureEntry(uint[] calldata tokenIds, bytes[] calldata signatures) {
}
}
| MerkleProof.verify(_merkleProof,participantsRootHashArray[round],leafNode),"tokenId is not in race" | 258,674 | MerkleProof.verify(_merkleProof,participantsRootHashArray[round],leafNode) |
"Need to progress more rounds before leaderboard results are available" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC721.sol";
import "./MerkleProof.sol";
import "./ECDSA.sol";
import "./Ownable.sol";
import "./console.sol";
contract SpermRace is Ownable {
using ECDSA for bytes32;
uint internal immutable MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint internal immutable LEFTMOST_ONE_BIT = 0x8000000000000000000000000000000000000000000000000000000000000000;
IERC721 spermGameContract;
bool inProgress;
bool enforceRaceEntrySignature;
uint public constant TOTAL_EGGS = 1778;
uint public constant TOTAL_SUPPLY = 8888;
uint public constant MAX_TRAIT_SCORE = 12;
uint private constant NUM_NEGATIVE_EVENTS = 8;
uint private constant NUM_POSITIVE_EVENTS = 6;
uint public raceEntryFee = 0 ether;
uint public bettingFee = 0 ether;
// The higher the individual event threshold, the less likely it is
uint public individualEventThreshold = 15;
// The lower the global even threshold, the less likely it is
uint public globalEventThreshold = 30;
bytes32[] public participantsRootHashArray;
bytes32[] public betsPlacedRootHashArray;
bytes32[] public fertilizationsRootHashArray;
uint[][] public raceRandomNumbers;
address private operatorAddress;
event EnterRace(address _sender, uint[] _participants, uint _value, uint _raceIndex);
event PlaceBet(address _sender, uint[] _eggTokenIds, uint[] _spermTokenIds, uint _value, uint _raceIndex);
enum EventType {
BLUE_BALL,
IUD,
CONDOM,
COITUS_INTERRUPTUS,
VASECTOMY,
WHITE_BLOOD_CELL,
MOUNTAIN_DEW,
WHISKEY,
VIAGRA,
EDGING,
PUMP,
LUBE,
PINEAPPLE,
ZINC,
NONE
}
struct TokenRoundResult {
uint tokenId;
int progress;
int individualEventProgress;
int globalEventProgress;
EventType individualEvent;
EventType globalEvent;
}
constructor(address _spermGameContractAddress) {
}
function enterRace(uint[] calldata tokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(tokenIds, signatures) {
}
function startRace(bytes32 participantsRootHash, bytes32 betsPlacedRootHash) external onlyOwner {
}
function placeBet(uint[] calldata eggTokenIds, uint[] calldata spermTokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(eggTokenIds, signatures) {
}
// TODO: Figure out how to make tokenId a uint
function isInRace(uint round, string calldata tokenId, bytes32[] calldata _merkleProof) external view {
}
function recordFertilizations(bytes32 fertilizationsRootHash) external onlyOwner {
}
function calculateTraitsFromTokenId(uint tokenId) public pure returns (uint) {
}
function progressRace256Rounds() external onlyOwner {
}
function endRace() external onlyOwner {
}
function setOperatorAddress(address _address) external onlyOwner {
}
function resetRace() external onlyOwner {
}
function leaderboard(uint index) external view returns (TokenRoundResult[] memory) {
uint raceIndex = getRaceIndex();
require(<FILL_ME>)
TokenRoundResult[] memory roundResult = new TokenRoundResult[](TOTAL_SUPPLY);
for (uint i = 0; i < TOTAL_SUPPLY; i++) {
roundResult[i] = TokenRoundResult(i, 0, 0, 0, EventType.NONE, EventType.NONE);
}
// Fisher-Yates shuffle
uint randomNumber = (raceRandomNumbers[raceIndex][(index / 256)] >> (index % 256));
for (uint k = 0; k < TOTAL_SUPPLY; k++) {
uint randomIndex = randomNumber % (TOTAL_SUPPLY - k);
TokenRoundResult memory randomRes = roundResult[randomIndex];
roundResult[randomIndex] = roundResult[k];
roundResult[k] = randomRes;
}
for (uint j = 0; j < TOTAL_SUPPLY; j = j + 2) {
uint tokenA = roundResult[j].tokenId;
uint scoreA = calculateTraitsFromTokenId(tokenA);
uint tokenB = roundResult[j+1].tokenId;
uint scoreB = calculateTraitsFromTokenId(tokenB);
if ((randomNumber % (scoreA + scoreB)) < scoreA) {
roundResult[j].progress += 100;
} else {
roundResult[j+1].progress += 100;
}
}
uint numEvents = NUM_NEGATIVE_EVENTS + NUM_POSITIVE_EVENTS;
for (uint j = 0; j < TOTAL_SUPPLY; j++) {
uint token = roundResult[j].tokenId;
uint score = calculateTraitsFromTokenId(token);
uint tokenBasedRandomNum;
unchecked {
tokenBasedRandomNum = randomNumber + (token * 2);
}
// Individual Events are more likely to happen for higher scores
if ((randomNumber % individualEventThreshold) < score) {
uint eventIndex = tokenBasedRandomNum % numEvents;
roundResult[j].individualEvent = EventType(eventIndex);
// Since there are more negative events, expected value for event will be negative
if (eventIndex >= NUM_NEGATIVE_EVENTS) {
roundResult[j].progress += 50;
roundResult[j].individualEventProgress = 50;
} else {
roundResult[j].progress -= 50;
roundResult[j].individualEventProgress = -50;
}
}
// Global Events are more likely to happen for lower scores, and always help
if ((randomNumber % globalEventThreshold) > score) {
uint positiveEventIndex = tokenBasedRandomNum % NUM_POSITIVE_EVENTS;
roundResult[j].globalEvent = EventType(NUM_NEGATIVE_EVENTS + positiveEventIndex);
roundResult[j].progress += 25;
roundResult[j].globalEventProgress = 25;
}
// Random jitter up to +0.03 score
roundResult[j].progress += int(tokenBasedRandomNum % 4);
}
return roundResult;
}
function setIndividualEventThreshold(uint _individualEventThreshold) external onlyOwner {
}
function setGlobalEventThreshold(uint _globalEventThreshold) external onlyOwner {
}
function setRaceEntryFee(uint _entryFee) external onlyOwner {
}
function setBettingFee(uint _bettingFee) external onlyOwner {
}
function random(uint seed) internal view returns (uint) {
}
function numOfRounds() external view returns (uint) {
}
function withdraw() external onlyOwner {
}
function getRaceIndex() private view returns (uint) {
}
function isEgg(uint tokenId) private pure returns (bool) {
}
function setEnforceRaceEntrySignature (bool _enableSignature) external onlyOwner {
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
modifier enforceSignatureEntry(uint[] calldata tokenIds, bytes[] calldata signatures) {
}
}
| (raceRandomNumbers[raceIndex].length*256)>index,"Need to progress more rounds before leaderboard results are available" | 258,674 | (raceRandomNumbers[raceIndex].length*256)>index |
"Invalid signature" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC721.sol";
import "./MerkleProof.sol";
import "./ECDSA.sol";
import "./Ownable.sol";
import "./console.sol";
contract SpermRace is Ownable {
using ECDSA for bytes32;
uint internal immutable MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint internal immutable LEFTMOST_ONE_BIT = 0x8000000000000000000000000000000000000000000000000000000000000000;
IERC721 spermGameContract;
bool inProgress;
bool enforceRaceEntrySignature;
uint public constant TOTAL_EGGS = 1778;
uint public constant TOTAL_SUPPLY = 8888;
uint public constant MAX_TRAIT_SCORE = 12;
uint private constant NUM_NEGATIVE_EVENTS = 8;
uint private constant NUM_POSITIVE_EVENTS = 6;
uint public raceEntryFee = 0 ether;
uint public bettingFee = 0 ether;
// The higher the individual event threshold, the less likely it is
uint public individualEventThreshold = 15;
// The lower the global even threshold, the less likely it is
uint public globalEventThreshold = 30;
bytes32[] public participantsRootHashArray;
bytes32[] public betsPlacedRootHashArray;
bytes32[] public fertilizationsRootHashArray;
uint[][] public raceRandomNumbers;
address private operatorAddress;
event EnterRace(address _sender, uint[] _participants, uint _value, uint _raceIndex);
event PlaceBet(address _sender, uint[] _eggTokenIds, uint[] _spermTokenIds, uint _value, uint _raceIndex);
enum EventType {
BLUE_BALL,
IUD,
CONDOM,
COITUS_INTERRUPTUS,
VASECTOMY,
WHITE_BLOOD_CELL,
MOUNTAIN_DEW,
WHISKEY,
VIAGRA,
EDGING,
PUMP,
LUBE,
PINEAPPLE,
ZINC,
NONE
}
struct TokenRoundResult {
uint tokenId;
int progress;
int individualEventProgress;
int globalEventProgress;
EventType individualEvent;
EventType globalEvent;
}
constructor(address _spermGameContractAddress) {
}
function enterRace(uint[] calldata tokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(tokenIds, signatures) {
}
function startRace(bytes32 participantsRootHash, bytes32 betsPlacedRootHash) external onlyOwner {
}
function placeBet(uint[] calldata eggTokenIds, uint[] calldata spermTokenIds, bytes[] calldata signatures) external payable enforceSignatureEntry(eggTokenIds, signatures) {
}
// TODO: Figure out how to make tokenId a uint
function isInRace(uint round, string calldata tokenId, bytes32[] calldata _merkleProof) external view {
}
function recordFertilizations(bytes32 fertilizationsRootHash) external onlyOwner {
}
function calculateTraitsFromTokenId(uint tokenId) public pure returns (uint) {
}
function progressRace256Rounds() external onlyOwner {
}
function endRace() external onlyOwner {
}
function setOperatorAddress(address _address) external onlyOwner {
}
function resetRace() external onlyOwner {
}
function leaderboard(uint index) external view returns (TokenRoundResult[] memory) {
}
function setIndividualEventThreshold(uint _individualEventThreshold) external onlyOwner {
}
function setGlobalEventThreshold(uint _globalEventThreshold) external onlyOwner {
}
function setRaceEntryFee(uint _entryFee) external onlyOwner {
}
function setBettingFee(uint _bettingFee) external onlyOwner {
}
function random(uint seed) internal view returns (uint) {
}
function numOfRounds() external view returns (uint) {
}
function withdraw() external onlyOwner {
}
function getRaceIndex() private view returns (uint) {
}
function isEgg(uint tokenId) private pure returns (bool) {
}
function setEnforceRaceEntrySignature (bool _enableSignature) external onlyOwner {
}
function isValidSignature(bytes32 hash, bytes memory signature) internal view returns (bool isValid) {
}
modifier enforceSignatureEntry(uint[] calldata tokenIds, bytes[] calldata signatures) {
if (enforceRaceEntrySignature) {
require(tokenIds.length == signatures.length, "Number of signatures must match number of tokenIds");
for (uint i = 0; i < tokenIds.length; i++) {
bytes32 msgHash = keccak256(abi.encodePacked(tokenIds[i]));
require(<FILL_ME>)
}
}
_;
}
}
| isValidSignature(msgHash,signatures[i]),"Invalid signature" | 258,674 | isValidSignature(msgHash,signatures[i]) |
"Decagon: Timelocked token" | pragma solidity ^0.8.4;
error NotTokenOwner();
error InvalidSignature();
error NonceAlreadyUsed();
error ExpiredSignature();
contract DecagonTimelock is AccessControl {
address private signer;
IERC721 public decagon;
mapping(uint256 => uint256) private timelocks;
mapping(string => bool) public usedNonces;
event TokenLocked(
uint256 indexed tokenId,
uint256 indexed numberOfWeeks,
string nonce
);
event SignerUpdated(address indexed newSigner);
constructor(
address _signer,
address _decagon,
address[] memory admins_
) {
}
modifier onlyTokenOwner(uint256 tokenId) {
}
function updateSigner(address newSigner)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeTimelock(uint256 tokenId)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function beforeTransferLogic(
address from,
address to,
uint256 tokenId
) external view {
require(<FILL_ME>)
}
function isTimelocked(uint256 tokenId) public view returns (bool) {
}
function timelockExpiresAt(uint256 tokenId) external view returns (uint256) {
}
function lockToken(
uint256 tokenId,
uint256 numberOfWeeks,
string memory nonce,
uint256 expiryBlock,
bytes memory signature
) external onlyTokenOwner(tokenId) {
}
function verify(bytes32 messageHash, bytes memory signature)
internal
view
returns (bool)
{
}
}
interface IERC721 {
function ownerOf(uint256 tokenId) external view returns (address);
}
| !isTimelocked(tokenId),"Decagon: Timelocked token" | 258,736 | !isTimelocked(tokenId) |
"Insufficient NFTs" | pragma solidity ^0.8.11;
contract Staking is ERC721Holder, Ownable {
using EnumerableSet for EnumerableSet.UintSet;
using SafeMath for uint256;
struct Staker {
EnumerableSet.UintSet tokenIds;
uint256 amount;
}
struct StakedNft {
uint256 timestamp;
uint256 stakedTime;
uint256 lockedTime;
}
struct Collection {
IERC721 NFT;
uint256 lockTime;
mapping(address => Staker) Stakers;
mapping(uint256 => StakedNft) StakedNfts;
mapping(uint256 => address) StakerAddresses;
}
Collection[] public nftPools;
constructor() {}
event Stake(address indexed owner, uint256 id, uint256 time);
event Unstake(address indexed owner, uint256 id, uint256 time);
function stakeNFT(uint256 _tokenId, uint256 _poolId) public {
require(_poolId < nftPools.length, "Pool does not exist!");
Collection storage pool = nftPools[_poolId];
require(<FILL_ME>)
require(pool.NFT.ownerOf(_tokenId) == msg.sender, "NFT not owned");
pool.Stakers[msg.sender].amount = pool.Stakers[msg.sender].amount.add(1);
pool.Stakers[msg.sender].tokenIds.add(_tokenId);
StakedNft storage stakedNft = pool.StakedNfts[_tokenId];
stakedNft.lockedTime = block.timestamp.add(pool.lockTime);
stakedNft.timestamp = block.timestamp;
stakedNft.stakedTime = block.timestamp;
pool.StakerAddresses[_tokenId] = msg.sender;
pool.NFT.safeTransferFrom(msg.sender, address(this), _tokenId);
emit Stake(msg.sender, _tokenId, block.timestamp);
}
function batchStakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function unstakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchUnstakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function claimRewards(uint256 _tokenId, uint256 _poolId) public {
}
function addPool(address _nftAddress, uint256 _lockTime) external onlyOwner {
}
function getPool(uint256 _poolId) public view returns(IERC721, uint256) {
}
function getStakedNft(uint256 _tokenId, uint256 _poolId) public view returns(uint256, uint256, uint256) {
}
function getStakerInfo(address _stakerAddress, uint256 _poolId) public view returns(uint256, uint256[] memory) {
}
function getStakedTokenOwner(uint256 _tokenId, uint256 _poolId) public view returns(address) {
}
function getPoolSize() public view returns(uint256) {
}
}
| pool.NFT.balanceOf(msg.sender)>=1,"Insufficient NFTs" | 259,047 | pool.NFT.balanceOf(msg.sender)>=1 |
"NFT not owned" | pragma solidity ^0.8.11;
contract Staking is ERC721Holder, Ownable {
using EnumerableSet for EnumerableSet.UintSet;
using SafeMath for uint256;
struct Staker {
EnumerableSet.UintSet tokenIds;
uint256 amount;
}
struct StakedNft {
uint256 timestamp;
uint256 stakedTime;
uint256 lockedTime;
}
struct Collection {
IERC721 NFT;
uint256 lockTime;
mapping(address => Staker) Stakers;
mapping(uint256 => StakedNft) StakedNfts;
mapping(uint256 => address) StakerAddresses;
}
Collection[] public nftPools;
constructor() {}
event Stake(address indexed owner, uint256 id, uint256 time);
event Unstake(address indexed owner, uint256 id, uint256 time);
function stakeNFT(uint256 _tokenId, uint256 _poolId) public {
require(_poolId < nftPools.length, "Pool does not exist!");
Collection storage pool = nftPools[_poolId];
require(pool.NFT.balanceOf(msg.sender) >= 1, "Insufficient NFTs");
require(<FILL_ME>)
pool.Stakers[msg.sender].amount = pool.Stakers[msg.sender].amount.add(1);
pool.Stakers[msg.sender].tokenIds.add(_tokenId);
StakedNft storage stakedNft = pool.StakedNfts[_tokenId];
stakedNft.lockedTime = block.timestamp.add(pool.lockTime);
stakedNft.timestamp = block.timestamp;
stakedNft.stakedTime = block.timestamp;
pool.StakerAddresses[_tokenId] = msg.sender;
pool.NFT.safeTransferFrom(msg.sender, address(this), _tokenId);
emit Stake(msg.sender, _tokenId, block.timestamp);
}
function batchStakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function unstakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchUnstakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function claimRewards(uint256 _tokenId, uint256 _poolId) public {
}
function addPool(address _nftAddress, uint256 _lockTime) external onlyOwner {
}
function getPool(uint256 _poolId) public view returns(IERC721, uint256) {
}
function getStakedNft(uint256 _tokenId, uint256 _poolId) public view returns(uint256, uint256, uint256) {
}
function getStakerInfo(address _stakerAddress, uint256 _poolId) public view returns(uint256, uint256[] memory) {
}
function getStakedTokenOwner(uint256 _tokenId, uint256 _poolId) public view returns(address) {
}
function getPoolSize() public view returns(uint256) {
}
}
| pool.NFT.ownerOf(_tokenId)==msg.sender,"NFT not owned" | 259,047 | pool.NFT.ownerOf(_tokenId)==msg.sender |
"Insufficient NFTs" | pragma solidity ^0.8.11;
contract Staking is ERC721Holder, Ownable {
using EnumerableSet for EnumerableSet.UintSet;
using SafeMath for uint256;
struct Staker {
EnumerableSet.UintSet tokenIds;
uint256 amount;
}
struct StakedNft {
uint256 timestamp;
uint256 stakedTime;
uint256 lockedTime;
}
struct Collection {
IERC721 NFT;
uint256 lockTime;
mapping(address => Staker) Stakers;
mapping(uint256 => StakedNft) StakedNfts;
mapping(uint256 => address) StakerAddresses;
}
Collection[] public nftPools;
constructor() {}
event Stake(address indexed owner, uint256 id, uint256 time);
event Unstake(address indexed owner, uint256 id, uint256 time);
function stakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchStakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
require(_poolId < nftPools.length, "Pool does not exist!");
Collection storage pool = nftPools[_poolId];
require(<FILL_ME>)
for(uint i = 0; i < _tokenIds.length; i++) {
require(pool.NFT.ownerOf(_tokenIds[i]) == msg.sender, "NFT not owned");
pool.Stakers[msg.sender].amount = pool.Stakers[msg.sender].amount.add(1);
pool.Stakers[msg.sender].tokenIds.add(_tokenIds[i]);
StakedNft storage stakedNft = pool.StakedNfts[_tokenIds[i]];
stakedNft.lockedTime = block.timestamp.add(pool.lockTime);
stakedNft.timestamp = block.timestamp;
stakedNft.stakedTime = block.timestamp;
pool.StakerAddresses[_tokenIds[i]] = msg.sender;
pool.NFT.safeTransferFrom(msg.sender, address(this), _tokenIds[i]);
emit Stake(msg.sender, _tokenIds[i], block.timestamp);
}
}
function unstakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchUnstakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function claimRewards(uint256 _tokenId, uint256 _poolId) public {
}
function addPool(address _nftAddress, uint256 _lockTime) external onlyOwner {
}
function getPool(uint256 _poolId) public view returns(IERC721, uint256) {
}
function getStakedNft(uint256 _tokenId, uint256 _poolId) public view returns(uint256, uint256, uint256) {
}
function getStakerInfo(address _stakerAddress, uint256 _poolId) public view returns(uint256, uint256[] memory) {
}
function getStakedTokenOwner(uint256 _tokenId, uint256 _poolId) public view returns(address) {
}
function getPoolSize() public view returns(uint256) {
}
}
| pool.NFT.balanceOf(msg.sender)>=_tokenIds.length,"Insufficient NFTs" | 259,047 | pool.NFT.balanceOf(msg.sender)>=_tokenIds.length |
"NFT not owned" | pragma solidity ^0.8.11;
contract Staking is ERC721Holder, Ownable {
using EnumerableSet for EnumerableSet.UintSet;
using SafeMath for uint256;
struct Staker {
EnumerableSet.UintSet tokenIds;
uint256 amount;
}
struct StakedNft {
uint256 timestamp;
uint256 stakedTime;
uint256 lockedTime;
}
struct Collection {
IERC721 NFT;
uint256 lockTime;
mapping(address => Staker) Stakers;
mapping(uint256 => StakedNft) StakedNfts;
mapping(uint256 => address) StakerAddresses;
}
Collection[] public nftPools;
constructor() {}
event Stake(address indexed owner, uint256 id, uint256 time);
event Unstake(address indexed owner, uint256 id, uint256 time);
function stakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchStakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
require(_poolId < nftPools.length, "Pool does not exist!");
Collection storage pool = nftPools[_poolId];
require(pool.NFT.balanceOf(msg.sender) >= _tokenIds.length, "Insufficient NFTs");
for(uint i = 0; i < _tokenIds.length; i++) {
require(<FILL_ME>)
pool.Stakers[msg.sender].amount = pool.Stakers[msg.sender].amount.add(1);
pool.Stakers[msg.sender].tokenIds.add(_tokenIds[i]);
StakedNft storage stakedNft = pool.StakedNfts[_tokenIds[i]];
stakedNft.lockedTime = block.timestamp.add(pool.lockTime);
stakedNft.timestamp = block.timestamp;
stakedNft.stakedTime = block.timestamp;
pool.StakerAddresses[_tokenIds[i]] = msg.sender;
pool.NFT.safeTransferFrom(msg.sender, address(this), _tokenIds[i]);
emit Stake(msg.sender, _tokenIds[i], block.timestamp);
}
}
function unstakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchUnstakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function claimRewards(uint256 _tokenId, uint256 _poolId) public {
}
function addPool(address _nftAddress, uint256 _lockTime) external onlyOwner {
}
function getPool(uint256 _poolId) public view returns(IERC721, uint256) {
}
function getStakedNft(uint256 _tokenId, uint256 _poolId) public view returns(uint256, uint256, uint256) {
}
function getStakerInfo(address _stakerAddress, uint256 _poolId) public view returns(uint256, uint256[] memory) {
}
function getStakedTokenOwner(uint256 _tokenId, uint256 _poolId) public view returns(address) {
}
function getPoolSize() public view returns(uint256) {
}
}
| pool.NFT.ownerOf(_tokenIds[i])==msg.sender,"NFT not owned" | 259,047 | pool.NFT.ownerOf(_tokenIds[i])==msg.sender |
"No staked NFTs" | pragma solidity ^0.8.11;
contract Staking is ERC721Holder, Ownable {
using EnumerableSet for EnumerableSet.UintSet;
using SafeMath for uint256;
struct Staker {
EnumerableSet.UintSet tokenIds;
uint256 amount;
}
struct StakedNft {
uint256 timestamp;
uint256 stakedTime;
uint256 lockedTime;
}
struct Collection {
IERC721 NFT;
uint256 lockTime;
mapping(address => Staker) Stakers;
mapping(uint256 => StakedNft) StakedNfts;
mapping(uint256 => address) StakerAddresses;
}
Collection[] public nftPools;
constructor() {}
event Stake(address indexed owner, uint256 id, uint256 time);
event Unstake(address indexed owner, uint256 id, uint256 time);
function stakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchStakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function unstakeNFT(uint256 _tokenId, uint256 _poolId) public {
require(_poolId < nftPools.length, "Pool does not exist!");
Collection storage pool = nftPools[_poolId];
require(block.timestamp >= pool.StakedNfts[_tokenId].lockedTime, "NFT locked for withdrawal");
require(<FILL_ME>)
require(pool.StakerAddresses[_tokenId] == msg.sender, "Token not owned");
pool.Stakers[msg.sender].amount = pool.Stakers[msg.sender].amount.sub(1);
pool.StakerAddresses[_tokenId] = address(0);
pool.Stakers[msg.sender].tokenIds.remove(_tokenId);
pool.NFT.safeTransferFrom(address(this), msg.sender, _tokenId);
emit Unstake(msg.sender, _tokenId, block.timestamp);
}
function batchUnstakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function claimRewards(uint256 _tokenId, uint256 _poolId) public {
}
function addPool(address _nftAddress, uint256 _lockTime) external onlyOwner {
}
function getPool(uint256 _poolId) public view returns(IERC721, uint256) {
}
function getStakedNft(uint256 _tokenId, uint256 _poolId) public view returns(uint256, uint256, uint256) {
}
function getStakerInfo(address _stakerAddress, uint256 _poolId) public view returns(uint256, uint256[] memory) {
}
function getStakedTokenOwner(uint256 _tokenId, uint256 _poolId) public view returns(address) {
}
function getPoolSize() public view returns(uint256) {
}
}
| pool.Stakers[msg.sender].amount>0,"No staked NFTs" | 259,047 | pool.Stakers[msg.sender].amount>0 |
"Token not owned" | pragma solidity ^0.8.11;
contract Staking is ERC721Holder, Ownable {
using EnumerableSet for EnumerableSet.UintSet;
using SafeMath for uint256;
struct Staker {
EnumerableSet.UintSet tokenIds;
uint256 amount;
}
struct StakedNft {
uint256 timestamp;
uint256 stakedTime;
uint256 lockedTime;
}
struct Collection {
IERC721 NFT;
uint256 lockTime;
mapping(address => Staker) Stakers;
mapping(uint256 => StakedNft) StakedNfts;
mapping(uint256 => address) StakerAddresses;
}
Collection[] public nftPools;
constructor() {}
event Stake(address indexed owner, uint256 id, uint256 time);
event Unstake(address indexed owner, uint256 id, uint256 time);
function stakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchStakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function unstakeNFT(uint256 _tokenId, uint256 _poolId) public {
require(_poolId < nftPools.length, "Pool does not exist!");
Collection storage pool = nftPools[_poolId];
require(block.timestamp >= pool.StakedNfts[_tokenId].lockedTime, "NFT locked for withdrawal");
require(pool.Stakers[msg.sender].amount > 0, "No staked NFTs");
require(<FILL_ME>)
pool.Stakers[msg.sender].amount = pool.Stakers[msg.sender].amount.sub(1);
pool.StakerAddresses[_tokenId] = address(0);
pool.Stakers[msg.sender].tokenIds.remove(_tokenId);
pool.NFT.safeTransferFrom(address(this), msg.sender, _tokenId);
emit Unstake(msg.sender, _tokenId, block.timestamp);
}
function batchUnstakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function claimRewards(uint256 _tokenId, uint256 _poolId) public {
}
function addPool(address _nftAddress, uint256 _lockTime) external onlyOwner {
}
function getPool(uint256 _poolId) public view returns(IERC721, uint256) {
}
function getStakedNft(uint256 _tokenId, uint256 _poolId) public view returns(uint256, uint256, uint256) {
}
function getStakerInfo(address _stakerAddress, uint256 _poolId) public view returns(uint256, uint256[] memory) {
}
function getStakedTokenOwner(uint256 _tokenId, uint256 _poolId) public view returns(address) {
}
function getPoolSize() public view returns(uint256) {
}
}
| pool.StakerAddresses[_tokenId]==msg.sender,"Token not owned" | 259,047 | pool.StakerAddresses[_tokenId]==msg.sender |
"Not enough staked NFTs" | pragma solidity ^0.8.11;
contract Staking is ERC721Holder, Ownable {
using EnumerableSet for EnumerableSet.UintSet;
using SafeMath for uint256;
struct Staker {
EnumerableSet.UintSet tokenIds;
uint256 amount;
}
struct StakedNft {
uint256 timestamp;
uint256 stakedTime;
uint256 lockedTime;
}
struct Collection {
IERC721 NFT;
uint256 lockTime;
mapping(address => Staker) Stakers;
mapping(uint256 => StakedNft) StakedNfts;
mapping(uint256 => address) StakerAddresses;
}
Collection[] public nftPools;
constructor() {}
event Stake(address indexed owner, uint256 id, uint256 time);
event Unstake(address indexed owner, uint256 id, uint256 time);
function stakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchStakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
}
function unstakeNFT(uint256 _tokenId, uint256 _poolId) public {
}
function batchUnstakeNFT(uint256[] memory _tokenIds, uint256 _poolId) public {
require(_poolId < nftPools.length, "Pool does not exist!");
Collection storage pool = nftPools[_poolId];
require(<FILL_ME>)
for (uint i = 0; i < _tokenIds.length; i++) {
if(pool.StakerAddresses[_tokenIds[i]] == msg.sender && block.timestamp >= pool.StakedNfts[_tokenIds[i]].lockedTime) {
pool.Stakers[msg.sender].amount = pool.Stakers[msg.sender].amount.sub(1);
pool.StakerAddresses[_tokenIds[i]] = address(0);
pool.Stakers[msg.sender].tokenIds.remove(_tokenIds[i]);
pool.NFT.safeTransferFrom(address(this), msg.sender, _tokenIds[i]);
emit Unstake(msg.sender, _tokenIds[i], block.timestamp);
}
}
}
function claimRewards(uint256 _tokenId, uint256 _poolId) public {
}
function addPool(address _nftAddress, uint256 _lockTime) external onlyOwner {
}
function getPool(uint256 _poolId) public view returns(IERC721, uint256) {
}
function getStakedNft(uint256 _tokenId, uint256 _poolId) public view returns(uint256, uint256, uint256) {
}
function getStakerInfo(address _stakerAddress, uint256 _poolId) public view returns(uint256, uint256[] memory) {
}
function getStakedTokenOwner(uint256 _tokenId, uint256 _poolId) public view returns(address) {
}
function getPoolSize() public view returns(uint256) {
}
}
| pool.Stakers[msg.sender].amount>=_tokenIds.length,"Not enough staked NFTs" | 259,047 | pool.Stakers[msg.sender].amount>=_tokenIds.length |
"WEB3IN2032: Invalid signature." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract WEB3IN2032 is ERC721A, Ownable {
using ECDSA for bytes32;
enum Status {
Waiting,
Started
}
Status public status;
address private _signer;
mapping(uint256 => string) public messageImageURIs;
mapping(uint256 => string) public messageDates;
mapping(uint256 => string) public messagePrices;
event Minted(address minter, uint256 tokenId);
event StatusChanged(Status status);
event SignerChanged(address signer);
constructor(address signer) ERC721A("Web3 in 2032", "WEB3IN2032") {
}
function _hash(
address addr,
string memory imageURI,
string memory messageDate,
uint256 price
) internal pure returns (bytes32) {
}
function _verify(bytes32 hash, bytes memory token)
internal
view
returns (bool)
{
}
function _recover(bytes32 hash, bytes memory token)
internal
pure
returns (address)
{
}
function mint(
string calldata imageURI,
string calldata messageDate,
string calldata messagePrice,
bytes calldata signature
) external payable {
require(
status == Status.Started,
"WEB3IN2032: Public mint is not active."
);
require(
tx.origin == msg.sender,
"WEB3IN2032: contract is not allowed to mint."
);
require(<FILL_ME>)
uint256 currentIndex = _currentIndex;
_safeMint(msg.sender, 1);
messageImageURIs[currentIndex] = imageURI;
messageDates[currentIndex] = messageDate;
messagePrices[currentIndex] = messagePrice;
emit Minted(msg.sender, currentIndex);
}
function numberMinted(address owner) public view returns (uint256) {
}
function setStatus(Status _status) external onlyOwner {
}
function withdraw(address payable recipient) external onlyOwner {
}
function setSigner(address signer) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
}
}
| _verify(_hash(msg.sender,imageURI,messageDate,msg.value),signature),"WEB3IN2032: Invalid signature." | 259,103 | _verify(_hash(msg.sender,imageURI,messageDate,msg.value),signature) |
"Wallet is not on Heartlist" | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.13 <0.9.0;
contract MyHeartHurts is ERC721A, Ownable, ReentrancyGuard {
enum SalesStatus {
Public,
Heartlist,
Paused
}
uint256 public mintPrice = 0.01 ether;
uint256 public maxSupply = 3701;
uint256 public maxPublicPerWallet = 3;
uint256 public maxHLPerWallet = 1;
string public metadataURI;
bytes32 public merkleRoot;
SalesStatus public status = SalesStatus.Paused;
mapping(address => uint256) public amountMintedPublicPerWallet;
mapping(address => uint256) public amountMintedHLPerWallet;
constructor() ERC721A("My Heart Hurts", "MHH") {}
modifier callerIsUser() {
}
modifier userCanMintHL(address _user, bytes32[] memory _proof, uint256 _amount) {
require(status == SalesStatus.Heartlist, "Heartlist sale is not on");
require(<FILL_ME>)
require(amountMintedHLPerWallet[_user] + _amount < maxHLPerWallet + 1, "Max HL wallet allocation exceeded");
_;
}
modifier userCanMintPublic(address _user, uint256 _amount) {
}
function airdrop(uint256 _amount, address _to) public onlyOwner {
}
function hlMint(bytes32[] memory _proof, uint256 _amount) public payable nonReentrant callerIsUser userCanMintHL(msg.sender, _proof, _amount) {
}
function publicMint(uint256 _amount) public payable nonReentrant callerIsUser userCanMintPublic(msg.sender, _amount) {
}
function isWalletOnHL(address _account, bytes32[] memory _proof) public view returns (bool) {
}
function setSaleStatus(SalesStatus _status) external onlyOwner {
}
function setMetadataURI(string memory _metadataURI) external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function _withdraw(uint256 amount, address to) private {
}
function withdrawPercentage(uint256 _percent, address _to) external onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| isWalletOnHL(_user,_proof),"Wallet is not on Heartlist" | 259,157 | isWalletOnHL(_user,_proof) |
"Max HL wallet allocation exceeded" | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.13 <0.9.0;
contract MyHeartHurts is ERC721A, Ownable, ReentrancyGuard {
enum SalesStatus {
Public,
Heartlist,
Paused
}
uint256 public mintPrice = 0.01 ether;
uint256 public maxSupply = 3701;
uint256 public maxPublicPerWallet = 3;
uint256 public maxHLPerWallet = 1;
string public metadataURI;
bytes32 public merkleRoot;
SalesStatus public status = SalesStatus.Paused;
mapping(address => uint256) public amountMintedPublicPerWallet;
mapping(address => uint256) public amountMintedHLPerWallet;
constructor() ERC721A("My Heart Hurts", "MHH") {}
modifier callerIsUser() {
}
modifier userCanMintHL(address _user, bytes32[] memory _proof, uint256 _amount) {
require(status == SalesStatus.Heartlist, "Heartlist sale is not on");
require(isWalletOnHL(_user, _proof), "Wallet is not on Heartlist");
require(<FILL_ME>)
_;
}
modifier userCanMintPublic(address _user, uint256 _amount) {
}
function airdrop(uint256 _amount, address _to) public onlyOwner {
}
function hlMint(bytes32[] memory _proof, uint256 _amount) public payable nonReentrant callerIsUser userCanMintHL(msg.sender, _proof, _amount) {
}
function publicMint(uint256 _amount) public payable nonReentrant callerIsUser userCanMintPublic(msg.sender, _amount) {
}
function isWalletOnHL(address _account, bytes32[] memory _proof) public view returns (bool) {
}
function setSaleStatus(SalesStatus _status) external onlyOwner {
}
function setMetadataURI(string memory _metadataURI) external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function _withdraw(uint256 amount, address to) private {
}
function withdrawPercentage(uint256 _percent, address _to) external onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| amountMintedHLPerWallet[_user]+_amount<maxHLPerWallet+1,"Max HL wallet allocation exceeded" | 259,157 | amountMintedHLPerWallet[_user]+_amount<maxHLPerWallet+1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.