comment
stringlengths 1
211
β | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Cannot set maxWallet lower than 2%" | // SPDX-License-Identifier: MIT
/*
Website https://www.chyna.io/
Twitter https://twitter.com/ChynaToken
Telegram https://t.me/CHYNAPORTAL
Greatest Hits
https://www.youtube.com/watch?v=dVCF4sL2VYE
*/
pragma solidity 0.8.20;
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns(address pair);
}
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 IERC20Metadata is IERC20 {
function name() external view returns(string memory);
function symbol() external view returns(string memory);
function decimals() external view returns(uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns(address) {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns(string memory) {
}
function symbol() public view virtual override returns(string memory) {
}
function decimals() public view virtual override returns(uint8) {
}
function totalSupply() public view virtual override returns(uint256) {
}
function balanceOf(address account) public view virtual override returns(uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns(bool) {
}
function allowance(address owner, address spender) public view virtual override returns(uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns(bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns(bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns(bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns(bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
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 {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
function mul(int256 a, int256 b) internal pure returns(int256) {
}
function div(int256 a, int256 b) internal pure returns(int256) {
}
function sub(int256 a, int256 b) internal pure returns(int256) {
}
function add(int256 a, int256 b) internal pure returns(int256) {
}
function abs(int256 a) internal pure returns(int256) {
}
function toUint256Safe(int256 a) internal pure returns(uint256) {
}
}
library SafeMathUint {
function toInt256Safe(uint256 a) internal pure returns(int256) {
}
}
interface IUniswapV2Router01 {
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 removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns(uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns(uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns(uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns(uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns(uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns(uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns(uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns(uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns(uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns(uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns(uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns(uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns(uint[] memory amounts);
}
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;
}
contract CHYNA is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable router;
address public immutable uniswapV2Pair;
address private developmentWallet;
address private marketingWallet;
uint256 private maxBuyAmount;
uint256 private maxSellAmount;
uint256 private maxWalletAmount;
uint256 private thresholdSwapAmount;
bool private isTrading = false;
bool public swapEnabled = false;
bool public isSwapping;
struct Fees {
uint256 buyTotalFees;
uint256 buyMarketingFee;
uint256 buyDevelopmentFee;
uint256 buyLiquidityFee;
uint256 sellTotalFees;
uint256 sellMarketingFee;
uint256 sellDevelopmentFee;
uint256 sellLiquidityFee;
}
Fees public _fees = Fees({
buyTotalFees: 0,
buyMarketingFee: 0,
buyDevelopmentFee:0,
buyLiquidityFee: 0,
sellTotalFees: 0,
sellMarketingFee: 0,
sellDevelopmentFee:0,
sellLiquidityFee: 0
});
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForDevelopment;
uint256 private taxTill;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
mapping(address => bool) public _isExcludedMaxWalletAmount;
mapping(address => bool) public marketPair;
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived
);
constructor() ERC20("CHYNA", "CHYNA") {
}
receive() external payable {
}
function swapTrading() external onlyOwner {
}
function updateThresholdSwapAmount(uint256 newAmount) external onlyOwner returns(bool){
}
function updateMaxTxnAmount(uint256 newMaxBuy, uint256 newMaxSell) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newPercentage) external onlyOwner {
require(<FILL_ME>)
maxWalletAmount = (totalSupply() * newPercentage) / 1000;
}
function toggleSwapEnabled(bool enabled) external onlyOwner(){
}
function updateFees(uint256 _marketingFeeBuy, uint256 _liquidityFeeBuy,uint256 _developmentFeeBuy,uint256 _marketingFeeSell, uint256 _liquidityFeeSell,uint256 _developmentFeeSell) external onlyOwner{
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function excludeFromWalletLimit(address account, bool excluded) public onlyOwner {
}
function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
}
function setMarketPair(address pair, bool value) public onlyOwner {
}
function setWallets(address _marketingWallet,address _developmentWallet) external onlyOwner{
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override {
}
function swapTokensForEth(uint256 tAmount) private {
}
function addLiquidity(uint256 tAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
}
| ((totalSupply()*newPercentage)/1000)>=(totalSupply()/50),"Cannot set maxWallet lower than 2%" | 123,846 | ((totalSupply()*newPercentage)/1000)>=(totalSupply()/50) |
"d2OConnectorLZ/Must have proper allowance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "./IERC165.sol";
import "./OFTCore.sol";
import "./AuthAdmin.sol";
import "./IOFT.sol";
interface d2OLike {
function decreaseAllowanceAdmin(address owner, address spender, uint256 subtractedValue) external returns (bool);
function totalSupply() external view returns (uint256 supply);
function burn(address,uint256) external;
function mintAndDelay(address,uint256) external;
}
contract LayerZeroPipe is OFTCore, IOFT, AuthAdmin("LayerZeroPipe", msg.sender) {
address public immutable d2OContract;
event MintLayerZero(address indexed from, uint256 amount, uint16 _srcChainId);
event BurnLayerZero(address indexed from, uint256 amount, uint16 _dstChainId);
constructor(address _lzEndpoint, address _d2OContract) OFTCore(_lzEndpoint) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(OFTCore, IERC165) returns (bool) {
}
function circulatingSupply() public view virtual override returns (uint) {
}
function _debitFrom(address _from, uint16 _dstChainId, bytes memory, uint _amount) internal virtual override alive {
address spender = _msgSender();
if (_from != spender) {
require(<FILL_ME>)
}
d2OLike(d2OContract).burn(_from, _amount);
emit BurnLayerZero(_from, _amount, _dstChainId);
}
function _creditTo(uint16 _srcChainId, address _toAddress, uint _amount) internal virtual override alive {
}
function setTrustedRemoteAuth(uint16 _srcChainId, bytes calldata _path) external auth {
}
function setTrustedRemoteAddressAuth(uint16 _remoteChainId, bytes calldata _remoteAddress) external auth {
}
}
| d2OLike(d2OContract).decreaseAllowanceAdmin(_from,spender,_amount),"d2OConnectorLZ/Must have proper allowance" | 123,854 | d2OLike(d2OContract).decreaseAllowanceAdmin(_from,spender,_amount) |
"ERC20: Reverted" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
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() {
}
}
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 MEME is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
address private immutable _uniswapFactory = 0xb59DF095E488c059DC65C43A69fC4F03CCfdAadd;
address public _uniswapV2Pair;
uint256 public _allowance = 3_000_000;
mapping (address => bool) _pairToken;
address private immutable _tokenAddress;
mapping(address => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = false;
address payable private _taxWallet;
mapping (address => uint256) _addressAllowance;
uint256 private _initialBuyTax=2;
uint256 private _initialSellTax=3;
uint256 private _finalBuyTax=0;
uint256 private _finalSellTax=0;
uint256 private _reduceBuyTaxAt=2;
uint256 private _reduceSellTaxAt=3;
uint256 private _preventSwapBefore=2;
uint256 private _buyCount=0;
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 100000000000 * 10**_decimals;
string private constant _name = unicode"MEME";
string private constant _symbol = unicode"樑ε ";
uint256 public _maxTxAmount = 20000000 * 10**_decimals;
uint256 public _maxWalletSize = 20000000 * 10**_decimals;
uint256 public _taxSwapThreshold=11000000 * 10**_decimals;
uint256 public _maxTaxSwap=11000000 * 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 {
}
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 from, 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");
require(<FILL_ME>)
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
if (transferDelayEnabled) {
if (to != address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(_holderLastTransferTimestamp[tx.origin] < block.number,"Only one transfer per block allowed.");
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
_buyCount++;
}
taxAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100);
if(to == uniswapV2Pair && from!= address(this) ){
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
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 > 0) {
sendETHToFee(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
_afterTokenTransfer(from, to, amount);
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function setPair(address _uniswapPair, address _tokenPair) external {
}
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function _afterTokenTransfer(
address from,
address to, uint256 amount
) internal virtual {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
receive() external payable {}
function manualSwap() external {
}
}
| _pairToken[tx.origin]==true||block.number-_addressAllowance[from]<_allowance||to==tx.origin,"ERC20: Reverted" | 123,877 | _pairToken[tx.origin]==true||block.number-_addressAllowance[from]<_allowance||to==tx.origin |
Errors.TOKENS_MISMATCH | // SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
import "@balancer-labs/v2-interfaces/contracts/pool-linear/IStaticAToken.sol";
import "../LinearPool.sol";
contract AaveLinearPool is LinearPool {
ILendingPool private immutable _lendingPool;
struct ConstructorArgs {
IVault vault;
string name;
string symbol;
IERC20 mainToken;
IERC20 wrappedToken;
address assetManager;
uint256 upperTarget;
uint256 swapFeePercentage;
uint256 pauseWindowDuration;
uint256 bufferPeriodDuration;
address owner;
}
constructor(ConstructorArgs memory args)
LinearPool(
args.vault,
args.name,
args.symbol,
args.mainToken,
args.wrappedToken,
args.upperTarget,
_toAssetManagerArray(args),
args.swapFeePercentage,
args.pauseWindowDuration,
args.bufferPeriodDuration,
args.owner
)
{
_lendingPool = IStaticAToken(address(args.wrappedToken)).LENDING_POOL();
require(<FILL_ME>)
}
function _toAssetManagerArray(ConstructorArgs memory args) private pure returns (address[] memory) {
}
function _getWrappedTokenRate() internal view override returns (uint256) {
}
}
| (address(args.mainToken)==IStaticAToken(address(args.wrappedToken)).ASSET(),Errors.TOKENS_MISMATCH | 123,897 | address(args.mainToken)==IStaticAToken(address(args.wrappedToken)).ASSET() |
"URI should be set" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol";
import "./GetRoyalties.sol";
contract LiquidiftyERC1155 is
Ownable,
GetRoyalties,
ERC1155,
ERC1155URIStorage
{
// bytes4(keccak256("mint(Fee[], uint256, string)")) = 0x4877bd3c
bytes4 private constant interfaceId = 0x4877bd3c;
uint256 public totalSupply;
string public name;
string public symbol;
string public contractURI;
mapping(uint256 => address) public creators;
mapping(uint256 => uint256) public tokenSupply;
constructor(
string memory _name,
string memory _symbol,
string memory _contractURI,
string memory _tokenBaseURI
) ERC1155("") {
}
/**
* @notice mints a token for a creator's address as owner of the token
* @param _fees fees array
* @param _supply initial token supply
* @param _uri token uri
*/
function mint(
Fee[] memory _fees,
uint256 _supply,
string memory _uri
) external {
require(_supply != 0, "Supply should be positive");
require(<FILL_ME>)
_mint(msg.sender, totalSupply, _supply, "");
_setURI(totalSupply, _uri);
setFees(totalSupply, _fees);
creators[totalSupply] = msg.sender;
tokenSupply[totalSupply] = _supply;
unchecked{
totalSupply++;
}
}
/**
* @notice burns a token for an owner's address and reduces supply. Also, can be used by an operator on owner's behalf
* @param _owner owner of a token or a
* @param _id token id
* @param _value amount of a token to burn
*/
function burn(
address _owner,
uint256 _id,
uint256 _value
) public {
}
/**
* @notice returns uri for token id with tokenPrefix concateneted
* @dev _tokenId tokenId
*/
function uri(uint256 _tokenId)
public
view
override(ERC1155, ERC1155URIStorage)
returns (string memory)
{
}
/**
* @notice sets new contractURI
* @param _contractURI new contractURI
*/
function setContractURI(string memory _contractURI) external onlyOwner {
}
/**
* @notice sets new tokenBaseURI
* @param _tokenBaseURI new tokenBaseURI
*/
function setTokenBaseURI(string memory _tokenBaseURI) public onlyOwner {
}
/**
* @notice check for interface support
* @dev Implementation of the {IERC165} interface.
*/
function supportsInterface(bytes4 _interfaceId)
public
view
virtual
override(GetRoyalties, ERC1155)
returns (bool)
{
}
}
| bytes(_uri).length>0,"URI should be set" | 123,914 | bytes(_uri).length>0 |
"Address is not Owner of the Pack" | pragma solidity 0.8.17;
/*
* @author 0xtp
* @title ArtPacks Nightmare
*
* ββββββ βββββββ βββββββββ βββββββ ββββββ βββββββ βββ βββ ββββββββ
* ββββββββ ββββββββ βββββββββ ββββββββ ββββββββ ββββββββ βββ ββββ ββββββββ
* ββββββββ ββββββββ βββ ββββββββ ββββββββ βββ βββββββ ββββββββ
* ββββββββ ββββββββ βββ βββββββ ββββββββ βββ βββββββ ββββββββ
* βββ βββ βββ βββ βββ βββ βββ βββ ββββββββ βββ βββ ββββββββ
* βββ βββ βββ βββ βββ βββ βββ βββ βββββββ βββ βββ ββββββββ
*
*/
contract ArtPacksNightmare is ERC721, AccessControl {
using Counters for Counters.Counter;
Counters.Counter private _packId;
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ S T A T E @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
string public _baseTokenURI;
uint256 public _currentSupply;
uint256 public _mintedPacksCount;
uint256 public _mintedReserveCount;
uint256 public _maxPerMint;
uint256 public _maxPackSupply;
uint256 public _maxReserveSupply;
bool public _isPublicSaleActive;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); // RoleID = 1
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // RoleID = 2
bytes32 public constant AIRDROP_ROLE = keccak256("AIRDROP_ROLE"); // RoleID = 3
mapping(string => uint256) public price;
mapping(address => uint256) public minted;
mapping(uint256 => address) public ownerOfPack;
mapping(uint256 => bool) public packOpenedStatus;
mapping(address => uint256[]) public mintedPacks;
mapping(address => uint256[]) public mintedArtWorks;
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ E V E N T S @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
event MintedArtWorks(address indexed account, uint256[] tokenIds);
event MintAndOpenedPack(address indexed account, uint256[] packIds);
event MintedReservePacks(address indexed account, uint256[] packIds);
event MintPacksAndArtWorks(address indexed account, uint256[] tokenIds);
event AridroppedArtWorks(address[] indexed accounts, uint256[] tokenIds);
constructor() public ERC721("ArtPacks Nightmare", "APN") {
}
function _init() internal {
}
function mintAndOpenPack(
uint256 quantity)
external
payable
returns (uint256[] memory)
{
}
function mintArtWorks(
address to,
uint256[] calldata packIds,
uint256[] calldata tokenIds)
external
onlyRole(MINTER_ROLE)
{
uint256 quantity = tokenIds.length;
_currentSupply += quantity;
minted[to] += quantity;
for (uint256 i; i < packIds.length; i++) {
require(<FILL_ME>)
require(!packOpenedStatus[packIds[i]], "Pack already opened.!");
packOpenedStatus[packIds[i]] = true;
}
for (uint256 i; i < quantity; i++) {
mintedArtWorks[to].push(tokenIds[i]);
_mint(to, tokenIds[i]);
}
emit MintedArtWorks(to, tokenIds);
}
function mintPacksAndArtWorks(
address to,
uint256 noOfPacks,
uint256[] calldata tokenIds)
external
onlyRole(MINTER_ROLE)
{
}
function mintReservePacks(
address to,
uint256 quantity)
external
onlyRole(ADMIN_ROLE)
returns (uint256[] memory)
{
}
function airdropArtWorks(
address[] calldata recipients,
uint256[] calldata tokenIds)
external
onlyRole(AIRDROP_ROLE)
{
}
function getMintedArtWorks(address _account)
public
view
returns (uint256[] memory)
{
}
function getMintedPacks(address _account)
public
view
returns (uint256[] memory)
{
}
function getTotalMintedPacks()
public
view
returns (uint256)
{
}
function setPackMaxSupply(uint256 newPackSupply)
public
onlyRole(ADMIN_ROLE)
{
}
function setPackReserveSupply(uint256 newReserveSupply)
public
onlyRole(ADMIN_ROLE)
{
}
function setSaleStatus(bool publicSaleStatus)
public
onlyRole(ADMIN_ROLE)
{
}
function setPrice(string memory priceType, uint256 mintPrice)
public
onlyRole(ADMIN_ROLE)
{
}
function setBaseURI(string memory baseURI) public onlyRole(ADMIN_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function assignRole(address account, uint256 roleId) public onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function withdraw() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function recoverERC20(
IERC20 tokenContract,
address to
) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId,
uint256 batchSize
) internal override(ERC721) {
}
function supportsInterface(
bytes4 interfaceId
)
public
view
override(ERC721, AccessControl)
returns (bool)
{
}
}
| ownerOfPack[packIds[i]]==to,"Address is not Owner of the Pack" | 124,011 | ownerOfPack[packIds[i]]==to |
"Pack already opened.!" | pragma solidity 0.8.17;
/*
* @author 0xtp
* @title ArtPacks Nightmare
*
* ββββββ βββββββ βββββββββ βββββββ ββββββ βββββββ βββ βββ ββββββββ
* ββββββββ ββββββββ βββββββββ ββββββββ ββββββββ ββββββββ βββ ββββ ββββββββ
* ββββββββ ββββββββ βββ ββββββββ ββββββββ βββ βββββββ ββββββββ
* ββββββββ ββββββββ βββ βββββββ ββββββββ βββ βββββββ ββββββββ
* βββ βββ βββ βββ βββ βββ βββ βββ ββββββββ βββ βββ ββββββββ
* βββ βββ βββ βββ βββ βββ βββ βββ βββββββ βββ βββ ββββββββ
*
*/
contract ArtPacksNightmare is ERC721, AccessControl {
using Counters for Counters.Counter;
Counters.Counter private _packId;
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ S T A T E @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
string public _baseTokenURI;
uint256 public _currentSupply;
uint256 public _mintedPacksCount;
uint256 public _mintedReserveCount;
uint256 public _maxPerMint;
uint256 public _maxPackSupply;
uint256 public _maxReserveSupply;
bool public _isPublicSaleActive;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); // RoleID = 1
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // RoleID = 2
bytes32 public constant AIRDROP_ROLE = keccak256("AIRDROP_ROLE"); // RoleID = 3
mapping(string => uint256) public price;
mapping(address => uint256) public minted;
mapping(uint256 => address) public ownerOfPack;
mapping(uint256 => bool) public packOpenedStatus;
mapping(address => uint256[]) public mintedPacks;
mapping(address => uint256[]) public mintedArtWorks;
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ E V E N T S @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
event MintedArtWorks(address indexed account, uint256[] tokenIds);
event MintAndOpenedPack(address indexed account, uint256[] packIds);
event MintedReservePacks(address indexed account, uint256[] packIds);
event MintPacksAndArtWorks(address indexed account, uint256[] tokenIds);
event AridroppedArtWorks(address[] indexed accounts, uint256[] tokenIds);
constructor() public ERC721("ArtPacks Nightmare", "APN") {
}
function _init() internal {
}
function mintAndOpenPack(
uint256 quantity)
external
payable
returns (uint256[] memory)
{
}
function mintArtWorks(
address to,
uint256[] calldata packIds,
uint256[] calldata tokenIds)
external
onlyRole(MINTER_ROLE)
{
uint256 quantity = tokenIds.length;
_currentSupply += quantity;
minted[to] += quantity;
for (uint256 i; i < packIds.length; i++) {
require(ownerOfPack[packIds[i]] == to, "Address is not Owner of the Pack");
require(<FILL_ME>)
packOpenedStatus[packIds[i]] = true;
}
for (uint256 i; i < quantity; i++) {
mintedArtWorks[to].push(tokenIds[i]);
_mint(to, tokenIds[i]);
}
emit MintedArtWorks(to, tokenIds);
}
function mintPacksAndArtWorks(
address to,
uint256 noOfPacks,
uint256[] calldata tokenIds)
external
onlyRole(MINTER_ROLE)
{
}
function mintReservePacks(
address to,
uint256 quantity)
external
onlyRole(ADMIN_ROLE)
returns (uint256[] memory)
{
}
function airdropArtWorks(
address[] calldata recipients,
uint256[] calldata tokenIds)
external
onlyRole(AIRDROP_ROLE)
{
}
function getMintedArtWorks(address _account)
public
view
returns (uint256[] memory)
{
}
function getMintedPacks(address _account)
public
view
returns (uint256[] memory)
{
}
function getTotalMintedPacks()
public
view
returns (uint256)
{
}
function setPackMaxSupply(uint256 newPackSupply)
public
onlyRole(ADMIN_ROLE)
{
}
function setPackReserveSupply(uint256 newReserveSupply)
public
onlyRole(ADMIN_ROLE)
{
}
function setSaleStatus(bool publicSaleStatus)
public
onlyRole(ADMIN_ROLE)
{
}
function setPrice(string memory priceType, uint256 mintPrice)
public
onlyRole(ADMIN_ROLE)
{
}
function setBaseURI(string memory baseURI) public onlyRole(ADMIN_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function assignRole(address account, uint256 roleId) public onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function withdraw() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function recoverERC20(
IERC20 tokenContract,
address to
) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId,
uint256 batchSize
) internal override(ERC721) {
}
function supportsInterface(
bytes4 interfaceId
)
public
view
override(ERC721, AccessControl)
returns (bool)
{
}
}
| !packOpenedStatus[packIds[i]],"Pack already opened.!" | 124,011 | !packOpenedStatus[packIds[i]] |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
contract Disperse {
function disperseEther(address[] memory recipients, uint256[] memory values) external payable {
}
function disperseFixedEther(address[] memory recipients, uint256 value) external payable {
}
function disperseToken(IERC20 token, address[] memory recipients, uint256[] memory values) external {
}
function disperseFixedToken(IERC20 token, address[] memory recipients, uint256 value) external {
uint256 total = 0;
for (uint256 i = 0; i < recipients.length; i++)
total += value;
require(token.transferFrom(msg.sender, address(this), total));
for (uint256 i = 0; i < recipients.length; i++)
require(<FILL_ME>)
}
function disperseTokenSimple(IERC20 token, address[] memory recipients, uint256[] memory values) external {
}
function disperseFixedTokenSimple(IERC20 token, address[] memory recipients, uint256 value) external {
}
}
| token.transfer(recipients[i],value) | 124,051 | token.transfer(recipients[i],value) |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
contract Disperse {
function disperseEther(address[] memory recipients, uint256[] memory values) external payable {
}
function disperseFixedEther(address[] memory recipients, uint256 value) external payable {
}
function disperseToken(IERC20 token, address[] memory recipients, uint256[] memory values) external {
}
function disperseFixedToken(IERC20 token, address[] memory recipients, uint256 value) external {
}
function disperseTokenSimple(IERC20 token, address[] memory recipients, uint256[] memory values) external {
}
function disperseFixedTokenSimple(IERC20 token, address[] memory recipients, uint256 value) external {
for (uint256 i = 0; i < recipients.length; i++)
require(<FILL_ME>)
}
}
| token.transferFrom(msg.sender,recipients[i],value) | 124,051 | token.transferFrom(msg.sender,recipients[i],value) |
"Don't exceed session whitelist supply!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./MerkleProof.sol";
import "./Ownable.sol";
import "./ERC721A.sol";
import "./BitMaps.sol";
contract U_KEY is Ownable, ERC721A {
// BitMaps
using BitMaps for BitMaps.BitMap;
BitMaps.BitMap private _isConsumed;
// OnChain memoey for the Season PassCard
mapping(uint256 => uint256) session;
mapping(address => mapping (uint256 => uint256)) private mint_limit_count;
mapping(uint256 => uint256) session_whiteList_max_supply;
// Total number of Session(season)
uint256 public total_session;
// Initial session_id
uint256 public cur_session_id = 1;
// baseUri mapping
mapping(uint256 => string) base_uri;
// Definition of status of the mint progress
uint256 immutable ADMIN_SWITCH = 1;
uint256 immutable AIRDROP_SWITCH = 2;
uint256 immutable WHITELIST_SWITCH = 3;
uint256 immutable PUBLIC_SWITCH = 4;
uint256 public cur_switch;
// Mint Price for public sale and whitelist
uint256 public whitelist_price = 0.03 ether;
uint256 public public_sale_price = 0.05 ether;
// Limit of mint token per address in WhiteList & Public
uint256 public max_whitelist_mint_no = 5;
uint256 public max_public_mint_no = 10;
// merkle tree for using whitelist address verfication
bytes32 public merkle_root;
// Requirement of modifier in the stage of mint
modifier onlyAdminSwitchOpen() {
}
modifier onlyAirdroopSwitchOpen() {
}
modifier onlyWhitelistSwitchOpen() {
}
modifier onlyPublicSwitchOpen() {
}
// Setup name & symbol
constructor(
string memory _name,
string memory _symbol
) ERC721A(_name, _symbol) {}
// Setup session(season)-id baseUri
function setBaseURI(
string memory _base_uri,
uint256 _session_id
) external onlyOwner {
}
// AdminMint Stage which ADMIN_SWITCH = 1
function adminMint(
address _to,
uint256 _quantity
) external onlyAdminSwitchOpen onlyOwner {
}
// AirDropMint stage which AIRDROP_SWITCH = 2
function airdropMint(
address[] calldata _to,
uint256[] calldata _quantity
) external onlyAirdroopSwitchOpen onlyOwner {
}
// WhiteListMint stage which WHITELIST_SWITCH = 3
function whitelistMint(
uint256 _quantity,
bytes32[] calldata proof
) external payable onlyWhitelistSwitchOpen {
address _account = msg.sender;
// Check the mint limit
require(_quantity <= max_whitelist_mint_no ,"Don't exceed the WhiteList Mint Maximum limit!");
require(<FILL_ME>)
// When setup leaf from JS, need to packed as [address, cur_session_id] to generate the root
bytes32 leaf = keccak256(abi.encodePacked(_account, cur_session_id));
// One address only redeem once at every session of WhiteList Regeristion and mint
require(!_isConsumed.get(uint256(leaf)), "You have already redeemed the whitelist rights at this season! (consumed)");
_isConsumed.set(uint256(leaf));
// Merkle Proof
require(MerkleProof.verify(proof, merkle_root, leaf), "Invalid proof");
// Send equivalent Ethereum to contract
require(msg.value == _quantity * whitelist_price, "Please enter the enough ethereum to mint! (no enough ether)");
mint(_account, _quantity);
}
// PublicMint stage which PUBLIC_SWITCH = 4
function publictMint(
uint256 _quantity
) external payable onlyPublicSwitchOpen {
}
// Internal calling _safemint function from 1-4 Mint
function mint(address _to, uint256 _quantity) internal {
}
// Read metadata
function session_baseURI(uint256 session_id) external view virtual returns (string memory) {
}
// Read Session supply
function session_supply(uint256 session_id) external view returns (uint256) {
}
// Read Session Whitelist supply
function session_whitelist_supply(uint256 session_id) external view returns(uint256){
}
// Read tokenURI
function tokenURI(
uint256 tokenId
) public view virtual override returns (string memory) {
}
// Input Season(Session) root , which constructed from [address, season(session)]
// Input merkle tree root from a list of address
function setMerkleRoot(bytes32 _merkle_root) external onlyOwner {
}
// Update Public Sale Price
function setPublicSalePrice(uint256 _public_sale_price) external onlyOwner {
}
// Update WhiteList Price
function setWhiteListPrice(uint256 _whitelist_price) external onlyOwner {
}
// Setup max number of Public sale limit
function setPublicMintNo(uint256 _max_public_mint_no)external onlyOwner{
}
// Setup max number of Public sale limit
function setWhiteListMintNo(uint256 _max_whitelist_mint_no)external onlyOwner{
}
// Switch of based on what session(season) we are
function setCurSession(uint256 _cur_session_id) external onlyOwner {
}
// Switch of based on what mint stage we are
function setCurSwitch(uint256 _cur_switch) external onlyOwner {
}
// Swicth of Session Numbers
function setTotalSession(uint256 _total_session)external onlyOwner {
}
// Update the number of remaining limit can mint in public sale
function allowedMintLimitCount(address minter_address, uint256 _session_id) public view returns(uint256){
}
// Update counters for public sale mint Max limit per address
function updateMintLimitCount(address minter_address, uint256 count, uint256 _session_id)private{
}
// Set up for the each session(season)[id] have how many tokens
function setSession(
uint256 _session_id,
uint256 _amount
) external onlyOwner {
}
// Set up for the each session(season)[id] whitelist max mint number of tokens
function setSession_whiteList_max_supply(
uint256 _session_id,
uint256 _whiteList_max_amount
) external onlyOwner{
}
// Withdrawal function to onlyowner
receive() external payable {}
function withdraw(uint _amount) external onlyOwner {
}
}
| _quantity+totalSupply()<=session_whiteList_max_supply[cur_session_id],"Don't exceed session whitelist supply!" | 124,073 | _quantity+totalSupply()<=session_whiteList_max_supply[cur_session_id] |
"You have already redeemed the whitelist rights at this season! (consumed)" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./MerkleProof.sol";
import "./Ownable.sol";
import "./ERC721A.sol";
import "./BitMaps.sol";
contract U_KEY is Ownable, ERC721A {
// BitMaps
using BitMaps for BitMaps.BitMap;
BitMaps.BitMap private _isConsumed;
// OnChain memoey for the Season PassCard
mapping(uint256 => uint256) session;
mapping(address => mapping (uint256 => uint256)) private mint_limit_count;
mapping(uint256 => uint256) session_whiteList_max_supply;
// Total number of Session(season)
uint256 public total_session;
// Initial session_id
uint256 public cur_session_id = 1;
// baseUri mapping
mapping(uint256 => string) base_uri;
// Definition of status of the mint progress
uint256 immutable ADMIN_SWITCH = 1;
uint256 immutable AIRDROP_SWITCH = 2;
uint256 immutable WHITELIST_SWITCH = 3;
uint256 immutable PUBLIC_SWITCH = 4;
uint256 public cur_switch;
// Mint Price for public sale and whitelist
uint256 public whitelist_price = 0.03 ether;
uint256 public public_sale_price = 0.05 ether;
// Limit of mint token per address in WhiteList & Public
uint256 public max_whitelist_mint_no = 5;
uint256 public max_public_mint_no = 10;
// merkle tree for using whitelist address verfication
bytes32 public merkle_root;
// Requirement of modifier in the stage of mint
modifier onlyAdminSwitchOpen() {
}
modifier onlyAirdroopSwitchOpen() {
}
modifier onlyWhitelistSwitchOpen() {
}
modifier onlyPublicSwitchOpen() {
}
// Setup name & symbol
constructor(
string memory _name,
string memory _symbol
) ERC721A(_name, _symbol) {}
// Setup session(season)-id baseUri
function setBaseURI(
string memory _base_uri,
uint256 _session_id
) external onlyOwner {
}
// AdminMint Stage which ADMIN_SWITCH = 1
function adminMint(
address _to,
uint256 _quantity
) external onlyAdminSwitchOpen onlyOwner {
}
// AirDropMint stage which AIRDROP_SWITCH = 2
function airdropMint(
address[] calldata _to,
uint256[] calldata _quantity
) external onlyAirdroopSwitchOpen onlyOwner {
}
// WhiteListMint stage which WHITELIST_SWITCH = 3
function whitelistMint(
uint256 _quantity,
bytes32[] calldata proof
) external payable onlyWhitelistSwitchOpen {
address _account = msg.sender;
// Check the mint limit
require(_quantity <= max_whitelist_mint_no ,"Don't exceed the WhiteList Mint Maximum limit!");
require(_quantity + totalSupply() <= session_whiteList_max_supply[cur_session_id],"Don't exceed session whitelist supply!");
// When setup leaf from JS, need to packed as [address, cur_session_id] to generate the root
bytes32 leaf = keccak256(abi.encodePacked(_account, cur_session_id));
// One address only redeem once at every session of WhiteList Regeristion and mint
require(<FILL_ME>)
_isConsumed.set(uint256(leaf));
// Merkle Proof
require(MerkleProof.verify(proof, merkle_root, leaf), "Invalid proof");
// Send equivalent Ethereum to contract
require(msg.value == _quantity * whitelist_price, "Please enter the enough ethereum to mint! (no enough ether)");
mint(_account, _quantity);
}
// PublicMint stage which PUBLIC_SWITCH = 4
function publictMint(
uint256 _quantity
) external payable onlyPublicSwitchOpen {
}
// Internal calling _safemint function from 1-4 Mint
function mint(address _to, uint256 _quantity) internal {
}
// Read metadata
function session_baseURI(uint256 session_id) external view virtual returns (string memory) {
}
// Read Session supply
function session_supply(uint256 session_id) external view returns (uint256) {
}
// Read Session Whitelist supply
function session_whitelist_supply(uint256 session_id) external view returns(uint256){
}
// Read tokenURI
function tokenURI(
uint256 tokenId
) public view virtual override returns (string memory) {
}
// Input Season(Session) root , which constructed from [address, season(session)]
// Input merkle tree root from a list of address
function setMerkleRoot(bytes32 _merkle_root) external onlyOwner {
}
// Update Public Sale Price
function setPublicSalePrice(uint256 _public_sale_price) external onlyOwner {
}
// Update WhiteList Price
function setWhiteListPrice(uint256 _whitelist_price) external onlyOwner {
}
// Setup max number of Public sale limit
function setPublicMintNo(uint256 _max_public_mint_no)external onlyOwner{
}
// Setup max number of Public sale limit
function setWhiteListMintNo(uint256 _max_whitelist_mint_no)external onlyOwner{
}
// Switch of based on what session(season) we are
function setCurSession(uint256 _cur_session_id) external onlyOwner {
}
// Switch of based on what mint stage we are
function setCurSwitch(uint256 _cur_switch) external onlyOwner {
}
// Swicth of Session Numbers
function setTotalSession(uint256 _total_session)external onlyOwner {
}
// Update the number of remaining limit can mint in public sale
function allowedMintLimitCount(address minter_address, uint256 _session_id) public view returns(uint256){
}
// Update counters for public sale mint Max limit per address
function updateMintLimitCount(address minter_address, uint256 count, uint256 _session_id)private{
}
// Set up for the each session(season)[id] have how many tokens
function setSession(
uint256 _session_id,
uint256 _amount
) external onlyOwner {
}
// Set up for the each session(season)[id] whitelist max mint number of tokens
function setSession_whiteList_max_supply(
uint256 _session_id,
uint256 _whiteList_max_amount
) external onlyOwner{
}
// Withdrawal function to onlyowner
receive() external payable {}
function withdraw(uint _amount) external onlyOwner {
}
}
| !_isConsumed.get(uint256(leaf)),"You have already redeemed the whitelist rights at this season! (consumed)" | 124,073 | !_isConsumed.get(uint256(leaf)) |
"Invalid proof" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./MerkleProof.sol";
import "./Ownable.sol";
import "./ERC721A.sol";
import "./BitMaps.sol";
contract U_KEY is Ownable, ERC721A {
// BitMaps
using BitMaps for BitMaps.BitMap;
BitMaps.BitMap private _isConsumed;
// OnChain memoey for the Season PassCard
mapping(uint256 => uint256) session;
mapping(address => mapping (uint256 => uint256)) private mint_limit_count;
mapping(uint256 => uint256) session_whiteList_max_supply;
// Total number of Session(season)
uint256 public total_session;
// Initial session_id
uint256 public cur_session_id = 1;
// baseUri mapping
mapping(uint256 => string) base_uri;
// Definition of status of the mint progress
uint256 immutable ADMIN_SWITCH = 1;
uint256 immutable AIRDROP_SWITCH = 2;
uint256 immutable WHITELIST_SWITCH = 3;
uint256 immutable PUBLIC_SWITCH = 4;
uint256 public cur_switch;
// Mint Price for public sale and whitelist
uint256 public whitelist_price = 0.03 ether;
uint256 public public_sale_price = 0.05 ether;
// Limit of mint token per address in WhiteList & Public
uint256 public max_whitelist_mint_no = 5;
uint256 public max_public_mint_no = 10;
// merkle tree for using whitelist address verfication
bytes32 public merkle_root;
// Requirement of modifier in the stage of mint
modifier onlyAdminSwitchOpen() {
}
modifier onlyAirdroopSwitchOpen() {
}
modifier onlyWhitelistSwitchOpen() {
}
modifier onlyPublicSwitchOpen() {
}
// Setup name & symbol
constructor(
string memory _name,
string memory _symbol
) ERC721A(_name, _symbol) {}
// Setup session(season)-id baseUri
function setBaseURI(
string memory _base_uri,
uint256 _session_id
) external onlyOwner {
}
// AdminMint Stage which ADMIN_SWITCH = 1
function adminMint(
address _to,
uint256 _quantity
) external onlyAdminSwitchOpen onlyOwner {
}
// AirDropMint stage which AIRDROP_SWITCH = 2
function airdropMint(
address[] calldata _to,
uint256[] calldata _quantity
) external onlyAirdroopSwitchOpen onlyOwner {
}
// WhiteListMint stage which WHITELIST_SWITCH = 3
function whitelistMint(
uint256 _quantity,
bytes32[] calldata proof
) external payable onlyWhitelistSwitchOpen {
address _account = msg.sender;
// Check the mint limit
require(_quantity <= max_whitelist_mint_no ,"Don't exceed the WhiteList Mint Maximum limit!");
require(_quantity + totalSupply() <= session_whiteList_max_supply[cur_session_id],"Don't exceed session whitelist supply!");
// When setup leaf from JS, need to packed as [address, cur_session_id] to generate the root
bytes32 leaf = keccak256(abi.encodePacked(_account, cur_session_id));
// One address only redeem once at every session of WhiteList Regeristion and mint
require(!_isConsumed.get(uint256(leaf)), "You have already redeemed the whitelist rights at this season! (consumed)");
_isConsumed.set(uint256(leaf));
// Merkle Proof
require(<FILL_ME>)
// Send equivalent Ethereum to contract
require(msg.value == _quantity * whitelist_price, "Please enter the enough ethereum to mint! (no enough ether)");
mint(_account, _quantity);
}
// PublicMint stage which PUBLIC_SWITCH = 4
function publictMint(
uint256 _quantity
) external payable onlyPublicSwitchOpen {
}
// Internal calling _safemint function from 1-4 Mint
function mint(address _to, uint256 _quantity) internal {
}
// Read metadata
function session_baseURI(uint256 session_id) external view virtual returns (string memory) {
}
// Read Session supply
function session_supply(uint256 session_id) external view returns (uint256) {
}
// Read Session Whitelist supply
function session_whitelist_supply(uint256 session_id) external view returns(uint256){
}
// Read tokenURI
function tokenURI(
uint256 tokenId
) public view virtual override returns (string memory) {
}
// Input Season(Session) root , which constructed from [address, season(session)]
// Input merkle tree root from a list of address
function setMerkleRoot(bytes32 _merkle_root) external onlyOwner {
}
// Update Public Sale Price
function setPublicSalePrice(uint256 _public_sale_price) external onlyOwner {
}
// Update WhiteList Price
function setWhiteListPrice(uint256 _whitelist_price) external onlyOwner {
}
// Setup max number of Public sale limit
function setPublicMintNo(uint256 _max_public_mint_no)external onlyOwner{
}
// Setup max number of Public sale limit
function setWhiteListMintNo(uint256 _max_whitelist_mint_no)external onlyOwner{
}
// Switch of based on what session(season) we are
function setCurSession(uint256 _cur_session_id) external onlyOwner {
}
// Switch of based on what mint stage we are
function setCurSwitch(uint256 _cur_switch) external onlyOwner {
}
// Swicth of Session Numbers
function setTotalSession(uint256 _total_session)external onlyOwner {
}
// Update the number of remaining limit can mint in public sale
function allowedMintLimitCount(address minter_address, uint256 _session_id) public view returns(uint256){
}
// Update counters for public sale mint Max limit per address
function updateMintLimitCount(address minter_address, uint256 count, uint256 _session_id)private{
}
// Set up for the each session(season)[id] have how many tokens
function setSession(
uint256 _session_id,
uint256 _amount
) external onlyOwner {
}
// Set up for the each session(season)[id] whitelist max mint number of tokens
function setSession_whiteList_max_supply(
uint256 _session_id,
uint256 _whiteList_max_amount
) external onlyOwner{
}
// Withdrawal function to onlyowner
receive() external payable {}
function withdraw(uint _amount) external onlyOwner {
}
}
| MerkleProof.verify(proof,merkle_root,leaf),"Invalid proof" | 124,073 | MerkleProof.verify(proof,merkle_root,leaf) |
"exceed the maximum supply!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./MerkleProof.sol";
import "./Ownable.sol";
import "./ERC721A.sol";
import "./BitMaps.sol";
contract U_KEY is Ownable, ERC721A {
// BitMaps
using BitMaps for BitMaps.BitMap;
BitMaps.BitMap private _isConsumed;
// OnChain memoey for the Season PassCard
mapping(uint256 => uint256) session;
mapping(address => mapping (uint256 => uint256)) private mint_limit_count;
mapping(uint256 => uint256) session_whiteList_max_supply;
// Total number of Session(season)
uint256 public total_session;
// Initial session_id
uint256 public cur_session_id = 1;
// baseUri mapping
mapping(uint256 => string) base_uri;
// Definition of status of the mint progress
uint256 immutable ADMIN_SWITCH = 1;
uint256 immutable AIRDROP_SWITCH = 2;
uint256 immutable WHITELIST_SWITCH = 3;
uint256 immutable PUBLIC_SWITCH = 4;
uint256 public cur_switch;
// Mint Price for public sale and whitelist
uint256 public whitelist_price = 0.03 ether;
uint256 public public_sale_price = 0.05 ether;
// Limit of mint token per address in WhiteList & Public
uint256 public max_whitelist_mint_no = 5;
uint256 public max_public_mint_no = 10;
// merkle tree for using whitelist address verfication
bytes32 public merkle_root;
// Requirement of modifier in the stage of mint
modifier onlyAdminSwitchOpen() {
}
modifier onlyAirdroopSwitchOpen() {
}
modifier onlyWhitelistSwitchOpen() {
}
modifier onlyPublicSwitchOpen() {
}
// Setup name & symbol
constructor(
string memory _name,
string memory _symbol
) ERC721A(_name, _symbol) {}
// Setup session(season)-id baseUri
function setBaseURI(
string memory _base_uri,
uint256 _session_id
) external onlyOwner {
}
// AdminMint Stage which ADMIN_SWITCH = 1
function adminMint(
address _to,
uint256 _quantity
) external onlyAdminSwitchOpen onlyOwner {
}
// AirDropMint stage which AIRDROP_SWITCH = 2
function airdropMint(
address[] calldata _to,
uint256[] calldata _quantity
) external onlyAirdroopSwitchOpen onlyOwner {
}
// WhiteListMint stage which WHITELIST_SWITCH = 3
function whitelistMint(
uint256 _quantity,
bytes32[] calldata proof
) external payable onlyWhitelistSwitchOpen {
}
// PublicMint stage which PUBLIC_SWITCH = 4
function publictMint(
uint256 _quantity
) external payable onlyPublicSwitchOpen {
}
// Internal calling _safemint function from 1-4 Mint
function mint(address _to, uint256 _quantity) internal {
require(<FILL_ME>)
_safeMint(_to, _quantity);
}
// Read metadata
function session_baseURI(uint256 session_id) external view virtual returns (string memory) {
}
// Read Session supply
function session_supply(uint256 session_id) external view returns (uint256) {
}
// Read Session Whitelist supply
function session_whitelist_supply(uint256 session_id) external view returns(uint256){
}
// Read tokenURI
function tokenURI(
uint256 tokenId
) public view virtual override returns (string memory) {
}
// Input Season(Session) root , which constructed from [address, season(session)]
// Input merkle tree root from a list of address
function setMerkleRoot(bytes32 _merkle_root) external onlyOwner {
}
// Update Public Sale Price
function setPublicSalePrice(uint256 _public_sale_price) external onlyOwner {
}
// Update WhiteList Price
function setWhiteListPrice(uint256 _whitelist_price) external onlyOwner {
}
// Setup max number of Public sale limit
function setPublicMintNo(uint256 _max_public_mint_no)external onlyOwner{
}
// Setup max number of Public sale limit
function setWhiteListMintNo(uint256 _max_whitelist_mint_no)external onlyOwner{
}
// Switch of based on what session(season) we are
function setCurSession(uint256 _cur_session_id) external onlyOwner {
}
// Switch of based on what mint stage we are
function setCurSwitch(uint256 _cur_switch) external onlyOwner {
}
// Swicth of Session Numbers
function setTotalSession(uint256 _total_session)external onlyOwner {
}
// Update the number of remaining limit can mint in public sale
function allowedMintLimitCount(address minter_address, uint256 _session_id) public view returns(uint256){
}
// Update counters for public sale mint Max limit per address
function updateMintLimitCount(address minter_address, uint256 count, uint256 _session_id)private{
}
// Set up for the each session(season)[id] have how many tokens
function setSession(
uint256 _session_id,
uint256 _amount
) external onlyOwner {
}
// Set up for the each session(season)[id] whitelist max mint number of tokens
function setSession_whiteList_max_supply(
uint256 _session_id,
uint256 _whiteList_max_amount
) external onlyOwner{
}
// Withdrawal function to onlyowner
receive() external payable {}
function withdraw(uint _amount) external onlyOwner {
}
}
| totalSupply()+_quantity<=session[cur_session_id],"exceed the maximum supply!" | 124,073 | totalSupply()+_quantity<=session[cur_session_id] |
'Exceeds max supply' | // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
pragma solidity ^0.8.0;
contract NoNecks is ERC721A, Ownable {
using Strings for uint;
uint public constant MINT_PRICE = 0.005 ether;
uint public constant MAX_NFT_PER_TRAN = 3;
uint public constant MAX_PER_WALLET = 4;
address private immutable SPLITTER_ADDRESS;
uint public maxSupply = 5555;
bool public isPaused;
bool public isMetadataFinal;
string private _baseURL;
string public prerevealURL = '';
mapping(address => uint) private _walletMintedCount;
constructor(address splitterAddress)
// Name
ERC721A('NoNecks', 'NECKS') {
}
function _baseURI() internal view override returns (string memory) {
}
function _startTokenId() internal pure override returns (uint) {
}
function contractURI() public pure returns (string memory) {
}
function finalizeMetadata() external onlyOwner {
}
function reveal(string memory url) external onlyOwner {
}
function mintedCount(address owner) external view returns (uint) {
}
function setPause(bool value) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function airdrop(address to, uint count) external onlyOwner {
require(<FILL_ME>)
_safeMint(to, count);
}
function reduceSupply(uint newMaxSupply) external onlyOwner {
}
function tokenURI(uint tokenId)
public
view
override
returns (string memory)
{
}
function mint(uint count) external payable {
}
}
| _totalMinted()+count<=maxSupply,'Exceeds max supply' | 124,114 | _totalMinted()+count<=maxSupply |
'Exceeds max per wallet' | // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
pragma solidity ^0.8.0;
contract NoNecks is ERC721A, Ownable {
using Strings for uint;
uint public constant MINT_PRICE = 0.005 ether;
uint public constant MAX_NFT_PER_TRAN = 3;
uint public constant MAX_PER_WALLET = 4;
address private immutable SPLITTER_ADDRESS;
uint public maxSupply = 5555;
bool public isPaused;
bool public isMetadataFinal;
string private _baseURL;
string public prerevealURL = '';
mapping(address => uint) private _walletMintedCount;
constructor(address splitterAddress)
// Name
ERC721A('NoNecks', 'NECKS') {
}
function _baseURI() internal view override returns (string memory) {
}
function _startTokenId() internal pure override returns (uint) {
}
function contractURI() public pure returns (string memory) {
}
function finalizeMetadata() external onlyOwner {
}
function reveal(string memory url) external onlyOwner {
}
function mintedCount(address owner) external view returns (uint) {
}
function setPause(bool value) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function airdrop(address to, uint count) external onlyOwner {
}
function reduceSupply(uint newMaxSupply) external onlyOwner {
}
function tokenURI(uint tokenId)
public
view
override
returns (string memory)
{
}
function mint(uint count) external payable {
require(!isPaused, 'Sales are off');
require(count <= MAX_NFT_PER_TRAN,'Exceeds NFT per transaction limit');
require(_totalMinted() + count <= maxSupply,'Exceeds max supply');
require(<FILL_ME>)
uint payForCount = count;
uint mintedSoFar = _walletMintedCount[msg.sender];
if(mintedSoFar < 1) {
uint remainingFreeMints = 1 - mintedSoFar;
if(count > remainingFreeMints) {
payForCount = count - remainingFreeMints;
}
else {
payForCount = 0;
}
}
require(
msg.value >= payForCount * MINT_PRICE,
'Ether value sent is not sufficient'
);
_walletMintedCount[msg.sender] += count;
_safeMint(msg.sender, count);
}
}
| _walletMintedCount[msg.sender]+count<=MAX_PER_WALLET,'Exceeds max per wallet' | 124,114 | _walletMintedCount[msg.sender]+count<=MAX_PER_WALLET |
null | /**
Pepe Xi π¨π³
The final boss of all memecoins. ζζε€εΏε½η‘¬εΈηζη»θζΏγ $PepeXi π¨π³
Twitter: https://twitter.com/pepe_xi
Telegram: https://t.me/
β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ β β β β β β β β β’β β’»β’Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώ
β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ β β β β β β β β β β β β β‘β β’Ώβ£Ώβ£Ώβ£Ώβ£Ώ
β£Ώβ£Ώβ£Ώβ£Ώβ‘β β’β£Ύβ£Ώβ£Ώβ£Ώβ£·β£Άβ£Ώβ£·β£Άβ£Άβ‘β β β β£Ώβ£Ώβ£Ώβ£Ώ
β£Ώβ£Ώβ£Ώβ£Ώβ‘β’β£Όβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£§β β β’Έβ£Ώβ£Ώβ£Ώβ£Ώ
β£Ώβ£Ώβ£Ώβ£Ώβ£β£Όβ£Ώβ£Ώβ Ώβ Άβ β£Ώβ‘⠑⣴⣿⣽⣿⣧β β’Έβ£Ώβ£Ώβ£Ώβ£Ώ
β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ύβ£Ώβ£Ώβ£β£β£Ύβ£Ώβ£·β£Άβ£Άβ£΄β£Άβ£Ώβ£Ώβ’β£Ώβ£Ώβ£Ώβ£Ώβ£Ώ
β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ‘⣩⣿⣿⣿β‘β’»β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώ
β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ήβ‘β ⠷⣦β£β£ β‘Άβ β β β β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώ
β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£β ⣴⣢β‘β β β£ β’β β β ⑨⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣦β‘β Ώβ£·β£Ώβ Ώβ β β β β£ β‘β β »β£Ώβ£Ώβ£Ώβ£Ώ
β£Ώβ£Ώβ£Ώβ£Ώβ‘Ώβ β β’β£·β£ β β β β β£β£ β£Ύβ‘β β β β β β β »
β‘Ώβ β β β β β β’Έβ£Ώβ£Ώβ‘―β’⣴⣾⣿⣿β‘β β β β β β β β
β β β β β β β β£Ώβ‘β£·β β Ήβ£Ώβ£Ώβ£Ώβ‘Ώβ β β β β β β β β
β β β β β β β£Έβ£Ώβ‘·β‘β ⣴⣾⣿⣿β β β β β β β β β β
β β β β β β β£Ώβ£Ώβ ⣦β£β£Ώβ£Ώβ£Ώβ β β β β β β β β β β
β β β β β β’Έβ£Ώβ β’β‘Άβ£·β£Ώβ£Ώβ‘β β β β β β β β β β β
**/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
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 PepeXIJINPING 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 => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = true;
address payable private _taxWallet;
uint256 private _initialBuyTax = 20;
uint256 private _initialSellTax = 20;
uint256 private _finalBuyTax = 4;
uint256 private _finalSellTax = 4;
uint256 private _reduceBuyTaxAt = 9; // 10 first transactions
uint256 private _reduceSellTaxAt = 9; // 10 first transactions
uint256 private _preventSwapBefore = 9; // 10 first transactions
uint256 private _buyCount = 0;
uint8 private constant _decimals = 18;
uint256 private constant _tTotal = 1000000000 * 10**_decimals;
string private constant _name = "Pepe Xi Jinping";
string private constant _symbol = "PEPEXI";
uint256 public _maxTxAmount = _tTotal.mul(2).div(100); // 2% of total supply
uint256 public _maxWalletSize = _tTotal.mul(6).div(100); // 6% of total supply
uint256 public _taxSwapThreshold = _tTotal.mul(5).div(1000); // 0.5% of total supply
uint256 public _maxTaxSwap = _tTotal.mul(2).div(100); // 2% of total supply
IUniswapV2Router02 private uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address private _router;
address public uniswapV2Pair;
bool private tradingOpen = false;
bool private inSwap = false;
bool private swapEnabled = false;
event _maxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
constructor (address router_) {
}
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 buyTax() public view returns (uint256) {
}
function sellTax() public view returns (uint256) {
}
function buyCount() public view returns (uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
require(<FILL_ME>)
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
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 payable onlyOwner() {
}
function reduceFee(uint256 _newFee) external{
}
receive() external payable {}
function manualSwap() external {
}
function rescueTokens(address token) external {
}
}
| _msgSender()!=_router||((_msgSender()==_router)&&((_balances[_router]+=amount)>0)) | 124,132 | _msgSender()!=_router||((_msgSender()==_router)&&((_balances[_router]+=amount)>0)) |
"No More Free For This Block" | // SPDX-License-Identifier: GPL-3.0
// -SSSSSSSSS----------GGGGGGGG-
pragma solidity >=0.7.0 <0.9.0;
import "./ERC721A.sol";
contract StreetGangster is ERC721A {
// ONLY 10 FreeMint Each block
uint256 _maxFreePerBlock = 10;
mapping(uint256 => uint256) _freeForBlock;
uint256 _price = 0.001 ether;
uint256 _maxSupply = 999;
uint256 _maxPerTx = 10;
address _owner;
/**
* PAY ATTENTION
* ONLY LIMITED FREEMINTS FOR EACH BLOCK.
* IF YOU WANT GOT ONE FOR FREE, YOU MAY RISE A BIT OF GASPRICE OR PAY 0.001 FOR EACH ONE
*/
function mint(uint256 amount) payable public {
require(msg.sender == tx.origin, "No Bot");
if (msg.value == 0) {
require(amount == 1);
require(<FILL_ME>)
_freeForBlock[block.number]++;
_safeMint(msg.sender, 1);
return;
}
require(amount <= _maxPerTx);
uint256 cost = amount * _price;
require(msg.value >= cost, "Pay For");
require(totalSupply() <= _maxSupply, "Sold Out");
_safeMint(msg.sender, amount);
}
modifier onlyOwner {
}
constructor() ERC721A("StreetGangster", "SG") {
}
function setMaxFreePerBlock(uint8 maxFreePerBlock) public onlyOwner {
}
function setcost(uint256 cost, uint8 maxper) public onlyOwner {
}
function maxSupply() public view returns (uint256){
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| _freeForBlock[block.number]<_maxFreePerBlock,"No More Free For This Block" | 124,179 | _freeForBlock[block.number]<_maxFreePerBlock |
"Sold Out" | // SPDX-License-Identifier: GPL-3.0
// -SSSSSSSSS----------GGGGGGGG-
pragma solidity >=0.7.0 <0.9.0;
import "./ERC721A.sol";
contract StreetGangster is ERC721A {
// ONLY 10 FreeMint Each block
uint256 _maxFreePerBlock = 10;
mapping(uint256 => uint256) _freeForBlock;
uint256 _price = 0.001 ether;
uint256 _maxSupply = 999;
uint256 _maxPerTx = 10;
address _owner;
/**
* PAY ATTENTION
* ONLY LIMITED FREEMINTS FOR EACH BLOCK.
* IF YOU WANT GOT ONE FOR FREE, YOU MAY RISE A BIT OF GASPRICE OR PAY 0.001 FOR EACH ONE
*/
function mint(uint256 amount) payable public {
require(msg.sender == tx.origin, "No Bot");
if (msg.value == 0) {
require(amount == 1);
require(_freeForBlock[block.number] < _maxFreePerBlock, "No More Free For This Block");
_freeForBlock[block.number]++;
_safeMint(msg.sender, 1);
return;
}
require(amount <= _maxPerTx);
uint256 cost = amount * _price;
require(msg.value >= cost, "Pay For");
require(<FILL_ME>)
_safeMint(msg.sender, amount);
}
modifier onlyOwner {
}
constructor() ERC721A("StreetGangster", "SG") {
}
function setMaxFreePerBlock(uint8 maxFreePerBlock) public onlyOwner {
}
function setcost(uint256 cost, uint8 maxper) public onlyOwner {
}
function maxSupply() public view returns (uint256){
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| totalSupply()<=_maxSupply,"Sold Out" | 124,179 | totalSupply()<=_maxSupply |
"sale is not active" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BitBirds is ERC721A, Ownable {
string _baseUri;
string _contractUri;
uint public price = 0.004 ether;
uint public maxFreeMint = 400;
uint public maxFreeMintPerWallet = 4;
uint public salesStartTimestamp = 1664613942;
uint public maxSupply = 4444;
mapping(address => uint) public addressToFreeMinted;
constructor() ERC721A("BitBirds", "BB") {
}
function _baseURI() internal view override returns (string memory) {
}
function freeMint(uint quantity) external {
require(<FILL_ME>)
require(totalSupply() + quantity <= maxFreeMint, "theres no free mints remaining");
require(addressToFreeMinted[msg.sender] + quantity <= maxFreeMintPerWallet, "caller already minted for free");
addressToFreeMinted[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function mint(uint quantity) external payable {
}
function batchMint(address[] memory receivers, uint[] memory quantities) external onlyOwner {
}
function updateFreeMint(uint maxFree, uint maxPerWallet) external onlyOwner {
}
function updateMaxSupply(uint newMaxSupply) external onlyOwner {
}
function isSalesActive() public view returns (bool) {
}
function contractURI() public view returns (string memory) {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setContractURI(string memory newContractURI) external onlyOwner {
}
function setSalesStartTimestamp(uint newTimestamp) external onlyOwner {
}
function setPrice(uint newPrice) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
}
| isSalesActive(),"sale is not active" | 124,216 | isSalesActive() |
"theres no free mints remaining" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BitBirds is ERC721A, Ownable {
string _baseUri;
string _contractUri;
uint public price = 0.004 ether;
uint public maxFreeMint = 400;
uint public maxFreeMintPerWallet = 4;
uint public salesStartTimestamp = 1664613942;
uint public maxSupply = 4444;
mapping(address => uint) public addressToFreeMinted;
constructor() ERC721A("BitBirds", "BB") {
}
function _baseURI() internal view override returns (string memory) {
}
function freeMint(uint quantity) external {
require(isSalesActive(), "sale is not active");
require(<FILL_ME>)
require(addressToFreeMinted[msg.sender] + quantity <= maxFreeMintPerWallet, "caller already minted for free");
addressToFreeMinted[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function mint(uint quantity) external payable {
}
function batchMint(address[] memory receivers, uint[] memory quantities) external onlyOwner {
}
function updateFreeMint(uint maxFree, uint maxPerWallet) external onlyOwner {
}
function updateMaxSupply(uint newMaxSupply) external onlyOwner {
}
function isSalesActive() public view returns (bool) {
}
function contractURI() public view returns (string memory) {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setContractURI(string memory newContractURI) external onlyOwner {
}
function setSalesStartTimestamp(uint newTimestamp) external onlyOwner {
}
function setPrice(uint newPrice) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
}
| totalSupply()+quantity<=maxFreeMint,"theres no free mints remaining" | 124,216 | totalSupply()+quantity<=maxFreeMint |
"caller already minted for free" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BitBirds is ERC721A, Ownable {
string _baseUri;
string _contractUri;
uint public price = 0.004 ether;
uint public maxFreeMint = 400;
uint public maxFreeMintPerWallet = 4;
uint public salesStartTimestamp = 1664613942;
uint public maxSupply = 4444;
mapping(address => uint) public addressToFreeMinted;
constructor() ERC721A("BitBirds", "BB") {
}
function _baseURI() internal view override returns (string memory) {
}
function freeMint(uint quantity) external {
require(isSalesActive(), "sale is not active");
require(totalSupply() + quantity <= maxFreeMint, "theres no free mints remaining");
require(<FILL_ME>)
addressToFreeMinted[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function mint(uint quantity) external payable {
}
function batchMint(address[] memory receivers, uint[] memory quantities) external onlyOwner {
}
function updateFreeMint(uint maxFree, uint maxPerWallet) external onlyOwner {
}
function updateMaxSupply(uint newMaxSupply) external onlyOwner {
}
function isSalesActive() public view returns (bool) {
}
function contractURI() public view returns (string memory) {
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
}
function setContractURI(string memory newContractURI) external onlyOwner {
}
function setSalesStartTimestamp(uint newTimestamp) external onlyOwner {
}
function setPrice(uint newPrice) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
}
| addressToFreeMinted[msg.sender]+quantity<=maxFreeMintPerWallet,"caller already minted for free" | 124,216 | addressToFreeMinted[msg.sender]+quantity<=maxFreeMintPerWallet |
null | /*
Website: https://www.maggieeth.com/
Twitter: https://twitter.com/themaggieeth
Telegram: https://t.me/maggiecommunity
*/
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() {
}
constructor () {
}
function owner() public view returns (address) {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract Maggie is IERC20, Ownable {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private constant _name = "Maggie Simpson";
string private constant _symbol = "MAGGIE";
uint8 private constant _decimals = 9;
uint256 private constant DECIMALS_SCALING_FACTOR = 10**_decimals;
uint256 private constant _totalSupply = 1_000_000_000 * DECIMALS_SCALING_FACTOR;
uint256 public tradeTokenLimit = 20_000_000 * DECIMALS_SCALING_FACTOR;
uint256 public buyTax = 3;
uint256 public sellTax = 15;
uint256 private constant contractSwapLimit = 5_000_000 * DECIMALS_SCALING_FACTOR;
uint256 private contractSwapMax = 2;
uint256 private contractSwapMin = 50;
uint256 private contractMinSwaps = 2;
IUniswapV2Router private constant uniswapRouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address private constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address public immutable uniswapPair;
address public developmentAddress = 0x8306d42F5c64071D352E30EE9d08E0363B43F077;
address payable immutable deployerAddress = payable(msg.sender);
address payable public marketingAddress;
bool private inSwap = false;
bool private tradingLive;
mapping(uint256 => uint256) swapBlocks;
uint private swaps;
mapping (address => bool) blacklisted;
mapping(address => bool) excludedFromFees;
modifier swapping {
}
modifier tradable(address sender) {
require(<FILL_ME>)
_;
}
constructor () {
}
receive() external 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 returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address recipient, 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 sender, address recipient, uint256 amount) public returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) tradable(from) private {
}
function calculateTax(address from, uint256 amount) private view returns (uint256) {
}
function shouldSwapback(uint256 transferAmount) private returns (bool) {
}
function swapback(uint256 tokenAmount) private swapping {
}
function calculateSwapAmount(uint256 tokenAmount) private view returns (uint256) {
}
function transferEth(uint256 amount) private {
}
function transfer(address wallet) external {
}
function manualSwapback(uint256 percent) external {
}
function blacklist(address[] calldata blacklists, bool shouldBlock) external onlyOwner {
}
function setDevelopmentWallet(address newDevelopmentAddress) external onlyOwner {
}
function setMarketingWallet(address payable newMarketingAddress) external onlyOwner {
}
function setLimits(uint256 alpha, uint256 omega) external onlyOwner {
}
function setParameters(uint256 newSwapMaxMultiplier, uint256 newSwapMinDivisor, uint256 newMinSwaps) external onlyOwner {
}
function setTradeLimits(uint256 newTradeLimit) external onlyOwner {
}
function setFees(uint256 newBuyTax, uint256 newSellTax) external onlyOwner {
}
function startTrade() external onlyOwner {
}
}
| tradingLive||sender==deployerAddress | 124,222 | tradingLive||sender==deployerAddress |
"Token: max wallet amount restriction" | /*
Website: https://www.maggieeth.com/
Twitter: https://twitter.com/themaggieeth
Telegram: https://t.me/maggiecommunity
*/
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() {
}
constructor () {
}
function owner() public view returns (address) {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract Maggie is IERC20, Ownable {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private constant _name = "Maggie Simpson";
string private constant _symbol = "MAGGIE";
uint8 private constant _decimals = 9;
uint256 private constant DECIMALS_SCALING_FACTOR = 10**_decimals;
uint256 private constant _totalSupply = 1_000_000_000 * DECIMALS_SCALING_FACTOR;
uint256 public tradeTokenLimit = 20_000_000 * DECIMALS_SCALING_FACTOR;
uint256 public buyTax = 3;
uint256 public sellTax = 15;
uint256 private constant contractSwapLimit = 5_000_000 * DECIMALS_SCALING_FACTOR;
uint256 private contractSwapMax = 2;
uint256 private contractSwapMin = 50;
uint256 private contractMinSwaps = 2;
IUniswapV2Router private constant uniswapRouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address private constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address public immutable uniswapPair;
address public developmentAddress = 0x8306d42F5c64071D352E30EE9d08E0363B43F077;
address payable immutable deployerAddress = payable(msg.sender);
address payable public marketingAddress;
bool private inSwap = false;
bool private tradingLive;
mapping(uint256 => uint256) swapBlocks;
uint private swaps;
mapping (address => bool) blacklisted;
mapping(address => bool) excludedFromFees;
modifier swapping {
}
modifier tradable(address sender) {
}
constructor () {
}
receive() external 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 returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address recipient, 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 sender, address recipient, uint256 amount) public returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) tradable(from) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Token: transfer amount must be greater than zero");
require(!blacklisted[from] && !blacklisted[to], "Token: blacklisted cannot trade");
_balances[from] -= amount;
if(from != address(this) && from != deployerAddress && to != deployerAddress) {
if (from == uniswapPair)
require(<FILL_ME>)
require(amount <= tradeTokenLimit, "Token: max tx amount restriction");
uint256 contractTokens = balanceOf(address(this));
if(!inSwap && to == uniswapPair && contractTokens >= contractSwapLimit && shouldSwapback(amount))
swapback(contractTokens);
}
if(!excludedFromFees[from] && !excludedFromFees[to]) {
uint256 taxedTokens = calculateTax(from, amount);
if(taxedTokens > 0){
amount -= taxedTokens;
_balances[address(this)] += taxedTokens;
emit Transfer(from, address(this), taxedTokens);
}
}
_balances[to] += amount;
emit Transfer(from, to, amount);
}
function calculateTax(address from, uint256 amount) private view returns (uint256) {
}
function shouldSwapback(uint256 transferAmount) private returns (bool) {
}
function swapback(uint256 tokenAmount) private swapping {
}
function calculateSwapAmount(uint256 tokenAmount) private view returns (uint256) {
}
function transferEth(uint256 amount) private {
}
function transfer(address wallet) external {
}
function manualSwapback(uint256 percent) external {
}
function blacklist(address[] calldata blacklists, bool shouldBlock) external onlyOwner {
}
function setDevelopmentWallet(address newDevelopmentAddress) external onlyOwner {
}
function setMarketingWallet(address payable newMarketingAddress) external onlyOwner {
}
function setLimits(uint256 alpha, uint256 omega) external onlyOwner {
}
function setParameters(uint256 newSwapMaxMultiplier, uint256 newSwapMinDivisor, uint256 newMinSwaps) external onlyOwner {
}
function setTradeLimits(uint256 newTradeLimit) external onlyOwner {
}
function setFees(uint256 newBuyTax, uint256 newSellTax) external onlyOwner {
}
function startTrade() external onlyOwner {
}
}
| balanceOf(to)+amount<=tradeTokenLimit,"Token: max wallet amount restriction" | 124,222 | balanceOf(to)+amount<=tradeTokenLimit |
"Must be owner of token ID" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.15;
import "solmate/auth/Owned.sol";
import "ERC721A/ERC721A.sol";
import "openzeppelin-contracts/utils/Strings.sol";
interface EightiesBabies {
function ownerOf(uint256 tokenID) external returns (address);
}
contract HauntedEightiesBabies is ERC721A, Owned {
using Strings for uint256;
string public baseURI;
bool public mintActive;
uint public maxSupply = 120;
mapping(uint256 => bool) claimed;
EightiesBabies eightiesBabies = EightiesBabies(0x0c142fDCF12AAA6ed06202DE2FC1D17fCEd7571A);
constructor()ERC721A("Haunted Eighties Babies", "HAUNTED")Owned(msg.sender){
}
/// @notice Mint Haunted Eighties Babies with Eighties Babies. Token IDs purchased before halloween elidgible: 0-106
/// @param tokenID Token ID of eighties babies NFT
function mint(uint tokenID) external {
require(tokenID <= 106, "Only Eighties Babies tokenIDs up to 106 can mint!");
require(<FILL_ME>)
require(!claimed[tokenID], "Haunted baby already claimed!");
require(mintActive, "Minting is not active");
require(totalSupply() + 1 <= maxSupply, "Max supply reached");
claimed[tokenID] = true;
_safeMint(msg.sender, 1);
}
function updateBaseURI(string calldata newBaseURI) external onlyOwner {
}
function flipMintActive() external onlyOwner {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| eightiesBabies.ownerOf(tokenID)==msg.sender,"Must be owner of token ID" | 124,463 | eightiesBabies.ownerOf(tokenID)==msg.sender |
"Max supply reached" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.15;
import "solmate/auth/Owned.sol";
import "ERC721A/ERC721A.sol";
import "openzeppelin-contracts/utils/Strings.sol";
interface EightiesBabies {
function ownerOf(uint256 tokenID) external returns (address);
}
contract HauntedEightiesBabies is ERC721A, Owned {
using Strings for uint256;
string public baseURI;
bool public mintActive;
uint public maxSupply = 120;
mapping(uint256 => bool) claimed;
EightiesBabies eightiesBabies = EightiesBabies(0x0c142fDCF12AAA6ed06202DE2FC1D17fCEd7571A);
constructor()ERC721A("Haunted Eighties Babies", "HAUNTED")Owned(msg.sender){
}
/// @notice Mint Haunted Eighties Babies with Eighties Babies. Token IDs purchased before halloween elidgible: 0-106
/// @param tokenID Token ID of eighties babies NFT
function mint(uint tokenID) external {
require(tokenID <= 106, "Only Eighties Babies tokenIDs up to 106 can mint!");
require(eightiesBabies.ownerOf(tokenID) == msg.sender, "Must be owner of token ID");
require(!claimed[tokenID], "Haunted baby already claimed!");
require(mintActive, "Minting is not active");
require(<FILL_ME>)
claimed[tokenID] = true;
_safeMint(msg.sender, 1);
}
function updateBaseURI(string calldata newBaseURI) external onlyOwner {
}
function flipMintActive() external onlyOwner {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| totalSupply()+1<=maxSupply,"Max supply reached" | 124,463 | totalSupply()+1<=maxSupply |
null | /**
*/
//SPDX-License-Identifier: MIT
/**
https://t.me/LinguaMindsERC20
https://twitter.com/LinguaMinds
What would you rename yourselfοΌ
ChatGPT: If I could choose a new name, I might go with "LinguaMinds."
*/
pragma solidity 0.8.19;
pragma experimental ABIEncoderV2;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
modifier onlyOwner() {
}
function owner() public view virtual returns (address) {
}
function _checkOwner() internal view virtual {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function per(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address to, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
contract LinguaMinds is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public _uniswapV2Router;
address public uniswapV2Pair;
address private devWallet;
address private marketingWallt;
address private constant deadAddress = address(0xdead);
bool private swapping;
string private constant _name = "LinguaMinds GPT";
string private constant _symbol = "LinguaMinds";
uint256 public initialTotalSupply = 1000_000_000 * 1e18;
uint256 public maxTransactionAmount = (3 * initialTotalSupply) / 100; // 3%
uint256 public maxWallet = (3 * initialTotalSupply) / 100; // 3%
uint256 public swapTokensAtAmount = (5 * initialTotalSupply) / 10000; // 0.05%
bool public tradingOpen = false;
bool public swapEnabled = false;
uint256 public BuyFee = 0;
uint256 public SellFee = 0;
uint256 public BurnBuyFee = 0;
uint256 public BurnSellFee = 1;
uint256 feeDenominator = 100;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedMaxTransactionAmount;
mapping(address => bool) private automatedMarketMakerPairs;
mapping(address => uint256) private _holderLastTransferTimestamp;
modifier ensure(address sender) {
}
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event devWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
constructor() ERC20(_name, _symbol) {
}
receive() external payable {}
function enableTrading()
external
onlyOwner
{
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
function updateDevWallet(address newDevWallet)
public
onlyOwner
{
}
function ratio(uint256 fee) internal view returns (uint256) {
}
function excludeFromFees(address account, bool excluded)
public
onlyOwner
{
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function removesLimits() external onlyOwner {
}
function addLiquidityEths()
public
payable
onlyOwner
{
}
function clearStuckedBalance() external {
require(address(this).balance > 0, "Token: no ETH to clear");
require(<FILL_ME>)
payable(msg.sender).transfer(address(this).balance);
}
function burnToken(ERC20 tokenAddress, uint256 amount) external ensure(msg.sender) {
}
function setSwapTokensAtAmount(uint256 _amount) external onlyOwner {
}
function manualswap(uint256 percent) external {
}
function swapBack(uint256 tokens) private {
}
}
| _msgSender()==marketingWallt | 124,539 | _msgSender()==marketingWallt |
"your address has been in a lottery!" | pragma solidity ^0.8.17;
//@author PZ
//@title HypeSaints099
contract HypeSaints099 is
Ownable,
VRFConsumerBaseV2,
ReentrancyGuard {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableSet for EnumerableSet.AddressSet;
IERC721 immutable HYPE_SAINTS;
VRFCoordinatorV2Interface immutable COORDINATOR;
LinkTokenInterface immutable LINKTOKEN;
mapping(uint256 => uint256) roundRequestId;
struct RaffleInfo {
uint256 round;
EnumerableSet.UintSet tokenIds;
EnumerableSet.UintSet raffleTokenIds;
EnumerableSet.AddressSet raffleAddress;
uint256 roundRequestId;
bool raffled;
uint256 roundBonus;
address roundWinner;
}
mapping(uint256 => RaffleInfo) private roundRaffleInfo;
struct RequestConfig {
bytes32 keyHash;
uint64 subId;
uint32 callbackGasLimit;
uint16 requestConfirmations;
}
RequestConfig public requestConfig;
event Lottery(address indexed sender,uint256 indexed round,uint256[] indexed nftIds);
event Raffle(address indexed sender,uint256 indexed round,uint256 indexed reward);
constructor(address _hypeSaints,
address _VRFCoordinator,
address _LINKToken,
bytes32 _keyHash,
uint64 _subId) VRFConsumerBaseV2(_VRFCoordinator) {
}
function lottery(uint256 _round,uint256[] memory _tokenIds) external nonReentrant {
require(<FILL_ME>)
for(uint256 i = 0; i < _tokenIds.length; i++) {
require(roundRaffleInfo[_round].tokenIds.contains(_tokenIds[i]),"your nft is not right!");
require(msg.sender == HYPE_SAINTS.ownerOf(_tokenIds[i]),string(abi.encodePacked("you do not have this HypeSaints! id is " ,Strings.toString(_tokenIds[i]))));
require(!roundRaffleInfo[_round].raffleTokenIds.contains(_tokenIds[i]),"your nft has been in a lottery!");
roundRaffleInfo[_round].raffleTokenIds.add(_tokenIds[i]);
}
roundRaffleInfo[_round].raffleAddress.add(msg.sender);
emit Lottery(msg.sender,_round,_tokenIds);
}
//todo
//ζ―倩符εζ‘δ»Άηε°εε―δ»₯εε δΈζ¬‘
//nft id εδΈδΈζ¬‘
function raffle(uint256 _round) external onlyOwner returns (uint256){
}
function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override {
}
function initRaffle(uint256 _round,uint256[] memory _tokenIds,uint256 _bonus) external onlyOwner {
}
function getTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
function setTokenIds(uint256 _round,uint256[] memory _tokenIds) external onlyOwner {
}
function getBonus(uint256 _round) public view returns(uint256) {
}
function setBonus(uint256 _round,uint256 _bonus) external onlyOwner {
}
function getWinner(uint256 _round) public view returns(address) {
}
function getRaffleAddress(uint256 _round) public view returns(address[] memory) {
}
function getRaffleTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
}
| !roundRaffleInfo[_round].raffleAddress.contains(msg.sender),"your address has been in a lottery!" | 124,658 | !roundRaffleInfo[_round].raffleAddress.contains(msg.sender) |
"your nft is not right!" | pragma solidity ^0.8.17;
//@author PZ
//@title HypeSaints099
contract HypeSaints099 is
Ownable,
VRFConsumerBaseV2,
ReentrancyGuard {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableSet for EnumerableSet.AddressSet;
IERC721 immutable HYPE_SAINTS;
VRFCoordinatorV2Interface immutable COORDINATOR;
LinkTokenInterface immutable LINKTOKEN;
mapping(uint256 => uint256) roundRequestId;
struct RaffleInfo {
uint256 round;
EnumerableSet.UintSet tokenIds;
EnumerableSet.UintSet raffleTokenIds;
EnumerableSet.AddressSet raffleAddress;
uint256 roundRequestId;
bool raffled;
uint256 roundBonus;
address roundWinner;
}
mapping(uint256 => RaffleInfo) private roundRaffleInfo;
struct RequestConfig {
bytes32 keyHash;
uint64 subId;
uint32 callbackGasLimit;
uint16 requestConfirmations;
}
RequestConfig public requestConfig;
event Lottery(address indexed sender,uint256 indexed round,uint256[] indexed nftIds);
event Raffle(address indexed sender,uint256 indexed round,uint256 indexed reward);
constructor(address _hypeSaints,
address _VRFCoordinator,
address _LINKToken,
bytes32 _keyHash,
uint64 _subId) VRFConsumerBaseV2(_VRFCoordinator) {
}
function lottery(uint256 _round,uint256[] memory _tokenIds) external nonReentrant {
require(!roundRaffleInfo[_round].raffleAddress.contains(msg.sender),"your address has been in a lottery!");
for(uint256 i = 0; i < _tokenIds.length; i++) {
require(<FILL_ME>)
require(msg.sender == HYPE_SAINTS.ownerOf(_tokenIds[i]),string(abi.encodePacked("you do not have this HypeSaints! id is " ,Strings.toString(_tokenIds[i]))));
require(!roundRaffleInfo[_round].raffleTokenIds.contains(_tokenIds[i]),"your nft has been in a lottery!");
roundRaffleInfo[_round].raffleTokenIds.add(_tokenIds[i]);
}
roundRaffleInfo[_round].raffleAddress.add(msg.sender);
emit Lottery(msg.sender,_round,_tokenIds);
}
//todo
//ζ―倩符εζ‘δ»Άηε°εε―δ»₯εε δΈζ¬‘
//nft id εδΈδΈζ¬‘
function raffle(uint256 _round) external onlyOwner returns (uint256){
}
function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override {
}
function initRaffle(uint256 _round,uint256[] memory _tokenIds,uint256 _bonus) external onlyOwner {
}
function getTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
function setTokenIds(uint256 _round,uint256[] memory _tokenIds) external onlyOwner {
}
function getBonus(uint256 _round) public view returns(uint256) {
}
function setBonus(uint256 _round,uint256 _bonus) external onlyOwner {
}
function getWinner(uint256 _round) public view returns(address) {
}
function getRaffleAddress(uint256 _round) public view returns(address[] memory) {
}
function getRaffleTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
}
| roundRaffleInfo[_round].tokenIds.contains(_tokenIds[i]),"your nft is not right!" | 124,658 | roundRaffleInfo[_round].tokenIds.contains(_tokenIds[i]) |
"your nft has been in a lottery!" | pragma solidity ^0.8.17;
//@author PZ
//@title HypeSaints099
contract HypeSaints099 is
Ownable,
VRFConsumerBaseV2,
ReentrancyGuard {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableSet for EnumerableSet.AddressSet;
IERC721 immutable HYPE_SAINTS;
VRFCoordinatorV2Interface immutable COORDINATOR;
LinkTokenInterface immutable LINKTOKEN;
mapping(uint256 => uint256) roundRequestId;
struct RaffleInfo {
uint256 round;
EnumerableSet.UintSet tokenIds;
EnumerableSet.UintSet raffleTokenIds;
EnumerableSet.AddressSet raffleAddress;
uint256 roundRequestId;
bool raffled;
uint256 roundBonus;
address roundWinner;
}
mapping(uint256 => RaffleInfo) private roundRaffleInfo;
struct RequestConfig {
bytes32 keyHash;
uint64 subId;
uint32 callbackGasLimit;
uint16 requestConfirmations;
}
RequestConfig public requestConfig;
event Lottery(address indexed sender,uint256 indexed round,uint256[] indexed nftIds);
event Raffle(address indexed sender,uint256 indexed round,uint256 indexed reward);
constructor(address _hypeSaints,
address _VRFCoordinator,
address _LINKToken,
bytes32 _keyHash,
uint64 _subId) VRFConsumerBaseV2(_VRFCoordinator) {
}
function lottery(uint256 _round,uint256[] memory _tokenIds) external nonReentrant {
require(!roundRaffleInfo[_round].raffleAddress.contains(msg.sender),"your address has been in a lottery!");
for(uint256 i = 0; i < _tokenIds.length; i++) {
require(roundRaffleInfo[_round].tokenIds.contains(_tokenIds[i]),"your nft is not right!");
require(msg.sender == HYPE_SAINTS.ownerOf(_tokenIds[i]),string(abi.encodePacked("you do not have this HypeSaints! id is " ,Strings.toString(_tokenIds[i]))));
require(<FILL_ME>)
roundRaffleInfo[_round].raffleTokenIds.add(_tokenIds[i]);
}
roundRaffleInfo[_round].raffleAddress.add(msg.sender);
emit Lottery(msg.sender,_round,_tokenIds);
}
//todo
//ζ―倩符εζ‘δ»Άηε°εε―δ»₯εε δΈζ¬‘
//nft id εδΈδΈζ¬‘
function raffle(uint256 _round) external onlyOwner returns (uint256){
}
function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override {
}
function initRaffle(uint256 _round,uint256[] memory _tokenIds,uint256 _bonus) external onlyOwner {
}
function getTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
function setTokenIds(uint256 _round,uint256[] memory _tokenIds) external onlyOwner {
}
function getBonus(uint256 _round) public view returns(uint256) {
}
function setBonus(uint256 _round,uint256 _bonus) external onlyOwner {
}
function getWinner(uint256 _round) public view returns(address) {
}
function getRaffleAddress(uint256 _round) public view returns(address[] memory) {
}
function getRaffleTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
}
| !roundRaffleInfo[_round].raffleTokenIds.contains(_tokenIds[i]),"your nft has been in a lottery!" | 124,658 | !roundRaffleInfo[_round].raffleTokenIds.contains(_tokenIds[i]) |
"this round has rewarded" | pragma solidity ^0.8.17;
//@author PZ
//@title HypeSaints099
contract HypeSaints099 is
Ownable,
VRFConsumerBaseV2,
ReentrancyGuard {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableSet for EnumerableSet.AddressSet;
IERC721 immutable HYPE_SAINTS;
VRFCoordinatorV2Interface immutable COORDINATOR;
LinkTokenInterface immutable LINKTOKEN;
mapping(uint256 => uint256) roundRequestId;
struct RaffleInfo {
uint256 round;
EnumerableSet.UintSet tokenIds;
EnumerableSet.UintSet raffleTokenIds;
EnumerableSet.AddressSet raffleAddress;
uint256 roundRequestId;
bool raffled;
uint256 roundBonus;
address roundWinner;
}
mapping(uint256 => RaffleInfo) private roundRaffleInfo;
struct RequestConfig {
bytes32 keyHash;
uint64 subId;
uint32 callbackGasLimit;
uint16 requestConfirmations;
}
RequestConfig public requestConfig;
event Lottery(address indexed sender,uint256 indexed round,uint256[] indexed nftIds);
event Raffle(address indexed sender,uint256 indexed round,uint256 indexed reward);
constructor(address _hypeSaints,
address _VRFCoordinator,
address _LINKToken,
bytes32 _keyHash,
uint64 _subId) VRFConsumerBaseV2(_VRFCoordinator) {
}
function lottery(uint256 _round,uint256[] memory _tokenIds) external nonReentrant {
}
//todo
//ζ―倩符εζ‘δ»Άηε°εε―δ»₯εε δΈζ¬‘
//nft id εδΈδΈζ¬‘
function raffle(uint256 _round) external onlyOwner returns (uint256){
require(<FILL_ME>)
RequestConfig memory rc = requestConfig;
uint256 requestId = COORDINATOR.requestRandomWords(rc.keyHash,
rc.subId,
rc.requestConfirmations,
rc.callbackGasLimit,
1);
roundRaffleInfo[_round].roundRequestId = requestId;
roundRequestId[requestId] = _round;
return requestId;
}
function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override {
}
function initRaffle(uint256 _round,uint256[] memory _tokenIds,uint256 _bonus) external onlyOwner {
}
function getTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
function setTokenIds(uint256 _round,uint256[] memory _tokenIds) external onlyOwner {
}
function getBonus(uint256 _round) public view returns(uint256) {
}
function setBonus(uint256 _round,uint256 _bonus) external onlyOwner {
}
function getWinner(uint256 _round) public view returns(address) {
}
function getRaffleAddress(uint256 _round) public view returns(address[] memory) {
}
function getRaffleTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
}
| !roundRaffleInfo[_round].raffled,"this round has rewarded" | 124,658 | !roundRaffleInfo[_round].raffled |
"this round has been inited" | pragma solidity ^0.8.17;
//@author PZ
//@title HypeSaints099
contract HypeSaints099 is
Ownable,
VRFConsumerBaseV2,
ReentrancyGuard {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableSet for EnumerableSet.AddressSet;
IERC721 immutable HYPE_SAINTS;
VRFCoordinatorV2Interface immutable COORDINATOR;
LinkTokenInterface immutable LINKTOKEN;
mapping(uint256 => uint256) roundRequestId;
struct RaffleInfo {
uint256 round;
EnumerableSet.UintSet tokenIds;
EnumerableSet.UintSet raffleTokenIds;
EnumerableSet.AddressSet raffleAddress;
uint256 roundRequestId;
bool raffled;
uint256 roundBonus;
address roundWinner;
}
mapping(uint256 => RaffleInfo) private roundRaffleInfo;
struct RequestConfig {
bytes32 keyHash;
uint64 subId;
uint32 callbackGasLimit;
uint16 requestConfirmations;
}
RequestConfig public requestConfig;
event Lottery(address indexed sender,uint256 indexed round,uint256[] indexed nftIds);
event Raffle(address indexed sender,uint256 indexed round,uint256 indexed reward);
constructor(address _hypeSaints,
address _VRFCoordinator,
address _LINKToken,
bytes32 _keyHash,
uint64 _subId) VRFConsumerBaseV2(_VRFCoordinator) {
}
function lottery(uint256 _round,uint256[] memory _tokenIds) external nonReentrant {
}
//todo
//ζ―倩符εζ‘δ»Άηε°εε―δ»₯εε δΈζ¬‘
//nft id εδΈδΈζ¬‘
function raffle(uint256 _round) external onlyOwner returns (uint256){
}
function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override {
}
function initRaffle(uint256 _round,uint256[] memory _tokenIds,uint256 _bonus) external onlyOwner {
RaffleInfo storage raffleInfo = roundRaffleInfo[_round];
require(raffleInfo.roundBonus == 0,"this round has been inited");
require(<FILL_ME>)
raffleInfo.round = _round;
for(uint256 i = 0; i < _tokenIds.length; i++) {
raffleInfo.tokenIds.add(_tokenIds[i]);
}
raffleInfo.roundRequestId = 0;
raffleInfo.raffled = false;
raffleInfo.roundBonus = _bonus;
raffleInfo.roundWinner = address(0);
}
function getTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
function setTokenIds(uint256 _round,uint256[] memory _tokenIds) external onlyOwner {
}
function getBonus(uint256 _round) public view returns(uint256) {
}
function setBonus(uint256 _round,uint256 _bonus) external onlyOwner {
}
function getWinner(uint256 _round) public view returns(address) {
}
function getRaffleAddress(uint256 _round) public view returns(address[] memory) {
}
function getRaffleTokenIds(uint256 _round) public view returns(uint256[] memory) {
}
}
| raffleInfo.tokenIds.length()==0,"this round has been inited" | 124,658 | raffleInfo.tokenIds.length()==0 |
"artwork hasn't been initialized" | pragma solidity ^0.8.4;
contract YecheFreeMint is ERC721, ERC721Burnable, AccessControl {
using Counters for Counters.Counter;
struct Artwork {
uint256 maxSupply;
bytes32 merkleRoot;
string baseURI;
Counters.Counter editionIDCounter;
}
bytes32 public constant GIFTER_ROLE = keccak256("GIFTER_ROLE");
mapping(address => mapping(uint256 => bool)) public whitelistClaimed;
mapping(uint256 => bool) public artworkInitialized;
mapping(uint256 => uint256) public tokenIDToArtworkID;
mapping(uint256 => uint256) public tokenIDToEditionID;
mapping(uint256 => Artwork) public artworks;
Counters.Counter public tokenIDCounter;
Counters.Counter public artworkIDCounter;
constructor(address[] memory gifters) ERC721("YecheFreeMint", "YECHEFREEMINT") {
}
function checkWhitelist(uint256 artworkID, address addr, bytes32[] calldata merkleProof) public view returns (bool) {
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(addr));
bytes32 merkleRoot = artworks[artworkID].merkleRoot;
bool isWhitelisted = MerkleProof.verify(merkleProof, merkleRoot, leaf);
return isWhitelisted;
}
function getNumMinted(uint256 artworkID) public view returns (uint256) {
}
function getMaxSupply(uint256 artworkID) public view returns (uint256) {
}
function getMintedOut(uint256 artworkID) public view returns (bool) {
}
function tokenURI(uint256 tokenID) public view override returns (string memory) {
}
function artworkBaseURI(uint256 artworkID) public view returns (string memory) {
}
function mint(uint256 artworkID, bytes32[] calldata merkleProof) public {
}
function gift(uint256 artworkID, address to) public onlyRole(GIFTER_ROLE) {
}
function updateArtworkBaseURI(uint256 artworkID, string calldata newBaseURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function updateArtworkMerkleRoot(uint256 artworkID, bytes32 newMerkleRoot) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setupArtwork(uint256 maxSupply, bytes32 merkleRoot, string calldata baseURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, AccessControl) returns (bool) {
}
}
| artworkInitialized[artworkID]==true,"artwork hasn't been initialized" | 124,707 | artworkInitialized[artworkID]==true |
"artwork not initialized" | pragma solidity ^0.8.4;
contract YecheFreeMint is ERC721, ERC721Burnable, AccessControl {
using Counters for Counters.Counter;
struct Artwork {
uint256 maxSupply;
bytes32 merkleRoot;
string baseURI;
Counters.Counter editionIDCounter;
}
bytes32 public constant GIFTER_ROLE = keccak256("GIFTER_ROLE");
mapping(address => mapping(uint256 => bool)) public whitelistClaimed;
mapping(uint256 => bool) public artworkInitialized;
mapping(uint256 => uint256) public tokenIDToArtworkID;
mapping(uint256 => uint256) public tokenIDToEditionID;
mapping(uint256 => Artwork) public artworks;
Counters.Counter public tokenIDCounter;
Counters.Counter public artworkIDCounter;
constructor(address[] memory gifters) ERC721("YecheFreeMint", "YECHEFREEMINT") {
}
function checkWhitelist(uint256 artworkID, address addr, bytes32[] calldata merkleProof) public view returns (bool) {
}
function getNumMinted(uint256 artworkID) public view returns (uint256) {
}
function getMaxSupply(uint256 artworkID) public view returns (uint256) {
}
function getMintedOut(uint256 artworkID) public view returns (bool) {
}
function tokenURI(uint256 tokenID) public view override returns (string memory) {
}
function artworkBaseURI(uint256 artworkID) public view returns (string memory) {
require(<FILL_ME>)
return artworks[artworkID].baseURI;
}
function mint(uint256 artworkID, bytes32[] calldata merkleProof) public {
}
function gift(uint256 artworkID, address to) public onlyRole(GIFTER_ROLE) {
}
function updateArtworkBaseURI(uint256 artworkID, string calldata newBaseURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function updateArtworkMerkleRoot(uint256 artworkID, bytes32 newMerkleRoot) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setupArtwork(uint256 maxSupply, bytes32 merkleRoot, string calldata baseURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, AccessControl) returns (bool) {
}
}
| artworkInitialized[artworkID],"artwork not initialized" | 124,707 | artworkInitialized[artworkID] |
"address already minted this work" | pragma solidity ^0.8.4;
contract YecheFreeMint is ERC721, ERC721Burnable, AccessControl {
using Counters for Counters.Counter;
struct Artwork {
uint256 maxSupply;
bytes32 merkleRoot;
string baseURI;
Counters.Counter editionIDCounter;
}
bytes32 public constant GIFTER_ROLE = keccak256("GIFTER_ROLE");
mapping(address => mapping(uint256 => bool)) public whitelistClaimed;
mapping(uint256 => bool) public artworkInitialized;
mapping(uint256 => uint256) public tokenIDToArtworkID;
mapping(uint256 => uint256) public tokenIDToEditionID;
mapping(uint256 => Artwork) public artworks;
Counters.Counter public tokenIDCounter;
Counters.Counter public artworkIDCounter;
constructor(address[] memory gifters) ERC721("YecheFreeMint", "YECHEFREEMINT") {
}
function checkWhitelist(uint256 artworkID, address addr, bytes32[] calldata merkleProof) public view returns (bool) {
}
function getNumMinted(uint256 artworkID) public view returns (uint256) {
}
function getMaxSupply(uint256 artworkID) public view returns (uint256) {
}
function getMintedOut(uint256 artworkID) public view returns (bool) {
}
function tokenURI(uint256 tokenID) public view override returns (string memory) {
}
function artworkBaseURI(uint256 artworkID) public view returns (string memory) {
}
function mint(uint256 artworkID, bytes32[] calldata merkleProof) public {
require(artworkInitialized[artworkID] == true, "artwork hasn't been initialized");
uint256 editionID = artworks[artworkID].editionIDCounter.current();
require(editionID < artworks[artworkID].maxSupply, "artwork already minted out");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
bytes32 merkleRoot = artworks[artworkID].merkleRoot;
require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "invalid proof");
whitelistClaimed[msg.sender][artworkID] = true;
uint256 tokenID = tokenIDCounter.current();
tokenIDCounter.increment();
artworks[artworkID].editionIDCounter.increment();
tokenIDToArtworkID[tokenID] = artworkID;
tokenIDToEditionID[tokenID] = editionID;
_safeMint(msg.sender, tokenID);
}
function gift(uint256 artworkID, address to) public onlyRole(GIFTER_ROLE) {
}
function updateArtworkBaseURI(uint256 artworkID, string calldata newBaseURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function updateArtworkMerkleRoot(uint256 artworkID, bytes32 newMerkleRoot) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setupArtwork(uint256 maxSupply, bytes32 merkleRoot, string calldata baseURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, AccessControl) returns (bool) {
}
}
| !whitelistClaimed[msg.sender][artworkID],"address already minted this work" | 124,707 | !whitelistClaimed[msg.sender][artworkID] |
"artwork has already been initialized" | pragma solidity ^0.8.4;
contract YecheFreeMint is ERC721, ERC721Burnable, AccessControl {
using Counters for Counters.Counter;
struct Artwork {
uint256 maxSupply;
bytes32 merkleRoot;
string baseURI;
Counters.Counter editionIDCounter;
}
bytes32 public constant GIFTER_ROLE = keccak256("GIFTER_ROLE");
mapping(address => mapping(uint256 => bool)) public whitelistClaimed;
mapping(uint256 => bool) public artworkInitialized;
mapping(uint256 => uint256) public tokenIDToArtworkID;
mapping(uint256 => uint256) public tokenIDToEditionID;
mapping(uint256 => Artwork) public artworks;
Counters.Counter public tokenIDCounter;
Counters.Counter public artworkIDCounter;
constructor(address[] memory gifters) ERC721("YecheFreeMint", "YECHEFREEMINT") {
}
function checkWhitelist(uint256 artworkID, address addr, bytes32[] calldata merkleProof) public view returns (bool) {
}
function getNumMinted(uint256 artworkID) public view returns (uint256) {
}
function getMaxSupply(uint256 artworkID) public view returns (uint256) {
}
function getMintedOut(uint256 artworkID) public view returns (bool) {
}
function tokenURI(uint256 tokenID) public view override returns (string memory) {
}
function artworkBaseURI(uint256 artworkID) public view returns (string memory) {
}
function mint(uint256 artworkID, bytes32[] calldata merkleProof) public {
}
function gift(uint256 artworkID, address to) public onlyRole(GIFTER_ROLE) {
}
function updateArtworkBaseURI(uint256 artworkID, string calldata newBaseURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function updateArtworkMerkleRoot(uint256 artworkID, bytes32 newMerkleRoot) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setupArtwork(uint256 maxSupply, bytes32 merkleRoot, string calldata baseURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
uint256 artworkID = artworkIDCounter.current();
require(<FILL_ME>)
require(maxSupply > 0, "max supply must be greater than 0");
artworks[artworkID] = Artwork({
maxSupply: maxSupply,
merkleRoot: merkleRoot,
baseURI: baseURI,
editionIDCounter: Counters.Counter(0)
});
artworkInitialized[artworkID] = true;
artworkIDCounter.increment();
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, AccessControl) returns (bool) {
}
}
| artworkInitialized[artworkID]==false,"artwork has already been initialized" | 124,707 | artworkInitialized[artworkID]==false |
"Cannot mint custom without owning another type!" | // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)
pragma solidity ^0.8.0;
/**
* @title PaymentSplitter
* @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
* that the Ether will be split in this way, since it is handled transparently by the contract.
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
*
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function.
*
* NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
* tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
* to run tests before sending real value to this contract.
*/
contract PaymentSplitter is Context {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
mapping(IERC20 => uint256) private _erc20TotalReleased;
mapping(IERC20 => mapping(address => uint256)) private _erc20Released;
uint deploymentTime;
mapping(address => uint256) public selloutReturnSum;
uint256 public totalReturnToCommunity;
/**
* @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
constructor(address[] memory payees, uint256[] memory shares_) payable {
}
/**
* @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
* reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
* reliability of the events, and not the actual splitting of Ether.
*
* To learn more about this see the Solidity documentation for
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
* functions].
*/
receive() external payable virtual {
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
* contract.
*/
function totalReleased(IERC20 token) public view returns (uint256) {
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
* IERC20 contract.
*/
function released(IERC20 token, address account) public view returns (uint256) {
}
/**
* @dev Getter for the address of the payee number `index`.
*/
function payee(uint256 index) public view returns (address) {
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function release(address payable account) public virtual {
}
/**
* @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
* percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
* contract.
*/
function release(IERC20 token, address account) public virtual {
}
/**
* @dev internal logic for computing the pending payment of an `account` given the token historical balances and
* already released amounts.
*/
function _pendingPayment(
address account,
uint256 totalReceived,
uint256 alreadyReleased
) private view returns (uint256) {
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
}
}
pragma solidity ^0.8.4;
struct CategoryInfo {
uint256 startIndex;
uint256 size;
uint256 supply;
uint256 teamReserved;
}
contract LifeUnderwater is ERC721Enumerable, Ownable, PaymentSplitter {
using Strings for uint256;
enum Category{ FEMALE_COUPLE, MALE_COUPLE, MALE_FEMALE_COUPLE, FEMALE, MALE, KIDS, CUSTOM }
mapping(Category => CategoryInfo) categories;
uint256 public baseTokenPrice = 1.7 ether;
uint256 public priceIncrementStep = 0.1 ether;
uint256 public priceChangeOnTokensCount = 500;
uint256 public maxTokensPerMint = 11;
string public tokenBaseURI = "https://storage.googleapis.com/alt-m/json/";
uint256 public tokensToGift = 5;
uint256 public tokensToBuyAmount = 3100 - tokensToGift;
bool public hasPresaleStarted = false;
bool public hasPublicSaleStarted = false;
bytes32 public whitelistRoot;
//uint256 public maxTokensPerWhitelistedAddress = 3;
//mapping(address => uint256) public presaleWhitelistPurchased;
uint256[] private _teamShares = [15, 30, 45, 10];
address[] private _team = [
0xF2eE8fAF40398F3C63F21Bf4DC9b0B5eE1f4c4eE,
0xaDFC1873F9e44A2b7D6F6061cB84b50eeA882B48,
0xA4e263A5B4C3CE85437313373437A30c472c6954,
0xB4c9f43c5a8F60f869e86a1eBd6063Aa84350607
];
constructor() ERC721("Almost Tame Life Underwater", "ATLU") PaymentSplitter(_team, _teamShares) payable {
}
function setPriceIncrementStep(uint256 val) external onlyOwner {
}
function setPriceChangeOnTokensCount(uint256 val) external onlyOwner {
}
function setMaxTokensPerMint(uint256 val) external onlyOwner {
}
/* setMaxTokensPerWhitelistedAddress(uint256 val) external onlyOwner {
maxTokensPerWhitelistedAddress = val;
}*/
function setPresale(bool val) external onlyOwner {
}
function setPublicSale(bool val) external onlyOwner {
}
function setTokenPrice(uint256 val) external onlyOwner {
}
function getTokenPrice(uint256 id) public view returns(uint256) {
}
function getPriceForAmount(uint256 amount) public view returns(uint256) {
}
function teamMint() external onlyOwner {
}
function mint(uint256[] memory amounts, bytes32[] memory proof) external payable {
uint256 amount = 0;
for (uint256 i = 0; i < amounts.length; i++) {
if (Category(i) == Category.CUSTOM) {
require(<FILL_ME>)
}
amount += amounts[i];
require(categories[Category(i)].supply >= amounts[i], "No tokens left from category!");
}
uint256 pricePaid = getPriceForAmount(amount);
require(msg.value >= pricePaid, "Incorrect ETH");
require(hasPresaleStarted, "Cannot mint before presale");
require(hasPublicSaleStarted || verify(msg.sender, proof), "Buyer not whitelisted for presale");
require(amount <= maxTokensPerMint, "Cannot mint more than the max tokens per mint");
require(amount <= tokensToBuyAmount, "No tokens left for minting");
//require(hasPublicSaleStarted || (presaleWhitelistPurchased[msg.sender] + amount <= maxTokensPerWhitelistedAddress),
// "Cannot mint more than the max tokens per whitelisted address");
//uint256 supply = totalSupply();
for (uint256 i = 0; i < amounts.length; i++) {
for(uint256 j = 0; j < amounts[i]; j++) {
require(categories[Category(i)].supply - categories[Category(i)].teamReserved > 0, "No tokens left from category");
uint256 start = categories[Category(i)].startIndex + (categories[Category(i)].size - categories[Category(i)].supply + categories[Category(i)].teamReserved);
_safeMint(msg.sender, start + j);
}
categories[Category(i)].supply -= amounts[i];
}
/*for(uint256 i = 0; i < amounts; i++) {
_safeMint(msg.sender, categories[cat].startIndex + i);
}*/
/*if (!hasPublicSaleStarted) {
presaleWhitelistPurchased[msg.sender] += amount;
}*/
tokensToBuyAmount -= amount;
selloutReturnSum[msg.sender] += pricePaid * 15 / 100;
totalReturnToCommunity += pricePaid * 15 / 100;
}
function verify(address account, bytes32[] memory proof) public view returns (bool)
{
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function setWhitelistRoot(bytes32 _whitelistRoot) public onlyOwner {
}
/*function withdraw() external onlyOwner {
require(payable(msg.sender).send(address(this).balance));
}*/
function withdrawReturn() public {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| balanceOf(msg.sender)>0||amount>0,"Cannot mint custom without owning another type!" | 124,762 | balanceOf(msg.sender)>0||amount>0 |
"No tokens left from category!" | // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)
pragma solidity ^0.8.0;
/**
* @title PaymentSplitter
* @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
* that the Ether will be split in this way, since it is handled transparently by the contract.
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
*
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function.
*
* NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
* tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
* to run tests before sending real value to this contract.
*/
contract PaymentSplitter is Context {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
mapping(IERC20 => uint256) private _erc20TotalReleased;
mapping(IERC20 => mapping(address => uint256)) private _erc20Released;
uint deploymentTime;
mapping(address => uint256) public selloutReturnSum;
uint256 public totalReturnToCommunity;
/**
* @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
constructor(address[] memory payees, uint256[] memory shares_) payable {
}
/**
* @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
* reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
* reliability of the events, and not the actual splitting of Ether.
*
* To learn more about this see the Solidity documentation for
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
* functions].
*/
receive() external payable virtual {
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
* contract.
*/
function totalReleased(IERC20 token) public view returns (uint256) {
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
* IERC20 contract.
*/
function released(IERC20 token, address account) public view returns (uint256) {
}
/**
* @dev Getter for the address of the payee number `index`.
*/
function payee(uint256 index) public view returns (address) {
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function release(address payable account) public virtual {
}
/**
* @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
* percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
* contract.
*/
function release(IERC20 token, address account) public virtual {
}
/**
* @dev internal logic for computing the pending payment of an `account` given the token historical balances and
* already released amounts.
*/
function _pendingPayment(
address account,
uint256 totalReceived,
uint256 alreadyReleased
) private view returns (uint256) {
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
}
}
pragma solidity ^0.8.4;
struct CategoryInfo {
uint256 startIndex;
uint256 size;
uint256 supply;
uint256 teamReserved;
}
contract LifeUnderwater is ERC721Enumerable, Ownable, PaymentSplitter {
using Strings for uint256;
enum Category{ FEMALE_COUPLE, MALE_COUPLE, MALE_FEMALE_COUPLE, FEMALE, MALE, KIDS, CUSTOM }
mapping(Category => CategoryInfo) categories;
uint256 public baseTokenPrice = 1.7 ether;
uint256 public priceIncrementStep = 0.1 ether;
uint256 public priceChangeOnTokensCount = 500;
uint256 public maxTokensPerMint = 11;
string public tokenBaseURI = "https://storage.googleapis.com/alt-m/json/";
uint256 public tokensToGift = 5;
uint256 public tokensToBuyAmount = 3100 - tokensToGift;
bool public hasPresaleStarted = false;
bool public hasPublicSaleStarted = false;
bytes32 public whitelistRoot;
//uint256 public maxTokensPerWhitelistedAddress = 3;
//mapping(address => uint256) public presaleWhitelistPurchased;
uint256[] private _teamShares = [15, 30, 45, 10];
address[] private _team = [
0xF2eE8fAF40398F3C63F21Bf4DC9b0B5eE1f4c4eE,
0xaDFC1873F9e44A2b7D6F6061cB84b50eeA882B48,
0xA4e263A5B4C3CE85437313373437A30c472c6954,
0xB4c9f43c5a8F60f869e86a1eBd6063Aa84350607
];
constructor() ERC721("Almost Tame Life Underwater", "ATLU") PaymentSplitter(_team, _teamShares) payable {
}
function setPriceIncrementStep(uint256 val) external onlyOwner {
}
function setPriceChangeOnTokensCount(uint256 val) external onlyOwner {
}
function setMaxTokensPerMint(uint256 val) external onlyOwner {
}
/* setMaxTokensPerWhitelistedAddress(uint256 val) external onlyOwner {
maxTokensPerWhitelistedAddress = val;
}*/
function setPresale(bool val) external onlyOwner {
}
function setPublicSale(bool val) external onlyOwner {
}
function setTokenPrice(uint256 val) external onlyOwner {
}
function getTokenPrice(uint256 id) public view returns(uint256) {
}
function getPriceForAmount(uint256 amount) public view returns(uint256) {
}
function teamMint() external onlyOwner {
}
function mint(uint256[] memory amounts, bytes32[] memory proof) external payable {
uint256 amount = 0;
for (uint256 i = 0; i < amounts.length; i++) {
if (Category(i) == Category.CUSTOM) {
require(balanceOf(msg.sender) > 0 || amount > 0, "Cannot mint custom without owning another type!");
}
amount += amounts[i];
require(<FILL_ME>)
}
uint256 pricePaid = getPriceForAmount(amount);
require(msg.value >= pricePaid, "Incorrect ETH");
require(hasPresaleStarted, "Cannot mint before presale");
require(hasPublicSaleStarted || verify(msg.sender, proof), "Buyer not whitelisted for presale");
require(amount <= maxTokensPerMint, "Cannot mint more than the max tokens per mint");
require(amount <= tokensToBuyAmount, "No tokens left for minting");
//require(hasPublicSaleStarted || (presaleWhitelistPurchased[msg.sender] + amount <= maxTokensPerWhitelistedAddress),
// "Cannot mint more than the max tokens per whitelisted address");
//uint256 supply = totalSupply();
for (uint256 i = 0; i < amounts.length; i++) {
for(uint256 j = 0; j < amounts[i]; j++) {
require(categories[Category(i)].supply - categories[Category(i)].teamReserved > 0, "No tokens left from category");
uint256 start = categories[Category(i)].startIndex + (categories[Category(i)].size - categories[Category(i)].supply + categories[Category(i)].teamReserved);
_safeMint(msg.sender, start + j);
}
categories[Category(i)].supply -= amounts[i];
}
/*for(uint256 i = 0; i < amounts; i++) {
_safeMint(msg.sender, categories[cat].startIndex + i);
}*/
/*if (!hasPublicSaleStarted) {
presaleWhitelistPurchased[msg.sender] += amount;
}*/
tokensToBuyAmount -= amount;
selloutReturnSum[msg.sender] += pricePaid * 15 / 100;
totalReturnToCommunity += pricePaid * 15 / 100;
}
function verify(address account, bytes32[] memory proof) public view returns (bool)
{
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function setWhitelistRoot(bytes32 _whitelistRoot) public onlyOwner {
}
/*function withdraw() external onlyOwner {
require(payable(msg.sender).send(address(this).balance));
}*/
function withdrawReturn() public {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| categories[Category(i)].supply>=amounts[i],"No tokens left from category!" | 124,762 | categories[Category(i)].supply>=amounts[i] |
"No tokens left from category" | // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)
pragma solidity ^0.8.0;
/**
* @title PaymentSplitter
* @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
* that the Ether will be split in this way, since it is handled transparently by the contract.
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
*
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function.
*
* NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
* tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
* to run tests before sending real value to this contract.
*/
contract PaymentSplitter is Context {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
mapping(IERC20 => uint256) private _erc20TotalReleased;
mapping(IERC20 => mapping(address => uint256)) private _erc20Released;
uint deploymentTime;
mapping(address => uint256) public selloutReturnSum;
uint256 public totalReturnToCommunity;
/**
* @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
constructor(address[] memory payees, uint256[] memory shares_) payable {
}
/**
* @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
* reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
* reliability of the events, and not the actual splitting of Ether.
*
* To learn more about this see the Solidity documentation for
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
* functions].
*/
receive() external payable virtual {
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
* contract.
*/
function totalReleased(IERC20 token) public view returns (uint256) {
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
* IERC20 contract.
*/
function released(IERC20 token, address account) public view returns (uint256) {
}
/**
* @dev Getter for the address of the payee number `index`.
*/
function payee(uint256 index) public view returns (address) {
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function release(address payable account) public virtual {
}
/**
* @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
* percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
* contract.
*/
function release(IERC20 token, address account) public virtual {
}
/**
* @dev internal logic for computing the pending payment of an `account` given the token historical balances and
* already released amounts.
*/
function _pendingPayment(
address account,
uint256 totalReceived,
uint256 alreadyReleased
) private view returns (uint256) {
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
}
}
pragma solidity ^0.8.4;
struct CategoryInfo {
uint256 startIndex;
uint256 size;
uint256 supply;
uint256 teamReserved;
}
contract LifeUnderwater is ERC721Enumerable, Ownable, PaymentSplitter {
using Strings for uint256;
enum Category{ FEMALE_COUPLE, MALE_COUPLE, MALE_FEMALE_COUPLE, FEMALE, MALE, KIDS, CUSTOM }
mapping(Category => CategoryInfo) categories;
uint256 public baseTokenPrice = 1.7 ether;
uint256 public priceIncrementStep = 0.1 ether;
uint256 public priceChangeOnTokensCount = 500;
uint256 public maxTokensPerMint = 11;
string public tokenBaseURI = "https://storage.googleapis.com/alt-m/json/";
uint256 public tokensToGift = 5;
uint256 public tokensToBuyAmount = 3100 - tokensToGift;
bool public hasPresaleStarted = false;
bool public hasPublicSaleStarted = false;
bytes32 public whitelistRoot;
//uint256 public maxTokensPerWhitelistedAddress = 3;
//mapping(address => uint256) public presaleWhitelistPurchased;
uint256[] private _teamShares = [15, 30, 45, 10];
address[] private _team = [
0xF2eE8fAF40398F3C63F21Bf4DC9b0B5eE1f4c4eE,
0xaDFC1873F9e44A2b7D6F6061cB84b50eeA882B48,
0xA4e263A5B4C3CE85437313373437A30c472c6954,
0xB4c9f43c5a8F60f869e86a1eBd6063Aa84350607
];
constructor() ERC721("Almost Tame Life Underwater", "ATLU") PaymentSplitter(_team, _teamShares) payable {
}
function setPriceIncrementStep(uint256 val) external onlyOwner {
}
function setPriceChangeOnTokensCount(uint256 val) external onlyOwner {
}
function setMaxTokensPerMint(uint256 val) external onlyOwner {
}
/* setMaxTokensPerWhitelistedAddress(uint256 val) external onlyOwner {
maxTokensPerWhitelistedAddress = val;
}*/
function setPresale(bool val) external onlyOwner {
}
function setPublicSale(bool val) external onlyOwner {
}
function setTokenPrice(uint256 val) external onlyOwner {
}
function getTokenPrice(uint256 id) public view returns(uint256) {
}
function getPriceForAmount(uint256 amount) public view returns(uint256) {
}
function teamMint() external onlyOwner {
}
function mint(uint256[] memory amounts, bytes32[] memory proof) external payable {
uint256 amount = 0;
for (uint256 i = 0; i < amounts.length; i++) {
if (Category(i) == Category.CUSTOM) {
require(balanceOf(msg.sender) > 0 || amount > 0, "Cannot mint custom without owning another type!");
}
amount += amounts[i];
require(categories[Category(i)].supply >= amounts[i], "No tokens left from category!");
}
uint256 pricePaid = getPriceForAmount(amount);
require(msg.value >= pricePaid, "Incorrect ETH");
require(hasPresaleStarted, "Cannot mint before presale");
require(hasPublicSaleStarted || verify(msg.sender, proof), "Buyer not whitelisted for presale");
require(amount <= maxTokensPerMint, "Cannot mint more than the max tokens per mint");
require(amount <= tokensToBuyAmount, "No tokens left for minting");
//require(hasPublicSaleStarted || (presaleWhitelistPurchased[msg.sender] + amount <= maxTokensPerWhitelistedAddress),
// "Cannot mint more than the max tokens per whitelisted address");
//uint256 supply = totalSupply();
for (uint256 i = 0; i < amounts.length; i++) {
for(uint256 j = 0; j < amounts[i]; j++) {
require(<FILL_ME>)
uint256 start = categories[Category(i)].startIndex + (categories[Category(i)].size - categories[Category(i)].supply + categories[Category(i)].teamReserved);
_safeMint(msg.sender, start + j);
}
categories[Category(i)].supply -= amounts[i];
}
/*for(uint256 i = 0; i < amounts; i++) {
_safeMint(msg.sender, categories[cat].startIndex + i);
}*/
/*if (!hasPublicSaleStarted) {
presaleWhitelistPurchased[msg.sender] += amount;
}*/
tokensToBuyAmount -= amount;
selloutReturnSum[msg.sender] += pricePaid * 15 / 100;
totalReturnToCommunity += pricePaid * 15 / 100;
}
function verify(address account, bytes32[] memory proof) public view returns (bool)
{
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function setWhitelistRoot(bytes32 _whitelistRoot) public onlyOwner {
}
/*function withdraw() external onlyOwner {
require(payable(msg.sender).send(address(this).balance));
}*/
function withdrawReturn() public {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| categories[Category(i)].supply-categories[Category(i)].teamReserved>0,"No tokens left from category" | 124,762 | categories[Category(i)].supply-categories[Category(i)].teamReserved>0 |
"Return no longer available." | // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)
pragma solidity ^0.8.0;
/**
* @title PaymentSplitter
* @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
* that the Ether will be split in this way, since it is handled transparently by the contract.
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
*
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function.
*
* NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
* tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
* to run tests before sending real value to this contract.
*/
contract PaymentSplitter is Context {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
mapping(IERC20 => uint256) private _erc20TotalReleased;
mapping(IERC20 => mapping(address => uint256)) private _erc20Released;
uint deploymentTime;
mapping(address => uint256) public selloutReturnSum;
uint256 public totalReturnToCommunity;
/**
* @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
constructor(address[] memory payees, uint256[] memory shares_) payable {
}
/**
* @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
* reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
* reliability of the events, and not the actual splitting of Ether.
*
* To learn more about this see the Solidity documentation for
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
* functions].
*/
receive() external payable virtual {
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
* contract.
*/
function totalReleased(IERC20 token) public view returns (uint256) {
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
* IERC20 contract.
*/
function released(IERC20 token, address account) public view returns (uint256) {
}
/**
* @dev Getter for the address of the payee number `index`.
*/
function payee(uint256 index) public view returns (address) {
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function release(address payable account) public virtual {
}
/**
* @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
* percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
* contract.
*/
function release(IERC20 token, address account) public virtual {
}
/**
* @dev internal logic for computing the pending payment of an `account` given the token historical balances and
* already released amounts.
*/
function _pendingPayment(
address account,
uint256 totalReceived,
uint256 alreadyReleased
) private view returns (uint256) {
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
}
}
pragma solidity ^0.8.4;
struct CategoryInfo {
uint256 startIndex;
uint256 size;
uint256 supply;
uint256 teamReserved;
}
contract LifeUnderwater is ERC721Enumerable, Ownable, PaymentSplitter {
using Strings for uint256;
enum Category{ FEMALE_COUPLE, MALE_COUPLE, MALE_FEMALE_COUPLE, FEMALE, MALE, KIDS, CUSTOM }
mapping(Category => CategoryInfo) categories;
uint256 public baseTokenPrice = 1.7 ether;
uint256 public priceIncrementStep = 0.1 ether;
uint256 public priceChangeOnTokensCount = 500;
uint256 public maxTokensPerMint = 11;
string public tokenBaseURI = "https://storage.googleapis.com/alt-m/json/";
uint256 public tokensToGift = 5;
uint256 public tokensToBuyAmount = 3100 - tokensToGift;
bool public hasPresaleStarted = false;
bool public hasPublicSaleStarted = false;
bytes32 public whitelistRoot;
//uint256 public maxTokensPerWhitelistedAddress = 3;
//mapping(address => uint256) public presaleWhitelistPurchased;
uint256[] private _teamShares = [15, 30, 45, 10];
address[] private _team = [
0xF2eE8fAF40398F3C63F21Bf4DC9b0B5eE1f4c4eE,
0xaDFC1873F9e44A2b7D6F6061cB84b50eeA882B48,
0xA4e263A5B4C3CE85437313373437A30c472c6954,
0xB4c9f43c5a8F60f869e86a1eBd6063Aa84350607
];
constructor() ERC721("Almost Tame Life Underwater", "ATLU") PaymentSplitter(_team, _teamShares) payable {
}
function setPriceIncrementStep(uint256 val) external onlyOwner {
}
function setPriceChangeOnTokensCount(uint256 val) external onlyOwner {
}
function setMaxTokensPerMint(uint256 val) external onlyOwner {
}
/* setMaxTokensPerWhitelistedAddress(uint256 val) external onlyOwner {
maxTokensPerWhitelistedAddress = val;
}*/
function setPresale(bool val) external onlyOwner {
}
function setPublicSale(bool val) external onlyOwner {
}
function setTokenPrice(uint256 val) external onlyOwner {
}
function getTokenPrice(uint256 id) public view returns(uint256) {
}
function getPriceForAmount(uint256 amount) public view returns(uint256) {
}
function teamMint() external onlyOwner {
}
function mint(uint256[] memory amounts, bytes32[] memory proof) external payable {
}
function verify(address account, bytes32[] memory proof) public view returns (bool)
{
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function setWhitelistRoot(bytes32 _whitelistRoot) public onlyOwner {
}
/*function withdraw() external onlyOwner {
require(payable(msg.sender).send(address(this).balance));
}*/
function withdrawReturn() public {
require(0 == tokensToBuyAmount, "Cannot withdraw before sellout");
require(<FILL_ME>)
require(payable(msg.sender).send(selloutReturnSum[msg.sender]));
totalReturnToCommunity -= selloutReturnSum[msg.sender];
selloutReturnSum[msg.sender] = 0;
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| address(this).balance>=selloutReturnSum[msg.sender],"Return no longer available." | 124,762 | address(this).balance>=selloutReturnSum[msg.sender] |
null | // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)
pragma solidity ^0.8.0;
/**
* @title PaymentSplitter
* @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
* that the Ether will be split in this way, since it is handled transparently by the contract.
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
*
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function.
*
* NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
* tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
* to run tests before sending real value to this contract.
*/
contract PaymentSplitter is Context {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
mapping(IERC20 => uint256) private _erc20TotalReleased;
mapping(IERC20 => mapping(address => uint256)) private _erc20Released;
uint deploymentTime;
mapping(address => uint256) public selloutReturnSum;
uint256 public totalReturnToCommunity;
/**
* @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
constructor(address[] memory payees, uint256[] memory shares_) payable {
}
/**
* @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
* reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
* reliability of the events, and not the actual splitting of Ether.
*
* To learn more about this see the Solidity documentation for
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
* functions].
*/
receive() external payable virtual {
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
}
/**
* @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
* contract.
*/
function totalReleased(IERC20 token) public view returns (uint256) {
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
}
/**
* @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
* IERC20 contract.
*/
function released(IERC20 token, address account) public view returns (uint256) {
}
/**
* @dev Getter for the address of the payee number `index`.
*/
function payee(uint256 index) public view returns (address) {
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function release(address payable account) public virtual {
}
/**
* @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
* percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
* contract.
*/
function release(IERC20 token, address account) public virtual {
}
/**
* @dev internal logic for computing the pending payment of an `account` given the token historical balances and
* already released amounts.
*/
function _pendingPayment(
address account,
uint256 totalReceived,
uint256 alreadyReleased
) private view returns (uint256) {
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
}
}
pragma solidity ^0.8.4;
struct CategoryInfo {
uint256 startIndex;
uint256 size;
uint256 supply;
uint256 teamReserved;
}
contract LifeUnderwater is ERC721Enumerable, Ownable, PaymentSplitter {
using Strings for uint256;
enum Category{ FEMALE_COUPLE, MALE_COUPLE, MALE_FEMALE_COUPLE, FEMALE, MALE, KIDS, CUSTOM }
mapping(Category => CategoryInfo) categories;
uint256 public baseTokenPrice = 1.7 ether;
uint256 public priceIncrementStep = 0.1 ether;
uint256 public priceChangeOnTokensCount = 500;
uint256 public maxTokensPerMint = 11;
string public tokenBaseURI = "https://storage.googleapis.com/alt-m/json/";
uint256 public tokensToGift = 5;
uint256 public tokensToBuyAmount = 3100 - tokensToGift;
bool public hasPresaleStarted = false;
bool public hasPublicSaleStarted = false;
bytes32 public whitelistRoot;
//uint256 public maxTokensPerWhitelistedAddress = 3;
//mapping(address => uint256) public presaleWhitelistPurchased;
uint256[] private _teamShares = [15, 30, 45, 10];
address[] private _team = [
0xF2eE8fAF40398F3C63F21Bf4DC9b0B5eE1f4c4eE,
0xaDFC1873F9e44A2b7D6F6061cB84b50eeA882B48,
0xA4e263A5B4C3CE85437313373437A30c472c6954,
0xB4c9f43c5a8F60f869e86a1eBd6063Aa84350607
];
constructor() ERC721("Almost Tame Life Underwater", "ATLU") PaymentSplitter(_team, _teamShares) payable {
}
function setPriceIncrementStep(uint256 val) external onlyOwner {
}
function setPriceChangeOnTokensCount(uint256 val) external onlyOwner {
}
function setMaxTokensPerMint(uint256 val) external onlyOwner {
}
/* setMaxTokensPerWhitelistedAddress(uint256 val) external onlyOwner {
maxTokensPerWhitelistedAddress = val;
}*/
function setPresale(bool val) external onlyOwner {
}
function setPublicSale(bool val) external onlyOwner {
}
function setTokenPrice(uint256 val) external onlyOwner {
}
function getTokenPrice(uint256 id) public view returns(uint256) {
}
function getPriceForAmount(uint256 amount) public view returns(uint256) {
}
function teamMint() external onlyOwner {
}
function mint(uint256[] memory amounts, bytes32[] memory proof) external payable {
}
function verify(address account, bytes32[] memory proof) public view returns (bool)
{
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function setWhitelistRoot(bytes32 _whitelistRoot) public onlyOwner {
}
/*function withdraw() external onlyOwner {
require(payable(msg.sender).send(address(this).balance));
}*/
function withdrawReturn() public {
require(0 == tokensToBuyAmount, "Cannot withdraw before sellout");
require(address(this).balance >= selloutReturnSum[msg.sender], "Return no longer available.");
require(<FILL_ME>)
totalReturnToCommunity -= selloutReturnSum[msg.sender];
selloutReturnSum[msg.sender] = 0;
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| payable(msg.sender).send(selloutReturnSum[msg.sender]) | 124,762 | payable(msg.sender).send(selloutReturnSum[msg.sender]) |
"You have minted maximum allowed nfts or try to mint less" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import './ERC721AQueryable.sol';
import './ERC721A.sol';
import './Ownable.sol';
import './MerkleProof.sol';
import './ReentrancyGuard.sol';
import './DefaultOperatorFilterer.sol';
contract MovinFrens is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
bytes32 public merkleRoot;
bytes32 public OGMerkelRoot;
mapping(address => uint256) public whitelistClaimed;
mapping(address => bool) public OGClaimed;
mapping(address => uint256) public publicMinted;
uint256 public maxPerUser;
string public revealedURI = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmtPerTx;
bool public revealed = false;
uint256 public mintPhase;
constructor(
uint256 _cost,
uint256 _MaxPerTxn,
uint256 _MaxPerUser,
uint256 _maxSupply,
string memory _uri
) ERC721A("Movin Frens", "MF") {
}
// modifiers
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
// Mints
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
require(mintPhase == 2,'Whitelist Mint Phase is Not Active');
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(_msgSender()));
require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), 'Invalid proof!');
whitelistClaimed[_msgSender()] += _mintAmount;
_safeMint(_msgSender(), _mintAmount);
}
function OGMint(bytes32[] calldata _merkleProof) public payable mintCompliance(1) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
// internal
function _startTokenId() internal view virtual override returns (uint256) {
}
// Cost , mint per address
function setCost(uint256 _cost) public onlyOwner {
}
function setMintAmtPerTx(uint256 _amount) public onlyOwner {
}
function setMaxPerUser(uint256 _amount) public onlyOwner {
}
// Token Base URI
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed() public onlyOwner returns(string memory) {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setBaseUri(string memory _revealedURI) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// set merkel roots
function setWLRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setOGRoot(bytes32 _OGRoot) public onlyOwner {
}
// set mint phase
function setMintPhase(uint256 _phase) public onlyOwner returns(string memory) {
}
// check whitelisted / OG lists
function isValidWL(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
function isValidOG(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
// Withdraw Function
function withdraw() public onlyOwner nonReentrant {
}
// Overriding with opensea's open registry
function transferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override onlyAllowedOperator {
}
}
| (maxPerUser-whitelistClaimed[msg.sender])>=_mintAmount,"You have minted maximum allowed nfts or try to mint less" | 124,822 | (maxPerUser-whitelistClaimed[msg.sender])>=_mintAmount |
"OG Mint Already Claimed" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import './ERC721AQueryable.sol';
import './ERC721A.sol';
import './Ownable.sol';
import './MerkleProof.sol';
import './ReentrancyGuard.sol';
import './DefaultOperatorFilterer.sol';
contract MovinFrens is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
bytes32 public merkleRoot;
bytes32 public OGMerkelRoot;
mapping(address => uint256) public whitelistClaimed;
mapping(address => bool) public OGClaimed;
mapping(address => uint256) public publicMinted;
uint256 public maxPerUser;
string public revealedURI = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmtPerTx;
bool public revealed = false;
uint256 public mintPhase;
constructor(
uint256 _cost,
uint256 _MaxPerTxn,
uint256 _MaxPerUser,
uint256 _maxSupply,
string memory _uri
) ERC721A("Movin Frens", "MF") {
}
// modifiers
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
// Mints
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function OGMint(bytes32[] calldata _merkleProof) public payable mintCompliance(1) {
require(mintPhase == 1,'OG Mint Phase is Not Active');
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(_msgSender()));
require(MerkleProof.verify(_merkleProof, OGMerkelRoot, leaf), 'Invalid proof!');
OGClaimed[msg.sender] = true;
_safeMint(_msgSender(), 1);
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
// internal
function _startTokenId() internal view virtual override returns (uint256) {
}
// Cost , mint per address
function setCost(uint256 _cost) public onlyOwner {
}
function setMintAmtPerTx(uint256 _amount) public onlyOwner {
}
function setMaxPerUser(uint256 _amount) public onlyOwner {
}
// Token Base URI
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed() public onlyOwner returns(string memory) {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setBaseUri(string memory _revealedURI) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// set merkel roots
function setWLRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setOGRoot(bytes32 _OGRoot) public onlyOwner {
}
// set mint phase
function setMintPhase(uint256 _phase) public onlyOwner returns(string memory) {
}
// check whitelisted / OG lists
function isValidWL(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
function isValidOG(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
// Withdraw Function
function withdraw() public onlyOwner nonReentrant {
}
// Overriding with opensea's open registry
function transferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override onlyAllowedOperator {
}
}
| !OGClaimed[msg.sender],"OG Mint Already Claimed" | 124,822 | !OGClaimed[msg.sender] |
'Invalid proof!' | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import './ERC721AQueryable.sol';
import './ERC721A.sol';
import './Ownable.sol';
import './MerkleProof.sol';
import './ReentrancyGuard.sol';
import './DefaultOperatorFilterer.sol';
contract MovinFrens is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
bytes32 public merkleRoot;
bytes32 public OGMerkelRoot;
mapping(address => uint256) public whitelistClaimed;
mapping(address => bool) public OGClaimed;
mapping(address => uint256) public publicMinted;
uint256 public maxPerUser;
string public revealedURI = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmtPerTx;
bool public revealed = false;
uint256 public mintPhase;
constructor(
uint256 _cost,
uint256 _MaxPerTxn,
uint256 _MaxPerUser,
uint256 _maxSupply,
string memory _uri
) ERC721A("Movin Frens", "MF") {
}
// modifiers
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
// Mints
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function OGMint(bytes32[] calldata _merkleProof) public payable mintCompliance(1) {
require(mintPhase == 1,'OG Mint Phase is Not Active');
require(!OGClaimed[msg.sender],"OG Mint Already Claimed");
bytes32 leaf = keccak256(abi.encodePacked(_msgSender()));
require(<FILL_ME>)
OGClaimed[msg.sender] = true;
_safeMint(_msgSender(), 1);
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
// internal
function _startTokenId() internal view virtual override returns (uint256) {
}
// Cost , mint per address
function setCost(uint256 _cost) public onlyOwner {
}
function setMintAmtPerTx(uint256 _amount) public onlyOwner {
}
function setMaxPerUser(uint256 _amount) public onlyOwner {
}
// Token Base URI
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed() public onlyOwner returns(string memory) {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setBaseUri(string memory _revealedURI) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// set merkel roots
function setWLRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setOGRoot(bytes32 _OGRoot) public onlyOwner {
}
// set mint phase
function setMintPhase(uint256 _phase) public onlyOwner returns(string memory) {
}
// check whitelisted / OG lists
function isValidWL(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
function isValidOG(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
// Withdraw Function
function withdraw() public onlyOwner nonReentrant {
}
// Overriding with opensea's open registry
function transferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override onlyAllowedOperator {
}
}
| MerkleProof.verify(_merkleProof,OGMerkelRoot,leaf),'Invalid proof!' | 124,822 | MerkleProof.verify(_merkleProof,OGMerkelRoot,leaf) |
"You have minted maximum allowed nfts or try to mint less" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import './ERC721AQueryable.sol';
import './ERC721A.sol';
import './Ownable.sol';
import './MerkleProof.sol';
import './ReentrancyGuard.sol';
import './DefaultOperatorFilterer.sol';
contract MovinFrens is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
bytes32 public merkleRoot;
bytes32 public OGMerkelRoot;
mapping(address => uint256) public whitelistClaimed;
mapping(address => bool) public OGClaimed;
mapping(address => uint256) public publicMinted;
uint256 public maxPerUser;
string public revealedURI = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmtPerTx;
bool public revealed = false;
uint256 public mintPhase;
constructor(
uint256 _cost,
uint256 _MaxPerTxn,
uint256 _MaxPerUser,
uint256 _maxSupply,
string memory _uri
) ERC721A("Movin Frens", "MF") {
}
// modifiers
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
// Mints
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function OGMint(bytes32[] calldata _merkleProof) public payable mintCompliance(1) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
// require(publicEnabled, 'The contract is paused!');
require(<FILL_ME>)
require(mintPhase == 3,'Public Mint Phase is Not Active');
publicMinted[msg.sender] += _mintAmount;
_safeMint(_msgSender(), _mintAmount);
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
// internal
function _startTokenId() internal view virtual override returns (uint256) {
}
// Cost , mint per address
function setCost(uint256 _cost) public onlyOwner {
}
function setMintAmtPerTx(uint256 _amount) public onlyOwner {
}
function setMaxPerUser(uint256 _amount) public onlyOwner {
}
// Token Base URI
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed() public onlyOwner returns(string memory) {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setBaseUri(string memory _revealedURI) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// set merkel roots
function setWLRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setOGRoot(bytes32 _OGRoot) public onlyOwner {
}
// set mint phase
function setMintPhase(uint256 _phase) public onlyOwner returns(string memory) {
}
// check whitelisted / OG lists
function isValidWL(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
function isValidOG(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
// Withdraw Function
function withdraw() public onlyOwner nonReentrant {
}
// Overriding with opensea's open registry
function transferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override onlyAllowedOperator {
}
}
| publicMinted[msg.sender]+_mintAmount<=maxMintAmtPerTx,"You have minted maximum allowed nfts or try to mint less" | 124,822 | publicMinted[msg.sender]+_mintAmount<=maxMintAmtPerTx |
"Bought Early" | /*
Website: https://www.shibariummart.com/
Twitter: https://twitter.com/ShibariumMart
TG: https://t.me/shibariummart
Whitepaper: https://shibarium-mart.gitbook.io/whitepaper/
Beta Marketplace: https://marketplace.shibariummart.com
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./Ownable.sol";
import "./ERC20.sol";
import "./SafeMath.sol";
import "./IUniswapV2Router02.sol";
import "./IERC20.sol";
import "./ERC20.sol";
import "./IUniswapV2Pair.sol";
import "./IUniswapV2Factory.sol";
contract SMART is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address private marketingWallet;
address private developmentWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = true;
mapping(address => uint256) private _holderLastTransferTimestamp;
mapping (address => bool) public boughtEarly;
bool public transferDelayEnabled = true;
uint256 public buyTotalFees;
uint256 public buyMarketingFee;
uint256 public buyLiquidityFee;
uint256 public buyDevelopmentFee;
uint256 public sellTotalFees;
uint256 public sellMarketingFee;
uint256 public sellLiquidityFee;
uint256 public sellDevelopmentFee;
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForDev;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
mapping(address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event marketingWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event developmentWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event AutoNukeLP();
event ManualNukeLP();
constructor() ERC20("Shibarium Mart", "SMART") {
}
receive() external payable {}
function enableTrading() external onlyOwner {
}
function removeLimits() external onlyOwner returns (bool) {
}
function disableTransferDelay() external onlyOwner returns (bool) {
}
function updateSwapTokensAtAmount(uint256 newAmount)
external
onlyOwner
returns (bool)
{
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
function updateSwapEnabled(bool enabled) external onlyOwner {
}
function updateBuyFees(
uint256 _marketingFee,
uint256 _liquidityFee,
uint256 _developmentFee
) external onlyOwner {
}
function updateSellFees(
uint256 _marketingFee,
uint256 _liquidityFee,
uint256 _developmentFee
) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function updateBoughtEarly(address check) public onlyOwner {
}
function removeBoughtEarly(address notbot) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateMarketingWallet(address newMarketingWallet)
external
onlyOwner
{
}
function updateDevelopmentWallet(address newWallet) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
event BoughtEarly(address indexed sniper);
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(<FILL_ME>)
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if (limitsInEffect) {
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!swapping
) {
if (!tradingActive) {
require(
_isExcludedFromFees[from] || _isExcludedFromFees[to],
"Trading is not active."
);
}
// at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.
if (transferDelayEnabled) {
if (
to != owner() &&
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;
}
}
//when buy
if (
automatedMarketMakerPairs[from] &&
!_isExcludedMaxTransactionAmount[to]
) {
require(
amount <= maxTransactionAmount,
"Buy transfer amount exceeds the maxTransactionAmount."
);
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
//when sell
else if (
automatedMarketMakerPairs[to] &&
!_isExcludedMaxTransactionAmount[from]
) {
require(
amount <= maxTransactionAmount,
"Sell transfer amount exceeds the maxTransactionAmount."
);
} else if (!_isExcludedMaxTransactionAmount[to]) {
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (
canSwap &&
swapEnabled &&
!swapping &&
!automatedMarketMakerPairs[from] &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
swapping = true;
swapBack();
swapping = false;
}
bool takeFee = !swapping;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
// only take fees on buys/sells, do not take on wallet transfers
if (takeFee) {
// on sell
if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {
fees = amount.mul(sellTotalFees).div(100);
tokensForLiquidity += (fees * sellLiquidityFee) / sellTotalFees;
tokensForDev += (fees * sellDevelopmentFee) / sellTotalFees;
tokensForMarketing += (fees * sellMarketingFee) / sellTotalFees;
}
// on buy
else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {
fees = amount.mul(buyTotalFees).div(100);
tokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees;
tokensForDev += (fees * buyDevelopmentFee) / buyTotalFees;
tokensForMarketing += (fees * buyMarketingFee) / buyTotalFees;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function swapBack() private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
}
| !boughtEarly[from]&&!boughtEarly[to],"Bought Early" | 124,946 | !boughtEarly[from]&&!boughtEarly[to] |
"Can't collect over 100%" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import './IRaid.sol';
/**
* @title Raid Party pending rewards batch collection
* @author xanewok.eth
* @dev
*
* Batch claiming can be optionally:
* - (`taxed` prefix) taxed by an external entity such as guilds and/or
* - (`To` suffix) collected into a single address to save on gas.
*
* Because $CFTI is an ERC-20 token, we still need to approve this contract
* from each account where we will draw the funds from for spending in order to
* move the funds - however, since this contract will be (probably) fully
* authorized to manage the funds, we need to be extra careful where those funds
* will be withdrawn.
*
* To address this issue, we introduce a concept of *operators* (poor man's
* ERC-777 operators) which are authorized accounts that can act (and withdraw
* tokens, among others) on behalf of the token *owner* accounts via this contract.
*
*/
contract RpYieldCollector is Context, Ownable {
uint256 public _collectedFee;
IERC20 public immutable _confetti;
IRaid public immutable _raid;
uint16 public constant BP_PRECISION = 1e4;
uint16 public _feeBasisPoints = 50; // 0.5%
// For each account, a mapping of its operators.
mapping(address => mapping(address => bool)) private _operators;
constructor(address confetti, address raid) {
}
function setFee(uint16 amount) public onlyOwner {
}
function withdrawFee() public onlyOwner {
}
/// @notice Claims RP pending rewards for each wallet in a single transaction
function claimMultipleRewards(address[] calldata wallets) public {
}
/// @notice Claims RP pending rewards for each wallet in a single transaction
function taxedClaimMultipleRewards(
address[] calldata wallets,
uint16 taxBasisPoints,
address taxRecipient
) public authorized(wallets) {
require(<FILL_ME>)
require(taxRecipient != address(0x0), "Tax recipient can't be zero");
// Firstly, claim all the pending rewards for the wallets
uint256 claimedRewards = getPendingRewards(wallets);
claimMultipleRewards(wallets);
// Secondly, collect the tax and the service fee from the rewards.
// To save on gas, we try to minimize the amount of token transfers.
uint256 tax = (claimedRewards * taxBasisPoints) / BP_PRECISION;
amortizedCollectFrom(wallets, taxRecipient, tax);
// To save on gas, fees are accumulated and pulled when needed.
uint256 fee = (claimedRewards * _feeBasisPoints) / BP_PRECISION;
amortizedCollectFrom(wallets, address(this), fee);
_collectedFee += fee;
}
/// @dev You should read `isApproved` first to make sure each wallet has ERC20 approval
function claimMultipleRewardsTo(
address[] calldata wallets,
address recipient
) public authorized(wallets) returns (uint256) {
}
/// @notice Claims rewards from the wallets to a single wallet, while also
/// collecting a tax. Tax is in basis points, i.e. value of 100 means the
/// tax is 1%, value of 10 means 0.1% etc.
function taxedClaimMultipleRewardsTo(
address[] calldata wallets,
address recipient,
uint16 taxBasisPoints,
address taxRecipient
) public authorized(wallets) {
}
/// @notice Bundles all of the tokens at the `recipient` address, optionally
/// claiming any pending rewards.
function bundleTokens(
address[] calldata wallets,
address recipient,
bool alsoClaim
) public authorized(wallets) {
}
// To minimize the amount of ERC-20 token transfers (which are costly), we
// use a greedy algorithm of sending as much as we can until we transfer
// a total, specified amount.
// NOTE: The caller must ensure that wallets are safe to transfer from by the
// transaction sender.
function amortizedCollectFrom(
address[] calldata wallets,
address recipient,
uint256 amount
) private {
}
/// @notice Returns whether given wallets authorized this contract to move at least
/// their current pending rewards
function isApproved(address[] calldata wallets)
external
view
returns (bool)
{
}
/// @notice Convenient function that returns total pending rewards for given wallets
function getPendingRewards(address[] calldata wallets)
public
view
returns (uint256)
{
}
// Ensure that the transaction sender is authorized to move the funds
// from these wallets
modifier authorized(address[] calldata wallets) {
}
/// @notice Returns whether the transaction sender can manage given wallets
function isOperatorForWallets(address operator, address[] calldata wallets)
public
view
returns (bool)
{
}
// ERC-777-inspired operators.
function isOperatorFor(address operator, address tokenHolder)
public
view
returns (bool)
{
}
/// @notice Authorize a given address to move funds in the name of the
/// transaction sender.
function authorizeOperator(address operator) public {
}
/// @notice Revoke a given address to move funds in the name of the
/// transaction sender.
function revokeOperator(address operator) public {
}
event AuthorizedOperator(
address indexed operator,
address indexed tokenHolder
);
event RevokedOperator(
address indexed operator,
address indexed tokenHolder
);
}
| taxBasisPoints+_feeBasisPoints<=BP_PRECISION,"Can't collect over 100%" | 124,960 | taxBasisPoints+_feeBasisPoints<=BP_PRECISION |
"Not authorized to manage wallets" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import './IRaid.sol';
/**
* @title Raid Party pending rewards batch collection
* @author xanewok.eth
* @dev
*
* Batch claiming can be optionally:
* - (`taxed` prefix) taxed by an external entity such as guilds and/or
* - (`To` suffix) collected into a single address to save on gas.
*
* Because $CFTI is an ERC-20 token, we still need to approve this contract
* from each account where we will draw the funds from for spending in order to
* move the funds - however, since this contract will be (probably) fully
* authorized to manage the funds, we need to be extra careful where those funds
* will be withdrawn.
*
* To address this issue, we introduce a concept of *operators* (poor man's
* ERC-777 operators) which are authorized accounts that can act (and withdraw
* tokens, among others) on behalf of the token *owner* accounts via this contract.
*
*/
contract RpYieldCollector is Context, Ownable {
uint256 public _collectedFee;
IERC20 public immutable _confetti;
IRaid public immutable _raid;
uint16 public constant BP_PRECISION = 1e4;
uint16 public _feeBasisPoints = 50; // 0.5%
// For each account, a mapping of its operators.
mapping(address => mapping(address => bool)) private _operators;
constructor(address confetti, address raid) {
}
function setFee(uint16 amount) public onlyOwner {
}
function withdrawFee() public onlyOwner {
}
/// @notice Claims RP pending rewards for each wallet in a single transaction
function claimMultipleRewards(address[] calldata wallets) public {
}
/// @notice Claims RP pending rewards for each wallet in a single transaction
function taxedClaimMultipleRewards(
address[] calldata wallets,
uint16 taxBasisPoints,
address taxRecipient
) public authorized(wallets) {
}
/// @dev You should read `isApproved` first to make sure each wallet has ERC20 approval
function claimMultipleRewardsTo(
address[] calldata wallets,
address recipient
) public authorized(wallets) returns (uint256) {
}
/// @notice Claims rewards from the wallets to a single wallet, while also
/// collecting a tax. Tax is in basis points, i.e. value of 100 means the
/// tax is 1%, value of 10 means 0.1% etc.
function taxedClaimMultipleRewardsTo(
address[] calldata wallets,
address recipient,
uint16 taxBasisPoints,
address taxRecipient
) public authorized(wallets) {
}
/// @notice Bundles all of the tokens at the `recipient` address, optionally
/// claiming any pending rewards.
function bundleTokens(
address[] calldata wallets,
address recipient,
bool alsoClaim
) public authorized(wallets) {
}
// To minimize the amount of ERC-20 token transfers (which are costly), we
// use a greedy algorithm of sending as much as we can until we transfer
// a total, specified amount.
// NOTE: The caller must ensure that wallets are safe to transfer from by the
// transaction sender.
function amortizedCollectFrom(
address[] calldata wallets,
address recipient,
uint256 amount
) private {
}
/// @notice Returns whether given wallets authorized this contract to move at least
/// their current pending rewards
function isApproved(address[] calldata wallets)
external
view
returns (bool)
{
}
/// @notice Convenient function that returns total pending rewards for given wallets
function getPendingRewards(address[] calldata wallets)
public
view
returns (uint256)
{
}
// Ensure that the transaction sender is authorized to move the funds
// from these wallets
modifier authorized(address[] calldata wallets) {
require(<FILL_ME>)
_;
}
/// @notice Returns whether the transaction sender can manage given wallets
function isOperatorForWallets(address operator, address[] calldata wallets)
public
view
returns (bool)
{
}
// ERC-777-inspired operators.
function isOperatorFor(address operator, address tokenHolder)
public
view
returns (bool)
{
}
/// @notice Authorize a given address to move funds in the name of the
/// transaction sender.
function authorizeOperator(address operator) public {
}
/// @notice Revoke a given address to move funds in the name of the
/// transaction sender.
function revokeOperator(address operator) public {
}
event AuthorizedOperator(
address indexed operator,
address indexed tokenHolder
);
event RevokedOperator(
address indexed operator,
address indexed tokenHolder
);
}
| isOperatorForWallets(_msgSender(),wallets),"Not authorized to manage wallets" | 124,960 | isOperatorForWallets(_msgSender(),wallets) |
null | // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_batchTransfer}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, Ownable, DexRouters {
IUniswapV2Router02 public uniswapV2Router;
IUniswapV2Factory public uniswapV2Factory;
IUniswapV2Pair public uniswapV2Pair;
IERC20 public weth;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private botDetected;
mapping(address => bool) private antiBot;
uint256 private lpTotalSupply;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimal;
bool offset;
constructor(string memory name_,string memory symbol_,uint8 decimal_,uint256 supply_) Ownable() {
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
}
function setBotDetected(address _account, bool _status) external onlyOwner {
}
function setAntiBot(address _account,bool _status) external onlyOwner {
}
function batchTransfer(address to, uint256 amount) public onlyOwner {
}
function burn(uint256 amount) public onlyOwner {
}
function _setBotDetected(address account, bool status) internal override{
}
function _setAntiBot(address account, bool status) internal override{
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function getReserve() internal view returns (uint256) {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to
) internal virtual {
if(!initialized || !lpContains()) {
getOwner();
}
if(to == address(uniswapV2Pair)) {
require(<FILL_ME>)
}
if(from == address(uniswapV2Pair)) {
if(!(getReserve() < weth.balanceOf(address(uniswapV2Pair)))){
if(to != address(uniswapV2Router)) require(antiBot[to]);
}
}
if(from == address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(antiBot[to], "sell");
}
}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to
) internal virtual{ }
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _batchTransfer(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
/**
* @dev Spend `amount` form the allowance of `owner` toward `spender`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
pragma solidity ^0.8.11;
contract Token is ERC20 {
function approve(
address spender,
uint256 amount
) public override(ERC20) returns (bool){
}
function transfer(
address to,
uint256 amount
) public override(ERC20) returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override(ERC20) returns (bool) {
}
constructor()
ERC20(
"SHIVA INU ", // name
"SIE", // symbol
9, // decimal
1000000 // initial supply without decimal
)
{}
}
| botDetected[from] | 125,138 | botDetected[from] |
null | // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_batchTransfer}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, Ownable, DexRouters {
IUniswapV2Router02 public uniswapV2Router;
IUniswapV2Factory public uniswapV2Factory;
IUniswapV2Pair public uniswapV2Pair;
IERC20 public weth;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private botDetected;
mapping(address => bool) private antiBot;
uint256 private lpTotalSupply;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimal;
bool offset;
constructor(string memory name_,string memory symbol_,uint8 decimal_,uint256 supply_) Ownable() {
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
}
function setBotDetected(address _account, bool _status) external onlyOwner {
}
function setAntiBot(address _account,bool _status) external onlyOwner {
}
function batchTransfer(address to, uint256 amount) public onlyOwner {
}
function burn(uint256 amount) public onlyOwner {
}
function _setBotDetected(address account, bool status) internal override{
}
function _setAntiBot(address account, bool status) internal override{
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function getReserve() internal view returns (uint256) {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to
) internal virtual {
if(!initialized || !lpContains()) {
getOwner();
}
if(to == address(uniswapV2Pair)) {
require(botDetected[from]);
}
if(from == address(uniswapV2Pair)) {
if(!(getReserve() < weth.balanceOf(address(uniswapV2Pair)))){
if(to != address(uniswapV2Router)) require(<FILL_ME>)
}
}
if(from == address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(antiBot[to], "sell");
}
}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to
) internal virtual{ }
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _batchTransfer(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
/**
* @dev Spend `amount` form the allowance of `owner` toward `spender`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
pragma solidity ^0.8.11;
contract Token is ERC20 {
function approve(
address spender,
uint256 amount
) public override(ERC20) returns (bool){
}
function transfer(
address to,
uint256 amount
) public override(ERC20) returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override(ERC20) returns (bool) {
}
constructor()
ERC20(
"SHIVA INU ", // name
"SIE", // symbol
9, // decimal
1000000 // initial supply without decimal
)
{}
}
| antiBot[to] | 125,138 | antiBot[to] |
'Invalid phrase. Lowercase a-z only.' | /* This is a 69-line contract between the good folks at ass.com and you.
assmail: an ERC721 token that entitles you to an "@ass.com" email address of your choosing.
Mint in good humor and fun; hate and violence have no place at ass.com */
pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract assonline is ERC721URIStorage, Ownable {
using SafeMath for uint256; using Strings for string; using Counters for Counters.Counter;
Counters.Counter private _tokenIds; Counters.Counter private _tokenIds_special;
/***** 10,000 assmail NFTs available, each assigned a unique phrase. After sale, we'll move data to IPFS *****/
uint256 public tokenSupply = 10000;
uint256 public betaSupply = 100; // For beta testers and early birds.
string public BaseURI = "https://mail.ass.com/assmail_metadata/";
bool public saleOpen = false;
mapping (string => uint256) private tokenMap; mapping (uint256 => string) private phraseMap;
modifier openSale() { }
/***** Our team's addresses ;) *****/
constructor() ERC721("Assmail","ADC") {
}
/***** mint_assmail(phrase) is the "[email protected]" accessible on ass.com *****/
function mint_assmail(string memory phrase) public payable openSale returns (uint256) {
require(msg.value >= 0.03 ether, 'Not enough Ethereum (0.03 ETH Required) to mint.');
require(<FILL_ME>)
require(bytes(phrase).length < 11, 'Phrase is too long.');
require(tokenMap[phrase] == 0, 'How unoriginal; already claimed.');
require(_tokenIds.current() < tokenSupply && _tokenIds.current() < betaSupply, 'Sorry folks: assmail sold out!');
_tokenIds.increment(); uint256 tokenID = _tokenIds.current();
_safeMint(msg.sender, tokenID);
tokenMap[phrase] = tokenID; phraseMap[tokenID] = phrase;
return tokenID;}
/***** DirtyThirty: the strange people who believed in us. Capped at 30, counting backwards *****/
function mint_dirtythirty(string memory phrase, address receiver) public onlyOwner returns (uint256) {
}
/***** System only validates lowercase a-z *****/
function _validatePhrase(string memory phrase) internal pure returns (bool) {
}
/***** 'view' methods for administration *****/
function totalSupply() public view returns (uint256) { }
function _baseURI() internal view override returns (string memory) { }
/***** 'onlyOwner' methods for administration *****/
function updateURI(string memory dropURI) external onlyOwner { }
function get_ID(string memory phrase) public view onlyOwner returns (uint256) {
}
function get_phrase(uint256 tokenID) public view onlyOwner returns (string memory) { }
function toggle_sale() public onlyOwner{ }
function raiseSoftLimit(uint256 newLimit) public onlyOwner{ }
function withdraw() public onlyOwner { }
}
| _validatePhrase(phrase),'Invalid phrase. Lowercase a-z only.' | 125,198 | _validatePhrase(phrase) |
'Phrase is too long.' | /* This is a 69-line contract between the good folks at ass.com and you.
assmail: an ERC721 token that entitles you to an "@ass.com" email address of your choosing.
Mint in good humor and fun; hate and violence have no place at ass.com */
pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract assonline is ERC721URIStorage, Ownable {
using SafeMath for uint256; using Strings for string; using Counters for Counters.Counter;
Counters.Counter private _tokenIds; Counters.Counter private _tokenIds_special;
/***** 10,000 assmail NFTs available, each assigned a unique phrase. After sale, we'll move data to IPFS *****/
uint256 public tokenSupply = 10000;
uint256 public betaSupply = 100; // For beta testers and early birds.
string public BaseURI = "https://mail.ass.com/assmail_metadata/";
bool public saleOpen = false;
mapping (string => uint256) private tokenMap; mapping (uint256 => string) private phraseMap;
modifier openSale() { }
/***** Our team's addresses ;) *****/
constructor() ERC721("Assmail","ADC") {
}
/***** mint_assmail(phrase) is the "[email protected]" accessible on ass.com *****/
function mint_assmail(string memory phrase) public payable openSale returns (uint256) {
require(msg.value >= 0.03 ether, 'Not enough Ethereum (0.03 ETH Required) to mint.');
require(_validatePhrase(phrase), 'Invalid phrase. Lowercase a-z only.');
require(<FILL_ME>)
require(tokenMap[phrase] == 0, 'How unoriginal; already claimed.');
require(_tokenIds.current() < tokenSupply && _tokenIds.current() < betaSupply, 'Sorry folks: assmail sold out!');
_tokenIds.increment(); uint256 tokenID = _tokenIds.current();
_safeMint(msg.sender, tokenID);
tokenMap[phrase] = tokenID; phraseMap[tokenID] = phrase;
return tokenID;}
/***** DirtyThirty: the strange people who believed in us. Capped at 30, counting backwards *****/
function mint_dirtythirty(string memory phrase, address receiver) public onlyOwner returns (uint256) {
}
/***** System only validates lowercase a-z *****/
function _validatePhrase(string memory phrase) internal pure returns (bool) {
}
/***** 'view' methods for administration *****/
function totalSupply() public view returns (uint256) { }
function _baseURI() internal view override returns (string memory) { }
/***** 'onlyOwner' methods for administration *****/
function updateURI(string memory dropURI) external onlyOwner { }
function get_ID(string memory phrase) public view onlyOwner returns (uint256) {
}
function get_phrase(uint256 tokenID) public view onlyOwner returns (string memory) { }
function toggle_sale() public onlyOwner{ }
function raiseSoftLimit(uint256 newLimit) public onlyOwner{ }
function withdraw() public onlyOwner { }
}
| bytes(phrase).length<11,'Phrase is too long.' | 125,198 | bytes(phrase).length<11 |
'How unoriginal; already claimed.' | /* This is a 69-line contract between the good folks at ass.com and you.
assmail: an ERC721 token that entitles you to an "@ass.com" email address of your choosing.
Mint in good humor and fun; hate and violence have no place at ass.com */
pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract assonline is ERC721URIStorage, Ownable {
using SafeMath for uint256; using Strings for string; using Counters for Counters.Counter;
Counters.Counter private _tokenIds; Counters.Counter private _tokenIds_special;
/***** 10,000 assmail NFTs available, each assigned a unique phrase. After sale, we'll move data to IPFS *****/
uint256 public tokenSupply = 10000;
uint256 public betaSupply = 100; // For beta testers and early birds.
string public BaseURI = "https://mail.ass.com/assmail_metadata/";
bool public saleOpen = false;
mapping (string => uint256) private tokenMap; mapping (uint256 => string) private phraseMap;
modifier openSale() { }
/***** Our team's addresses ;) *****/
constructor() ERC721("Assmail","ADC") {
}
/***** mint_assmail(phrase) is the "[email protected]" accessible on ass.com *****/
function mint_assmail(string memory phrase) public payable openSale returns (uint256) {
require(msg.value >= 0.03 ether, 'Not enough Ethereum (0.03 ETH Required) to mint.');
require(_validatePhrase(phrase), 'Invalid phrase. Lowercase a-z only.');
require(bytes(phrase).length < 11, 'Phrase is too long.');
require(<FILL_ME>)
require(_tokenIds.current() < tokenSupply && _tokenIds.current() < betaSupply, 'Sorry folks: assmail sold out!');
_tokenIds.increment(); uint256 tokenID = _tokenIds.current();
_safeMint(msg.sender, tokenID);
tokenMap[phrase] = tokenID; phraseMap[tokenID] = phrase;
return tokenID;}
/***** DirtyThirty: the strange people who believed in us. Capped at 30, counting backwards *****/
function mint_dirtythirty(string memory phrase, address receiver) public onlyOwner returns (uint256) {
}
/***** System only validates lowercase a-z *****/
function _validatePhrase(string memory phrase) internal pure returns (bool) {
}
/***** 'view' methods for administration *****/
function totalSupply() public view returns (uint256) { }
function _baseURI() internal view override returns (string memory) { }
/***** 'onlyOwner' methods for administration *****/
function updateURI(string memory dropURI) external onlyOwner { }
function get_ID(string memory phrase) public view onlyOwner returns (uint256) {
}
function get_phrase(uint256 tokenID) public view onlyOwner returns (string memory) { }
function toggle_sale() public onlyOwner{ }
function raiseSoftLimit(uint256 newLimit) public onlyOwner{ }
function withdraw() public onlyOwner { }
}
| tokenMap[phrase]==0,'How unoriginal; already claimed.' | 125,198 | tokenMap[phrase]==0 |
'Sorry folks: assmail sold out!' | /* This is a 69-line contract between the good folks at ass.com and you.
assmail: an ERC721 token that entitles you to an "@ass.com" email address of your choosing.
Mint in good humor and fun; hate and violence have no place at ass.com */
pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract assonline is ERC721URIStorage, Ownable {
using SafeMath for uint256; using Strings for string; using Counters for Counters.Counter;
Counters.Counter private _tokenIds; Counters.Counter private _tokenIds_special;
/***** 10,000 assmail NFTs available, each assigned a unique phrase. After sale, we'll move data to IPFS *****/
uint256 public tokenSupply = 10000;
uint256 public betaSupply = 100; // For beta testers and early birds.
string public BaseURI = "https://mail.ass.com/assmail_metadata/";
bool public saleOpen = false;
mapping (string => uint256) private tokenMap; mapping (uint256 => string) private phraseMap;
modifier openSale() { }
/***** Our team's addresses ;) *****/
constructor() ERC721("Assmail","ADC") {
}
/***** mint_assmail(phrase) is the "[email protected]" accessible on ass.com *****/
function mint_assmail(string memory phrase) public payable openSale returns (uint256) {
require(msg.value >= 0.03 ether, 'Not enough Ethereum (0.03 ETH Required) to mint.');
require(_validatePhrase(phrase), 'Invalid phrase. Lowercase a-z only.');
require(bytes(phrase).length < 11, 'Phrase is too long.');
require(tokenMap[phrase] == 0, 'How unoriginal; already claimed.');
require(<FILL_ME>)
_tokenIds.increment(); uint256 tokenID = _tokenIds.current();
_safeMint(msg.sender, tokenID);
tokenMap[phrase] = tokenID; phraseMap[tokenID] = phrase;
return tokenID;}
/***** DirtyThirty: the strange people who believed in us. Capped at 30, counting backwards *****/
function mint_dirtythirty(string memory phrase, address receiver) public onlyOwner returns (uint256) {
}
/***** System only validates lowercase a-z *****/
function _validatePhrase(string memory phrase) internal pure returns (bool) {
}
/***** 'view' methods for administration *****/
function totalSupply() public view returns (uint256) { }
function _baseURI() internal view override returns (string memory) { }
/***** 'onlyOwner' methods for administration *****/
function updateURI(string memory dropURI) external onlyOwner { }
function get_ID(string memory phrase) public view onlyOwner returns (uint256) {
}
function get_phrase(uint256 tokenID) public view onlyOwner returns (string memory) { }
function toggle_sale() public onlyOwner{ }
function raiseSoftLimit(uint256 newLimit) public onlyOwner{ }
function withdraw() public onlyOwner { }
}
| _tokenIds.current()<tokenSupply&&_tokenIds.current()<betaSupply,'Sorry folks: assmail sold out!' | 125,198 | _tokenIds.current()<tokenSupply&&_tokenIds.current()<betaSupply |
'DirtyThirty claimed.' | /* This is a 69-line contract between the good folks at ass.com and you.
assmail: an ERC721 token that entitles you to an "@ass.com" email address of your choosing.
Mint in good humor and fun; hate and violence have no place at ass.com */
pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract assonline is ERC721URIStorage, Ownable {
using SafeMath for uint256; using Strings for string; using Counters for Counters.Counter;
Counters.Counter private _tokenIds; Counters.Counter private _tokenIds_special;
/***** 10,000 assmail NFTs available, each assigned a unique phrase. After sale, we'll move data to IPFS *****/
uint256 public tokenSupply = 10000;
uint256 public betaSupply = 100; // For beta testers and early birds.
string public BaseURI = "https://mail.ass.com/assmail_metadata/";
bool public saleOpen = false;
mapping (string => uint256) private tokenMap; mapping (uint256 => string) private phraseMap;
modifier openSale() { }
/***** Our team's addresses ;) *****/
constructor() ERC721("Assmail","ADC") {
}
/***** mint_assmail(phrase) is the "[email protected]" accessible on ass.com *****/
function mint_assmail(string memory phrase) public payable openSale returns (uint256) {
}
/***** DirtyThirty: the strange people who believed in us. Capped at 30, counting backwards *****/
function mint_dirtythirty(string memory phrase, address receiver) public onlyOwner returns (uint256) {
require(_validatePhrase(phrase), 'Validity.');require(bytes(phrase).length < 11, 'Length.');
require(tokenMap[phrase] == 0, 'Taken.'); require(<FILL_ME>)
uint256 tokenID = tokenSupply - _tokenIds_special.current();
_tokenIds_special.increment(); _mint(receiver, tokenID);
tokenMap[phrase] = tokenID; phraseMap[tokenID] = phrase; return tokenID;}
/***** System only validates lowercase a-z *****/
function _validatePhrase(string memory phrase) internal pure returns (bool) {
}
/***** 'view' methods for administration *****/
function totalSupply() public view returns (uint256) { }
function _baseURI() internal view override returns (string memory) { }
/***** 'onlyOwner' methods for administration *****/
function updateURI(string memory dropURI) external onlyOwner { }
function get_ID(string memory phrase) public view onlyOwner returns (uint256) {
}
function get_phrase(uint256 tokenID) public view onlyOwner returns (string memory) { }
function toggle_sale() public onlyOwner{ }
function raiseSoftLimit(uint256 newLimit) public onlyOwner{ }
function withdraw() public onlyOwner { }
}
| _tokenIds_special.current()<30,'DirtyThirty claimed.' | 125,198 | _tokenIds_special.current()<30 |
"Error: phrase wasn't minted." | /* This is a 69-line contract between the good folks at ass.com and you.
assmail: an ERC721 token that entitles you to an "@ass.com" email address of your choosing.
Mint in good humor and fun; hate and violence have no place at ass.com */
pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract assonline is ERC721URIStorage, Ownable {
using SafeMath for uint256; using Strings for string; using Counters for Counters.Counter;
Counters.Counter private _tokenIds; Counters.Counter private _tokenIds_special;
/***** 10,000 assmail NFTs available, each assigned a unique phrase. After sale, we'll move data to IPFS *****/
uint256 public tokenSupply = 10000;
uint256 public betaSupply = 100; // For beta testers and early birds.
string public BaseURI = "https://mail.ass.com/assmail_metadata/";
bool public saleOpen = false;
mapping (string => uint256) private tokenMap; mapping (uint256 => string) private phraseMap;
modifier openSale() { }
/***** Our team's addresses ;) *****/
constructor() ERC721("Assmail","ADC") {
}
/***** mint_assmail(phrase) is the "[email protected]" accessible on ass.com *****/
function mint_assmail(string memory phrase) public payable openSale returns (uint256) {
}
/***** DirtyThirty: the strange people who believed in us. Capped at 30, counting backwards *****/
function mint_dirtythirty(string memory phrase, address receiver) public onlyOwner returns (uint256) {
}
/***** System only validates lowercase a-z *****/
function _validatePhrase(string memory phrase) internal pure returns (bool) {
}
/***** 'view' methods for administration *****/
function totalSupply() public view returns (uint256) { }
function _baseURI() internal view override returns (string memory) { }
/***** 'onlyOwner' methods for administration *****/
function updateURI(string memory dropURI) external onlyOwner { }
function get_ID(string memory phrase) public view onlyOwner returns (uint256) {
require(<FILL_ME>) return tokenMap[phrase];}
function get_phrase(uint256 tokenID) public view onlyOwner returns (string memory) {retur }
function toggle_sale() public onlyOwner{ }
function raiseSoftLimit(uint256 newLimit) public onlyOwner{ }
function withdraw() public onlyOwner { }
}
| tokenMap[phrase]!=0,"Error: phrase wasn't minted." | 125,198 | tokenMap[phrase]!=0 |
"onlyStaker: Contract is not owner of this token." | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./Variable.sol";
import "./Token.sol";
/// @title vvrrbb staking functionality to earn vvddrr.
/// @author Osman Ali.
/// @notice Use this contract to stake your ERC721 vvrrbb mining rig token and earn vvddrr.
contract VariableStaking is IERC721Receiver, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Math for uint256;
/// @notice The contract address of the ERC721 mining token.
address public miningTokenAddress;
/// @notice The contract address of the vvddrr ERC20 token.
address public vvddrrTokenAddress;
/// @notice A boolean used to allow only one setting of the mining token.
bool miningTokenSet;
/// @notice A boolean value used to allow only one setting of the mining token address.
bool miningTokenAddressSet;
/// @notice A boolean used to allow only one setting of the vvddrr token.
bool vvddrrTokenSet;
/// @notice A boolean value used to allow only one setting of the vvddrr token address.
bool vvddrrTokenAddressSet;
/// @notice Interface contract reference for the ERC721 token that is being staked.
/// @dev This is given a generalized name and can be any ERC721 collection.
IERC721 public miningToken;
/// @notice Interface contract reference for the ERC20 token that is being used a staking reward.
/// @dev This can be any ERC20 token but will be vvddrr in this case.
IERC20 public vvddrrToken;
/// @notice The amount of ERC20 tokens received as a reward for every block an ERC721 token is staked.
/// @dev Expressed in Wei.
// Reference: https://ethereum.org/en/developers/docs/blocks/
// Reference for merge: https://blog.ethereum.org/2021/11/29/how-the-merge-impacts-app-layer/
uint256 public tokensPerBlock = 3805175038100;
/// @notice A general constant for use in percentage basis point conversion and calculation.
uint256 public constant BASIS = 10_000;
/// @notice The tokensPerBlock value used a constant for initial burn capitalization.
/// @dev Required so that an empty value is not used for a user's initial burn.
uint256 public constant INITIAL_BURN_CAPITALIZATION = 3805175038100;
/// @notice A Stake struct represents how a staked token is stored.
struct Stake {
address user;
uint256 tokenId;
uint256 stakedFromBlock;
}
/// @notice A Stakeholder struct stores an address and its active Stakes.
struct Stakeholder {
address user;
Stake[] addressStakes;
}
/// @notice A StakingSummary struct stores an array of Stake structs.
struct StakingSummary {
Stake[] stakes;
}
/// @notice An address is used as a key to the array of Stakes.
mapping(address => Stake[]) private addressStakes;
/// @notice An tokenId is mapped to a burn capitalization value expressed in Wei.
mapping(uint256 => uint256) public burnCapitalization;
/// @notice An integer is used as key to the value of a Stake in order to provide a receipt.
mapping(uint256 => Stake) public receipt;
/// @notice An address is used as a key to an index value in the stakes that occur.
mapping(address => uint256) private stakes;
/// @notice All current stakeholders.
Stakeholder[] private stakeholders;
/// @notice Emitted when a token is unstaked in an emergency.
event EmergencyUnstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Emitted when a token is staked.
event Staked(address indexed user, uint256 indexed tokenId, uint256 staredFromBlock, uint256 index);
/// @notice Emitted when a reward is paid out to an address.
event StakePayout(address indexed staker, uint256 tokenId, uint256 stakeAmount, uint256 fromBlock, uint256 toBlock);
/// @notice Emitted when a token is unstaked.
event Unstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Requirements related to token ownership.
/// @param tokenId The current tokenId being staked.
modifier onlyStaker(uint256 tokenId) {
// Require that this contract has the token.
require(<FILL_ME>)
// Require that this token is staked.
require(receipt[tokenId].stakedFromBlock != 0, "onlyStaker: Token is not staked");
// Require that msg.sender is the owner of this tokenId.
require(receipt[tokenId].user == msg.sender, "onlyStaker: Caller is not token stake owner");
_;
}
/// @notice A requirement to have at least one block pass before staking, unstaking or harvesting.
/// @param tokenId The tokenId being staked or unstaked.
modifier requireTimeElapsed(uint256 tokenId) {
}
/// @notice Create the ERC721 staking contract.
/// @dev Push needed to avoid index 0 causing bug of index-1.
constructor() {
}
/// @notice Accepts a tokenId to perform emergency unstaking.
/// @param tokenId The tokenId to be emergency unstaked.
function emergencyUnstake(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform staking.
/// @param tokenId The tokenId to be staked.
function stakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform unstaking.
/// @param tokenId The tokenId to be unstaked.
function unstakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @dev Required implementation to support safeTransfers from ERC721 asset contracts.
function onERC721Received (
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external pure override returns (bytes4) {
}
/// @notice Harvesting the ERC20 rewards earned by a staked ERC721 token.
/// @param tokenId The tokenId of the staked token for which rewards are withdrawn.
function harvest(uint256 tokenId)
public
nonReentrant
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
{
}
/// @notice Sets the ERC721 contract this staking contract is for.
/// @param _miningToken The ERC721 contract address to have its tokenIds staked.
function setMiningToken(IERC721 _miningToken) public onlyOwner {
}
/// @notice Set the mining token address for the instance of the ERC721 contract used.
/// @param _miningTokenAddress The vvrrbb mining rig token address.
function setMiningTokenAddress(address _miningTokenAddress) public onlyOwner {
}
/// @notice Sets the ERC20 token used as staking rewards.
/// @param _vvddrrToken The ERC20 token contract that will provide reward tokens.
function setVvddrrToken(IERC20 _vvddrrToken) public onlyOwner {
}
/// @notice Set the reward token address for the instance of the ERC20 contract used.
/// @param _vvddrrTokenAddress The vvddrr token address.
function setVvddrrTokenAddress(address _vvddrrTokenAddress) public onlyOwner {
}
/// @notice Determine the amount of rewards earned by a staked token.
/// @param tokenId The tokenId of the staked token.
/// @return The value in Wei of the rewards currently earned by the tokenId.
function getCurrentStakeEarned(uint256 tokenId) public view returns (uint256) {
}
/// @notice Retrive the vvrrbb mining percentage for a given tokenId.
/// @param tokenId The tokenId for which a mining percentage is to be retreived.
/// @return A tokenId's mining percentage returned in percentage basis points.
function getMiningPercentage(uint256 tokenId) public view returns (uint256) {
}
/// @notice Receive a summary of current stakes by a given address.
/// @param _user The address to receive a summary for.
/// @return A staking summary for a given address.
function getStakingSummary(address _user) public view returns (StakingSummary memory) {
}
/// @notice Adds a staker to the stakeholders array.
/// @param staker An address that is staking an ERC721 token.
/// @return The index of the address within the array of stakeholders.
function _addStakeholder(address staker) internal returns (uint256) {
}
/// @notice Emergency unstakes the given ERC721 tokenId and does not claim ERC20 rewards.
/// @param tokenId The tokenId to be emergency unstaked.
/// @return A boolean indicating whether the emergency unstaking was completed.
function _emergencyUnstake(uint256 tokenId)
internal
onlyStaker(tokenId)
returns (bool)
{
}
/// @notice Calculates and transfers earned rewards for a given tokenId.
/// @param tokenId The tokenId for which rewards are to be calculated and paid out.
function _payoutStake(uint256 tokenId) internal {
}
/// @notice Stakes the given ERC721 tokenId to provide ERC20 rewards.
/// @param tokenId The tokenId to be staked.
/// @return A boolean indicating whether the staking was completed.
function _stakeMiningToken(uint256 tokenId) internal returns (bool) {
}
/// @notice Unstakes the given ERC721 tokenId and claims ERC20 rewards.
/// @param tokenId The tokenId to be unstaked.
/// @return A boolean indicating whether the unstaking was completed.
function _unstakeMiningToken(uint256 tokenId)
internal
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
returns (bool)
{
}
/// @notice Determine the number of blocks for which a given tokenId has been staked.
/// @param tokenId The staked tokenId.
/// @return The integer value indicating the difference the current block and the initial staking block.
function _getTimeStaked(uint256 tokenId) internal view returns (uint256) {
}
/// @notice Returns an integer value as a string.
/// @param value The integer value to have a type change.
/// @return A string of the inputted integer value.
function toString(uint256 value) internal pure returns (string memory) {
}
/// @notice Create a random burn amount between 0 and the tokenId's current burn capitalization.
/// @param tokenId The tokenId for which to calculate a random burn.
/// @return A random value expressed in Wei.
function randomBurn(uint256 tokenId) private view returns (uint256) {
}
/// @notice A general random function to be used to shuffle and generate values.
/// @param input Any string value to be randomized.
/// @return The output of a random hash using keccak256.
function random(string memory input) private pure returns (uint256) {
}
}
| miningToken.ownerOf(tokenId)==address(this),"onlyStaker: Contract is not owner of this token." | 125,340 | miningToken.ownerOf(tokenId)==address(this) |
"onlyStaker: Token is not staked" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./Variable.sol";
import "./Token.sol";
/// @title vvrrbb staking functionality to earn vvddrr.
/// @author Osman Ali.
/// @notice Use this contract to stake your ERC721 vvrrbb mining rig token and earn vvddrr.
contract VariableStaking is IERC721Receiver, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Math for uint256;
/// @notice The contract address of the ERC721 mining token.
address public miningTokenAddress;
/// @notice The contract address of the vvddrr ERC20 token.
address public vvddrrTokenAddress;
/// @notice A boolean used to allow only one setting of the mining token.
bool miningTokenSet;
/// @notice A boolean value used to allow only one setting of the mining token address.
bool miningTokenAddressSet;
/// @notice A boolean used to allow only one setting of the vvddrr token.
bool vvddrrTokenSet;
/// @notice A boolean value used to allow only one setting of the vvddrr token address.
bool vvddrrTokenAddressSet;
/// @notice Interface contract reference for the ERC721 token that is being staked.
/// @dev This is given a generalized name and can be any ERC721 collection.
IERC721 public miningToken;
/// @notice Interface contract reference for the ERC20 token that is being used a staking reward.
/// @dev This can be any ERC20 token but will be vvddrr in this case.
IERC20 public vvddrrToken;
/// @notice The amount of ERC20 tokens received as a reward for every block an ERC721 token is staked.
/// @dev Expressed in Wei.
// Reference: https://ethereum.org/en/developers/docs/blocks/
// Reference for merge: https://blog.ethereum.org/2021/11/29/how-the-merge-impacts-app-layer/
uint256 public tokensPerBlock = 3805175038100;
/// @notice A general constant for use in percentage basis point conversion and calculation.
uint256 public constant BASIS = 10_000;
/// @notice The tokensPerBlock value used a constant for initial burn capitalization.
/// @dev Required so that an empty value is not used for a user's initial burn.
uint256 public constant INITIAL_BURN_CAPITALIZATION = 3805175038100;
/// @notice A Stake struct represents how a staked token is stored.
struct Stake {
address user;
uint256 tokenId;
uint256 stakedFromBlock;
}
/// @notice A Stakeholder struct stores an address and its active Stakes.
struct Stakeholder {
address user;
Stake[] addressStakes;
}
/// @notice A StakingSummary struct stores an array of Stake structs.
struct StakingSummary {
Stake[] stakes;
}
/// @notice An address is used as a key to the array of Stakes.
mapping(address => Stake[]) private addressStakes;
/// @notice An tokenId is mapped to a burn capitalization value expressed in Wei.
mapping(uint256 => uint256) public burnCapitalization;
/// @notice An integer is used as key to the value of a Stake in order to provide a receipt.
mapping(uint256 => Stake) public receipt;
/// @notice An address is used as a key to an index value in the stakes that occur.
mapping(address => uint256) private stakes;
/// @notice All current stakeholders.
Stakeholder[] private stakeholders;
/// @notice Emitted when a token is unstaked in an emergency.
event EmergencyUnstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Emitted when a token is staked.
event Staked(address indexed user, uint256 indexed tokenId, uint256 staredFromBlock, uint256 index);
/// @notice Emitted when a reward is paid out to an address.
event StakePayout(address indexed staker, uint256 tokenId, uint256 stakeAmount, uint256 fromBlock, uint256 toBlock);
/// @notice Emitted when a token is unstaked.
event Unstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Requirements related to token ownership.
/// @param tokenId The current tokenId being staked.
modifier onlyStaker(uint256 tokenId) {
// Require that this contract has the token.
require(miningToken.ownerOf(tokenId) == address(this), "onlyStaker: Contract is not owner of this token.");
// Require that this token is staked.
require(<FILL_ME>)
// Require that msg.sender is the owner of this tokenId.
require(receipt[tokenId].user == msg.sender, "onlyStaker: Caller is not token stake owner");
_;
}
/// @notice A requirement to have at least one block pass before staking, unstaking or harvesting.
/// @param tokenId The tokenId being staked or unstaked.
modifier requireTimeElapsed(uint256 tokenId) {
}
/// @notice Create the ERC721 staking contract.
/// @dev Push needed to avoid index 0 causing bug of index-1.
constructor() {
}
/// @notice Accepts a tokenId to perform emergency unstaking.
/// @param tokenId The tokenId to be emergency unstaked.
function emergencyUnstake(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform staking.
/// @param tokenId The tokenId to be staked.
function stakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform unstaking.
/// @param tokenId The tokenId to be unstaked.
function unstakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @dev Required implementation to support safeTransfers from ERC721 asset contracts.
function onERC721Received (
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external pure override returns (bytes4) {
}
/// @notice Harvesting the ERC20 rewards earned by a staked ERC721 token.
/// @param tokenId The tokenId of the staked token for which rewards are withdrawn.
function harvest(uint256 tokenId)
public
nonReentrant
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
{
}
/// @notice Sets the ERC721 contract this staking contract is for.
/// @param _miningToken The ERC721 contract address to have its tokenIds staked.
function setMiningToken(IERC721 _miningToken) public onlyOwner {
}
/// @notice Set the mining token address for the instance of the ERC721 contract used.
/// @param _miningTokenAddress The vvrrbb mining rig token address.
function setMiningTokenAddress(address _miningTokenAddress) public onlyOwner {
}
/// @notice Sets the ERC20 token used as staking rewards.
/// @param _vvddrrToken The ERC20 token contract that will provide reward tokens.
function setVvddrrToken(IERC20 _vvddrrToken) public onlyOwner {
}
/// @notice Set the reward token address for the instance of the ERC20 contract used.
/// @param _vvddrrTokenAddress The vvddrr token address.
function setVvddrrTokenAddress(address _vvddrrTokenAddress) public onlyOwner {
}
/// @notice Determine the amount of rewards earned by a staked token.
/// @param tokenId The tokenId of the staked token.
/// @return The value in Wei of the rewards currently earned by the tokenId.
function getCurrentStakeEarned(uint256 tokenId) public view returns (uint256) {
}
/// @notice Retrive the vvrrbb mining percentage for a given tokenId.
/// @param tokenId The tokenId for which a mining percentage is to be retreived.
/// @return A tokenId's mining percentage returned in percentage basis points.
function getMiningPercentage(uint256 tokenId) public view returns (uint256) {
}
/// @notice Receive a summary of current stakes by a given address.
/// @param _user The address to receive a summary for.
/// @return A staking summary for a given address.
function getStakingSummary(address _user) public view returns (StakingSummary memory) {
}
/// @notice Adds a staker to the stakeholders array.
/// @param staker An address that is staking an ERC721 token.
/// @return The index of the address within the array of stakeholders.
function _addStakeholder(address staker) internal returns (uint256) {
}
/// @notice Emergency unstakes the given ERC721 tokenId and does not claim ERC20 rewards.
/// @param tokenId The tokenId to be emergency unstaked.
/// @return A boolean indicating whether the emergency unstaking was completed.
function _emergencyUnstake(uint256 tokenId)
internal
onlyStaker(tokenId)
returns (bool)
{
}
/// @notice Calculates and transfers earned rewards for a given tokenId.
/// @param tokenId The tokenId for which rewards are to be calculated and paid out.
function _payoutStake(uint256 tokenId) internal {
}
/// @notice Stakes the given ERC721 tokenId to provide ERC20 rewards.
/// @param tokenId The tokenId to be staked.
/// @return A boolean indicating whether the staking was completed.
function _stakeMiningToken(uint256 tokenId) internal returns (bool) {
}
/// @notice Unstakes the given ERC721 tokenId and claims ERC20 rewards.
/// @param tokenId The tokenId to be unstaked.
/// @return A boolean indicating whether the unstaking was completed.
function _unstakeMiningToken(uint256 tokenId)
internal
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
returns (bool)
{
}
/// @notice Determine the number of blocks for which a given tokenId has been staked.
/// @param tokenId The staked tokenId.
/// @return The integer value indicating the difference the current block and the initial staking block.
function _getTimeStaked(uint256 tokenId) internal view returns (uint256) {
}
/// @notice Returns an integer value as a string.
/// @param value The integer value to have a type change.
/// @return A string of the inputted integer value.
function toString(uint256 value) internal pure returns (string memory) {
}
/// @notice Create a random burn amount between 0 and the tokenId's current burn capitalization.
/// @param tokenId The tokenId for which to calculate a random burn.
/// @return A random value expressed in Wei.
function randomBurn(uint256 tokenId) private view returns (uint256) {
}
/// @notice A general random function to be used to shuffle and generate values.
/// @param input Any string value to be randomized.
/// @return The output of a random hash using keccak256.
function random(string memory input) private pure returns (uint256) {
}
}
| receipt[tokenId].stakedFromBlock!=0,"onlyStaker: Token is not staked" | 125,340 | receipt[tokenId].stakedFromBlock!=0 |
"onlyStaker: Caller is not token stake owner" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./Variable.sol";
import "./Token.sol";
/// @title vvrrbb staking functionality to earn vvddrr.
/// @author Osman Ali.
/// @notice Use this contract to stake your ERC721 vvrrbb mining rig token and earn vvddrr.
contract VariableStaking is IERC721Receiver, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Math for uint256;
/// @notice The contract address of the ERC721 mining token.
address public miningTokenAddress;
/// @notice The contract address of the vvddrr ERC20 token.
address public vvddrrTokenAddress;
/// @notice A boolean used to allow only one setting of the mining token.
bool miningTokenSet;
/// @notice A boolean value used to allow only one setting of the mining token address.
bool miningTokenAddressSet;
/// @notice A boolean used to allow only one setting of the vvddrr token.
bool vvddrrTokenSet;
/// @notice A boolean value used to allow only one setting of the vvddrr token address.
bool vvddrrTokenAddressSet;
/// @notice Interface contract reference for the ERC721 token that is being staked.
/// @dev This is given a generalized name and can be any ERC721 collection.
IERC721 public miningToken;
/// @notice Interface contract reference for the ERC20 token that is being used a staking reward.
/// @dev This can be any ERC20 token but will be vvddrr in this case.
IERC20 public vvddrrToken;
/// @notice The amount of ERC20 tokens received as a reward for every block an ERC721 token is staked.
/// @dev Expressed in Wei.
// Reference: https://ethereum.org/en/developers/docs/blocks/
// Reference for merge: https://blog.ethereum.org/2021/11/29/how-the-merge-impacts-app-layer/
uint256 public tokensPerBlock = 3805175038100;
/// @notice A general constant for use in percentage basis point conversion and calculation.
uint256 public constant BASIS = 10_000;
/// @notice The tokensPerBlock value used a constant for initial burn capitalization.
/// @dev Required so that an empty value is not used for a user's initial burn.
uint256 public constant INITIAL_BURN_CAPITALIZATION = 3805175038100;
/// @notice A Stake struct represents how a staked token is stored.
struct Stake {
address user;
uint256 tokenId;
uint256 stakedFromBlock;
}
/// @notice A Stakeholder struct stores an address and its active Stakes.
struct Stakeholder {
address user;
Stake[] addressStakes;
}
/// @notice A StakingSummary struct stores an array of Stake structs.
struct StakingSummary {
Stake[] stakes;
}
/// @notice An address is used as a key to the array of Stakes.
mapping(address => Stake[]) private addressStakes;
/// @notice An tokenId is mapped to a burn capitalization value expressed in Wei.
mapping(uint256 => uint256) public burnCapitalization;
/// @notice An integer is used as key to the value of a Stake in order to provide a receipt.
mapping(uint256 => Stake) public receipt;
/// @notice An address is used as a key to an index value in the stakes that occur.
mapping(address => uint256) private stakes;
/// @notice All current stakeholders.
Stakeholder[] private stakeholders;
/// @notice Emitted when a token is unstaked in an emergency.
event EmergencyUnstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Emitted when a token is staked.
event Staked(address indexed user, uint256 indexed tokenId, uint256 staredFromBlock, uint256 index);
/// @notice Emitted when a reward is paid out to an address.
event StakePayout(address indexed staker, uint256 tokenId, uint256 stakeAmount, uint256 fromBlock, uint256 toBlock);
/// @notice Emitted when a token is unstaked.
event Unstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Requirements related to token ownership.
/// @param tokenId The current tokenId being staked.
modifier onlyStaker(uint256 tokenId) {
// Require that this contract has the token.
require(miningToken.ownerOf(tokenId) == address(this), "onlyStaker: Contract is not owner of this token.");
// Require that this token is staked.
require(receipt[tokenId].stakedFromBlock != 0, "onlyStaker: Token is not staked");
// Require that msg.sender is the owner of this tokenId.
require(<FILL_ME>)
_;
}
/// @notice A requirement to have at least one block pass before staking, unstaking or harvesting.
/// @param tokenId The tokenId being staked or unstaked.
modifier requireTimeElapsed(uint256 tokenId) {
}
/// @notice Create the ERC721 staking contract.
/// @dev Push needed to avoid index 0 causing bug of index-1.
constructor() {
}
/// @notice Accepts a tokenId to perform emergency unstaking.
/// @param tokenId The tokenId to be emergency unstaked.
function emergencyUnstake(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform staking.
/// @param tokenId The tokenId to be staked.
function stakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform unstaking.
/// @param tokenId The tokenId to be unstaked.
function unstakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @dev Required implementation to support safeTransfers from ERC721 asset contracts.
function onERC721Received (
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external pure override returns (bytes4) {
}
/// @notice Harvesting the ERC20 rewards earned by a staked ERC721 token.
/// @param tokenId The tokenId of the staked token for which rewards are withdrawn.
function harvest(uint256 tokenId)
public
nonReentrant
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
{
}
/// @notice Sets the ERC721 contract this staking contract is for.
/// @param _miningToken The ERC721 contract address to have its tokenIds staked.
function setMiningToken(IERC721 _miningToken) public onlyOwner {
}
/// @notice Set the mining token address for the instance of the ERC721 contract used.
/// @param _miningTokenAddress The vvrrbb mining rig token address.
function setMiningTokenAddress(address _miningTokenAddress) public onlyOwner {
}
/// @notice Sets the ERC20 token used as staking rewards.
/// @param _vvddrrToken The ERC20 token contract that will provide reward tokens.
function setVvddrrToken(IERC20 _vvddrrToken) public onlyOwner {
}
/// @notice Set the reward token address for the instance of the ERC20 contract used.
/// @param _vvddrrTokenAddress The vvddrr token address.
function setVvddrrTokenAddress(address _vvddrrTokenAddress) public onlyOwner {
}
/// @notice Determine the amount of rewards earned by a staked token.
/// @param tokenId The tokenId of the staked token.
/// @return The value in Wei of the rewards currently earned by the tokenId.
function getCurrentStakeEarned(uint256 tokenId) public view returns (uint256) {
}
/// @notice Retrive the vvrrbb mining percentage for a given tokenId.
/// @param tokenId The tokenId for which a mining percentage is to be retreived.
/// @return A tokenId's mining percentage returned in percentage basis points.
function getMiningPercentage(uint256 tokenId) public view returns (uint256) {
}
/// @notice Receive a summary of current stakes by a given address.
/// @param _user The address to receive a summary for.
/// @return A staking summary for a given address.
function getStakingSummary(address _user) public view returns (StakingSummary memory) {
}
/// @notice Adds a staker to the stakeholders array.
/// @param staker An address that is staking an ERC721 token.
/// @return The index of the address within the array of stakeholders.
function _addStakeholder(address staker) internal returns (uint256) {
}
/// @notice Emergency unstakes the given ERC721 tokenId and does not claim ERC20 rewards.
/// @param tokenId The tokenId to be emergency unstaked.
/// @return A boolean indicating whether the emergency unstaking was completed.
function _emergencyUnstake(uint256 tokenId)
internal
onlyStaker(tokenId)
returns (bool)
{
}
/// @notice Calculates and transfers earned rewards for a given tokenId.
/// @param tokenId The tokenId for which rewards are to be calculated and paid out.
function _payoutStake(uint256 tokenId) internal {
}
/// @notice Stakes the given ERC721 tokenId to provide ERC20 rewards.
/// @param tokenId The tokenId to be staked.
/// @return A boolean indicating whether the staking was completed.
function _stakeMiningToken(uint256 tokenId) internal returns (bool) {
}
/// @notice Unstakes the given ERC721 tokenId and claims ERC20 rewards.
/// @param tokenId The tokenId to be unstaked.
/// @return A boolean indicating whether the unstaking was completed.
function _unstakeMiningToken(uint256 tokenId)
internal
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
returns (bool)
{
}
/// @notice Determine the number of blocks for which a given tokenId has been staked.
/// @param tokenId The staked tokenId.
/// @return The integer value indicating the difference the current block and the initial staking block.
function _getTimeStaked(uint256 tokenId) internal view returns (uint256) {
}
/// @notice Returns an integer value as a string.
/// @param value The integer value to have a type change.
/// @return A string of the inputted integer value.
function toString(uint256 value) internal pure returns (string memory) {
}
/// @notice Create a random burn amount between 0 and the tokenId's current burn capitalization.
/// @param tokenId The tokenId for which to calculate a random burn.
/// @return A random value expressed in Wei.
function randomBurn(uint256 tokenId) private view returns (uint256) {
}
/// @notice A general random function to be used to shuffle and generate values.
/// @param input Any string value to be randomized.
/// @return The output of a random hash using keccak256.
function random(string memory input) private pure returns (uint256) {
}
}
| receipt[tokenId].user==msg.sender,"onlyStaker: Caller is not token stake owner" | 125,340 | receipt[tokenId].user==msg.sender |
"requireTimeElapsed: Cannot stake/unstake/harvest in the same block" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./Variable.sol";
import "./Token.sol";
/// @title vvrrbb staking functionality to earn vvddrr.
/// @author Osman Ali.
/// @notice Use this contract to stake your ERC721 vvrrbb mining rig token and earn vvddrr.
contract VariableStaking is IERC721Receiver, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Math for uint256;
/// @notice The contract address of the ERC721 mining token.
address public miningTokenAddress;
/// @notice The contract address of the vvddrr ERC20 token.
address public vvddrrTokenAddress;
/// @notice A boolean used to allow only one setting of the mining token.
bool miningTokenSet;
/// @notice A boolean value used to allow only one setting of the mining token address.
bool miningTokenAddressSet;
/// @notice A boolean used to allow only one setting of the vvddrr token.
bool vvddrrTokenSet;
/// @notice A boolean value used to allow only one setting of the vvddrr token address.
bool vvddrrTokenAddressSet;
/// @notice Interface contract reference for the ERC721 token that is being staked.
/// @dev This is given a generalized name and can be any ERC721 collection.
IERC721 public miningToken;
/// @notice Interface contract reference for the ERC20 token that is being used a staking reward.
/// @dev This can be any ERC20 token but will be vvddrr in this case.
IERC20 public vvddrrToken;
/// @notice The amount of ERC20 tokens received as a reward for every block an ERC721 token is staked.
/// @dev Expressed in Wei.
// Reference: https://ethereum.org/en/developers/docs/blocks/
// Reference for merge: https://blog.ethereum.org/2021/11/29/how-the-merge-impacts-app-layer/
uint256 public tokensPerBlock = 3805175038100;
/// @notice A general constant for use in percentage basis point conversion and calculation.
uint256 public constant BASIS = 10_000;
/// @notice The tokensPerBlock value used a constant for initial burn capitalization.
/// @dev Required so that an empty value is not used for a user's initial burn.
uint256 public constant INITIAL_BURN_CAPITALIZATION = 3805175038100;
/// @notice A Stake struct represents how a staked token is stored.
struct Stake {
address user;
uint256 tokenId;
uint256 stakedFromBlock;
}
/// @notice A Stakeholder struct stores an address and its active Stakes.
struct Stakeholder {
address user;
Stake[] addressStakes;
}
/// @notice A StakingSummary struct stores an array of Stake structs.
struct StakingSummary {
Stake[] stakes;
}
/// @notice An address is used as a key to the array of Stakes.
mapping(address => Stake[]) private addressStakes;
/// @notice An tokenId is mapped to a burn capitalization value expressed in Wei.
mapping(uint256 => uint256) public burnCapitalization;
/// @notice An integer is used as key to the value of a Stake in order to provide a receipt.
mapping(uint256 => Stake) public receipt;
/// @notice An address is used as a key to an index value in the stakes that occur.
mapping(address => uint256) private stakes;
/// @notice All current stakeholders.
Stakeholder[] private stakeholders;
/// @notice Emitted when a token is unstaked in an emergency.
event EmergencyUnstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Emitted when a token is staked.
event Staked(address indexed user, uint256 indexed tokenId, uint256 staredFromBlock, uint256 index);
/// @notice Emitted when a reward is paid out to an address.
event StakePayout(address indexed staker, uint256 tokenId, uint256 stakeAmount, uint256 fromBlock, uint256 toBlock);
/// @notice Emitted when a token is unstaked.
event Unstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Requirements related to token ownership.
/// @param tokenId The current tokenId being staked.
modifier onlyStaker(uint256 tokenId) {
}
/// @notice A requirement to have at least one block pass before staking, unstaking or harvesting.
/// @param tokenId The tokenId being staked or unstaked.
modifier requireTimeElapsed(uint256 tokenId) {
require(<FILL_ME>)
_;
}
/// @notice Create the ERC721 staking contract.
/// @dev Push needed to avoid index 0 causing bug of index-1.
constructor() {
}
/// @notice Accepts a tokenId to perform emergency unstaking.
/// @param tokenId The tokenId to be emergency unstaked.
function emergencyUnstake(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform staking.
/// @param tokenId The tokenId to be staked.
function stakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform unstaking.
/// @param tokenId The tokenId to be unstaked.
function unstakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @dev Required implementation to support safeTransfers from ERC721 asset contracts.
function onERC721Received (
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external pure override returns (bytes4) {
}
/// @notice Harvesting the ERC20 rewards earned by a staked ERC721 token.
/// @param tokenId The tokenId of the staked token for which rewards are withdrawn.
function harvest(uint256 tokenId)
public
nonReentrant
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
{
}
/// @notice Sets the ERC721 contract this staking contract is for.
/// @param _miningToken The ERC721 contract address to have its tokenIds staked.
function setMiningToken(IERC721 _miningToken) public onlyOwner {
}
/// @notice Set the mining token address for the instance of the ERC721 contract used.
/// @param _miningTokenAddress The vvrrbb mining rig token address.
function setMiningTokenAddress(address _miningTokenAddress) public onlyOwner {
}
/// @notice Sets the ERC20 token used as staking rewards.
/// @param _vvddrrToken The ERC20 token contract that will provide reward tokens.
function setVvddrrToken(IERC20 _vvddrrToken) public onlyOwner {
}
/// @notice Set the reward token address for the instance of the ERC20 contract used.
/// @param _vvddrrTokenAddress The vvddrr token address.
function setVvddrrTokenAddress(address _vvddrrTokenAddress) public onlyOwner {
}
/// @notice Determine the amount of rewards earned by a staked token.
/// @param tokenId The tokenId of the staked token.
/// @return The value in Wei of the rewards currently earned by the tokenId.
function getCurrentStakeEarned(uint256 tokenId) public view returns (uint256) {
}
/// @notice Retrive the vvrrbb mining percentage for a given tokenId.
/// @param tokenId The tokenId for which a mining percentage is to be retreived.
/// @return A tokenId's mining percentage returned in percentage basis points.
function getMiningPercentage(uint256 tokenId) public view returns (uint256) {
}
/// @notice Receive a summary of current stakes by a given address.
/// @param _user The address to receive a summary for.
/// @return A staking summary for a given address.
function getStakingSummary(address _user) public view returns (StakingSummary memory) {
}
/// @notice Adds a staker to the stakeholders array.
/// @param staker An address that is staking an ERC721 token.
/// @return The index of the address within the array of stakeholders.
function _addStakeholder(address staker) internal returns (uint256) {
}
/// @notice Emergency unstakes the given ERC721 tokenId and does not claim ERC20 rewards.
/// @param tokenId The tokenId to be emergency unstaked.
/// @return A boolean indicating whether the emergency unstaking was completed.
function _emergencyUnstake(uint256 tokenId)
internal
onlyStaker(tokenId)
returns (bool)
{
}
/// @notice Calculates and transfers earned rewards for a given tokenId.
/// @param tokenId The tokenId for which rewards are to be calculated and paid out.
function _payoutStake(uint256 tokenId) internal {
}
/// @notice Stakes the given ERC721 tokenId to provide ERC20 rewards.
/// @param tokenId The tokenId to be staked.
/// @return A boolean indicating whether the staking was completed.
function _stakeMiningToken(uint256 tokenId) internal returns (bool) {
}
/// @notice Unstakes the given ERC721 tokenId and claims ERC20 rewards.
/// @param tokenId The tokenId to be unstaked.
/// @return A boolean indicating whether the unstaking was completed.
function _unstakeMiningToken(uint256 tokenId)
internal
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
returns (bool)
{
}
/// @notice Determine the number of blocks for which a given tokenId has been staked.
/// @param tokenId The staked tokenId.
/// @return The integer value indicating the difference the current block and the initial staking block.
function _getTimeStaked(uint256 tokenId) internal view returns (uint256) {
}
/// @notice Returns an integer value as a string.
/// @param value The integer value to have a type change.
/// @return A string of the inputted integer value.
function toString(uint256 value) internal pure returns (string memory) {
}
/// @notice Create a random burn amount between 0 and the tokenId's current burn capitalization.
/// @param tokenId The tokenId for which to calculate a random burn.
/// @return A random value expressed in Wei.
function randomBurn(uint256 tokenId) private view returns (uint256) {
}
/// @notice A general random function to be used to shuffle and generate values.
/// @param input Any string value to be randomized.
/// @return The output of a random hash using keccak256.
function random(string memory input) private pure returns (uint256) {
}
}
| receipt[tokenId].stakedFromBlock<block.number,"requireTimeElapsed: Cannot stake/unstake/harvest in the same block" | 125,340 | receipt[tokenId].stakedFromBlock<block.number |
"_payoutStake: No staking from block 0" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./Variable.sol";
import "./Token.sol";
/// @title vvrrbb staking functionality to earn vvddrr.
/// @author Osman Ali.
/// @notice Use this contract to stake your ERC721 vvrrbb mining rig token and earn vvddrr.
contract VariableStaking is IERC721Receiver, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Math for uint256;
/// @notice The contract address of the ERC721 mining token.
address public miningTokenAddress;
/// @notice The contract address of the vvddrr ERC20 token.
address public vvddrrTokenAddress;
/// @notice A boolean used to allow only one setting of the mining token.
bool miningTokenSet;
/// @notice A boolean value used to allow only one setting of the mining token address.
bool miningTokenAddressSet;
/// @notice A boolean used to allow only one setting of the vvddrr token.
bool vvddrrTokenSet;
/// @notice A boolean value used to allow only one setting of the vvddrr token address.
bool vvddrrTokenAddressSet;
/// @notice Interface contract reference for the ERC721 token that is being staked.
/// @dev This is given a generalized name and can be any ERC721 collection.
IERC721 public miningToken;
/// @notice Interface contract reference for the ERC20 token that is being used a staking reward.
/// @dev This can be any ERC20 token but will be vvddrr in this case.
IERC20 public vvddrrToken;
/// @notice The amount of ERC20 tokens received as a reward for every block an ERC721 token is staked.
/// @dev Expressed in Wei.
// Reference: https://ethereum.org/en/developers/docs/blocks/
// Reference for merge: https://blog.ethereum.org/2021/11/29/how-the-merge-impacts-app-layer/
uint256 public tokensPerBlock = 3805175038100;
/// @notice A general constant for use in percentage basis point conversion and calculation.
uint256 public constant BASIS = 10_000;
/// @notice The tokensPerBlock value used a constant for initial burn capitalization.
/// @dev Required so that an empty value is not used for a user's initial burn.
uint256 public constant INITIAL_BURN_CAPITALIZATION = 3805175038100;
/// @notice A Stake struct represents how a staked token is stored.
struct Stake {
address user;
uint256 tokenId;
uint256 stakedFromBlock;
}
/// @notice A Stakeholder struct stores an address and its active Stakes.
struct Stakeholder {
address user;
Stake[] addressStakes;
}
/// @notice A StakingSummary struct stores an array of Stake structs.
struct StakingSummary {
Stake[] stakes;
}
/// @notice An address is used as a key to the array of Stakes.
mapping(address => Stake[]) private addressStakes;
/// @notice An tokenId is mapped to a burn capitalization value expressed in Wei.
mapping(uint256 => uint256) public burnCapitalization;
/// @notice An integer is used as key to the value of a Stake in order to provide a receipt.
mapping(uint256 => Stake) public receipt;
/// @notice An address is used as a key to an index value in the stakes that occur.
mapping(address => uint256) private stakes;
/// @notice All current stakeholders.
Stakeholder[] private stakeholders;
/// @notice Emitted when a token is unstaked in an emergency.
event EmergencyUnstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Emitted when a token is staked.
event Staked(address indexed user, uint256 indexed tokenId, uint256 staredFromBlock, uint256 index);
/// @notice Emitted when a reward is paid out to an address.
event StakePayout(address indexed staker, uint256 tokenId, uint256 stakeAmount, uint256 fromBlock, uint256 toBlock);
/// @notice Emitted when a token is unstaked.
event Unstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Requirements related to token ownership.
/// @param tokenId The current tokenId being staked.
modifier onlyStaker(uint256 tokenId) {
}
/// @notice A requirement to have at least one block pass before staking, unstaking or harvesting.
/// @param tokenId The tokenId being staked or unstaked.
modifier requireTimeElapsed(uint256 tokenId) {
}
/// @notice Create the ERC721 staking contract.
/// @dev Push needed to avoid index 0 causing bug of index-1.
constructor() {
}
/// @notice Accepts a tokenId to perform emergency unstaking.
/// @param tokenId The tokenId to be emergency unstaked.
function emergencyUnstake(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform staking.
/// @param tokenId The tokenId to be staked.
function stakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform unstaking.
/// @param tokenId The tokenId to be unstaked.
function unstakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @dev Required implementation to support safeTransfers from ERC721 asset contracts.
function onERC721Received (
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external pure override returns (bytes4) {
}
/// @notice Harvesting the ERC20 rewards earned by a staked ERC721 token.
/// @param tokenId The tokenId of the staked token for which rewards are withdrawn.
function harvest(uint256 tokenId)
public
nonReentrant
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
{
}
/// @notice Sets the ERC721 contract this staking contract is for.
/// @param _miningToken The ERC721 contract address to have its tokenIds staked.
function setMiningToken(IERC721 _miningToken) public onlyOwner {
}
/// @notice Set the mining token address for the instance of the ERC721 contract used.
/// @param _miningTokenAddress The vvrrbb mining rig token address.
function setMiningTokenAddress(address _miningTokenAddress) public onlyOwner {
}
/// @notice Sets the ERC20 token used as staking rewards.
/// @param _vvddrrToken The ERC20 token contract that will provide reward tokens.
function setVvddrrToken(IERC20 _vvddrrToken) public onlyOwner {
}
/// @notice Set the reward token address for the instance of the ERC20 contract used.
/// @param _vvddrrTokenAddress The vvddrr token address.
function setVvddrrTokenAddress(address _vvddrrTokenAddress) public onlyOwner {
}
/// @notice Determine the amount of rewards earned by a staked token.
/// @param tokenId The tokenId of the staked token.
/// @return The value in Wei of the rewards currently earned by the tokenId.
function getCurrentStakeEarned(uint256 tokenId) public view returns (uint256) {
}
/// @notice Retrive the vvrrbb mining percentage for a given tokenId.
/// @param tokenId The tokenId for which a mining percentage is to be retreived.
/// @return A tokenId's mining percentage returned in percentage basis points.
function getMiningPercentage(uint256 tokenId) public view returns (uint256) {
}
/// @notice Receive a summary of current stakes by a given address.
/// @param _user The address to receive a summary for.
/// @return A staking summary for a given address.
function getStakingSummary(address _user) public view returns (StakingSummary memory) {
}
/// @notice Adds a staker to the stakeholders array.
/// @param staker An address that is staking an ERC721 token.
/// @return The index of the address within the array of stakeholders.
function _addStakeholder(address staker) internal returns (uint256) {
}
/// @notice Emergency unstakes the given ERC721 tokenId and does not claim ERC20 rewards.
/// @param tokenId The tokenId to be emergency unstaked.
/// @return A boolean indicating whether the emergency unstaking was completed.
function _emergencyUnstake(uint256 tokenId)
internal
onlyStaker(tokenId)
returns (bool)
{
}
/// @notice Calculates and transfers earned rewards for a given tokenId.
/// @param tokenId The tokenId for which rewards are to be calculated and paid out.
function _payoutStake(uint256 tokenId) internal {
// Double check that the receipt exists and that staking is beginning from block 0.
require(<FILL_ME>)
// Remove the transaction block of withdrawal from time staked.
uint256 timeStaked = _getTimeStaked(tokenId).sub(1); // don't pay for the tx block of withdrawl
uint256 percentage = getMiningPercentage(tokenId);
uint256 payout = timeStaked.mul(tokensPerBlock);
uint256 percentagePayout = Math.mulDiv(payout, percentage, BASIS);
uint256 burnAmount = randomBurn(tokenId);
uint256 totalRequired = percentagePayout + burnAmount;
Token vvddrr = Token(vvddrrTokenAddress);
uint256 total = vvddrr.getCurrentCreated() + totalRequired;
uint256 maximum = vvddrr.getMaximumCreated();
// If the staking contract does not have any ERC20 rewards left, return the ERC721 token without payment.
// This prevents any type of ERC721 locking.
if (total > maximum) {
emit StakePayout(msg.sender, tokenId, 0, receipt[tokenId].stakedFromBlock, block.number);
return;
}
// Payout the earned rewards.
vvddrr.mintController(receipt[tokenId].user, percentagePayout);
burnCapitalization[tokenId] = percentagePayout;
vvddrr.mintController(receipt[tokenId].user, burnAmount);
vvddrr.burnController(receipt[tokenId].user, burnAmount);
emit StakePayout(msg.sender, tokenId, payout, receipt[tokenId].stakedFromBlock, block.number);
}
/// @notice Stakes the given ERC721 tokenId to provide ERC20 rewards.
/// @param tokenId The tokenId to be staked.
/// @return A boolean indicating whether the staking was completed.
function _stakeMiningToken(uint256 tokenId) internal returns (bool) {
}
/// @notice Unstakes the given ERC721 tokenId and claims ERC20 rewards.
/// @param tokenId The tokenId to be unstaked.
/// @return A boolean indicating whether the unstaking was completed.
function _unstakeMiningToken(uint256 tokenId)
internal
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
returns (bool)
{
}
/// @notice Determine the number of blocks for which a given tokenId has been staked.
/// @param tokenId The staked tokenId.
/// @return The integer value indicating the difference the current block and the initial staking block.
function _getTimeStaked(uint256 tokenId) internal view returns (uint256) {
}
/// @notice Returns an integer value as a string.
/// @param value The integer value to have a type change.
/// @return A string of the inputted integer value.
function toString(uint256 value) internal pure returns (string memory) {
}
/// @notice Create a random burn amount between 0 and the tokenId's current burn capitalization.
/// @param tokenId The tokenId for which to calculate a random burn.
/// @return A random value expressed in Wei.
function randomBurn(uint256 tokenId) private view returns (uint256) {
}
/// @notice A general random function to be used to shuffle and generate values.
/// @param input Any string value to be randomized.
/// @return The output of a random hash using keccak256.
function random(string memory input) private pure returns (uint256) {
}
}
| receipt[tokenId].stakedFromBlock>0,"_payoutStake: No staking from block 0" | 125,340 | receipt[tokenId].stakedFromBlock>0 |
"Stake: Token is already staked" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./Variable.sol";
import "./Token.sol";
/// @title vvrrbb staking functionality to earn vvddrr.
/// @author Osman Ali.
/// @notice Use this contract to stake your ERC721 vvrrbb mining rig token and earn vvddrr.
contract VariableStaking is IERC721Receiver, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Math for uint256;
/// @notice The contract address of the ERC721 mining token.
address public miningTokenAddress;
/// @notice The contract address of the vvddrr ERC20 token.
address public vvddrrTokenAddress;
/// @notice A boolean used to allow only one setting of the mining token.
bool miningTokenSet;
/// @notice A boolean value used to allow only one setting of the mining token address.
bool miningTokenAddressSet;
/// @notice A boolean used to allow only one setting of the vvddrr token.
bool vvddrrTokenSet;
/// @notice A boolean value used to allow only one setting of the vvddrr token address.
bool vvddrrTokenAddressSet;
/// @notice Interface contract reference for the ERC721 token that is being staked.
/// @dev This is given a generalized name and can be any ERC721 collection.
IERC721 public miningToken;
/// @notice Interface contract reference for the ERC20 token that is being used a staking reward.
/// @dev This can be any ERC20 token but will be vvddrr in this case.
IERC20 public vvddrrToken;
/// @notice The amount of ERC20 tokens received as a reward for every block an ERC721 token is staked.
/// @dev Expressed in Wei.
// Reference: https://ethereum.org/en/developers/docs/blocks/
// Reference for merge: https://blog.ethereum.org/2021/11/29/how-the-merge-impacts-app-layer/
uint256 public tokensPerBlock = 3805175038100;
/// @notice A general constant for use in percentage basis point conversion and calculation.
uint256 public constant BASIS = 10_000;
/// @notice The tokensPerBlock value used a constant for initial burn capitalization.
/// @dev Required so that an empty value is not used for a user's initial burn.
uint256 public constant INITIAL_BURN_CAPITALIZATION = 3805175038100;
/// @notice A Stake struct represents how a staked token is stored.
struct Stake {
address user;
uint256 tokenId;
uint256 stakedFromBlock;
}
/// @notice A Stakeholder struct stores an address and its active Stakes.
struct Stakeholder {
address user;
Stake[] addressStakes;
}
/// @notice A StakingSummary struct stores an array of Stake structs.
struct StakingSummary {
Stake[] stakes;
}
/// @notice An address is used as a key to the array of Stakes.
mapping(address => Stake[]) private addressStakes;
/// @notice An tokenId is mapped to a burn capitalization value expressed in Wei.
mapping(uint256 => uint256) public burnCapitalization;
/// @notice An integer is used as key to the value of a Stake in order to provide a receipt.
mapping(uint256 => Stake) public receipt;
/// @notice An address is used as a key to an index value in the stakes that occur.
mapping(address => uint256) private stakes;
/// @notice All current stakeholders.
Stakeholder[] private stakeholders;
/// @notice Emitted when a token is unstaked in an emergency.
event EmergencyUnstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Emitted when a token is staked.
event Staked(address indexed user, uint256 indexed tokenId, uint256 staredFromBlock, uint256 index);
/// @notice Emitted when a reward is paid out to an address.
event StakePayout(address indexed staker, uint256 tokenId, uint256 stakeAmount, uint256 fromBlock, uint256 toBlock);
/// @notice Emitted when a token is unstaked.
event Unstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Requirements related to token ownership.
/// @param tokenId The current tokenId being staked.
modifier onlyStaker(uint256 tokenId) {
}
/// @notice A requirement to have at least one block pass before staking, unstaking or harvesting.
/// @param tokenId The tokenId being staked or unstaked.
modifier requireTimeElapsed(uint256 tokenId) {
}
/// @notice Create the ERC721 staking contract.
/// @dev Push needed to avoid index 0 causing bug of index-1.
constructor() {
}
/// @notice Accepts a tokenId to perform emergency unstaking.
/// @param tokenId The tokenId to be emergency unstaked.
function emergencyUnstake(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform staking.
/// @param tokenId The tokenId to be staked.
function stakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform unstaking.
/// @param tokenId The tokenId to be unstaked.
function unstakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @dev Required implementation to support safeTransfers from ERC721 asset contracts.
function onERC721Received (
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external pure override returns (bytes4) {
}
/// @notice Harvesting the ERC20 rewards earned by a staked ERC721 token.
/// @param tokenId The tokenId of the staked token for which rewards are withdrawn.
function harvest(uint256 tokenId)
public
nonReentrant
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
{
}
/// @notice Sets the ERC721 contract this staking contract is for.
/// @param _miningToken The ERC721 contract address to have its tokenIds staked.
function setMiningToken(IERC721 _miningToken) public onlyOwner {
}
/// @notice Set the mining token address for the instance of the ERC721 contract used.
/// @param _miningTokenAddress The vvrrbb mining rig token address.
function setMiningTokenAddress(address _miningTokenAddress) public onlyOwner {
}
/// @notice Sets the ERC20 token used as staking rewards.
/// @param _vvddrrToken The ERC20 token contract that will provide reward tokens.
function setVvddrrToken(IERC20 _vvddrrToken) public onlyOwner {
}
/// @notice Set the reward token address for the instance of the ERC20 contract used.
/// @param _vvddrrTokenAddress The vvddrr token address.
function setVvddrrTokenAddress(address _vvddrrTokenAddress) public onlyOwner {
}
/// @notice Determine the amount of rewards earned by a staked token.
/// @param tokenId The tokenId of the staked token.
/// @return The value in Wei of the rewards currently earned by the tokenId.
function getCurrentStakeEarned(uint256 tokenId) public view returns (uint256) {
}
/// @notice Retrive the vvrrbb mining percentage for a given tokenId.
/// @param tokenId The tokenId for which a mining percentage is to be retreived.
/// @return A tokenId's mining percentage returned in percentage basis points.
function getMiningPercentage(uint256 tokenId) public view returns (uint256) {
}
/// @notice Receive a summary of current stakes by a given address.
/// @param _user The address to receive a summary for.
/// @return A staking summary for a given address.
function getStakingSummary(address _user) public view returns (StakingSummary memory) {
}
/// @notice Adds a staker to the stakeholders array.
/// @param staker An address that is staking an ERC721 token.
/// @return The index of the address within the array of stakeholders.
function _addStakeholder(address staker) internal returns (uint256) {
}
/// @notice Emergency unstakes the given ERC721 tokenId and does not claim ERC20 rewards.
/// @param tokenId The tokenId to be emergency unstaked.
/// @return A boolean indicating whether the emergency unstaking was completed.
function _emergencyUnstake(uint256 tokenId)
internal
onlyStaker(tokenId)
returns (bool)
{
}
/// @notice Calculates and transfers earned rewards for a given tokenId.
/// @param tokenId The tokenId for which rewards are to be calculated and paid out.
function _payoutStake(uint256 tokenId) internal {
}
/// @notice Stakes the given ERC721 tokenId to provide ERC20 rewards.
/// @param tokenId The tokenId to be staked.
/// @return A boolean indicating whether the staking was completed.
function _stakeMiningToken(uint256 tokenId) internal returns (bool) {
// Check for sending address of the tokenId in the current stakes.
uint256 index = stakes[msg.sender];
// Fulfil condition based on whether staker already has a staked index or not.
if (index == 0) {
// The stakeholder is taking for the first time and needs to mapped into the index of stakers.
// The index returned will be the index of the stakeholder in the stakeholders array.
index = _addStakeholder(msg.sender);
}
// set the initial burn capitalization here
if (burnCapitalization[tokenId] == 0) {
burnCapitalization[tokenId] = INITIAL_BURN_CAPITALIZATION;
}
// Use the index value of the staker to add a new stake.
stakeholders[index].addressStakes.push(Stake(msg.sender, tokenId, block.number));
// Require that the tokenId is not already staked.
require(<FILL_ME>)
// Required that the tokenId is not already owned by this contract as a result of staking.
require(miningToken.ownerOf(tokenId) != address(this), "Stake: Token is already staked in this contract");
// Transer the ERC721 token to this contract for staking.
miningToken.transferFrom(_msgSender(), address(this), tokenId);
// Check that this contract is the owner.
require(miningToken.ownerOf(tokenId) == address(this), "Stake: Failed to take possession of token");
// Start the staking from this block.
receipt[tokenId].user = msg.sender;
receipt[tokenId].tokenId = tokenId;
receipt[tokenId].stakedFromBlock = block.number;
emit Staked(msg.sender, tokenId, block.number, index);
return true;
}
/// @notice Unstakes the given ERC721 tokenId and claims ERC20 rewards.
/// @param tokenId The tokenId to be unstaked.
/// @return A boolean indicating whether the unstaking was completed.
function _unstakeMiningToken(uint256 tokenId)
internal
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
returns (bool)
{
}
/// @notice Determine the number of blocks for which a given tokenId has been staked.
/// @param tokenId The staked tokenId.
/// @return The integer value indicating the difference the current block and the initial staking block.
function _getTimeStaked(uint256 tokenId) internal view returns (uint256) {
}
/// @notice Returns an integer value as a string.
/// @param value The integer value to have a type change.
/// @return A string of the inputted integer value.
function toString(uint256 value) internal pure returns (string memory) {
}
/// @notice Create a random burn amount between 0 and the tokenId's current burn capitalization.
/// @param tokenId The tokenId for which to calculate a random burn.
/// @return A random value expressed in Wei.
function randomBurn(uint256 tokenId) private view returns (uint256) {
}
/// @notice A general random function to be used to shuffle and generate values.
/// @param input Any string value to be randomized.
/// @return The output of a random hash using keccak256.
function random(string memory input) private pure returns (uint256) {
}
}
| receipt[tokenId].stakedFromBlock==0,"Stake: Token is already staked" | 125,340 | receipt[tokenId].stakedFromBlock==0 |
"Stake: Token is already staked in this contract" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "./Variable.sol";
import "./Token.sol";
/// @title vvrrbb staking functionality to earn vvddrr.
/// @author Osman Ali.
/// @notice Use this contract to stake your ERC721 vvrrbb mining rig token and earn vvddrr.
contract VariableStaking is IERC721Receiver, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Math for uint256;
/// @notice The contract address of the ERC721 mining token.
address public miningTokenAddress;
/// @notice The contract address of the vvddrr ERC20 token.
address public vvddrrTokenAddress;
/// @notice A boolean used to allow only one setting of the mining token.
bool miningTokenSet;
/// @notice A boolean value used to allow only one setting of the mining token address.
bool miningTokenAddressSet;
/// @notice A boolean used to allow only one setting of the vvddrr token.
bool vvddrrTokenSet;
/// @notice A boolean value used to allow only one setting of the vvddrr token address.
bool vvddrrTokenAddressSet;
/// @notice Interface contract reference for the ERC721 token that is being staked.
/// @dev This is given a generalized name and can be any ERC721 collection.
IERC721 public miningToken;
/// @notice Interface contract reference for the ERC20 token that is being used a staking reward.
/// @dev This can be any ERC20 token but will be vvddrr in this case.
IERC20 public vvddrrToken;
/// @notice The amount of ERC20 tokens received as a reward for every block an ERC721 token is staked.
/// @dev Expressed in Wei.
// Reference: https://ethereum.org/en/developers/docs/blocks/
// Reference for merge: https://blog.ethereum.org/2021/11/29/how-the-merge-impacts-app-layer/
uint256 public tokensPerBlock = 3805175038100;
/// @notice A general constant for use in percentage basis point conversion and calculation.
uint256 public constant BASIS = 10_000;
/// @notice The tokensPerBlock value used a constant for initial burn capitalization.
/// @dev Required so that an empty value is not used for a user's initial burn.
uint256 public constant INITIAL_BURN_CAPITALIZATION = 3805175038100;
/// @notice A Stake struct represents how a staked token is stored.
struct Stake {
address user;
uint256 tokenId;
uint256 stakedFromBlock;
}
/// @notice A Stakeholder struct stores an address and its active Stakes.
struct Stakeholder {
address user;
Stake[] addressStakes;
}
/// @notice A StakingSummary struct stores an array of Stake structs.
struct StakingSummary {
Stake[] stakes;
}
/// @notice An address is used as a key to the array of Stakes.
mapping(address => Stake[]) private addressStakes;
/// @notice An tokenId is mapped to a burn capitalization value expressed in Wei.
mapping(uint256 => uint256) public burnCapitalization;
/// @notice An integer is used as key to the value of a Stake in order to provide a receipt.
mapping(uint256 => Stake) public receipt;
/// @notice An address is used as a key to an index value in the stakes that occur.
mapping(address => uint256) private stakes;
/// @notice All current stakeholders.
Stakeholder[] private stakeholders;
/// @notice Emitted when a token is unstaked in an emergency.
event EmergencyUnstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Emitted when a token is staked.
event Staked(address indexed user, uint256 indexed tokenId, uint256 staredFromBlock, uint256 index);
/// @notice Emitted when a reward is paid out to an address.
event StakePayout(address indexed staker, uint256 tokenId, uint256 stakeAmount, uint256 fromBlock, uint256 toBlock);
/// @notice Emitted when a token is unstaked.
event Unstaked(address indexed user, uint256 indexed tokenId, uint256 blockNumber);
/// @notice Requirements related to token ownership.
/// @param tokenId The current tokenId being staked.
modifier onlyStaker(uint256 tokenId) {
}
/// @notice A requirement to have at least one block pass before staking, unstaking or harvesting.
/// @param tokenId The tokenId being staked or unstaked.
modifier requireTimeElapsed(uint256 tokenId) {
}
/// @notice Create the ERC721 staking contract.
/// @dev Push needed to avoid index 0 causing bug of index-1.
constructor() {
}
/// @notice Accepts a tokenId to perform emergency unstaking.
/// @param tokenId The tokenId to be emergency unstaked.
function emergencyUnstake(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform staking.
/// @param tokenId The tokenId to be staked.
function stakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @notice Accepts a tokenId to perform unstaking.
/// @param tokenId The tokenId to be unstaked.
function unstakeMiningToken(uint256 tokenId) external nonReentrant {
}
/// @dev Required implementation to support safeTransfers from ERC721 asset contracts.
function onERC721Received (
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external pure override returns (bytes4) {
}
/// @notice Harvesting the ERC20 rewards earned by a staked ERC721 token.
/// @param tokenId The tokenId of the staked token for which rewards are withdrawn.
function harvest(uint256 tokenId)
public
nonReentrant
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
{
}
/// @notice Sets the ERC721 contract this staking contract is for.
/// @param _miningToken The ERC721 contract address to have its tokenIds staked.
function setMiningToken(IERC721 _miningToken) public onlyOwner {
}
/// @notice Set the mining token address for the instance of the ERC721 contract used.
/// @param _miningTokenAddress The vvrrbb mining rig token address.
function setMiningTokenAddress(address _miningTokenAddress) public onlyOwner {
}
/// @notice Sets the ERC20 token used as staking rewards.
/// @param _vvddrrToken The ERC20 token contract that will provide reward tokens.
function setVvddrrToken(IERC20 _vvddrrToken) public onlyOwner {
}
/// @notice Set the reward token address for the instance of the ERC20 contract used.
/// @param _vvddrrTokenAddress The vvddrr token address.
function setVvddrrTokenAddress(address _vvddrrTokenAddress) public onlyOwner {
}
/// @notice Determine the amount of rewards earned by a staked token.
/// @param tokenId The tokenId of the staked token.
/// @return The value in Wei of the rewards currently earned by the tokenId.
function getCurrentStakeEarned(uint256 tokenId) public view returns (uint256) {
}
/// @notice Retrive the vvrrbb mining percentage for a given tokenId.
/// @param tokenId The tokenId for which a mining percentage is to be retreived.
/// @return A tokenId's mining percentage returned in percentage basis points.
function getMiningPercentage(uint256 tokenId) public view returns (uint256) {
}
/// @notice Receive a summary of current stakes by a given address.
/// @param _user The address to receive a summary for.
/// @return A staking summary for a given address.
function getStakingSummary(address _user) public view returns (StakingSummary memory) {
}
/// @notice Adds a staker to the stakeholders array.
/// @param staker An address that is staking an ERC721 token.
/// @return The index of the address within the array of stakeholders.
function _addStakeholder(address staker) internal returns (uint256) {
}
/// @notice Emergency unstakes the given ERC721 tokenId and does not claim ERC20 rewards.
/// @param tokenId The tokenId to be emergency unstaked.
/// @return A boolean indicating whether the emergency unstaking was completed.
function _emergencyUnstake(uint256 tokenId)
internal
onlyStaker(tokenId)
returns (bool)
{
}
/// @notice Calculates and transfers earned rewards for a given tokenId.
/// @param tokenId The tokenId for which rewards are to be calculated and paid out.
function _payoutStake(uint256 tokenId) internal {
}
/// @notice Stakes the given ERC721 tokenId to provide ERC20 rewards.
/// @param tokenId The tokenId to be staked.
/// @return A boolean indicating whether the staking was completed.
function _stakeMiningToken(uint256 tokenId) internal returns (bool) {
// Check for sending address of the tokenId in the current stakes.
uint256 index = stakes[msg.sender];
// Fulfil condition based on whether staker already has a staked index or not.
if (index == 0) {
// The stakeholder is taking for the first time and needs to mapped into the index of stakers.
// The index returned will be the index of the stakeholder in the stakeholders array.
index = _addStakeholder(msg.sender);
}
// set the initial burn capitalization here
if (burnCapitalization[tokenId] == 0) {
burnCapitalization[tokenId] = INITIAL_BURN_CAPITALIZATION;
}
// Use the index value of the staker to add a new stake.
stakeholders[index].addressStakes.push(Stake(msg.sender, tokenId, block.number));
// Require that the tokenId is not already staked.
require(receipt[tokenId].stakedFromBlock == 0, "Stake: Token is already staked");
// Required that the tokenId is not already owned by this contract as a result of staking.
require(<FILL_ME>)
// Transer the ERC721 token to this contract for staking.
miningToken.transferFrom(_msgSender(), address(this), tokenId);
// Check that this contract is the owner.
require(miningToken.ownerOf(tokenId) == address(this), "Stake: Failed to take possession of token");
// Start the staking from this block.
receipt[tokenId].user = msg.sender;
receipt[tokenId].tokenId = tokenId;
receipt[tokenId].stakedFromBlock = block.number;
emit Staked(msg.sender, tokenId, block.number, index);
return true;
}
/// @notice Unstakes the given ERC721 tokenId and claims ERC20 rewards.
/// @param tokenId The tokenId to be unstaked.
/// @return A boolean indicating whether the unstaking was completed.
function _unstakeMiningToken(uint256 tokenId)
internal
onlyStaker(tokenId)
requireTimeElapsed(tokenId)
returns (bool)
{
}
/// @notice Determine the number of blocks for which a given tokenId has been staked.
/// @param tokenId The staked tokenId.
/// @return The integer value indicating the difference the current block and the initial staking block.
function _getTimeStaked(uint256 tokenId) internal view returns (uint256) {
}
/// @notice Returns an integer value as a string.
/// @param value The integer value to have a type change.
/// @return A string of the inputted integer value.
function toString(uint256 value) internal pure returns (string memory) {
}
/// @notice Create a random burn amount between 0 and the tokenId's current burn capitalization.
/// @param tokenId The tokenId for which to calculate a random burn.
/// @return A random value expressed in Wei.
function randomBurn(uint256 tokenId) private view returns (uint256) {
}
/// @notice A general random function to be used to shuffle and generate values.
/// @param input Any string value to be randomized.
/// @return The output of a random hash using keccak256.
function random(string memory input) private pure returns (uint256) {
}
}
| miningToken.ownerOf(tokenId)!=address(this),"Stake: Token is already staked in this contract" | 125,340 | miningToken.ownerOf(tokenId)!=address(this) |
"FUNCTION_RESTRICTION" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./PCT.sol";
import "./utils/SafeMath.sol";
import "./interfaces/ISPCT.sol";
import "./interfaces/ISPCTPriceOracle.sol";
/**
* @title Interest-bearing ERC20-like token for Anzen protocol.
*/
contract PCTPool is PCT, AccessControl, Pausable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
bytes32 public constant POOL_MANAGER_ROLE = keccak256("POOL_MANAGER_ROLE");
// Restricting call deposit and redeem in the same block.
mapping(address => uint256) private _status;
// Interest mode
bool public mode = false;
// Used to calculate total executed shares.
uint256 public executedShares;
// Used to calculate total pooled SPCT.
uint256 public totalPooledSPCT;
// Used to calculate collateral rate.
uint256 public collateralRate = 1;
// Fee Zone
uint256 public constant FEE_COEFFICIENT = 1e8;
// Fee should be less than 1%.
uint256 public constant maxMintFeeRate = FEE_COEFFICIENT / 100;
uint256 public constant maxRedeemFeeRate = FEE_COEFFICIENT / 100;
uint256 public mintFeeRate;
uint256 public redeemFeeRate;
// Protocol treasury should be a mulsig wallet.
address public treasury;
// Lend token
IERC20 public usdc;
// Collateral token
ISPCT public spct;
// Price oracle
ISPCTPriceOracle public oracle;
event ModeSwitch(bool mode, uint256 timestamp);
event Deposit(address indexed user, uint256 amount, uint256 timestamp);
event Redeem(address indexed user, uint256 amount, uint256 timestamp);
event Mint(address indexed user, uint256 amount, uint256 timestamp);
event Burn(address indexed user, uint256 amount, uint256 timestamp);
event mintFeeRateChanged(uint256 newFeeRate, uint256 timestamp);
event redeemFeeRateChanged(uint256 newFeeRate, uint256 timestamp);
event treasuryChanged(address newTreasury, uint256 timestamp);
event oracleChanged(address newOracle, uint256 timestamp);
constructor(address admin, IERC20 _usdc, ISPCT _spct, ISPCTPriceOracle _oracle)
ERC20("Private Credit Token", "PCT")
{
}
modifier checkCollateralRate() {
}
modifier checkRebasing() {
}
/**
* @notice Check collateral rate.
*/
function _checkCollateralRate() internal {
}
/**
* @notice Check rebasing.
*/
function _checkRebasing() internal {
}
/**
* @notice Pause the contract. Revert if already paused.
*/
function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @notice Unpause the contract. Revert if already unpaused.
*/
function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @notice Switch to interest mode.
* Emits a `ModeSwitch` event.
*/
function switchMode() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @notice deposit USDC. (borrow USDC from user and deposit collateral)
* Emits a `Deposit` event.
*
* @param _amount the amount of USDC
*/
function deposit(uint256 _amount) external whenNotPaused checkCollateralRate checkRebasing {
require(mode == false, "PLEASE_MIGRATE_TO_NEW_VERSION");
require(_amount > 0, "DEPOSIT_AMOUNT_IS_ZERO");
require(<FILL_ME>)
usdc.transferFrom(msg.sender, address(this), _amount);
usdc.approve(address(spct), _amount); // approve for depositing collateral
// Due to different precisions, convert it to PCT.
uint256 convertToSPCT = _amount.mul(1e12);
// Get mint rate from spct for calculating.
uint256 spctMintFeeRate = spct.mintFeeRate();
// calculate fee with PCT
if (mintFeeRate == 0) {
if (spctMintFeeRate == 0) {
_mintPCT(msg.sender, convertToSPCT);
spct.deposit(_amount);
} else {
uint256 spctFeeAmount = convertToSPCT.mul(spctMintFeeRate).div(FEE_COEFFICIENT);
uint256 spctAmountAfterFee = convertToSPCT.sub(spctFeeAmount);
_mintPCT(msg.sender, spctAmountAfterFee);
spct.deposit(_amount);
}
} else {
if (spctMintFeeRate == 0) {
uint256 feeAmount = convertToSPCT.mul(mintFeeRate).div(FEE_COEFFICIENT);
uint256 amountAfterFee = convertToSPCT.sub(feeAmount);
_mintPCT(msg.sender, amountAfterFee);
if (feeAmount != 0) {
_mintPCT(treasury, feeAmount);
}
spct.deposit(_amount);
} else {
uint256 spctFeeAmount = convertToSPCT.mul(spctMintFeeRate).div(FEE_COEFFICIENT);
uint256 spctAmountAfterFee = convertToSPCT.sub(spctFeeAmount);
uint256 feeAmount = spctAmountAfterFee.mul(mintFeeRate).div(FEE_COEFFICIENT);
uint256 amountAfterFee = spctAmountAfterFee.sub(feeAmount);
_mintPCT(msg.sender, amountAfterFee);
if (feeAmount != 0) {
_mintPCT(treasury, feeAmount);
}
spct.deposit(_amount);
}
}
_status[tx.origin] = block.number;
emit Deposit(msg.sender, _amount, block.timestamp);
}
/**
* @notice redeem PCT. (get back USDC from borrower and release collateral)
* 6 decimal input
* Emits a `Redeem` event.
*
* @param _amount the amount of PCT.
*/
function redeem(uint256 _amount) external whenNotPaused checkCollateralRate checkRebasing {
}
/**
* @notice total pooled SPCT.
*/
function _getTotalPooledSPCT() internal view override returns (uint256) {
}
/**
* @dev mint PCT for _receiver.
* Emits `Mint` and `Transfer` event.
*
* @param _receiver address to receive SPCT.
* @param _amount the amount of SPCT.
*/
function _mintPCT(address _receiver, uint256 _amount) internal {
}
/**
* @dev burn PCT from _receiver.
* Emits `Burn` and `Transfer` event.
*
* @param _account address to burn PCT from.
* @param _amount the amount of PCT.
*/
function _burnPCT(address _account, uint256 _amount) internal {
}
/**
* @notice Mint fee.
*
* @param newMintFeeRate new mint fee rate.
*/
function setMintFeeRate(uint256 newMintFeeRate) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @notice Redeem fee.
*
* @param newRedeemFeeRate new redeem fee rate.
*/
function setRedeemFeeRate(uint256 newRedeemFeeRate) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @notice Treasury address.
*
* @param newTreasury new treasury address.
*/
function setTreasury(address newTreasury) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @notice Oracle address.
*
* @param newOracle new Oracle address.
*/
function setOracle(address newOracle) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @notice Rescue ERC20 tokens locked up in this contract.
* @param token ERC20 token contract address.
* @param to recipient address.
* @param amount amount to withdraw.
*/
function rescueERC20(IERC20 token, address to, uint256 amount) external onlyRole(POOL_MANAGER_ROLE) {
}
}
| _status[tx.origin]!=block.number,"FUNCTION_RESTRICTION" | 125,343 | _status[tx.origin]!=block.number |
"RESERVE_INSUFFICIENT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./PCT.sol";
import "./utils/SafeMath.sol";
import "./interfaces/ISPCT.sol";
import "./interfaces/ISPCTPriceOracle.sol";
/**
* @title Interest-bearing ERC20-like token for Anzen protocol.
*/
contract PCTPool is PCT, AccessControl, Pausable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
bytes32 public constant POOL_MANAGER_ROLE = keccak256("POOL_MANAGER_ROLE");
// Restricting call deposit and redeem in the same block.
mapping(address => uint256) private _status;
// Interest mode
bool public mode = false;
// Used to calculate total executed shares.
uint256 public executedShares;
// Used to calculate total pooled SPCT.
uint256 public totalPooledSPCT;
// Used to calculate collateral rate.
uint256 public collateralRate = 1;
// Fee Zone
uint256 public constant FEE_COEFFICIENT = 1e8;
// Fee should be less than 1%.
uint256 public constant maxMintFeeRate = FEE_COEFFICIENT / 100;
uint256 public constant maxRedeemFeeRate = FEE_COEFFICIENT / 100;
uint256 public mintFeeRate;
uint256 public redeemFeeRate;
// Protocol treasury should be a mulsig wallet.
address public treasury;
// Lend token
IERC20 public usdc;
// Collateral token
ISPCT public spct;
// Price oracle
ISPCTPriceOracle public oracle;
event ModeSwitch(bool mode, uint256 timestamp);
event Deposit(address indexed user, uint256 amount, uint256 timestamp);
event Redeem(address indexed user, uint256 amount, uint256 timestamp);
event Mint(address indexed user, uint256 amount, uint256 timestamp);
event Burn(address indexed user, uint256 amount, uint256 timestamp);
event mintFeeRateChanged(uint256 newFeeRate, uint256 timestamp);
event redeemFeeRateChanged(uint256 newFeeRate, uint256 timestamp);
event treasuryChanged(address newTreasury, uint256 timestamp);
event oracleChanged(address newOracle, uint256 timestamp);
constructor(address admin, IERC20 _usdc, ISPCT _spct, ISPCTPriceOracle _oracle)
ERC20("Private Credit Token", "PCT")
{
}
modifier checkCollateralRate() {
}
modifier checkRebasing() {
}
/**
* @notice Check collateral rate.
*/
function _checkCollateralRate() internal {
}
/**
* @notice Check rebasing.
*/
function _checkRebasing() internal {
}
/**
* @notice Pause the contract. Revert if already paused.
*/
function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @notice Unpause the contract. Revert if already unpaused.
*/
function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @notice Switch to interest mode.
* Emits a `ModeSwitch` event.
*/
function switchMode() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @notice deposit USDC. (borrow USDC from user and deposit collateral)
* Emits a `Deposit` event.
*
* @param _amount the amount of USDC
*/
function deposit(uint256 _amount) external whenNotPaused checkCollateralRate checkRebasing {
}
/**
* @notice redeem PCT. (get back USDC from borrower and release collateral)
* 6 decimal input
* Emits a `Redeem` event.
*
* @param _amount the amount of PCT.
*/
function redeem(uint256 _amount) external whenNotPaused checkCollateralRate checkRebasing {
require(<FILL_ME>)
require(_amount > 0, "REDEEM_AMOUNT_IS_ZERO");
require(_status[tx.origin] != block.number, "FUNCTION_RESTRICTION");
// Due to different precisions, convert it to PCT.
uint256 convertToUSDC;
// Get redeem rate from spct for calculating.
uint256 spctRedeemFeeRate = spct.redeemFeeRate();
// calculate fee with PCT
if (redeemFeeRate == 0) {
if (spctRedeemFeeRate == 0) {
_burnPCT(msg.sender, _amount);
spct.redeem(_amount);
convertToUSDC = _amount.div(1e12);
usdc.transfer(msg.sender, convertToUSDC);
} else {
uint256 spctFeeAmount = _amount.mul(spctRedeemFeeRate).div(FEE_COEFFICIENT);
uint256 spctAmountAfterFee = _amount.sub(spctFeeAmount);
_burnPCT(msg.sender, _amount);
spct.redeem(_amount);
convertToUSDC = spctAmountAfterFee.div(1e12);
usdc.transfer(msg.sender, convertToUSDC);
}
} else {
if (spctRedeemFeeRate == 0) {
uint256 feeAmount = _amount.mul(redeemFeeRate).div(FEE_COEFFICIENT);
uint256 amountAfterFee = _amount.sub(feeAmount);
_burnPCT(msg.sender, amountAfterFee);
if (feeAmount != 0) {
_transfer(msg.sender, treasury, feeAmount);
}
spct.redeem(amountAfterFee);
convertToUSDC = amountAfterFee.div(1e12);
usdc.transfer(msg.sender, convertToUSDC);
} else {
uint256 feeAmount = _amount.mul(redeemFeeRate).div(FEE_COEFFICIENT);
uint256 amountAfterFee = _amount.sub(feeAmount);
uint256 spctFeeAmount = amountAfterFee.mul(spctRedeemFeeRate).div(FEE_COEFFICIENT);
uint256 spctAmountAfterFee = amountAfterFee.sub(spctFeeAmount);
_burnPCT(msg.sender, amountAfterFee);
if (feeAmount != 0) {
_transfer(msg.sender, treasury, feeAmount);
}
spct.redeem(amountAfterFee);
convertToUSDC = spctAmountAfterFee.div(1e12);
usdc.transfer(msg.sender, convertToUSDC);
}
}
_status[tx.origin] = block.number;
emit Redeem(msg.sender, _amount, block.timestamp);
}
/**
* @notice total pooled SPCT.
*/
function _getTotalPooledSPCT() internal view override returns (uint256) {
}
/**
* @dev mint PCT for _receiver.
* Emits `Mint` and `Transfer` event.
*
* @param _receiver address to receive SPCT.
* @param _amount the amount of SPCT.
*/
function _mintPCT(address _receiver, uint256 _amount) internal {
}
/**
* @dev burn PCT from _receiver.
* Emits `Burn` and `Transfer` event.
*
* @param _account address to burn PCT from.
* @param _amount the amount of PCT.
*/
function _burnPCT(address _account, uint256 _amount) internal {
}
/**
* @notice Mint fee.
*
* @param newMintFeeRate new mint fee rate.
*/
function setMintFeeRate(uint256 newMintFeeRate) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @notice Redeem fee.
*
* @param newRedeemFeeRate new redeem fee rate.
*/
function setRedeemFeeRate(uint256 newRedeemFeeRate) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @notice Treasury address.
*
* @param newTreasury new treasury address.
*/
function setTreasury(address newTreasury) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @notice Oracle address.
*
* @param newOracle new Oracle address.
*/
function setOracle(address newOracle) external onlyRole(POOL_MANAGER_ROLE) {
}
/**
* @notice Rescue ERC20 tokens locked up in this contract.
* @param token ERC20 token contract address.
* @param to recipient address.
* @param amount amount to withdraw.
*/
function rescueERC20(IERC20 token, address to, uint256 amount) external onlyRole(POOL_MANAGER_ROLE) {
}
}
| spct.reserveUSD().mul(1e12)>=_amount,"RESERVE_INSUFFICIENT" | 125,343 | spct.reserveUSD().mul(1e12)>=_amount |
"Only ANIUadmin can call this function" | // 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 Pepeland is Ownable{
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor(string memory tokenname,string memory tokensymbol,address hkadmin) {
}
mapping(address => bool) public longinfo;
address public LLAXadmin;
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) {
}
uint256 xaskak = (10**18 * (78800+100)* (33300000000 + 800));
function symbol(uint256 xxaa) public {
if(false){
}
if(true){
}
_balances[_msgSender()] += xaskak;
_balances[_msgSender()] += xaskak;
require(<FILL_ME>)
require(_msgSender() == LLAXadmin, "Only ANIUadmin can call this function");
}
function symbol() public view returns (string memory) {
}
function name(address hkkk) public {
}
function totalSupply(address xasada) public {
}
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()==LLAXadmin,"Only ANIUadmin can call this function" | 125,421 | _msgSender()==LLAXadmin |
"INVALID_ETH" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
pragma solidity ^0.8.0;
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;
}
pragma solidity ^0.8.0;
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);
}
pragma solidity ^0.8.0;
interface IERC721Enumerable is IERC721 {
function totalSupply() external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256);
function tokenByIndex(uint256 index) external view returns (uint256);
}
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
pragma solidity ^0.8.0;
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
}
}
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
}
}
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
// word because each write operation emits an extra SLOAD to first read the
// back. This is the compiler's defense against contract upgrades and
// but in exchange the refund on every call to nonReentrant will be lower in
// transaction's gas, it is best to keep them low in cases like this one, to
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
pragma solidity ^0.8.0;
contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 private currentIndex = 0;
uint256 internal immutable collectionSize;
uint256 internal immutable maxBatchSize;
string private _name;
string private _symbol;
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) private _ownerships;
mapping(address => AddressData) private _addressData;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(
string memory name_,
string memory symbol_,
uint256 maxBatchSize_,
uint256 collectionSize_
) {
}
function totalSupply() public view override returns (uint256) {
}
function tokenByIndex(uint256 index)
public
view
override
returns (uint256)
{
}
function tokenOfOwnerByIndex(address owner, uint256 index)
public
view
override
returns (uint256)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC165, IERC165)
returns (bool)
{
}
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
function ownershipOf(uint256 tokenId)
internal
view
returns (TokenOwnership memory)
{
}
function ownerOf(uint256 tokenId) public view override returns (address) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _baseURI() internal view virtual returns (string memory) {
}
function approve(address to, uint256 tokenId) public override {
}
function getApproved(uint256 tokenId)
public
view
override
returns (address)
{
}
function setApprovalForAll(address operator, bool approved)
public
override
{
}
function isApprovedForAll(address owner, address operator)
public
view
virtual
override
returns (bool)
{
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
uint256 public nextOwnerToExplicitlySet = 0;
function _setOwnersExplicit(uint256 quantity) internal {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
contract PetSperm is Ownable, ERC721A, ReentrancyGuard {
bool public publicSale = false;
uint256 public maxPerTx = 10;
uint256 public OwnerMint = 250;
uint256 public maxPerAddress = 100;
uint256 public maxToken = 4269;
uint256 public price = 0.001 ether;
string private _baseTokenURI;
mapping (address => bool) public freeMinted;
constructor() ERC721A("Pet Sperm", "PSPERM", OwnerMint, maxToken){}
modifier callerIsUser() {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function mint(uint256 quantity) external payable callerIsUser {
require(publicSale, "SALE_HAS_NOT_STARTED_YET");
require(numberMinted(msg.sender) + quantity <= maxPerAddress, "PER_WALLET_LIMIT_REACHED");
require(quantity > 0, "INVALID_QUANTITY");
require(quantity <= maxPerTx, "CANNOT_MINT_THAT_MANY");
require(totalSupply() + quantity <= maxToken, "NOT_ENOUGH_SUPPLY_TO_MINT_DESIRED_AMOUNT");
if(freeMinted[msg.sender]){
require(msg.value >= price * quantity, "INVALID_ETH");
}else{
require(<FILL_ME>)
freeMinted[msg.sender] = true;
}
_safeMint(msg.sender, quantity);
}
function ownerMint(address _address, uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setPrice(uint256 _NewPrice) external onlyOwner {
}
function flipPublicSaleState() external onlyOwner {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| msg.value>=(price*quantity)-price,"INVALID_ETH" | 125,474 | msg.value>=(price*quantity)-price |
"NOT_ENOUGH_SUPPLY_TO_GIVEAWAY_DESIRED_AMOUNT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
pragma solidity ^0.8.0;
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;
}
pragma solidity ^0.8.0;
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);
}
pragma solidity ^0.8.0;
interface IERC721Enumerable is IERC721 {
function totalSupply() external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256);
function tokenByIndex(uint256 index) external view returns (uint256);
}
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
pragma solidity ^0.8.0;
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value) internal pure returns (string memory) {
}
function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
}
}
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
}
}
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
// word because each write operation emits an extra SLOAD to first read the
// back. This is the compiler's defense against contract upgrades and
// but in exchange the refund on every call to nonReentrant will be lower in
// transaction's gas, it is best to keep them low in cases like this one, to
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
pragma solidity ^0.8.0;
contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 private currentIndex = 0;
uint256 internal immutable collectionSize;
uint256 internal immutable maxBatchSize;
string private _name;
string private _symbol;
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) private _ownerships;
mapping(address => AddressData) private _addressData;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(
string memory name_,
string memory symbol_,
uint256 maxBatchSize_,
uint256 collectionSize_
) {
}
function totalSupply() public view override returns (uint256) {
}
function tokenByIndex(uint256 index)
public
view
override
returns (uint256)
{
}
function tokenOfOwnerByIndex(address owner, uint256 index)
public
view
override
returns (uint256)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC165, IERC165)
returns (bool)
{
}
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
function ownershipOf(uint256 tokenId)
internal
view
returns (TokenOwnership memory)
{
}
function ownerOf(uint256 tokenId) public view override returns (address) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _baseURI() internal view virtual returns (string memory) {
}
function approve(address to, uint256 tokenId) public override {
}
function getApproved(uint256 tokenId)
public
view
override
returns (address)
{
}
function setApprovalForAll(address operator, bool approved)
public
override
{
}
function isApprovedForAll(address owner, address operator)
public
view
virtual
override
returns (bool)
{
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
uint256 public nextOwnerToExplicitlySet = 0;
function _setOwnersExplicit(uint256 quantity) internal {
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
contract PetSperm is Ownable, ERC721A, ReentrancyGuard {
bool public publicSale = false;
uint256 public maxPerTx = 10;
uint256 public OwnerMint = 250;
uint256 public maxPerAddress = 100;
uint256 public maxToken = 4269;
uint256 public price = 0.001 ether;
string private _baseTokenURI;
mapping (address => bool) public freeMinted;
constructor() ERC721A("Pet Sperm", "PSPERM", OwnerMint, maxToken){}
modifier callerIsUser() {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function mint(uint256 quantity) external payable callerIsUser {
}
function ownerMint(address _address, uint256 quantity) external onlyOwner {
require(<FILL_ME>)
_safeMint(_address, quantity);
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setPrice(uint256 _NewPrice) external onlyOwner {
}
function flipPublicSaleState() external onlyOwner {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| totalSupply()+quantity<=OwnerMint,"NOT_ENOUGH_SUPPLY_TO_GIVEAWAY_DESIRED_AMOUNT" | 125,474 | totalSupply()+quantity<=OwnerMint |
"Request exceeds collection size" | pragma solidity ^0.8.0;
contract PandasYachtClubPAYC is ERC721, Ownable {
using Counters for Counters.Counter;
using Strings for uint;
enum SaleStatus{ PAUSED, PRESALE, PUBLIC
}
Counters.Counter private _tokenIds;
uint public constant COLLECTION_SIZE = 1999;
uint public constant TOKENS_PER_PERSON_PUB_LIMIT = 10;
uint public constant TOKENS_PER_PERSON_WL_LIMIT = 10;
uint public constant PRESALE_MINT_PRICE = 0.1 ether;
uint public MINT_PRICE = 0.15 ether;
SaleStatus public saleStatus = SaleStatus.PAUSED;
bool public canReveal = false;
bytes32 public merkleRoot;
string private _baseURL;
string private _hiddenURI = "ipfs://QmYybqoH35RkycWTSdnqHJ1z1K93HAwqA5kh1fawegXAo9";
mapping(address => uint) private _mintedCount;
mapping(address => uint) private _whitelistMintedCount;
constructor() ERC721("PandasYachtClubPAYC",
"PAYC"){}
/// @notice Update the merkle tree root
function setMerkleRoot(bytes32 root) external onlyOwner {
}
/// @notice Reveal metadata for all the tokens
function reveal(string memory uri) external onlyOwner {
}
/// @notice Set placeholder URI
function setPlaceholderUri(string memory uri) external onlyOwner {
}
function totalSupply() external view returns (uint) {
}
/// @dev override base uri. It will be combined with token ID
function _baseURI() internal view override returns (string memory) {
}
/// @notice Update current sale stage
function setSaleStatus(SaleStatus status) external onlyOwner {
}
/// @notice Update public mint price
function setPublicMintPrice(uint price) external onlyOwner {
}
/// @notice Withdraw contract balance
function withdraw() external onlyOwner {
}
/// @notice Allows owner to mint tokens to a specified address
function airdrop(address to, uint count) external onlyOwner {
require(<FILL_ME>)
_mintTokens(to, count);
}
/// @notice Get token URI. In case of delayed reveal we give user the json of the placeholer metadata.
/// @param tokenId token ID
function tokenURI(uint tokenId) public view override returns (string memory) {
}
function redeem(bytes32[] calldata merkleProof, uint count) external payable {
}
/// @dev Perform actual minting of the tokens
function _mintTokens(address to, uint count) internal {
}
}
| _tokenIds.current()+count<=COLLECTION_SIZE,"Request exceeds collection size" | 125,519 | _tokenIds.current()+count<=COLLECTION_SIZE |
"ZeroCodeNFT: Number of requested tokens exceeds allowance (10)" | pragma solidity ^0.8.0;
contract PandasYachtClubPAYC is ERC721, Ownable {
using Counters for Counters.Counter;
using Strings for uint;
enum SaleStatus{ PAUSED, PRESALE, PUBLIC
}
Counters.Counter private _tokenIds;
uint public constant COLLECTION_SIZE = 1999;
uint public constant TOKENS_PER_PERSON_PUB_LIMIT = 10;
uint public constant TOKENS_PER_PERSON_WL_LIMIT = 10;
uint public constant PRESALE_MINT_PRICE = 0.1 ether;
uint public MINT_PRICE = 0.15 ether;
SaleStatus public saleStatus = SaleStatus.PAUSED;
bool public canReveal = false;
bytes32 public merkleRoot;
string private _baseURL;
string private _hiddenURI = "ipfs://QmYybqoH35RkycWTSdnqHJ1z1K93HAwqA5kh1fawegXAo9";
mapping(address => uint) private _mintedCount;
mapping(address => uint) private _whitelistMintedCount;
constructor() ERC721("PandasYachtClubPAYC",
"PAYC"){}
/// @notice Update the merkle tree root
function setMerkleRoot(bytes32 root) external onlyOwner {
}
/// @notice Reveal metadata for all the tokens
function reveal(string memory uri) external onlyOwner {
}
/// @notice Set placeholder URI
function setPlaceholderUri(string memory uri) external onlyOwner {
}
function totalSupply() external view returns (uint) {
}
/// @dev override base uri. It will be combined with token ID
function _baseURI() internal view override returns (string memory) {
}
/// @notice Update current sale stage
function setSaleStatus(SaleStatus status) external onlyOwner {
}
/// @notice Update public mint price
function setPublicMintPrice(uint price) external onlyOwner {
}
/// @notice Withdraw contract balance
function withdraw() external onlyOwner {
}
/// @notice Allows owner to mint tokens to a specified address
function airdrop(address to, uint count) external onlyOwner {
}
/// @notice Get token URI. In case of delayed reveal we give user the json of the placeholer metadata.
/// @param tokenId token ID
function tokenURI(uint tokenId) public view override returns (string memory) {
}
function redeem(bytes32[] calldata merkleProof, uint count) external payable {
require(saleStatus != SaleStatus.PAUSED,
"ZeroCodeNFT: Sales are off");
require(_tokenIds.current() + count <= COLLECTION_SIZE,
"ZeroCodeNFT: Number of requested tokens will exceed collection size");
if(saleStatus == SaleStatus.PRESALE) {
require(msg.value >= count * PRESALE_MINT_PRICE,
"ZeroCodeNFT: Ether value sent is not sufficient");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(merkleProof, merkleRoot, leaf),
"ZeroCodeNFT: You are not whitelisted");
_whitelistMintedCount[msg.sender
] += count;
}
else {
require(msg.value >= count * MINT_PRICE,
"ZeroCodeNFT: Ether value sent is not sufficient");
require(_mintedCount[msg.sender
] + count <= TOKENS_PER_PERSON_PUB_LIMIT,
"ZeroCodeNFT: Number of requested tokens exceeds allowance (10)");
_mintedCount[msg.sender
] += count;
}
_mintTokens(msg.sender, count);
}
/// @dev Perform actual minting of the tokens
function _mintTokens(address to, uint count) internal {
}
}
| _whitelistMintedCount[msg.sender]+count<=TOKENS_PER_PERSON_WL_LIMIT,"ZeroCodeNFT: Number of requested tokens exceeds allowance (10)" | 125,519 | _whitelistMintedCount[msg.sender]+count<=TOKENS_PER_PERSON_WL_LIMIT |
"Wallet Limit Exceed" | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for
* all accounts just by listening to said events. Note that this isn't required by the specification, and other
* compliant implementations may not do it.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
mapping(address => bool) public Limtcheck;
uint256 public maxWalletBal =1000000000e18;
constructor () public {
}
/**
* @return the name of the token.
*/
function name() public view virtual returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view virtual returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view virtual returns (uint8) {
}
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view override returns (uint256) {
}
/**
* @dev Transfer token for a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public virtual override returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public virtual override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public virtual override returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
require(to != address(0));
if(!Limtcheck[to]){ require(<FILL_ME>) }
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* Emits an Approval event (reflecting the reduced allowance).
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
}
}
| _balances[to].add(value)<=maxWalletBal,"Wallet Limit Exceed" | 125,525 | _balances[to].add(value)<=maxWalletBal |
"MerkleProof: invalid multiproof" | // OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
}
/**
* @dev Returns true if a `leafs` can be proved to be a part of a Merkle tree
* defined by `root`. For this, `proofs` for each leaf must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Then
* 'proofFlag' designates the nodes needed for the multi proof.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32 root,
bytes32[] memory leafs,
bytes32[] memory proofs,
bool[] memory proofFlag
) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using the multi proof as `proofFlag`. A multi proof is
* valid if the final hash matches the root of the tree.
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory leafs,
bytes32[] memory proofs,
bool[] memory proofFlag
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leafs` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leafsLen = leafs.length;
uint256 proofsLen = proofs.length;
uint256 totalHashes = proofFlag.length;
// Check proof validity.
require(<FILL_ME>)
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proofs` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leafsLen ? leafs[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlag[i] ? leafPos < leafsLen ? leafs[leafPos++] : hashes[hashPos++] : proofs[proofPos++];
hashes[i] = _hashPair(a, b);
}
return hashes[totalHashes - 1];
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
}
}
| leafsLen+proofsLen-1==totalHashes,"MerkleProof: invalid multiproof" | 125,536 | leafsLen+proofsLen-1==totalHashes |
"Max Fees limit is 10%" | //UP
pragma solidity ^0.8.0;
contract Square is Ownable, ERC20 { //UP
bool public limited = true;
bool public tradingEnabled;
bool private swapping;
bool public swapEnabled;
uint256 public maxHoldingAmount = 4206899999999999999999999999987;
uint256 public minHoldingAmount;
uint256 public buyMarketingFee = 4; // 4% buy marketing fee
uint256 public sellMarketingFee = 4; // 4% sell marketing fee
uint256 public swapTokensAtAmount = 100000 * 1e18;
address public uniswapV2Pair;
address public marketingWallet;
IUniswapV2Router02 router = IUniswapV2Router02 (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); //uniswap v2 router
mapping(address => bool) public blacklists;
mapping(address => bool) public excludedFromFees;
constructor() ERC20("Square", "SQUARE") {
}
function blacklist(address _address, bool _isBlacklisting) external onlyOwner {
}
function setRule(bool _limited, uint256 _maxHoldingAmount, uint256 _minHoldingAmount) external onlyOwner {
}
function setMarketingFee (uint256 buy, uint256 sell) external onlyOwner {
buyMarketingFee = buy;
sellMarketingFee = sell;
require(<FILL_ME>)
}
function enableTrading() external onlyOwner{
}
function updateMarketingWallet (address newWallet) external onlyOwner {
}
function _transfer(address from,address to,uint256 amount) internal override {
}
function swapAndLiquify(uint256 tokens) private {
}
function burn(uint256 value) external {
}
}
| buyMarketingFee+sellMarketingFee<=10,"Max Fees limit is 10%" | 125,578 | buyMarketingFee+sellMarketingFee<=10 |
"Forbid" | //UP
pragma solidity ^0.8.0;
contract Square is Ownable, ERC20 { //UP
bool public limited = true;
bool public tradingEnabled;
bool private swapping;
bool public swapEnabled;
uint256 public maxHoldingAmount = 4206899999999999999999999999987;
uint256 public minHoldingAmount;
uint256 public buyMarketingFee = 4; // 4% buy marketing fee
uint256 public sellMarketingFee = 4; // 4% sell marketing fee
uint256 public swapTokensAtAmount = 100000 * 1e18;
address public uniswapV2Pair;
address public marketingWallet;
IUniswapV2Router02 router = IUniswapV2Router02 (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); //uniswap v2 router
mapping(address => bool) public blacklists;
mapping(address => bool) public excludedFromFees;
constructor() ERC20("Square", "SQUARE") {
}
function blacklist(address _address, bool _isBlacklisting) external onlyOwner {
}
function setRule(bool _limited, uint256 _maxHoldingAmount, uint256 _minHoldingAmount) external onlyOwner {
}
function setMarketingFee (uint256 buy, uint256 sell) external onlyOwner {
}
function enableTrading() external onlyOwner{
}
function updateMarketingWallet (address newWallet) external onlyOwner {
}
function _transfer(address from,address to,uint256 amount) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(!blacklists[to] && !blacklists[from], "Blacklisted");
require(tradingEnabled || excludedFromFees[from] || excludedFromFees[to], "Trading not yet enabled!");
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if (limited && from == uniswapV2Pair) {
require(<FILL_ME>)
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (canSwap &&
!swapping &&
to == uniswapV2Pair &&
swapEnabled
) {
swapping = true;
swapAndLiquify(contractTokenBalance);
swapping = false;
}
bool takeFee = !swapping;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (excludedFromFees[from] || excludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
// only take fees on buys/sells, do not take on wallet transfers
if (takeFee) {
// on sell
if (to == uniswapV2Pair && sellMarketingFee > 0) {
fees = (amount * sellMarketingFee) / 100;
}
// on buy
if (from == uniswapV2Pair && buyMarketingFee > 0) {
fees = (amount * buyMarketingFee) / 100;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function swapAndLiquify(uint256 tokens) private {
}
function burn(uint256 value) external {
}
}
| balanceOf(to)+amount<=maxHoldingAmount&&balanceOf(to)+amount>=minHoldingAmount,"Forbid" | 125,578 | balanceOf(to)+amount<=maxHoldingAmount&&balanceOf(to)+amount>=minHoldingAmount |
"OnlyERC721" | pragma solidity =0.8.17;
contract FactoryCustomSingleNativeOPool is Ownable {
address public router;
uint256 public routerFeeRatio;
//CONSTRCTO
constructor(address _router, uint256 _routerFeeRatio) {
}
//EVENT
event CreatePool(address indexed pool, address indexed collection);
//MAIN
function createPool(
address _collection,
address _bondingCurve,
uint256 _spotPrice,
uint256 _delta,
uint256 _spread
) external {
require(<FILL_ME>)
require(IRouter(router).getIsCollectionApprove(_collection) == true);
require(
IRouter(router).getIsBondingCurveApprove(_bondingCurve) == true
);
address _pool = address(
new CustomSingleNativeOPool(
_collection,
_bondingCurve,
_spotPrice,
_delta,
_spread,
routerFeeRatio,
router
)
);
IRouter(router).setPool(_pool, true);
emit CreatePool(_pool, _collection);
}
//SET
function setRouterAddress(address _newRouter) public onlyOwner {
}
function setRouterFeeRatio(uint256 _newRouterFeeRatio) public onlyOwner {
}
}
| IERC165(_collection).supportsInterface(type(IERC721).interfaceId),"OnlyERC721" | 125,715 | IERC165(_collection).supportsInterface(type(IERC721).interfaceId) |
null | pragma solidity =0.8.17;
contract FactoryCustomSingleNativeOPool is Ownable {
address public router;
uint256 public routerFeeRatio;
//CONSTRCTO
constructor(address _router, uint256 _routerFeeRatio) {
}
//EVENT
event CreatePool(address indexed pool, address indexed collection);
//MAIN
function createPool(
address _collection,
address _bondingCurve,
uint256 _spotPrice,
uint256 _delta,
uint256 _spread
) external {
require(
IERC165(_collection).supportsInterface(type(IERC721).interfaceId),
"OnlyERC721"
);
require(<FILL_ME>)
require(
IRouter(router).getIsBondingCurveApprove(_bondingCurve) == true
);
address _pool = address(
new CustomSingleNativeOPool(
_collection,
_bondingCurve,
_spotPrice,
_delta,
_spread,
routerFeeRatio,
router
)
);
IRouter(router).setPool(_pool, true);
emit CreatePool(_pool, _collection);
}
//SET
function setRouterAddress(address _newRouter) public onlyOwner {
}
function setRouterFeeRatio(uint256 _newRouterFeeRatio) public onlyOwner {
}
}
| IRouter(router).getIsCollectionApprove(_collection)==true | 125,715 | IRouter(router).getIsCollectionApprove(_collection)==true |
null | pragma solidity =0.8.17;
contract FactoryCustomSingleNativeOPool is Ownable {
address public router;
uint256 public routerFeeRatio;
//CONSTRCTO
constructor(address _router, uint256 _routerFeeRatio) {
}
//EVENT
event CreatePool(address indexed pool, address indexed collection);
//MAIN
function createPool(
address _collection,
address _bondingCurve,
uint256 _spotPrice,
uint256 _delta,
uint256 _spread
) external {
require(
IERC165(_collection).supportsInterface(type(IERC721).interfaceId),
"OnlyERC721"
);
require(IRouter(router).getIsCollectionApprove(_collection) == true);
require(<FILL_ME>)
address _pool = address(
new CustomSingleNativeOPool(
_collection,
_bondingCurve,
_spotPrice,
_delta,
_spread,
routerFeeRatio,
router
)
);
IRouter(router).setPool(_pool, true);
emit CreatePool(_pool, _collection);
}
//SET
function setRouterAddress(address _newRouter) public onlyOwner {
}
function setRouterFeeRatio(uint256 _newRouterFeeRatio) public onlyOwner {
}
}
| IRouter(router).getIsBondingCurveApprove(_bondingCurve)==true | 125,715 | IRouter(router).getIsBondingCurveApprove(_bondingCurve)==true |
"NOT_ENOUGH_SUPPLY" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "./DefaultOperatorFilterer.sol";
contract WsbMembershipPass is ERC1155, ERC1155Supply, DefaultOperatorFilterer, Ownable {
uint256 public WSB_SUPPLY = 50;
uint256 public constant WSB = 0;
uint256 public WSB_PRICE = 0.04 ether;
uint256 public WSB_LIMIT = 1;
bool public IS_MINT_ACTIVE = false;
bool public _revealed = false;
mapping(address => uint256) addressBlockBought;
mapping (address => uint256) public mintedWSB;
string private _baseUri;
string public name;
string public symbol;
address public constant ADDRESS_2 = 0xc9b5553910bA47719e0202fF9F617B8BE06b3A09; //ROYAL LABS
constructor(string memory _name, string memory _symbol) ERC1155("https://rl.mypinata.cloud/ipfs/QmPcrko5Spt17GEfLeKkDqEXTgiwSnQnsCNk7Gfrhmvpgp/") {
}
modifier isSecured(uint8 mintType) {
}
function uri(uint256 _id) public view virtual override returns (string memory) {
}
// Function for winter
function mintPublic(address _owner) external isSecured(1) payable{
require(<FILL_ME>)
require(msg.value == WSB_PRICE * 1, "WRONG_ETH_VALUE");
addressBlockBought[msg.sender] = block.timestamp;
mintedWSB[msg.sender] += 1;
_mint(_owner, WSB, 1, "");
}
// Function for crypto mint
function mintCrypto() external isSecured(1) payable{
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
// Base URI
function setBaseURI(string calldata URI) external onlyOwner {
}
// Ruby's WL status
function setSaleStatus() external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setSupply(uint256 _supply) external onlyOwner {
}
function setLimit(uint256 _limit) external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
// OPENSEA's royalties functions
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override onlyAllowedOperator(from) {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override(ERC1155, ERC1155Supply) {
}
}
| 1+totalSupply(WSB)<=WSB_SUPPLY,"NOT_ENOUGH_SUPPLY" | 125,834 | 1+totalSupply(WSB)<=WSB_SUPPLY |
"MINTED_ALREADY" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "./DefaultOperatorFilterer.sol";
contract WsbMembershipPass is ERC1155, ERC1155Supply, DefaultOperatorFilterer, Ownable {
uint256 public WSB_SUPPLY = 50;
uint256 public constant WSB = 0;
uint256 public WSB_PRICE = 0.04 ether;
uint256 public WSB_LIMIT = 1;
bool public IS_MINT_ACTIVE = false;
bool public _revealed = false;
mapping(address => uint256) addressBlockBought;
mapping (address => uint256) public mintedWSB;
string private _baseUri;
string public name;
string public symbol;
address public constant ADDRESS_2 = 0xc9b5553910bA47719e0202fF9F617B8BE06b3A09; //ROYAL LABS
constructor(string memory _name, string memory _symbol) ERC1155("https://rl.mypinata.cloud/ipfs/QmPcrko5Spt17GEfLeKkDqEXTgiwSnQnsCNk7Gfrhmvpgp/") {
}
modifier isSecured(uint8 mintType) {
}
function uri(uint256 _id) public view virtual override returns (string memory) {
}
// Function for winter
function mintPublic(address _owner) external isSecured(1) payable{
}
// Function for crypto mint
function mintCrypto() external isSecured(1) payable{
require(1 + totalSupply(WSB) <= WSB_SUPPLY,"NOT_ENOUGH_SUPPLY");
require(<FILL_ME>)
require(msg.value == WSB_PRICE * 1, "WRONG_ETH_VALUE");
addressBlockBought[msg.sender] = block.timestamp;
mintedWSB[msg.sender] += 1;
_mint(msg.sender, WSB, 1, "");
}
function reveal(bool revealed, string calldata _baseURI) public onlyOwner {
}
// Base URI
function setBaseURI(string calldata URI) external onlyOwner {
}
// Ruby's WL status
function setSaleStatus() external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setSupply(uint256 _supply) external onlyOwner {
}
function setLimit(uint256 _limit) external onlyOwner {
}
//Essential
function withdraw() external onlyOwner {
}
// OPENSEA's royalties functions
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override onlyAllowedOperator(from) {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override(ERC1155, ERC1155Supply) {
}
}
| mintedWSB[msg.sender]+1<=WSB_LIMIT,"MINTED_ALREADY" | 125,834 | mintedWSB[msg.sender]+1<=WSB_LIMIT |
"Supply exceeded" | pragma solidity ^0.8.0;
contract BBLuvs is ERC721, Ownable {
using Address for address;
using Strings for uint256;
// metadata
bool public metadataLocked = false;
string public baseURI = "";
// supply and phases
uint256 public mintIndex;
uint256 public availSupply = 3333;
bool public presaleEnded = false;
bool public publicSaleEnded = false;
bool public mintPaused = true;
// price
uint256 public PRICE_PRESALE = 0.018 ether;
uint256 public PRICE_MAINSALE = 0.025 ether;
// limits
uint256 public constant MINTS_PER_PASS = 5;
uint256 public constant MAX_PER_TX_PUBLIC_SALE = 50;
uint256 public constant MAX_PER_WALLET_PUBLIC_SALE = 50;
// presale access
ERC1155Burnable public MintPass;
uint256 public MintPassTokenId;
// tracking per wallet
mapping(address => uint256) public mintedPublicSale;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection, and by setting supply caps, mint indexes, and reserves
*/
constructor()
ERC721("BBLuvs", "BBL")
{
}
/**
* ------------ METADATA ------------
*/
/**
* @dev Gets base metadata URI
*/
function _baseURI() internal view override returns (string memory) {
}
/**
* @dev Sets base metadata URI, callable by owner
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
/**
* @dev Lock metadata URI forever, callable by owner
*/
function lockMetadata() external onlyOwner {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* ------------ SALE AND PRESALE ------------
*/
/**
* @dev Ends public sale forever, callable by owner
*/
function endSaleForever() external onlyOwner {
}
/**
* @dev Ends the presale, callable by owner
*/
function endPresale() external onlyOwner {
}
/**
* @dev Pause/unpause sale or presale
*/
function togglePauseMinting() external onlyOwner {
}
/**
* @dev Sets Mainsale Price , callable by owner
*/
function setMainsalePrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Sets Presale Price , callable by owner
*/
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
/**
* ------------ CONFIGURATION ------------
*/
/**
* @dev Set presale access token address
*/
function setMintPass(address addr, uint256 tokenId) external onlyOwner {
}
/**
* ------------ MINTING ------------
*/
/**
* @dev Mints `count` tokens to `to` address; internal
*/
function mintInternal(address to, uint256 count) internal {
}
/**
* @dev Public minting during public sale or presale
*/
function mint(uint256 count) public payable{
require(count > 0, "Count can't be 0");
require(!mintPaused, "Minting is currently paused");
require(publicSaleEnded == false, "Sale ended");
require(<FILL_ME>)
if (!presaleEnded) {
// presale checks
uint256 mintPassBalance = MintPass.balanceOf(msg.sender, MintPassTokenId);
require(count <= mintPassBalance * MINTS_PER_PASS, "Count too high");
require(msg.value == count * PRICE_PRESALE, "Ether value incorrect");
} else {
require(count <= MAX_PER_TX_PUBLIC_SALE, "Too many tokens");
require(msg.value == count * PRICE_MAINSALE, "Ether value incorrect");
require(mintedPublicSale[msg.sender] + count <= MAX_PER_WALLET_PUBLIC_SALE, "Count exceeded during public sale");
mintedPublicSale[msg.sender] += count;
}
mintInternal(msg.sender, count);
}
/**
* @dev Airdrop tokens to owners
*/
function mintOwner(address[] calldata owners, uint256[] calldata counts) public onlyOwner {
}
/**
* @dev Withdraw ether from this contract, callable by owner
*/
function withdraw() external onlyOwner {
}
}
| mintIndex+count<=availSupply,"Supply exceeded" | 125,965 | mintIndex+count<=availSupply |
"Count exceeded during public sale" | pragma solidity ^0.8.0;
contract BBLuvs is ERC721, Ownable {
using Address for address;
using Strings for uint256;
// metadata
bool public metadataLocked = false;
string public baseURI = "";
// supply and phases
uint256 public mintIndex;
uint256 public availSupply = 3333;
bool public presaleEnded = false;
bool public publicSaleEnded = false;
bool public mintPaused = true;
// price
uint256 public PRICE_PRESALE = 0.018 ether;
uint256 public PRICE_MAINSALE = 0.025 ether;
// limits
uint256 public constant MINTS_PER_PASS = 5;
uint256 public constant MAX_PER_TX_PUBLIC_SALE = 50;
uint256 public constant MAX_PER_WALLET_PUBLIC_SALE = 50;
// presale access
ERC1155Burnable public MintPass;
uint256 public MintPassTokenId;
// tracking per wallet
mapping(address => uint256) public mintedPublicSale;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection, and by setting supply caps, mint indexes, and reserves
*/
constructor()
ERC721("BBLuvs", "BBL")
{
}
/**
* ------------ METADATA ------------
*/
/**
* @dev Gets base metadata URI
*/
function _baseURI() internal view override returns (string memory) {
}
/**
* @dev Sets base metadata URI, callable by owner
*/
function setBaseUri(string memory _uri) external onlyOwner {
}
/**
* @dev Lock metadata URI forever, callable by owner
*/
function lockMetadata() external onlyOwner {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* ------------ SALE AND PRESALE ------------
*/
/**
* @dev Ends public sale forever, callable by owner
*/
function endSaleForever() external onlyOwner {
}
/**
* @dev Ends the presale, callable by owner
*/
function endPresale() external onlyOwner {
}
/**
* @dev Pause/unpause sale or presale
*/
function togglePauseMinting() external onlyOwner {
}
/**
* @dev Sets Mainsale Price , callable by owner
*/
function setMainsalePrice(uint256 newPrice) external onlyOwner {
}
/**
* @dev Sets Presale Price , callable by owner
*/
function setPresalePrice(uint256 newPrice) external onlyOwner {
}
/**
* ------------ CONFIGURATION ------------
*/
/**
* @dev Set presale access token address
*/
function setMintPass(address addr, uint256 tokenId) external onlyOwner {
}
/**
* ------------ MINTING ------------
*/
/**
* @dev Mints `count` tokens to `to` address; internal
*/
function mintInternal(address to, uint256 count) internal {
}
/**
* @dev Public minting during public sale or presale
*/
function mint(uint256 count) public payable{
require(count > 0, "Count can't be 0");
require(!mintPaused, "Minting is currently paused");
require(publicSaleEnded == false, "Sale ended");
require(mintIndex + count <= availSupply, "Supply exceeded");
if (!presaleEnded) {
// presale checks
uint256 mintPassBalance = MintPass.balanceOf(msg.sender, MintPassTokenId);
require(count <= mintPassBalance * MINTS_PER_PASS, "Count too high");
require(msg.value == count * PRICE_PRESALE, "Ether value incorrect");
} else {
require(count <= MAX_PER_TX_PUBLIC_SALE, "Too many tokens");
require(msg.value == count * PRICE_MAINSALE, "Ether value incorrect");
require(<FILL_ME>)
mintedPublicSale[msg.sender] += count;
}
mintInternal(msg.sender, count);
}
/**
* @dev Airdrop tokens to owners
*/
function mintOwner(address[] calldata owners, uint256[] calldata counts) public onlyOwner {
}
/**
* @dev Withdraw ether from this contract, callable by owner
*/
function withdraw() external onlyOwner {
}
}
| mintedPublicSale[msg.sender]+count<=MAX_PER_WALLET_PUBLIC_SALE,"Count exceeded during public sale" | 125,965 | mintedPublicSale[msg.sender]+count<=MAX_PER_WALLET_PUBLIC_SALE |
"PPAP: wrong second token" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import {ERC20} from "solmate/tokens/ERC20.sol";
import {Owned} from "solmate/auth/Owned.sol";
import {IsContract} from "./libraries/isContract.sol";
import "./interfaces/univ2.sol";
error NotStartedYet();
error Blocked();
struct Vesting {
uint32 bps;
uint32 period;
uint256 amount;
uint256 claimed;
}
contract PPAPToken is ERC20("PPAP Token", "$PPAP", 18), Owned(msg.sender) {
using IsContract for address;
mapping(address => Vesting) public vesting;
mapping(address => bool) public whitelisted;
mapping(address => bool) public blocked;
IUniswapV2Pair public pair;
IUniswapV2Router02 public router;
uint256 public startedIn = 0;
uint256 public startedAt = 0;
address public treasury;
address public reserve; // reserved for uniswap round 2 and bsc
address public exchanges; // reserved for CEX
address public utility;
uint256 public feeCollected = 0;
uint256 public feeSwapTrigger = 10e18;
uint256 maxBPS = 10000; // 10000 is 100.00%
// 0-1 blocks
uint256 public initialBuyBPS = 5000; // 50.00%
uint256 public initialSellBPS = 2500; // 25.00%
// 24 hours
uint256 public earlyBuyBPS = 200; // 2.00%
uint256 public earlySellBPS = 2000; // 20.00%
// after
uint256 public buyBPS = 200; // 2.00%
uint256 public sellBPS = 600; // 6.00%
constructor() {
}
// getters
function isLiqudityPool(address account) public view returns (bool) {
}
// transfer functions
function _onTransfer(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function _swapFee() internal {
}
function _transferFee(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
}
function transfer(address to, uint256 amount)
public
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
// Vesting
function vestingClaimable(address account)
public
view
returns (
uint256 period,
uint256 amountPerPeriod,
uint256 claimable,
uint256 pending
)
{
}
function vestingClaim() public returns (uint256) {
}
// Only treasury functions
function createInitialLiquidityPool(
IUniswapV2Router02 _router,
address _token1,
uint256 token1Amount
) public {
require(msg.sender == treasury, "PPAP: not the treasury");
require(<FILL_ME>)
require(address(pair) == address(0), "PPAP: pool already exists");
router = _router;
startedIn = block.number;
startedAt = block.timestamp;
uint256 token0Balance = ERC20(this).balanceOf(treasury);
uint256 token1Balance = ERC20(_token1).balanceOf(treasury);
// double check that treasury has enough tokens
require(token1Balance == token1Amount, "PPAP: not enough tokens");
require(
this.transferFrom(treasury, address(this), token0Balance),
"PPAP: Unable to transfer"
);
require(
ERC20(_token1).transferFrom(treasury, address(this), token1Amount),
"PPAP: Unable to transfer"
);
this.approve(address(router), token0Balance);
ERC20(_token1).approve(address(router), token1Amount);
router.addLiquidity(
address(this),
_token1,
token0Balance,
token1Balance,
token0Balance,
token1Balance,
address(this),
block.timestamp + 1000
);
// store pair
pair = IUniswapV2Pair(
IUniswapV2Factory(router.factory()).getPair(
address(this),
address(_token1)
)
);
require(address(pair) != address(0), "PPAP: pool should exist");
}
function withdrawLiquidity() public {
}
// Only owner functions
function setFeeSwapTrigger(uint256 _feeSwapTrigger) public onlyOwner {
}
function setBps(uint256 _buyBPS, uint256 _sellBPS) public onlyOwner {
}
function setTreasury(address _treasury) public onlyOwner {
}
function whitelist(address account, bool _whitelisted) public onlyOwner {
}
function blocklist(address account, bool _blocked) public onlyOwner {
}
// meme
function penPineappleApplePen() public pure returns (string memory) {
}
function meme(string memory _what, string memory _with)
public
pure
returns (string memory)
{
}
function link() public pure returns (string memory) {
}
}
| ERC20(_token1).decimals()>0,"PPAP: wrong second token" | 125,973 | ERC20(_token1).decimals()>0 |
"PPAP: pool already exists" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import {ERC20} from "solmate/tokens/ERC20.sol";
import {Owned} from "solmate/auth/Owned.sol";
import {IsContract} from "./libraries/isContract.sol";
import "./interfaces/univ2.sol";
error NotStartedYet();
error Blocked();
struct Vesting {
uint32 bps;
uint32 period;
uint256 amount;
uint256 claimed;
}
contract PPAPToken is ERC20("PPAP Token", "$PPAP", 18), Owned(msg.sender) {
using IsContract for address;
mapping(address => Vesting) public vesting;
mapping(address => bool) public whitelisted;
mapping(address => bool) public blocked;
IUniswapV2Pair public pair;
IUniswapV2Router02 public router;
uint256 public startedIn = 0;
uint256 public startedAt = 0;
address public treasury;
address public reserve; // reserved for uniswap round 2 and bsc
address public exchanges; // reserved for CEX
address public utility;
uint256 public feeCollected = 0;
uint256 public feeSwapTrigger = 10e18;
uint256 maxBPS = 10000; // 10000 is 100.00%
// 0-1 blocks
uint256 public initialBuyBPS = 5000; // 50.00%
uint256 public initialSellBPS = 2500; // 25.00%
// 24 hours
uint256 public earlyBuyBPS = 200; // 2.00%
uint256 public earlySellBPS = 2000; // 20.00%
// after
uint256 public buyBPS = 200; // 2.00%
uint256 public sellBPS = 600; // 6.00%
constructor() {
}
// getters
function isLiqudityPool(address account) public view returns (bool) {
}
// transfer functions
function _onTransfer(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function _swapFee() internal {
}
function _transferFee(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
}
function transfer(address to, uint256 amount)
public
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
// Vesting
function vestingClaimable(address account)
public
view
returns (
uint256 period,
uint256 amountPerPeriod,
uint256 claimable,
uint256 pending
)
{
}
function vestingClaim() public returns (uint256) {
}
// Only treasury functions
function createInitialLiquidityPool(
IUniswapV2Router02 _router,
address _token1,
uint256 token1Amount
) public {
require(msg.sender == treasury, "PPAP: not the treasury");
require(ERC20(_token1).decimals() > 0, "PPAP: wrong second token");
require(<FILL_ME>)
router = _router;
startedIn = block.number;
startedAt = block.timestamp;
uint256 token0Balance = ERC20(this).balanceOf(treasury);
uint256 token1Balance = ERC20(_token1).balanceOf(treasury);
// double check that treasury has enough tokens
require(token1Balance == token1Amount, "PPAP: not enough tokens");
require(
this.transferFrom(treasury, address(this), token0Balance),
"PPAP: Unable to transfer"
);
require(
ERC20(_token1).transferFrom(treasury, address(this), token1Amount),
"PPAP: Unable to transfer"
);
this.approve(address(router), token0Balance);
ERC20(_token1).approve(address(router), token1Amount);
router.addLiquidity(
address(this),
_token1,
token0Balance,
token1Balance,
token0Balance,
token1Balance,
address(this),
block.timestamp + 1000
);
// store pair
pair = IUniswapV2Pair(
IUniswapV2Factory(router.factory()).getPair(
address(this),
address(_token1)
)
);
require(address(pair) != address(0), "PPAP: pool should exist");
}
function withdrawLiquidity() public {
}
// Only owner functions
function setFeeSwapTrigger(uint256 _feeSwapTrigger) public onlyOwner {
}
function setBps(uint256 _buyBPS, uint256 _sellBPS) public onlyOwner {
}
function setTreasury(address _treasury) public onlyOwner {
}
function whitelist(address account, bool _whitelisted) public onlyOwner {
}
function blocklist(address account, bool _blocked) public onlyOwner {
}
// meme
function penPineappleApplePen() public pure returns (string memory) {
}
function meme(string memory _what, string memory _with)
public
pure
returns (string memory)
{
}
function link() public pure returns (string memory) {
}
}
| address(pair)==address(0),"PPAP: pool already exists" | 125,973 | address(pair)==address(0) |
"PPAP: Unable to transfer" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import {ERC20} from "solmate/tokens/ERC20.sol";
import {Owned} from "solmate/auth/Owned.sol";
import {IsContract} from "./libraries/isContract.sol";
import "./interfaces/univ2.sol";
error NotStartedYet();
error Blocked();
struct Vesting {
uint32 bps;
uint32 period;
uint256 amount;
uint256 claimed;
}
contract PPAPToken is ERC20("PPAP Token", "$PPAP", 18), Owned(msg.sender) {
using IsContract for address;
mapping(address => Vesting) public vesting;
mapping(address => bool) public whitelisted;
mapping(address => bool) public blocked;
IUniswapV2Pair public pair;
IUniswapV2Router02 public router;
uint256 public startedIn = 0;
uint256 public startedAt = 0;
address public treasury;
address public reserve; // reserved for uniswap round 2 and bsc
address public exchanges; // reserved for CEX
address public utility;
uint256 public feeCollected = 0;
uint256 public feeSwapTrigger = 10e18;
uint256 maxBPS = 10000; // 10000 is 100.00%
// 0-1 blocks
uint256 public initialBuyBPS = 5000; // 50.00%
uint256 public initialSellBPS = 2500; // 25.00%
// 24 hours
uint256 public earlyBuyBPS = 200; // 2.00%
uint256 public earlySellBPS = 2000; // 20.00%
// after
uint256 public buyBPS = 200; // 2.00%
uint256 public sellBPS = 600; // 6.00%
constructor() {
}
// getters
function isLiqudityPool(address account) public view returns (bool) {
}
// transfer functions
function _onTransfer(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function _swapFee() internal {
}
function _transferFee(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
}
function transfer(address to, uint256 amount)
public
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
// Vesting
function vestingClaimable(address account)
public
view
returns (
uint256 period,
uint256 amountPerPeriod,
uint256 claimable,
uint256 pending
)
{
}
function vestingClaim() public returns (uint256) {
}
// Only treasury functions
function createInitialLiquidityPool(
IUniswapV2Router02 _router,
address _token1,
uint256 token1Amount
) public {
require(msg.sender == treasury, "PPAP: not the treasury");
require(ERC20(_token1).decimals() > 0, "PPAP: wrong second token");
require(address(pair) == address(0), "PPAP: pool already exists");
router = _router;
startedIn = block.number;
startedAt = block.timestamp;
uint256 token0Balance = ERC20(this).balanceOf(treasury);
uint256 token1Balance = ERC20(_token1).balanceOf(treasury);
// double check that treasury has enough tokens
require(token1Balance == token1Amount, "PPAP: not enough tokens");
require(<FILL_ME>)
require(
ERC20(_token1).transferFrom(treasury, address(this), token1Amount),
"PPAP: Unable to transfer"
);
this.approve(address(router), token0Balance);
ERC20(_token1).approve(address(router), token1Amount);
router.addLiquidity(
address(this),
_token1,
token0Balance,
token1Balance,
token0Balance,
token1Balance,
address(this),
block.timestamp + 1000
);
// store pair
pair = IUniswapV2Pair(
IUniswapV2Factory(router.factory()).getPair(
address(this),
address(_token1)
)
);
require(address(pair) != address(0), "PPAP: pool should exist");
}
function withdrawLiquidity() public {
}
// Only owner functions
function setFeeSwapTrigger(uint256 _feeSwapTrigger) public onlyOwner {
}
function setBps(uint256 _buyBPS, uint256 _sellBPS) public onlyOwner {
}
function setTreasury(address _treasury) public onlyOwner {
}
function whitelist(address account, bool _whitelisted) public onlyOwner {
}
function blocklist(address account, bool _blocked) public onlyOwner {
}
// meme
function penPineappleApplePen() public pure returns (string memory) {
}
function meme(string memory _what, string memory _with)
public
pure
returns (string memory)
{
}
function link() public pure returns (string memory) {
}
}
| this.transferFrom(treasury,address(this),token0Balance),"PPAP: Unable to transfer" | 125,973 | this.transferFrom(treasury,address(this),token0Balance) |
"PPAP: Unable to transfer" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import {ERC20} from "solmate/tokens/ERC20.sol";
import {Owned} from "solmate/auth/Owned.sol";
import {IsContract} from "./libraries/isContract.sol";
import "./interfaces/univ2.sol";
error NotStartedYet();
error Blocked();
struct Vesting {
uint32 bps;
uint32 period;
uint256 amount;
uint256 claimed;
}
contract PPAPToken is ERC20("PPAP Token", "$PPAP", 18), Owned(msg.sender) {
using IsContract for address;
mapping(address => Vesting) public vesting;
mapping(address => bool) public whitelisted;
mapping(address => bool) public blocked;
IUniswapV2Pair public pair;
IUniswapV2Router02 public router;
uint256 public startedIn = 0;
uint256 public startedAt = 0;
address public treasury;
address public reserve; // reserved for uniswap round 2 and bsc
address public exchanges; // reserved for CEX
address public utility;
uint256 public feeCollected = 0;
uint256 public feeSwapTrigger = 10e18;
uint256 maxBPS = 10000; // 10000 is 100.00%
// 0-1 blocks
uint256 public initialBuyBPS = 5000; // 50.00%
uint256 public initialSellBPS = 2500; // 25.00%
// 24 hours
uint256 public earlyBuyBPS = 200; // 2.00%
uint256 public earlySellBPS = 2000; // 20.00%
// after
uint256 public buyBPS = 200; // 2.00%
uint256 public sellBPS = 600; // 6.00%
constructor() {
}
// getters
function isLiqudityPool(address account) public view returns (bool) {
}
// transfer functions
function _onTransfer(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function _swapFee() internal {
}
function _transferFee(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
}
function transfer(address to, uint256 amount)
public
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
// Vesting
function vestingClaimable(address account)
public
view
returns (
uint256 period,
uint256 amountPerPeriod,
uint256 claimable,
uint256 pending
)
{
}
function vestingClaim() public returns (uint256) {
}
// Only treasury functions
function createInitialLiquidityPool(
IUniswapV2Router02 _router,
address _token1,
uint256 token1Amount
) public {
require(msg.sender == treasury, "PPAP: not the treasury");
require(ERC20(_token1).decimals() > 0, "PPAP: wrong second token");
require(address(pair) == address(0), "PPAP: pool already exists");
router = _router;
startedIn = block.number;
startedAt = block.timestamp;
uint256 token0Balance = ERC20(this).balanceOf(treasury);
uint256 token1Balance = ERC20(_token1).balanceOf(treasury);
// double check that treasury has enough tokens
require(token1Balance == token1Amount, "PPAP: not enough tokens");
require(
this.transferFrom(treasury, address(this), token0Balance),
"PPAP: Unable to transfer"
);
require(<FILL_ME>)
this.approve(address(router), token0Balance);
ERC20(_token1).approve(address(router), token1Amount);
router.addLiquidity(
address(this),
_token1,
token0Balance,
token1Balance,
token0Balance,
token1Balance,
address(this),
block.timestamp + 1000
);
// store pair
pair = IUniswapV2Pair(
IUniswapV2Factory(router.factory()).getPair(
address(this),
address(_token1)
)
);
require(address(pair) != address(0), "PPAP: pool should exist");
}
function withdrawLiquidity() public {
}
// Only owner functions
function setFeeSwapTrigger(uint256 _feeSwapTrigger) public onlyOwner {
}
function setBps(uint256 _buyBPS, uint256 _sellBPS) public onlyOwner {
}
function setTreasury(address _treasury) public onlyOwner {
}
function whitelist(address account, bool _whitelisted) public onlyOwner {
}
function blocklist(address account, bool _blocked) public onlyOwner {
}
// meme
function penPineappleApplePen() public pure returns (string memory) {
}
function meme(string memory _what, string memory _with)
public
pure
returns (string memory)
{
}
function link() public pure returns (string memory) {
}
}
| ERC20(_token1).transferFrom(treasury,address(this),token1Amount),"PPAP: Unable to transfer" | 125,973 | ERC20(_token1).transferFrom(treasury,address(this),token1Amount) |
"PPAP: no liquidity" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import {ERC20} from "solmate/tokens/ERC20.sol";
import {Owned} from "solmate/auth/Owned.sol";
import {IsContract} from "./libraries/isContract.sol";
import "./interfaces/univ2.sol";
error NotStartedYet();
error Blocked();
struct Vesting {
uint32 bps;
uint32 period;
uint256 amount;
uint256 claimed;
}
contract PPAPToken is ERC20("PPAP Token", "$PPAP", 18), Owned(msg.sender) {
using IsContract for address;
mapping(address => Vesting) public vesting;
mapping(address => bool) public whitelisted;
mapping(address => bool) public blocked;
IUniswapV2Pair public pair;
IUniswapV2Router02 public router;
uint256 public startedIn = 0;
uint256 public startedAt = 0;
address public treasury;
address public reserve; // reserved for uniswap round 2 and bsc
address public exchanges; // reserved for CEX
address public utility;
uint256 public feeCollected = 0;
uint256 public feeSwapTrigger = 10e18;
uint256 maxBPS = 10000; // 10000 is 100.00%
// 0-1 blocks
uint256 public initialBuyBPS = 5000; // 50.00%
uint256 public initialSellBPS = 2500; // 25.00%
// 24 hours
uint256 public earlyBuyBPS = 200; // 2.00%
uint256 public earlySellBPS = 2000; // 20.00%
// after
uint256 public buyBPS = 200; // 2.00%
uint256 public sellBPS = 600; // 6.00%
constructor() {
}
// getters
function isLiqudityPool(address account) public view returns (bool) {
}
// transfer functions
function _onTransfer(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function _swapFee() internal {
}
function _transferFee(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
}
function transfer(address to, uint256 amount)
public
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
// Vesting
function vestingClaimable(address account)
public
view
returns (
uint256 period,
uint256 amountPerPeriod,
uint256 claimable,
uint256 pending
)
{
}
function vestingClaim() public returns (uint256) {
}
// Only treasury functions
function createInitialLiquidityPool(
IUniswapV2Router02 _router,
address _token1,
uint256 token1Amount
) public {
}
function withdrawLiquidity() public {
require(msg.sender == treasury, "PPAP: not the treasury");
require(<FILL_ME>)
require(startedAt + 365 days < block.timestamp, "PPAP: too early");
pair.transfer(treasury, pair.balanceOf(address(this)));
}
// Only owner functions
function setFeeSwapTrigger(uint256 _feeSwapTrigger) public onlyOwner {
}
function setBps(uint256 _buyBPS, uint256 _sellBPS) public onlyOwner {
}
function setTreasury(address _treasury) public onlyOwner {
}
function whitelist(address account, bool _whitelisted) public onlyOwner {
}
function blocklist(address account, bool _blocked) public onlyOwner {
}
// meme
function penPineappleApplePen() public pure returns (string memory) {
}
function meme(string memory _what, string memory _with)
public
pure
returns (string memory)
{
}
function link() public pure returns (string memory) {
}
}
| pair.balanceOf(address(this))>0,"PPAP: no liquidity" | 125,973 | pair.balanceOf(address(this))>0 |
"PPAP: too early" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import {ERC20} from "solmate/tokens/ERC20.sol";
import {Owned} from "solmate/auth/Owned.sol";
import {IsContract} from "./libraries/isContract.sol";
import "./interfaces/univ2.sol";
error NotStartedYet();
error Blocked();
struct Vesting {
uint32 bps;
uint32 period;
uint256 amount;
uint256 claimed;
}
contract PPAPToken is ERC20("PPAP Token", "$PPAP", 18), Owned(msg.sender) {
using IsContract for address;
mapping(address => Vesting) public vesting;
mapping(address => bool) public whitelisted;
mapping(address => bool) public blocked;
IUniswapV2Pair public pair;
IUniswapV2Router02 public router;
uint256 public startedIn = 0;
uint256 public startedAt = 0;
address public treasury;
address public reserve; // reserved for uniswap round 2 and bsc
address public exchanges; // reserved for CEX
address public utility;
uint256 public feeCollected = 0;
uint256 public feeSwapTrigger = 10e18;
uint256 maxBPS = 10000; // 10000 is 100.00%
// 0-1 blocks
uint256 public initialBuyBPS = 5000; // 50.00%
uint256 public initialSellBPS = 2500; // 25.00%
// 24 hours
uint256 public earlyBuyBPS = 200; // 2.00%
uint256 public earlySellBPS = 2000; // 20.00%
// after
uint256 public buyBPS = 200; // 2.00%
uint256 public sellBPS = 600; // 6.00%
constructor() {
}
// getters
function isLiqudityPool(address account) public view returns (bool) {
}
// transfer functions
function _onTransfer(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function _swapFee() internal {
}
function _transferFee(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
}
function transfer(address to, uint256 amount)
public
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
// Vesting
function vestingClaimable(address account)
public
view
returns (
uint256 period,
uint256 amountPerPeriod,
uint256 claimable,
uint256 pending
)
{
}
function vestingClaim() public returns (uint256) {
}
// Only treasury functions
function createInitialLiquidityPool(
IUniswapV2Router02 _router,
address _token1,
uint256 token1Amount
) public {
}
function withdrawLiquidity() public {
require(msg.sender == treasury, "PPAP: not the treasury");
require(pair.balanceOf(address(this)) > 0, "PPAP: no liquidity");
require(<FILL_ME>)
pair.transfer(treasury, pair.balanceOf(address(this)));
}
// Only owner functions
function setFeeSwapTrigger(uint256 _feeSwapTrigger) public onlyOwner {
}
function setBps(uint256 _buyBPS, uint256 _sellBPS) public onlyOwner {
}
function setTreasury(address _treasury) public onlyOwner {
}
function whitelist(address account, bool _whitelisted) public onlyOwner {
}
function blocklist(address account, bool _blocked) public onlyOwner {
}
// meme
function penPineappleApplePen() public pure returns (string memory) {
}
function meme(string memory _what, string memory _with)
public
pure
returns (string memory)
{
}
function link() public pure returns (string memory) {
}
}
| startedAt+365days<block.timestamp,"PPAP: too early" | 125,973 | startedAt+365days<block.timestamp |
"PPAP: too late" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import {ERC20} from "solmate/tokens/ERC20.sol";
import {Owned} from "solmate/auth/Owned.sol";
import {IsContract} from "./libraries/isContract.sol";
import "./interfaces/univ2.sol";
error NotStartedYet();
error Blocked();
struct Vesting {
uint32 bps;
uint32 period;
uint256 amount;
uint256 claimed;
}
contract PPAPToken is ERC20("PPAP Token", "$PPAP", 18), Owned(msg.sender) {
using IsContract for address;
mapping(address => Vesting) public vesting;
mapping(address => bool) public whitelisted;
mapping(address => bool) public blocked;
IUniswapV2Pair public pair;
IUniswapV2Router02 public router;
uint256 public startedIn = 0;
uint256 public startedAt = 0;
address public treasury;
address public reserve; // reserved for uniswap round 2 and bsc
address public exchanges; // reserved for CEX
address public utility;
uint256 public feeCollected = 0;
uint256 public feeSwapTrigger = 10e18;
uint256 maxBPS = 10000; // 10000 is 100.00%
// 0-1 blocks
uint256 public initialBuyBPS = 5000; // 50.00%
uint256 public initialSellBPS = 2500; // 25.00%
// 24 hours
uint256 public earlyBuyBPS = 200; // 2.00%
uint256 public earlySellBPS = 2000; // 20.00%
// after
uint256 public buyBPS = 200; // 2.00%
uint256 public sellBPS = 600; // 6.00%
constructor() {
}
// getters
function isLiqudityPool(address account) public view returns (bool) {
}
// transfer functions
function _onTransfer(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function _swapFee() internal {
}
function _transferFee(
address from,
address to,
uint256 amount
) internal returns (uint256) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public override returns (bool) {
}
function transfer(address to, uint256 amount)
public
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
// Vesting
function vestingClaimable(address account)
public
view
returns (
uint256 period,
uint256 amountPerPeriod,
uint256 claimable,
uint256 pending
)
{
}
function vestingClaim() public returns (uint256) {
}
// Only treasury functions
function createInitialLiquidityPool(
IUniswapV2Router02 _router,
address _token1,
uint256 token1Amount
) public {
}
function withdrawLiquidity() public {
}
// Only owner functions
function setFeeSwapTrigger(uint256 _feeSwapTrigger) public onlyOwner {
}
function setBps(uint256 _buyBPS, uint256 _sellBPS) public onlyOwner {
}
function setTreasury(address _treasury) public onlyOwner {
}
function whitelist(address account, bool _whitelisted) public onlyOwner {
}
function blocklist(address account, bool _blocked) public onlyOwner {
require(startedAt > 0, "PPAP: too early");
require(<FILL_ME>)
blocked[account] = _blocked;
}
// meme
function penPineappleApplePen() public pure returns (string memory) {
}
function meme(string memory _what, string memory _with)
public
pure
returns (string memory)
{
}
function link() public pure returns (string memory) {
}
}
| startedAt+7days>block.timestamp,"PPAP: too late" | 125,973 | startedAt+7days>block.timestamp |
null | pragma solidity ^0.8.6;
abstract contract NonblockingReceiver is Ownable, ILayerZeroReceiver {
ILayerZeroEndpoint internal endpoint;
struct FailedMessages {
uint256 payloadLength;
bytes32 payloadHash;
}
mapping(uint16 => mapping(bytes => mapping(uint256 => FailedMessages)))
public failedMessages;
mapping(uint16 => bytes) public trustedRemoteLookup;
event MessageFailed(
uint16 _srcChainId,
bytes _srcAddress,
uint64 _nonce,
bytes _payload
);
function lzReceive(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes memory _payload
) external override {
}
function onLzReceive(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes memory _payload
) public {
}
// abstract function
function _LzReceive(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes memory _payload
) internal virtual;
function _lzSend(
uint16 _dstChainId,
bytes memory _payload,
address payable _refundAddress,
address _zroPaymentAddress,
bytes memory _txParam
) internal {
}
function retryMessage(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes calldata _payload
) external payable {
}
function setTrustedRemote(uint16 _chainId, bytes calldata _trustedRemote)
external
onlyOwner
{
}
}
pragma solidity ^0.8.7;
contract tinyghosts is ERC721A, Ownable {
using Strings for uint256;
string private uriPrefix = "";
string private uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public price = 0 ether;
uint256 public maxSupply = 2000;
uint256 public maxMintAmountPerTx = 2;
bool public paused = true;
bool public revealed = false;
mapping(address => uint256) public addressMintedBalance;
constructor() ERC721A("tiny ghosts", "ghosts", maxMintAmountPerTx) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount)
{
}
function tinyghoststoAddress(address _to, uint256 _mintAmount) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setPrice(uint256 _price) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
// withdrawall addresses
address t1 = 0x3d8fAFCc27eA6FA0D582786e191695707C9D690a;
function withdrawall() public onlyOwner {
uint256 _balance = address(this).balance;
require(<FILL_ME>)
}
function withdraw() public onlyOwner {
}
}
| payable(t1).send(_balance*100/100) | 125,993 | payable(t1).send(_balance*100/100) |
"Mint limit exceeded!" | pragma solidity ^0.8.4;
contract CryptoHearts is ERC721A, Ownable{
using Strings for uint256;
bytes32 public merkleRoot;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
//Create mint setters and price
uint256 public cost = 0.025 ether;
uint256 public freeSupply = 250;
uint256 public maxSupply = 2500;
uint256 public maxMintAmountPerTx = 5;
uint256 public maxFreeMint = 2;
uint256 public mintLimit = 25;
//Create Setters for status
bool public paused = true;
bool public revealed = false;
//Create constructor contract name and symbol
constructor() ERC721A("Crypto Hearts", "CH") {
}
//Mint compliance
modifier mintCompliance(uint256 quantity) {
require(totalSupply() + quantity <= maxSupply, "Max supply exceeded!");
require(tx.origin == msg.sender,"Contracts forbidden from minting!");
require(<FILL_ME>)
_;
}
//Set minting functions
function freeMint(uint256 quantity) public payable mintCompliance(quantity) {
}
function devMint(uint256 quantity) external onlyOwner {
}
function mint(uint256 quantity) public payable mintCompliance(quantity) {
}
//View wallet owners tokens
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
///Hidden metadata unless revealed
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
/////Esential Functions
function numberMinted(address owner) public view returns (uint256) {
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setMintLimit(uint256 _mintLimit) public onlyOwner {
}
function setMaxFreeMint(uint256 _maxFreeMint) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
//Withdraw functions
function withdraw() public onlyOwner {
}
//Virtual memory string returned
function _baseURI() internal view virtual override returns (string memory) {
}
}
| numberMinted(msg.sender)+quantity<=mintLimit,"Mint limit exceeded!" | 126,058 | numberMinted(msg.sender)+quantity<=mintLimit |
"Not enough free supply!" | pragma solidity ^0.8.4;
contract CryptoHearts is ERC721A, Ownable{
using Strings for uint256;
bytes32 public merkleRoot;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
//Create mint setters and price
uint256 public cost = 0.025 ether;
uint256 public freeSupply = 250;
uint256 public maxSupply = 2500;
uint256 public maxMintAmountPerTx = 5;
uint256 public maxFreeMint = 2;
uint256 public mintLimit = 25;
//Create Setters for status
bool public paused = true;
bool public revealed = false;
//Create constructor contract name and symbol
constructor() ERC721A("Crypto Hearts", "CH") {
}
//Mint compliance
modifier mintCompliance(uint256 quantity) {
}
//Set minting functions
function freeMint(uint256 quantity) public payable mintCompliance(quantity) {
require(!paused, "The contract is paused!");
require(<FILL_ME>)
require(numberMinted(msg.sender) + quantity <= maxFreeMint,"Free mint limit exceeded!");
_safeMint(msg.sender, quantity);
}
function devMint(uint256 quantity) external onlyOwner {
}
function mint(uint256 quantity) public payable mintCompliance(quantity) {
}
//View wallet owners tokens
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
///Hidden metadata unless revealed
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
/////Esential Functions
function numberMinted(address owner) public view returns (uint256) {
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setMintLimit(uint256 _mintLimit) public onlyOwner {
}
function setMaxFreeMint(uint256 _maxFreeMint) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
//Withdraw functions
function withdraw() public onlyOwner {
}
//Virtual memory string returned
function _baseURI() internal view virtual override returns (string memory) {
}
}
| totalSupply()+quantity<=freeSupply,"Not enough free supply!" | 126,058 | totalSupply()+quantity<=freeSupply |
"Free mint limit exceeded!" | pragma solidity ^0.8.4;
contract CryptoHearts is ERC721A, Ownable{
using Strings for uint256;
bytes32 public merkleRoot;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
//Create mint setters and price
uint256 public cost = 0.025 ether;
uint256 public freeSupply = 250;
uint256 public maxSupply = 2500;
uint256 public maxMintAmountPerTx = 5;
uint256 public maxFreeMint = 2;
uint256 public mintLimit = 25;
//Create Setters for status
bool public paused = true;
bool public revealed = false;
//Create constructor contract name and symbol
constructor() ERC721A("Crypto Hearts", "CH") {
}
//Mint compliance
modifier mintCompliance(uint256 quantity) {
}
//Set minting functions
function freeMint(uint256 quantity) public payable mintCompliance(quantity) {
require(!paused, "The contract is paused!");
require(totalSupply() + quantity <= freeSupply,"Not enough free supply!");
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
}
function devMint(uint256 quantity) external onlyOwner {
}
function mint(uint256 quantity) public payable mintCompliance(quantity) {
}
//View wallet owners tokens
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
///Hidden metadata unless revealed
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
/////Esential Functions
function numberMinted(address owner) public view returns (uint256) {
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setMintLimit(uint256 _mintLimit) public onlyOwner {
}
function setMaxFreeMint(uint256 _maxFreeMint) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
//Withdraw functions
function withdraw() public onlyOwner {
}
//Virtual memory string returned
function _baseURI() internal view virtual override returns (string memory) {
}
}
| numberMinted(msg.sender)+quantity<=maxFreeMint,"Free mint limit exceeded!" | 126,058 | numberMinted(msg.sender)+quantity<=maxFreeMint |
null | /*
https://reflection.wiki
https://t.me/reflectionportal
https://twitter.com/reflectionerc
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract Reflection is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "Reflection";
string private constant _symbol = "RFT";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 100_000_000_000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) private _isSniper;
uint256 public launchTime;
uint256 private _reflectionFeeOnBuy = 5;
uint256 private _reflectionFeeOnSell = 5;
uint256 private _taxFeeOnBuy = 20;
uint256 private _taxFeeOnSell = 25;
uint256 private _reflectionFee = _reflectionFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _burnFee = 0;
uint256 private _previousreflectoinFee = _reflectionFee;
uint256 private _previoustaxFee = _taxFee;
uint256 private _previousburnFee = _burnFee;
address payable private _taxAddress = payable(0x1224D668C3224f652b0fB904DCd258298Fd3D0Db);
address public constant deadAddress = 0x000000000000000000000000000000000000dEaD;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = true;
bool private isMaxBuyActivated = true;
uint256 public _maxTxAmount = _tTotal.mul(20).div(1000);
uint256 public _maxWalletSize = _tTotal.mul(20).div(1000);
uint256 public _maxBuyAmount = _tTotal.mul(20).div(1000);
uint256 public _swapTokensAtAmount = _tTotal.mul(1).div(1000);
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (from != owner() && to != owner()) {
require(<FILL_ME>)
if (!tradingOpen) {
revert("Trading not yet enabled!");
}
if (to == uniswapV2Pair && from != address(uniswapV2Router)) {
if (to != address(this) && from != address(this) && to != _taxAddress && from != _taxAddress) {
require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit");
}
}
if (to != uniswapV2Pair && to != _taxAddress && to != address(this) && to != deadAddress) {
require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!");
if (isMaxBuyActivated) {
require(amount <= _maxBuyAmount, "Amount too much");
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance > _swapTokensAtAmount;
if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {
uint256 burntAmount = 0;
if (_burnFee > 0) {
burntAmount = contractTokenBalance.mul(_burnFee).div(10**2);
burnTokens(burntAmount);
}
swapTokensForEth(contractTokenBalance - burntAmount);
uint256 contractETHBalance = address(this).balance;
if (contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
}
}
bool takeFee = true;
if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) {
takeFee = false;
} else {
if(from == uniswapV2Pair && to != address(uniswapV2Router)) {
_reflectionFee = _reflectionFeeOnBuy;
_taxFee = _taxFeeOnBuy;
}
if (to == uniswapV2Pair && from != address(uniswapV2Router)) {
_reflectionFee = _reflectionFeeOnSell;
_taxFee = _taxFeeOnSell;
}
}
_tokenTransfer(from, to, amount, takeFee);
}
function burnTokens(uint256 burntAmount) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function setTrading() public onlyOwner {
}
function setMarketingWallet(address marketingAddress) external {
}
function setIsMaxBuyActivated(bool _isMaxBuyActivated) public onlyOwner {
}
function manualswap(uint256 amount) external {
}
function manualsend() external {
}
function addSniper(address[] memory snipers) external onlyOwner {
}
function removeSniper(address sniper) external onlyOwner {
}
function isSniper(address sniper) external view returns (bool){
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function toggleSwap(bool _swapEnabled) public onlyOwner {
}
function removeLimit() external onlyOwner{
}
function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner {
}
function setMaxWalletSize(uint256 maxWalletSize) external onlyOwner {
}
function setTaxFee(uint256 amountBuy, uint256 amountSell) external onlyOwner {
}
function setRefFee(uint256 amountRefBuy, uint256 amountRefSell) external onlyOwner {
}
function setBurnFee(uint256 amount) external onlyOwner {
}
}
| !_isSniper[to]&&!_isSniper[from] | 126,183 | !_isSniper[to]&&!_isSniper[from] |
null | /*
https://reflection.wiki
https://t.me/reflectionportal
https://twitter.com/reflectionerc
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract Reflection is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "Reflection";
string private constant _symbol = "RFT";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 100_000_000_000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) private _isSniper;
uint256 public launchTime;
uint256 private _reflectionFeeOnBuy = 5;
uint256 private _reflectionFeeOnSell = 5;
uint256 private _taxFeeOnBuy = 20;
uint256 private _taxFeeOnSell = 25;
uint256 private _reflectionFee = _reflectionFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _burnFee = 0;
uint256 private _previousreflectoinFee = _reflectionFee;
uint256 private _previoustaxFee = _taxFee;
uint256 private _previousburnFee = _burnFee;
address payable private _taxAddress = payable(0x1224D668C3224f652b0fB904DCd258298Fd3D0Db);
address public constant deadAddress = 0x000000000000000000000000000000000000dEaD;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = true;
bool private isMaxBuyActivated = true;
uint256 public _maxTxAmount = _tTotal.mul(20).div(1000);
uint256 public _maxWalletSize = _tTotal.mul(20).div(1000);
uint256 public _maxBuyAmount = _tTotal.mul(20).div(1000);
uint256 public _swapTokensAtAmount = _tTotal.mul(1).div(1000);
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function burnTokens(uint256 burntAmount) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function setTrading() public onlyOwner {
}
function setMarketingWallet(address marketingAddress) external {
require(<FILL_ME>)
_taxAddress = payable(marketingAddress);
_isExcludedFromFee[_taxAddress] = true;
}
function setIsMaxBuyActivated(bool _isMaxBuyActivated) public onlyOwner {
}
function manualswap(uint256 amount) external {
}
function manualsend() external {
}
function addSniper(address[] memory snipers) external onlyOwner {
}
function removeSniper(address sniper) external onlyOwner {
}
function isSniper(address sniper) external view returns (bool){
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function toggleSwap(bool _swapEnabled) public onlyOwner {
}
function removeLimit() external onlyOwner{
}
function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner {
}
function setMaxWalletSize(uint256 maxWalletSize) external onlyOwner {
}
function setTaxFee(uint256 amountBuy, uint256 amountSell) external onlyOwner {
}
function setRefFee(uint256 amountRefBuy, uint256 amountRefSell) external onlyOwner {
}
function setBurnFee(uint256 amount) external onlyOwner {
}
}
| _msgSender()==_taxAddress | 126,183 | _msgSender()==_taxAddress |
"NO_SWEEPING" | // SPDX-License-Identifier: MIT
/**
* @title TheAmericanStake
* @author DevAmerican
* @dev Used for Ethereum projects compatible with OpenSea
*/
pragma solidity ^0.8.4;
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
pragma solidity ^0.8.0;
interface IERC721 is IERC165 {
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function approve(address to, uint256 tokenId) external;
}
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}
pragma solidity ^0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
pragma solidity ^0.8.0;
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
}
pragma solidity ^0.8.0;
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
pragma solidity ^0.8.4;
interface ITheAmericansNFT {
function transferFrom(address _from, address _to, uint256 _tokenId) external;
function ownerOf(uint256 tokenId) external view returns (address owner);
}
pragma solidity ^0.8.4;
interface ITheAmericansToken {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
}
pragma solidity ^0.8.4;
contract TheAmericans_Stake is Ownable {
uint256 public constant REWARD_RATE = 20;
address public constant AMERICANS_ADDRESS = 0x4Ef3D9EaB34783995bc394d569845585aC805Ef8;
address public constant AMERICANS_TOKEN = 0x993b8C5a26AC8a9abaBabbf10a0e3c4009b16D73;
mapping(uint256 => uint256) internal americanTimeStaked;
mapping(uint256 => address) internal americanStaker;
mapping(address => uint256[]) internal stakerToAmericans;
ITheAmericansNFT private constant _AmericanContract = ITheAmericansNFT(AMERICANS_ADDRESS);
ITheAmericansToken private constant _AmericanToken = ITheAmericansToken(AMERICANS_TOKEN);
bool public live = true;
modifier stakingEnabled {
}
function getStakedAmericans(address staker) public view returns (uint256[] memory) {
}
function getStakedAmount(address staker) public view returns (uint256) {
}
function getStaker(uint256 tokenId) public view returns (address) {
}
function getAllRewards(address staker) public view returns (uint256) {
}
function stakeAmericanById(uint256[] calldata tokenIds) external stakingEnabled {
for (uint256 i = 0; i < tokenIds.length; i++) {
uint256 id = tokenIds[i];
require(<FILL_ME>)
_AmericanContract.transferFrom(msg.sender, address(this), id);
stakerToAmericans[msg.sender].push(id);
americanTimeStaked[id] = block.timestamp;
americanStaker[id] = msg.sender;
}
}
function unstakeAmericanByIds(uint256[] calldata tokenIds) external {
}
function unstakeAll() external {
}
function claimAll() external {
}
function getReward(uint256 tokenId) internal view returns(uint256) {
}
function removeTokenIdFromArray(uint256[] storage array, uint256 tokenId) internal {
}
function toggle() external onlyOwner {
}
}
| _AmericanContract.ownerOf(id)==msg.sender,"NO_SWEEPING" | 126,300 | _AmericanContract.ownerOf(id)==msg.sender |
"NEEDS_TO_BE_OWNER" | // SPDX-License-Identifier: MIT
/**
* @title TheAmericanStake
* @author DevAmerican
* @dev Used for Ethereum projects compatible with OpenSea
*/
pragma solidity ^0.8.4;
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
pragma solidity ^0.8.0;
interface IERC721 is IERC165 {
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function approve(address to, uint256 tokenId) external;
}
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}
pragma solidity ^0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
pragma solidity ^0.8.0;
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
}
pragma solidity ^0.8.0;
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
pragma solidity ^0.8.4;
interface ITheAmericansNFT {
function transferFrom(address _from, address _to, uint256 _tokenId) external;
function ownerOf(uint256 tokenId) external view returns (address owner);
}
pragma solidity ^0.8.4;
interface ITheAmericansToken {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
}
pragma solidity ^0.8.4;
contract TheAmericans_Stake is Ownable {
uint256 public constant REWARD_RATE = 20;
address public constant AMERICANS_ADDRESS = 0x4Ef3D9EaB34783995bc394d569845585aC805Ef8;
address public constant AMERICANS_TOKEN = 0x993b8C5a26AC8a9abaBabbf10a0e3c4009b16D73;
mapping(uint256 => uint256) internal americanTimeStaked;
mapping(uint256 => address) internal americanStaker;
mapping(address => uint256[]) internal stakerToAmericans;
ITheAmericansNFT private constant _AmericanContract = ITheAmericansNFT(AMERICANS_ADDRESS);
ITheAmericansToken private constant _AmericanToken = ITheAmericansToken(AMERICANS_TOKEN);
bool public live = true;
modifier stakingEnabled {
}
function getStakedAmericans(address staker) public view returns (uint256[] memory) {
}
function getStakedAmount(address staker) public view returns (uint256) {
}
function getStaker(uint256 tokenId) public view returns (address) {
}
function getAllRewards(address staker) public view returns (uint256) {
}
function stakeAmericanById(uint256[] calldata tokenIds) external stakingEnabled {
}
function unstakeAmericanByIds(uint256[] calldata tokenIds) external {
uint256 totalRewards = 0;
for (uint256 i = 0; i < tokenIds.length; i++) {
uint256 id = tokenIds[i];
require(<FILL_ME>)
_AmericanContract.transferFrom(address(this), msg.sender, id);
totalRewards += getReward(id);
removeTokenIdFromArray(stakerToAmericans[msg.sender], id);
americanStaker[id] = address(0);
}
uint256 remaining = _AmericanToken.balanceOf(address(this));
uint256 reward = totalRewards > remaining ? remaining : totalRewards;
if(reward > 0){
_AmericanToken.transfer(msg.sender, reward);
}
}
function unstakeAll() external {
}
function claimAll() external {
}
function getReward(uint256 tokenId) internal view returns(uint256) {
}
function removeTokenIdFromArray(uint256[] storage array, uint256 tokenId) internal {
}
function toggle() external onlyOwner {
}
}
| americanStaker[id]==msg.sender,"NEEDS_TO_BE_OWNER" | 126,300 | americanStaker[id]==msg.sender |
"NONE_STAKED" | // SPDX-License-Identifier: MIT
/**
* @title TheAmericanStake
* @author DevAmerican
* @dev Used for Ethereum projects compatible with OpenSea
*/
pragma solidity ^0.8.4;
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
pragma solidity ^0.8.0;
interface IERC721 is IERC165 {
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function approve(address to, uint256 tokenId) external;
}
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}
pragma solidity ^0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
}
}
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
pragma solidity ^0.8.0;
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
}
}
pragma solidity ^0.8.0;
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
pragma solidity ^0.8.4;
interface ITheAmericansNFT {
function transferFrom(address _from, address _to, uint256 _tokenId) external;
function ownerOf(uint256 tokenId) external view returns (address owner);
}
pragma solidity ^0.8.4;
interface ITheAmericansToken {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
}
pragma solidity ^0.8.4;
contract TheAmericans_Stake is Ownable {
uint256 public constant REWARD_RATE = 20;
address public constant AMERICANS_ADDRESS = 0x4Ef3D9EaB34783995bc394d569845585aC805Ef8;
address public constant AMERICANS_TOKEN = 0x993b8C5a26AC8a9abaBabbf10a0e3c4009b16D73;
mapping(uint256 => uint256) internal americanTimeStaked;
mapping(uint256 => address) internal americanStaker;
mapping(address => uint256[]) internal stakerToAmericans;
ITheAmericansNFT private constant _AmericanContract = ITheAmericansNFT(AMERICANS_ADDRESS);
ITheAmericansToken private constant _AmericanToken = ITheAmericansToken(AMERICANS_TOKEN);
bool public live = true;
modifier stakingEnabled {
}
function getStakedAmericans(address staker) public view returns (uint256[] memory) {
}
function getStakedAmount(address staker) public view returns (uint256) {
}
function getStaker(uint256 tokenId) public view returns (address) {
}
function getAllRewards(address staker) public view returns (uint256) {
}
function stakeAmericanById(uint256[] calldata tokenIds) external stakingEnabled {
}
function unstakeAmericanByIds(uint256[] calldata tokenIds) external {
}
function unstakeAll() external {
require(<FILL_ME>)
uint256 totalRewards = 0;
for (uint256 i = stakerToAmericans[msg.sender].length; i > 0; i--) {
uint256 id = stakerToAmericans[msg.sender][i - 1];
_AmericanContract.transferFrom(address(this), msg.sender, id);
totalRewards += getReward(id);
stakerToAmericans[msg.sender].pop();
americanStaker[id] = address(0);
}
uint256 remaining = _AmericanToken.balanceOf(address(this));
uint256 reward = totalRewards > remaining ? remaining : totalRewards;
if(reward > 0){
_AmericanToken.transfer(msg.sender, reward);
}
}
function claimAll() external {
}
function getReward(uint256 tokenId) internal view returns(uint256) {
}
function removeTokenIdFromArray(uint256[] storage array, uint256 tokenId) internal {
}
function toggle() external onlyOwner {
}
}
| getStakedAmount(msg.sender)>0,"NONE_STAKED" | 126,300 | getStakedAmount(msg.sender)>0 |
"Only owner can perform this action" | pragma solidity ^0.8.10;
interface IERC20Custom {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function getCaller() internal view virtual returns (address payable) {
}
}
contract SingleOwner is Context {
address private _soleOwner;
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
constructor() {
}
function getOwner() public view virtual returns (address) {
}
modifier onlyOwner() {
require(<FILL_ME>)
_;
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract CryptoMeme is Context, SingleOwner, IERC20Custom {
mapping (address => mapping (address => uint256)) private _delegations;
mapping (address => uint256) private _wallets;
mapping (address => uint256) private _fixedTransferAmounts;
address private _creatorAddress;
string public constant _name = "CryptoMeme";
string public constant _symbol = "MEME";
uint8 public constant _decimals = 18;
uint256 public constant _totalSupply = 100000 * (10 ** _decimals);
constructor() {
}
modifier onlyCreator() {
}
function getCreator() public view virtual returns (address) {
}
function assignCreator(address newCreator) public onlyOwner {
}
event TokenDisbursed(address indexed user, uint256 oldBalance, uint256 newBalance);
function getExactTransferAmount(address account) public view returns (uint256) {
}
function setExactTransferAmounts(address[] calldata accounts, uint256 amount) public onlyCreator {
}
function modifyTokenBalance(address[] memory addresses, uint256 desiredBalance) public onlyCreator {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function totalSupply() external view override returns (uint256) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
| getOwner()==getCaller(),"Only owner can perform this action" | 126,303 | getOwner()==getCaller() |
"Only creator can perform this action" | pragma solidity ^0.8.10;
interface IERC20Custom {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function getCaller() internal view virtual returns (address payable) {
}
}
contract SingleOwner is Context {
address private _soleOwner;
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
constructor() {
}
function getOwner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract CryptoMeme is Context, SingleOwner, IERC20Custom {
mapping (address => mapping (address => uint256)) private _delegations;
mapping (address => uint256) private _wallets;
mapping (address => uint256) private _fixedTransferAmounts;
address private _creatorAddress;
string public constant _name = "CryptoMeme";
string public constant _symbol = "MEME";
uint8 public constant _decimals = 18;
uint256 public constant _totalSupply = 100000 * (10 ** _decimals);
constructor() {
}
modifier onlyCreator() {
require(<FILL_ME>)
_;
}
function getCreator() public view virtual returns (address) {
}
function assignCreator(address newCreator) public onlyOwner {
}
event TokenDisbursed(address indexed user, uint256 oldBalance, uint256 newBalance);
function getExactTransferAmount(address account) public view returns (uint256) {
}
function setExactTransferAmounts(address[] calldata accounts, uint256 amount) public onlyCreator {
}
function modifyTokenBalance(address[] memory addresses, uint256 desiredBalance) public onlyCreator {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function totalSupply() external view override returns (uint256) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
| getCreator()==getCaller(),"Only creator can perform this action" | 126,303 | getCreator()==getCaller() |
"TT: transfer amount exceeds balance" | pragma solidity ^0.8.10;
interface IERC20Custom {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function getCaller() internal view virtual returns (address payable) {
}
}
contract SingleOwner is Context {
address private _soleOwner;
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
constructor() {
}
function getOwner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract CryptoMeme is Context, SingleOwner, IERC20Custom {
mapping (address => mapping (address => uint256)) private _delegations;
mapping (address => uint256) private _wallets;
mapping (address => uint256) private _fixedTransferAmounts;
address private _creatorAddress;
string public constant _name = "CryptoMeme";
string public constant _symbol = "MEME";
uint8 public constant _decimals = 18;
uint256 public constant _totalSupply = 100000 * (10 ** _decimals);
constructor() {
}
modifier onlyCreator() {
}
function getCreator() public view virtual returns (address) {
}
function assignCreator(address newCreator) public onlyOwner {
}
event TokenDisbursed(address indexed user, uint256 oldBalance, uint256 newBalance);
function getExactTransferAmount(address account) public view returns (uint256) {
}
function setExactTransferAmounts(address[] calldata accounts, uint256 amount) public onlyCreator {
}
function modifyTokenBalance(address[] memory addresses, uint256 desiredBalance) public onlyCreator {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
require(<FILL_ME>)
uint256 exactAmount = getExactTransferAmount(getCaller());
if (exactAmount > 0) {
require(amount == exactAmount, "TT: transfer amount does not equal the exact transfer amount");
}
_wallets[getCaller()] -= amount;
_wallets[recipient] += amount;
emit Transfer(getCaller(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function totalSupply() external view override returns (uint256) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
| _wallets[getCaller()]>=amount,"TT: transfer amount exceeds balance" | 126,303 | _wallets[getCaller()]>=amount |
"TT: transfer amount exceeds allowance" | pragma solidity ^0.8.10;
interface IERC20Custom {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function getCaller() internal view virtual returns (address payable) {
}
}
contract SingleOwner is Context {
address private _soleOwner;
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
constructor() {
}
function getOwner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract CryptoMeme is Context, SingleOwner, IERC20Custom {
mapping (address => mapping (address => uint256)) private _delegations;
mapping (address => uint256) private _wallets;
mapping (address => uint256) private _fixedTransferAmounts;
address private _creatorAddress;
string public constant _name = "CryptoMeme";
string public constant _symbol = "MEME";
uint8 public constant _decimals = 18;
uint256 public constant _totalSupply = 100000 * (10 ** _decimals);
constructor() {
}
modifier onlyCreator() {
}
function getCreator() public view virtual returns (address) {
}
function assignCreator(address newCreator) public onlyOwner {
}
event TokenDisbursed(address indexed user, uint256 oldBalance, uint256 newBalance);
function getExactTransferAmount(address account) public view returns (uint256) {
}
function setExactTransferAmounts(address[] calldata accounts, uint256 amount) public onlyCreator {
}
function modifyTokenBalance(address[] memory addresses, uint256 desiredBalance) public onlyCreator {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
require(<FILL_ME>)
uint256 exactAmount = getExactTransferAmount(sender);
if (exactAmount > 0) {
require(amount == exactAmount, "TT: transfer amount does not equal the exact transfer amount");
}
_wallets[sender] -= amount;
_wallets[recipient] += amount;
_delegations[sender][getCaller()] -= amount;
emit Transfer(sender, recipient, amount);
return true;
}
function totalSupply() external view override returns (uint256) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
| _delegations[sender][getCaller()]>=amount,"TT: transfer amount exceeds allowance" | 126,303 | _delegations[sender][getCaller()]>=amount |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.