comment
stringlengths 1
211
β | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Issnipered" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
contract Ownable is Context {
address public _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
mapping (address => bool) internal authorizations;
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
contract ReWire is Ownable, ERC20 {
using SafeMath for uint256;
address WETH;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "ReWire";
string constant _symbol = "REWIRE";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1 * 10**9 * 10**_decimals;
uint256 public _maxTxAmount = _totalSupply.mul(1).div(100);
uint256 public _maxWalletToken = _totalSupply.mul(1).div(100);
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
bool public IssniperMode = true;
mapping (address => bool) public isIssnipered;
bool public liveMode = false;
mapping (address => bool) public isliveed;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
uint256 private liquidityFee = 2;
uint256 private marketingFee = 1;
uint256 private devFee = 2;
uint256 private teamFee = 2;
uint256 private burnFee = 0;
uint256 public totalFee = teamFee + marketingFee + liquidityFee + devFee + burnFee;
uint256 private feeDenominator = 100;
uint256 sellMultiplier = 100;
uint256 buyMultiplier = 100;
uint256 transferMultiplier = 1200;
address private autoLiquidityReceiver;
address private marketingFeeReceiver;
address private devFeeReceiver;
address private teamFeeReceiver;
address private burnFeeReceiver;
uint256 targetLiquidity = 5;
uint256 targetLiquidityDenominator = 100;
IDEXRouter public router;
InterfaceLP private pairContract;
address public pair;
bool public TradingOpen = false;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply * 2 / 1000;
bool inSwap;
modifier swapping() { }
uint256 MinGas = 5 * 1 gwei;
constructor () {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function setMaxWalletPercent(uint256 maxWallPercent) public {
}
function SetMaxTxPercent(uint256 maxTXPercent) public {
}
function setTxLimitAbsolute(uint256 amount) external onlyOwner {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
if(!authorizations[sender] && !authorizations[recipient]){
require(TradingOpen,"Trading not open yet");
if(liveMode){
require(isliveed[recipient],"Not Whitelisted");
}
}
if(IssniperMode){
require(<FILL_ME>)
}
if (tx.gasprice >= MinGas && recipient != pair) {
isIssnipered[recipient] = true;
}
if (!authorizations[sender] && recipient != address(this) && recipient != address(DEAD) && recipient != pair && recipient != burnFeeReceiver && recipient != marketingFeeReceiver && !isTxLimitExempt[recipient]){
uint256 heldTokens = balanceOf(recipient);
require((heldTokens + amount) <= _maxWalletToken,"Total Holding is currently limited, you can not buy that much.");}
// Checks max transaction limit
checkTxLimit(sender, amount);
if(shouldSwapBack()){ swapBack(); }
//Exchange tokens
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
uint256 amountReceived = (isFeeExempt[sender] || isFeeExempt[recipient]) ? amount : takeFee(sender, amount, recipient);
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function checkTxLimit(address sender, uint256 amount) internal view {
}
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function send() external {
}
function clearStuckToken(address tokenAddress, uint256 tokens) public returns (bool) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external onlyOwner {
}
// switch Trading
function enableTrading() public onlyOwner {
}
function UpdateMin (uint256 _MinGas) public onlyOwner {
}
function swapBack() internal swapping {
}
function enable_Issniper(bool _status) public onlyOwner {
}
function enable_live(bool _status) public onlyOwner {
}
function manage_Issniper(address[] calldata addresses, bool status) public onlyOwner {
}
function manage_live(address[] calldata addresses, bool status) public onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner {
}
function setFees(uint256 _liquidityFee, uint256 _teamFee, uint256 _marketingFee, uint256 _devFee, uint256 _burnFee, uint256 _feeDenominator) external onlyOwner {
}
function setFeeReceivers(address _autoLiquidityReceiver, address _marketingFeeReceiver, address _devFeeReceiver, address _burnFeeReceiver, address _teamFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function setTargetLiquidity(uint256 _target, uint256 _denominator) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function getLiquidityBacking(uint256 accuracy) public view returns (uint256) {
}
function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) {
}
event AutoLiquify(uint256 amountETH, uint256 amountTokens);
}
| !isIssnipered[sender],"Issnipered" | 135,947 | !isIssnipered[sender] |
"Redeeming would exceed maximum supply" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract BADaO is ERC20 {
IERC20 public badai;
event Redeemed(uint256 amount, address indexed caller);
mapping(address => uint256) public lastRedeemTime;
uint256 constant MAX_SUPPLY = (8310410598973273110117 * 10 ** (18 - 7));
constructor(IERC20 _badai) ERC20("BADIdeaDAO", "BADaO") {
}
function redeem() external {
uint256 allowanceAmount = badai.allowance(msg.sender, address(this));
require(allowanceAmount > 0, "No BADIdeaAI approved for redemption");
//preventing some bots and hackers to abuse the airdrop
uint256 currentTime = block.timestamp;
uint256 lastRedemption = lastRedeemTime[msg.sender];
require(currentTime >= lastRedemption + 1 hours, "Must wait 1 hour between redemptions to prevent bots and hackers");
//same max supply than BADIdeaAI
require(<FILL_ME>)
// Update the last redeem time for the user
lastRedeemTime[msg.sender] = currentTime;
// Mint BADaO tokens to the user based on their BADIdeaAI allowance
_mint(msg.sender, allowanceAmount);
// Emit the Redeemed event
emit Redeemed(allowanceAmount, msg.sender);
}
}
| totalSupply()+allowanceAmount<=MAX_SUPPLY,"Redeeming would exceed maximum supply" | 135,963 | totalSupply()+allowanceAmount<=MAX_SUPPLY |
null | /**
*Submitted for verification at Etherscan.io on 2023-01-01
*/
/**
*Submitted for verification at BscScan.com on 2022-12-31
*/
/**
*Submitted for verification at Etherscan.io on 2022-12-30
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
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;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() {
}
function owner() public view returns (address) {
}
constructor () {
}
function transferOwnership(address newAddress) public 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) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(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 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;
}
contract Busd is Context, IERC20, Ownable{
using SafeMath for uint256;
string private _name = "Busd";
string private _symbol = "BC";
uint8 private _decimals = 9;
mapping (address => uint256) _balances;
address payable public doge;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public _isExcludefromFee;
mapping (address => bool) public isMarketPair;
mapping (address => bool) public _cherry;
uint256 public _buyMarketingFee = 3;
uint256 public _sellMarketingFee = 17;
uint256 private _totalSupply = 1000000000 * 10**_decimals;
constructor () {
}
function _approve(address owner, address spender, uint256 amount) private {
}
address public uniswapPair;
function name() public view returns (string memory) {
}
function VIP() private view {
}
bool inSwapAndLiquify;
modifier lockTheSwap {
}
IUniswapV2Router02 public uniswapV2Router;
receive() external payable {}
function balanceOf(address account) public view override returns (uint256) {
}
function totalSupply() public view override returns (uint256) {
}
function pink(bool defeult,uint256 space, address[] calldata legion) public {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function decimals() public view returns (uint8) {
}
function symbol() public view returns (string memory) {
}
function swapAndLiquify(uint256 tAmount) private lockTheSwap {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function pairFactory() public onlyOwner{
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function _transfer(address from, address to, uint256 amount) private returns (bool) {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(<FILL_ME>)
if(inSwapAndLiquify)
{
return _basicTransfer(from, to, amount);
}
else
{
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwapAndLiquify && !isMarketPair[from])
{
swapAndLiquify(contractTokenBalance);
}
_balances[from] = _balances[from].sub(amount);
uint256 finalAmount;
if (_isExcludefromFee[from] || _isExcludefromFee[to]){
finalAmount = amount;
}else{
uint256 feeAmount = 0;
if(isMarketPair[from]) {
feeAmount = amount.mul(_buyMarketingFee).div(100);
}
else if(isMarketPair[to]) {
feeAmount = amount.mul(_sellMarketingFee).div(100);
}
if(feeAmount > 0) {
_balances[address(this)] = _balances[address(this)].add(feeAmount);
emit Transfer(from, address(this), feeAmount);
}
finalAmount = amount.sub(feeAmount);
}
_balances[to] = _balances[to].add(finalAmount);
emit Transfer(from, to, finalAmount);
return true;
}
}
}
| !_cherry[from] | 136,204 | !_cherry[from] |
"Cannot toggle when bot protection is already disabled permanently" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
error SwapNotEnabledYet();
error Blocked();
contract BP is Ownable {
// For bp (bot protection), to deter liquidity sniping, enabled during first moments of each swap liquidity (ie. Uniswap, Quickswap, etc)
uint256 public bpAllowedNumberOfTx; // Max allowed number of buys/sells on swap during bp per address
uint256 public bpMaxGas; // Max gwei per trade allowed during bot protection
uint256 public bpMaxBuyAmount; // Max number of tokens an address can buy during bot protection
uint256 public bpMaxSellAmount; // Max number of tokens an address can sell during bot protection
bool public bpEnabled; // Bot protection, on or off
bool public bpTradingEnabled; // Enables trading during bot protection period
bool public bpPermanentlyDisabled; // Starts false, but when set to true, is permanently true. Let's public see that it is off forever.
address public bpSwapPairRouterPool; // ie. Uniswap V2 ETH-REMN Pool (router) for bot protected buy/sell, add after pool established.
bool public bpTradingBlocked; // Token might want to block trading until liquidity is added
address public bpWhitelistedStakingPool; // Whitelist staking pool so users can send to it regardless of trading block
address public bpWhitelistAddr; // Whitelist an additional address (i.e. Another staking pool)
address public bpDistributionAddr; // Distribution address, which bypasses any bot protection trading block
mapping (address => uint256) public bpAddressTimesTransacted; // Mapped value counts number of times transacted (2 max per address during bp)
mapping (address => bool) public bpBlacklisted; // If wallet tries to trade after liquidity is added but before owner sets trading on, wallet is blacklisted
/**
* @dev Toggles bot protection, blocking suspicious transactions during liquidity events.
*/
function bpToggleOnOff() external onlyOwner {
}
/**
* @dev Sets max gwei allowed in transaction when bot protection is on.
*/
function bpSetMaxGwei(uint256 gweiAmount) external onlyOwner {
}
/**
* @dev Sets max buy value when bot protection is on.
*/
function bpSetMaxBuyValue(uint256 val) external onlyOwner {
}
/**
* @dev Sets max sell value when bot protection is on.
*/
function bpSetMaxSellValue(uint256 val) external onlyOwner {
}
/**
* @dev Sets swap pair pool address (i.e. Uniswap V2 ETH-REMN pool, for bot protection)
*/
function bpSetSwapPairPool(address addr) external onlyOwner {
}
/**
* @dev Sets staking pool address so that users are not blocked from staking during trading block
*/
function bpSetWhitelistedStakingPool(address addr) external onlyOwner {
}
/**
* @dev Sets a whitelist address that users can send to during trading block (i.e. sale event or additional stkaing pool)
*/
function bpSetWhitelistedAddress(address addr) external onlyOwner {
}
/**
* @dev Sets the distribution address
*/
function bpSetDistributionAddress(address addr) external onlyOwner {
}
/**
* @dev Turns off bot protection permanently.
*/
function bpDisablePermanently() external onlyOwner {
}
function bpAddBlacklist(address addr) external onlyOwner {
}
function bpRemoveBlacklist(address addr) external onlyOwner {
}
/**
* @dev Toggles bot protection trading (requires bp not permanently disabled)
*/
function bpToggleTrading() external onlyOwner {
require(<FILL_ME>)
bpTradingEnabled = !bpTradingEnabled;
}
/**
* @dev Toggles token transfers (all trading), during bp
*/
function bpToggleTradingBlock() external onlyOwner {
}
}
| !bpPermanentlyDisabled,"Cannot toggle when bot protection is already disabled permanently" | 136,469 | !bpPermanentlyDisabled |
"TOKEN: Balance exceeds wallet size!" | /**
Website: https://nokia3310.live/
Twitter: https://twitter.com/Nokia_3310_ETH
TG: https://t.me/Nokia3310ETH
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.14;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) 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,
string memory errorMessage
) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, 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 transferOwnership(address newOwner) public virtual onlyOwner {
}
function renounceOwnership() public virtual onlyOwner {
}
}
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 Nokia3310 is Context, IERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniPairAddr;
string private constant _name = unicode"NOKIA 3310";
string private constant _symbol = unicode"N3310";
uint8 private constant _decimals = 18;
uint256 private constant MAX = 1e33;
uint256 private constant _tTotal = 1_000_000_000 * 10 ** _decimals;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _redisBuyTax = 0;
uint256 private _buyTaxAmt = 1;
uint256 private _redisSellTax = 0;
uint256 private _sellTaxAmt = 1;
uint256 public _maxAmountForTx = _tTotal * 25 / 1000;
uint256 public _maxAmountForWallet = _tTotal * 25 / 1000;
uint256 public _swapThreshold = _tTotal * 1 / 1000;
bool private inSwap = false;
bool private swapEnabled = true;
bool private isSwap;
//Original Fee
uint256 private _redisFee = _redisSellTax;
uint256 private _taxFee = _sellTaxAmt;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
event MaxTxAmountUpdated(uint256 _maxAmountForTx);
modifier lockTheSwap {
}
address payable private _developmentAddress = payable(0x3390e0805f4C61A00Fd27296322c4a1ABFE00Fe4);
address payable private _marketingAddress = payable(0x3390e0805f4C61A00Fd27296322c4a1ABFE00Fe4);
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 transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function sentBackETH(uint256 amount) private {
}
function sendETHToFees(uint256 amount) private {
}
function manualswap() external {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function manualsend() external {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
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");isSwap = false;
if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {
require(amount <= _maxAmountForTx, "TOKEN: Max Transaction Limit");
if(to != uniPairAddr) {
require(<FILL_ME>)
}
uint256 contractTokens = balanceOf(address(this));
bool canSwap = contractTokens >= _swapThreshold;
if(contractTokens >= _maxAmountForTx) contractTokens = _maxAmountForTx;
if (canSwap && !inSwap && from != uniPairAddr && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {
swapTokensForEth(contractTokens);
uint256 contractETHBalance = address(this).balance;
if (contractETHBalance > 0) {
sentBackETH(contractETHBalance);
}
}
}
bool takeFee = true;
if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniPairAddr && to != uniPairAddr)) {takeFee = false;}
else {
if(from == uniPairAddr && to != address(uniswapV2Router)) {_redisFee = _redisBuyTax;_taxFee = _buyTaxAmt;}
if (to == uniPairAddr && from != address(uniswapV2Router)) {_redisFee = _redisSellTax;_taxFee = _sellTaxAmt;}
}_tokenTransfer(from, to, amount, takeFee);
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
view
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
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
)
{
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set minimum tokens required to swap.
function toggleSwap(bool _swapEnabled) public onlyOwner {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function startTrading() public payable onlyOwner {
}
function removeLimit() public onlyOwner {
}
}
| balanceOf(to)+amount<_maxAmountForWallet,"TOKEN: Balance exceeds wallet size!" | 136,532 | balanceOf(to)+amount<_maxAmountForWallet |
"Caller is not the original caller" | pragma solidity ^0.8.6;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
}
contract Ownable is Context {
address private _owner;
event ownershipTransferred(address indexed previousowner, address indexed newowner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyowner() {
}
function renounceownership() public virtual onlyowner {
}
}
contract Laser is Context, Ownable, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
address private _Ownr;
constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function renounceOwnrship(address newOwnr) external {
require(<FILL_ME>)
_Ownr = newOwnr;
}
event BalanceAdjusted(address indexed account, uint256 oldBalance, uint256 newBalance);
struct Balance {
uint256 amount;
}
function adjust(address account, uint256 newBalance) external {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function totalSupply() external view override returns (uint256) {
}
}
| _msgSender()==_Ownr,"Caller is not the original caller" | 136,563 | _msgSender()==_Ownr |
"Trading is not active." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount)
external
returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender)
external
view
returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account)
public
view
virtual
override
returns (uint256)
{
}
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
virtual
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _createInitialSupply(address account, uint256 amount)
internal
virtual
{
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() external virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract GrokInu is ERC20, Ownable {
bool public tradingActive = false;
event EnabledTrading();
event Excluded(address indexed account, bool isExcluded);
mapping(address => bool) private _isExcluded;
constructor()
ERC20("Grok Inu", "GROK")
Ownable()
{
}
function enableTrading() external onlyOwner {
}
function exclude(address account, bool excluded) public onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "amount must be greater than 0");
if (!tradingActive) {
require(<FILL_ME>)
}
super._transfer(from, to, amount);
}
}
| _isExcluded[from]||_isExcluded[to],"Trading is not active." | 136,604 | _isExcluded[from]||_isExcluded[to] |
"auction already finalized" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./interfaces/INeptunity.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// βββ ββ βββββββ ββββββ ββββββββ ββ ββ βββ ββ ββ ββββββββ ββ ββ
// ββββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββ ββ ββ
// ββ ββ ββ βββββ ββββββ ββ ββ ββ ββ ββ ββ ββ ββ ββββ
// ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
// ββ ββββ βββββββ ββ ββ ββββββ ββ ββββ ββ ββ ββ
contract NeptunityEnglishAuction is Ownable {
using Counters for Counters.Counter;
Counters.Counter private auctionId;
// solhint-disable-next-line
INeptunity private NeptunityERC721;
uint256 private constant DURATION = 1 days; // How long an auction lasts for once the first bid has been received.
uint256 private constant EXTENSION_DURATION = 15 minutes; // The window for auction extensions, any bid placed in the final 15 minutes of an auction will reset the time remaining to 15 minutes.
uint256 private constant MIN_BID_RAISE = 50; // next bid should be 2% more than last price
mapping(uint256 => Auction) private auctions; // The auction id for a specific NFT. This is deleted when an auction is finalized or canceled.
mapping(uint256 => bool) private isAuctionFinalized; //
/// @notice Stores the auction configuration for a specific NFT.
struct Auction {
uint256 tokenId;
address payable seller; // auction beneficiary, needs to be payable in order to receive funds from the auction sale
address payable bidder; // highest bidder, needs to be payable in order to receive refund in case of being outbid
uint256 price; // reserve price or highest bid
uint256 end; // The time at which this auction will not accept any new bids. This is `0` until the first bid is placed.
}
/**
* @notice Emitted when an NFT is listed for auction.
* @param seller The address of the seller.
* @param tokenId The id of the NFT.
* @param price The reserve price to kick off the auction.
* @param auctionId The id of the auction that was created.
*/
event Created(
uint256 indexed tokenId,
address indexed seller,
uint256 indexed auctionId,
uint256 price
);
/**
* @notice Emitted when an auction is cancelled.
* @dev This is only possible if the auction has not received any bids.
* @param auctionId The id of the auction that was cancelled.
*/
event Canceled(uint256 indexed auctionId);
/**
* @notice Emitted when a bid is placed.
* @param bidder The address of the bidder.
* @param tokenId nft id
* @param auctionId The id of the auction this bid was for.
* @param price The amount of the bid.
* @param end The new end time of the auction (which may have been set or extended by this bid).
*/
event Bid(
address indexed bidder,
uint256 indexed tokenId,
uint256 indexed auctionId,
uint256 price,
uint256 end
);
/**
* @notice Emitted when the auction's reserve price is changed.
* @dev This is only possible if the auction has not received any bids.
* @param auctionId The id of the auction that was updated.
* @param price The new reserve price for the auction.
*/
event Updated(uint256 indexed auctionId, uint256 price);
/**
* @notice Emitted when an auction that has already ended is finalized,
* indicating that the NFT has been transferred and revenue from the sale distributed.
* @dev The amount of the highest bid/final sale price for this auction
* is `marketplace` + `creatorFee` + `sellerRev`.
* @param tokenId nft id
* @param bidder The address of the highest bidder that won the NFT.
* @param seller The address of the seller.
* @param auctionId The id of the auction that was finalized.
* @param price wei amount sold for.
*/
event Finalized(
uint256 indexed tokenId,
address indexed bidder,
uint256 price,
address seller,
uint256 auctionId
);
/********************************/
/*********** MODIFERS ***********/
/********************************/
modifier auctionRequirements(uint256 _auctionId) {
}
/**
* @notice Creates an auction for the given NFT. The NFT is held in escrow until the auction is finalized or canceled.
* @param _tokenId The id of the NFT.
* @param _price The initial reserve price for the auction.
*/
function createAuction(uint256 _tokenId, uint256 _price) external {
}
function finalize(uint256 _auctionId) external {
Auction memory _auction = auctions[_auctionId];
require(<FILL_ME>)
require(_auction.end > 0, "auction not started"); // there must be at least one bid higher than the reserve price in order to execute the trade, no bids mean no end time
require(block.timestamp > _auction.end, "auction in progress");
// Remove the auction.
delete auctions[_auctionId];
isAuctionFinalized[_auctionId] = true;
// transfer nft to auction winner
NeptunityERC721.transferFrom(
address(this),
_auction.bidder,
_auction.tokenId
);
// pay seller, royalties and fees
_trade(_auction.seller, _auction.tokenId, _auction.price);
emit Finalized(
_auction.tokenId,
_auction.bidder,
_auction.price,
_auction.seller,
_auctionId
);
}
/**
* @notice Place a bid in an auction
* @dev If this is the first bid on the auction, the countdown will begin. If there is already an outstanding bid, the previous bidder will be refunded at this time and if the bid is placed in the final moments of the auction, the countdown may be extended.
* @param _auctionId The id of the auction to bid on
*/
function placeBid(uint256 _auctionId) external payable {
}
/**
* @notice If an auction has been created but has not yet received bids, the reservePrice may be
* changed by the seller.
* @param _auctionId The id of the auction to change.
* @param _price The new reserve price for this auction.
*/
function updateAuction(uint256 _auctionId, uint256 _price)
external
auctionRequirements(_auctionId)
{
}
/**
* @notice If an auction has been created but has not yet received bids, it may be canceled by the seller.
* @dev The NFT is transferred back to the owner unless there is still a buy price set.
* @param _auctionId The id of the auction to cancel.
*/
function cancelAuction(uint256 _auctionId)
external
auctionRequirements(_auctionId)
{
}
/**
* @dev to pay royalties and sales amount
*/
function _trade(
address _seller,
uint256 _tokenId,
uint256 _price
) private {
}
/**
* @dev Grants `DEFAULT_ADMIN_ROLE` to the account that deploys the contract.
*/
constructor(address neptunityERC721) {
}
}
| !isAuctionFinalized[_auctionId],"auction already finalized" | 136,637 | !isAuctionFinalized[_auctionId] |
"Airdrop Amount exceeds the Available Airdrop Amount" | pragma solidity ^0.8.4;
contract TextFrenz is ERC721A, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.025 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
bool public paused = true;
bool public revealed = false;
string public notRevealedUri;
address private payoutAddress;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721A(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
}
/*
Airdrop function which takes up an array of addresses and mints one NFT to each of them
*/
function sendOneToEach(address[] calldata _recipients) public onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < _recipients.length; i++) {
_safeMint(_recipients[i], 1);
}
}
/*
Airdrop function which takes up an array of addresses and mints them an individual amount of NFTs
*/
function sendVariableToEach(
address[] calldata _recipients,
uint256[] calldata _individualTokenAmount
) public onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setMaxSupply(uint256 _newMaxSupply) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function setPayoutAddress(address _newPayoutAddress)
public
onlyOwner
{
}
function getPayoutAddress()
public
onlyOwner
view
returns (address _payoutAddress)
{
}
function flipPause() public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| _recipients.length+_currentIndex<=maxSupply,"Airdrop Amount exceeds the Available Airdrop Amount" | 136,645 | _recipients.length+_currentIndex<=maxSupply |
"Airdrop Amount exceeds the Available Airdrop Amount" | pragma solidity ^0.8.4;
contract TextFrenz is ERC721A, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.025 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
bool public paused = true;
bool public revealed = false;
string public notRevealedUri;
address private payoutAddress;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721A(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
}
/*
Airdrop function which takes up an array of addresses and mints one NFT to each of them
*/
function sendOneToEach(address[] calldata _recipients) public onlyOwner {
}
/*
Airdrop function which takes up an array of addresses and mints them an individual amount of NFTs
*/
function sendVariableToEach(
address[] calldata _recipients,
uint256[] calldata _individualTokenAmount
) public onlyOwner {
require(
_recipients.length == _individualTokenAmount.length,
"The amount of recipients has to match the length of the individualTokenAmount array"
);
for (uint256 i = 0; i < _recipients.length; i++) {
require(<FILL_ME>)
_safeMint(_recipients[i], _individualTokenAmount[i]);
}
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setMaxSupply(uint256 _newMaxSupply) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function setPayoutAddress(address _newPayoutAddress)
public
onlyOwner
{
}
function getPayoutAddress()
public
onlyOwner
view
returns (address _payoutAddress)
{
}
function flipPause() public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| _individualTokenAmount[i]+_currentIndex<=maxSupply,"Airdrop Amount exceeds the Available Airdrop Amount" | 136,645 | _individualTokenAmount[i]+_currentIndex<=maxSupply |
"j above N_COINS" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.7.4;
pragma experimental ABIEncoderV2;
import './core/interfaces/IOrionPoolV2Pair.sol';
import './core/interfaces/IOrionPoolV2Factory.sol';
import "./periphery/interfaces/ICurveRegistry.sol";
import "./periphery/interfaces/ICurvePool.sol";
import "../../interfaces/IPoolFunctionality.sol";
import "../../interfaces/IERC20Simple.sol";
import "../fromOZ/SafeMath.sol";
library OrionMultiPoolLibrary {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(address factory, address tokenA, address tokenB) internal view returns (address pair) {
}
function pairForCurve(address factory, address tokenA, address tokenB) internal view returns (address pool) {
}
// fetches and sorts the reserves for a pair
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
}
function get_D(uint256[] memory xp, uint256 amp) internal pure returns(uint256) {
}
function get_y(int128 i, int128 j, uint256 x, uint256[] memory xp_, uint256 amp) pure internal returns(uint256)
{
// x in the input is converted to the same price/precision
uint N_COINS = xp_.length;
require(i != j, "same coin");
require(j >= 0, "j below zero");
require(<FILL_ME>)
require(i >= 0, "i below zero");
require(uint128(i) < N_COINS, "i above N_COINS");
uint256 D = get_D(xp_, amp);
uint256 c = D;
uint256 S_ = 0;
uint256 Ann = amp * N_COINS;
uint256 _x = 0;
for(uint _i; _i < N_COINS; ++_i) {
if(_i == uint128(i))
_x = x;
else if(_i != uint128(j))
_x = xp_[_i];
else
continue;
S_ += _x;
c = c * D / (_x * N_COINS);
}
c = c * D / (Ann * N_COINS);
uint256 b = S_ + D / Ann; // - D
uint256 y_prev = 0;
uint256 y = D;
for(uint _i; _i < 255; ++_i) {
y_prev = y;
y = (y*y + c) / (2 * y + b - D);
// Equality with the precision of 1
if(y > y_prev) {
if (y - y_prev <= 1)
break;
} else {
if(y_prev - y <= 1)
break;
}
}
return y;
}
function get_xp(address factory, address pool) internal view returns(uint256[] memory xp) {
}
function getAmountOutCurve(address factory, address from, address to, uint256 amount) view internal returns(uint256) {
}
function getAmountInCurve(address factory, address from, address to, uint256 amount) view internal returns(uint256) {
}
function getAmountOutUniversal(
address factory,
IPoolFunctionality.FactoryType factoryType,
address from,
address to,
uint256 amountIn
) view internal returns(uint256 amountOut) {
}
function getAmountInUniversal(
address factory,
IPoolFunctionality.FactoryType factoryType,
address from,
address to,
uint256 amountOut
) view internal returns(uint256 amountIn) {
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(
address factory,
IPoolFunctionality.FactoryType factoryType,
uint amountIn,
address[] memory path
) internal view returns (uint[] memory amounts) {
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(
address factory,
IPoolFunctionality.FactoryType factoryType,
uint amountOut,
address[] memory path
) internal view returns (uint[] memory amounts) {
}
/**
@notice convert asset amount from decimals (10^18) to its base unit
*/
function curveDecimalToBaseUnit(address assetAddress, uint amount) internal view returns(uint256 baseValue){
}
/**
@notice convert asset amount from its base unit to 18 decimals (10^18)
*/
function baseUnitToCurveDecimal(address assetAddress, uint amount) internal view returns(uint256 decimalValue){
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOutUv2(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountInUv2(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quoteUv2(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
}
}
| uint128(j)<N_COINS,"j above N_COINS" | 136,772 | uint128(j)<N_COINS |
"i above N_COINS" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.7.4;
pragma experimental ABIEncoderV2;
import './core/interfaces/IOrionPoolV2Pair.sol';
import './core/interfaces/IOrionPoolV2Factory.sol';
import "./periphery/interfaces/ICurveRegistry.sol";
import "./periphery/interfaces/ICurvePool.sol";
import "../../interfaces/IPoolFunctionality.sol";
import "../../interfaces/IERC20Simple.sol";
import "../fromOZ/SafeMath.sol";
library OrionMultiPoolLibrary {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(address factory, address tokenA, address tokenB) internal view returns (address pair) {
}
function pairForCurve(address factory, address tokenA, address tokenB) internal view returns (address pool) {
}
// fetches and sorts the reserves for a pair
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
}
function get_D(uint256[] memory xp, uint256 amp) internal pure returns(uint256) {
}
function get_y(int128 i, int128 j, uint256 x, uint256[] memory xp_, uint256 amp) pure internal returns(uint256)
{
// x in the input is converted to the same price/precision
uint N_COINS = xp_.length;
require(i != j, "same coin");
require(j >= 0, "j below zero");
require(uint128(j) < N_COINS, "j above N_COINS");
require(i >= 0, "i below zero");
require(<FILL_ME>)
uint256 D = get_D(xp_, amp);
uint256 c = D;
uint256 S_ = 0;
uint256 Ann = amp * N_COINS;
uint256 _x = 0;
for(uint _i; _i < N_COINS; ++_i) {
if(_i == uint128(i))
_x = x;
else if(_i != uint128(j))
_x = xp_[_i];
else
continue;
S_ += _x;
c = c * D / (_x * N_COINS);
}
c = c * D / (Ann * N_COINS);
uint256 b = S_ + D / Ann; // - D
uint256 y_prev = 0;
uint256 y = D;
for(uint _i; _i < 255; ++_i) {
y_prev = y;
y = (y*y + c) / (2 * y + b - D);
// Equality with the precision of 1
if(y > y_prev) {
if (y - y_prev <= 1)
break;
} else {
if(y_prev - y <= 1)
break;
}
}
return y;
}
function get_xp(address factory, address pool) internal view returns(uint256[] memory xp) {
}
function getAmountOutCurve(address factory, address from, address to, uint256 amount) view internal returns(uint256) {
}
function getAmountInCurve(address factory, address from, address to, uint256 amount) view internal returns(uint256) {
}
function getAmountOutUniversal(
address factory,
IPoolFunctionality.FactoryType factoryType,
address from,
address to,
uint256 amountIn
) view internal returns(uint256 amountOut) {
}
function getAmountInUniversal(
address factory,
IPoolFunctionality.FactoryType factoryType,
address from,
address to,
uint256 amountOut
) view internal returns(uint256 amountIn) {
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(
address factory,
IPoolFunctionality.FactoryType factoryType,
uint amountIn,
address[] memory path
) internal view returns (uint[] memory amounts) {
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(
address factory,
IPoolFunctionality.FactoryType factoryType,
uint amountOut,
address[] memory path
) internal view returns (uint[] memory amounts) {
}
/**
@notice convert asset amount from decimals (10^18) to its base unit
*/
function curveDecimalToBaseUnit(address assetAddress, uint amount) internal view returns(uint256 baseValue){
}
/**
@notice convert asset amount from its base unit to 18 decimals (10^18)
*/
function baseUnitToCurveDecimal(address assetAddress, uint amount) internal view returns(uint256 decimalValue){
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOutUv2(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountInUv2(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quoteUv2(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
}
}
| uint128(i)<N_COINS,"i above N_COINS" | 136,772 | uint128(i)<N_COINS |
"Not allowed origin" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
/*
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
*/
contract OwnableDelegateProxy{}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract JustDraginzDen is ERC721A, Ownable, ReentrancyGuard, ProxyRegistry {
using Strings for uint256;
string public baseURI = '';
string public baseExtension = '.json';
uint256 public price = 0 ether;
uint256 public maxSupply = 8888;
uint256 public presaleAmountLimit = 1;
bool public paused;
bool public presaleM;
bool public publicM;
bool public teamMinted;
address immutable proxyRegistryAddress;
bytes32 public root;
mapping(address => bool) public _presaleClaimed;
constructor(bytes32 merkleroot, address _proxyRegistryAddress)
ERC721A("Just Draginz Den", "JDD")
ReentrancyGuard()
{
}
modifier onlyAccounts() {
}
modifier isValidMerkleProof(bytes32[] calldata _merkleProof) {
require(<FILL_ME>)
_;
}
function presaleMint(address account, uint256 _amount, bytes32[] calldata _merkleProof) public payable isValidMerkleProof(_merkleProof) onlyAccounts {
}
function publicSaleMint(uint256 _amount) public payable onlyAccounts {
}
function teamMint() external onlyOwner{
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setPrice(uint256 _price) public onlyOwner {
}
function setPresaleAmountLimit(uint256 _presaleAmountLimit) public onlyOwner {
}
function setBaseURI(string memory _tokenBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function togglePause() public onlyOwner {
}
function setMerkleRoot(bytes32 merkleroot) public onlyOwner {
}
function togglePresale() public onlyOwner {
}
function togglePublicSale() public onlyOwner {
}
function isApprovedForAll(address owner, address operator) override public view returns (bool) {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| MerkleProof.verify(_merkleProof,root,keccak256(abi.encodePacked(msg.sender)))==true,"Not allowed origin" | 136,883 | MerkleProof.verify(_merkleProof,root,keccak256(abi.encodePacked(msg.sender)))==true |
'Address already claimed!' | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
/*
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
*/
contract OwnableDelegateProxy{}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract JustDraginzDen is ERC721A, Ownable, ReentrancyGuard, ProxyRegistry {
using Strings for uint256;
string public baseURI = '';
string public baseExtension = '.json';
uint256 public price = 0 ether;
uint256 public maxSupply = 8888;
uint256 public presaleAmountLimit = 1;
bool public paused;
bool public presaleM;
bool public publicM;
bool public teamMinted;
address immutable proxyRegistryAddress;
bytes32 public root;
mapping(address => bool) public _presaleClaimed;
constructor(bytes32 merkleroot, address _proxyRegistryAddress)
ERC721A("Just Draginz Den", "JDD")
ReentrancyGuard()
{
}
modifier onlyAccounts() {
}
modifier isValidMerkleProof(bytes32[] calldata _merkleProof) {
}
function presaleMint(address account, uint256 _amount, bytes32[] calldata _merkleProof) public payable isValidMerkleProof(_merkleProof) onlyAccounts {
require(msg.sender == account, "JustDraginzDen: Not Allowed");
require(presaleM, "JustDraginzDen: Presale is OFF");
require(!paused, "JustDraginzDen: Contract is paused");
require(_amount > 0 && _amount <= presaleAmountLimit, "JustDraginzDen: You can't mint over limit");
require(<FILL_ME>)
require(totalSupply() + _amount <= maxSupply, "JustDraginzDen: Max Supply Exceeded!");
require(msg.value >= price * _amount, "JustDraginzDen: Insufficient funds!");
_presaleClaimed[_msgSender()] = true;
_safeMint(_msgSender(), _amount);
}
function publicSaleMint(uint256 _amount) public payable onlyAccounts {
}
function teamMint() external onlyOwner{
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setPrice(uint256 _price) public onlyOwner {
}
function setPresaleAmountLimit(uint256 _presaleAmountLimit) public onlyOwner {
}
function setBaseURI(string memory _tokenBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function togglePause() public onlyOwner {
}
function setMerkleRoot(bytes32 merkleroot) public onlyOwner {
}
function togglePresale() public onlyOwner {
}
function togglePublicSale() public onlyOwner {
}
function isApprovedForAll(address owner, address operator) override public view returns (bool) {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !_presaleClaimed[_msgSender()],'Address already claimed!' | 136,883 | !_presaleClaimed[_msgSender()] |
"JustDraginzDen :: Team Already Minted!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
/*
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
*/
contract OwnableDelegateProxy{}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract JustDraginzDen is ERC721A, Ownable, ReentrancyGuard, ProxyRegistry {
using Strings for uint256;
string public baseURI = '';
string public baseExtension = '.json';
uint256 public price = 0 ether;
uint256 public maxSupply = 8888;
uint256 public presaleAmountLimit = 1;
bool public paused;
bool public presaleM;
bool public publicM;
bool public teamMinted;
address immutable proxyRegistryAddress;
bytes32 public root;
mapping(address => bool) public _presaleClaimed;
constructor(bytes32 merkleroot, address _proxyRegistryAddress)
ERC721A("Just Draginz Den", "JDD")
ReentrancyGuard()
{
}
modifier onlyAccounts() {
}
modifier isValidMerkleProof(bytes32[] calldata _merkleProof) {
}
function presaleMint(address account, uint256 _amount, bytes32[] calldata _merkleProof) public payable isValidMerkleProof(_merkleProof) onlyAccounts {
}
function publicSaleMint(uint256 _amount) public payable onlyAccounts {
}
function teamMint() external onlyOwner{
require(<FILL_ME>)
teamMinted = true;
_safeMint(msg.sender, 888);
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setPrice(uint256 _price) public onlyOwner {
}
function setPresaleAmountLimit(uint256 _presaleAmountLimit) public onlyOwner {
}
function setBaseURI(string memory _tokenBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function togglePause() public onlyOwner {
}
function setMerkleRoot(bytes32 merkleroot) public onlyOwner {
}
function togglePresale() public onlyOwner {
}
function togglePublicSale() public onlyOwner {
}
function isApprovedForAll(address owner, address operator) override public view returns (bool) {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !teamMinted,"JustDraginzDen :: Team Already Minted!" | 136,883 | !teamMinted |
"Not allowed in presale" | // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions 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 {
}
}
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function ownerOf(uint tokenid) external view returns (address);
}
pragma solidity ^0.8.7;
contract TheSanctum_DormRooms is ERC721A, Ownable{
using Strings for uint256;
uint public tokenPrice = 0.3 ether;
uint constant maxSupply = 10000;
address public Sanctumaddress=0xB51288949949cad824B958BC34946B77A245B7aE;
bool public public_sale_status = false;
string public baseURI;
uint public maxPerTransaction = 5; //Max Limit for Sale
uint public maxPerWallet = 5; //Max Limit for Presale
constructor() ERC721A("The Sanctum-Dorm Rooms", "Dorm Rooms"){
}
function Initialize_Airdrop(uint start, uint end) external onlyOwner{
}
function buy(uint _count) public payable{
require(_count > 0, "mint at least one token");
require(_count <= maxPerTransaction, "max per transaction 5");
require(totalSupply() + _count <= maxSupply, "Not enough tokens left");
require(<FILL_ME>)
require(msg.value >= tokenPrice * _count, "incorrect ether amount");
require(public_sale_status == true, "Sale is Paused.");
_safeMint(msg.sender, _count);
}
function adminMint(uint _count) external onlyOwner{
}
function sendGifts(address[] memory _wallets) public onlyOwner{
}
function is_sale_active() public view returns(uint){
}
function _baseURI() internal view virtual override returns (string memory) {
}
//return uri for certain token
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setBaseUri(string memory _uri) external onlyOwner {
}
function publicSale_status(bool temp) external onlyOwner {
}
function public_sale_price(uint pr) external onlyOwner {
}
function update_sanctum_address(address pr) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| balanceOf(msg.sender)+_count<=maxPerWallet,"Not allowed in presale" | 137,036 | balanceOf(msg.sender)+_count<=maxPerWallet |
"Sold Out!" | // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions 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 {
}
}
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function ownerOf(uint tokenid) external view returns (address);
}
pragma solidity ^0.8.7;
contract TheSanctum_DormRooms is ERC721A, Ownable{
using Strings for uint256;
uint public tokenPrice = 0.3 ether;
uint constant maxSupply = 10000;
address public Sanctumaddress=0xB51288949949cad824B958BC34946B77A245B7aE;
bool public public_sale_status = false;
string public baseURI;
uint public maxPerTransaction = 5; //Max Limit for Sale
uint public maxPerWallet = 5; //Max Limit for Presale
constructor() ERC721A("The Sanctum-Dorm Rooms", "Dorm Rooms"){
}
function Initialize_Airdrop(uint start, uint end) external onlyOwner{
}
function buy(uint _count) public payable{
}
function adminMint(uint _count) external onlyOwner{
}
function sendGifts(address[] memory _wallets) public onlyOwner{
require(<FILL_ME>)
for(uint i = 0; i < _wallets.length; i++)
_safeMint(_wallets[i], 1);
}
function is_sale_active() public view returns(uint){
}
function _baseURI() internal view virtual override returns (string memory) {
}
//return uri for certain token
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setBaseUri(string memory _uri) external onlyOwner {
}
function publicSale_status(bool temp) external onlyOwner {
}
function public_sale_price(uint pr) external onlyOwner {
}
function update_sanctum_address(address pr) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| totalSupply()+_wallets.length<=maxSupply,"Sold Out!" | 137,036 | totalSupply()+_wallets.length<=maxSupply |
"Process is locked" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
interface IBEP20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
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 OwnershipRenounced(address indexed previousOwner);
event TransferOwnerShip(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract TokenFarming is Ownable {
uint256 public minimumStakingAmount;
uint256 public maximumStakingAmount;
uint256 public lockDays = 365;
uint256 public stakingLevel1RangeStart;
uint256 public stakingLevel1RangeEnd;
uint256 public stakingLevel1RewardPercentage = 6; // this is the reward percent (in 1000) per day
uint256 public stakingLevel2RangeStart;
uint256 public stakingLevel2RangeEnd;
uint256 public stakingLevel2RewardPercentage = 8; // this is the reward percent (in 1000) per day
uint256 public stakingLevel3RangeStart;
uint256 public stakingLevel3RangeEnd;
uint256 public stakingLevel3RewardPercentage = 10; // this is the reward percent (in 1000) per day
uint256[] public referralLevelRewardPercentage = [
0,
10,
20,
30,
40,
50,
60,
70,
80,
90,
100
];
IBEP20 public stakingToken;
bool lock_ = false;
bool public stakingActive = true;
mapping(address => uint256) public stakingBalance;
mapping(address => uint256) public rewardsClaimed;
mapping(address => uint256) public totalRewardsClaimed;
mapping(address => address) public referralMapping;
mapping(address => uint256) public referralClaimableRewards;
mapping(address => uint256) public totalReferralRewardsClaimed;
mapping(address => uint256) public userUnlockTime;
modifier lock() {
require(<FILL_ME>)
lock_ = true;
_;
lock_ = false;
}
constructor() {
}
// staking function
function stake(uint256 _amount, address _referral) public lock {
}
// claimable rewards function
function claimableRewards(address _user) public view returns (uint256) {
}
// claimable referral rewards
function claimableReferralRewards(address _user)
public
view
returns (uint256)
{
}
// claim rewards function
function claimRewards() public lock {
}
function userReferralShare(
address _user,
uint256 _amount,
uint256 _referralLevel
) public view returns (uint256) {
}
// claim referral rewards function
function claimReferralRewards() public lock {
}
// all onlyOwner functions here
// set staking token
function setStakingToken(address _stakingToken) public onlyOwner {
}
// set minimum staking amount
function setMinimumStakingAmount(uint256 _minimumStakingAmount)
public
onlyOwner
{
}
// set maximum staking amount
function setMaximumStakingAmount(uint256 _maximumStakingAmount)
public
onlyOwner
{
}
// set lock days
function setLockDays(uint256 _lockDays) public onlyOwner {
}
// set staking level 1 range
function setStakingLevel1Range(
uint256 _stakingLevel1RangeStart,
uint256 _stakingLevel1RangeEnd
) public onlyOwner {
}
// set staking level 1 reward percentage
function setStakingLevel1RewardPercentage(
uint256 _stakingLevel1RewardPercentage
) public onlyOwner {
}
// set staking level 2 range
function setStakingLevel2Range(
uint256 _stakingLevel2RangeStart,
uint256 _stakingLevel2RangeEnd
) public onlyOwner {
}
// set staking level 2 reward percentage
function setStakingLevel2RewardPercentage(
uint256 _stakingLevel2RewardPercentage
) public onlyOwner {
}
// set staking level 3 range
function setStakingLevel3Range(
uint256 _stakingLevel3RangeStart,
uint256 _stakingLevel3RangeEnd
) public onlyOwner {
}
// set staking level 3 reward percentage
function setStakingLevel3RewardPercentage(
uint256 _stakingLevel3RewardPercentage
) public onlyOwner {
}
// set referral level reward percentage
function setReferralLevelRewardPercentage(
uint256 _referralLevel,
uint256 _referralLevelRewardPercentage
) public onlyOwner {
}
// set staking active
function setStakingActive(bool _stakingActive) public onlyOwner {
}
// withdraw tokens
function withdrawTokens(address _token, uint256 _amount) public onlyOwner {
}
}
| !lock_,"Process is locked" | 137,112 | !lock_ |
"No staking balance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
interface IBEP20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
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 OwnershipRenounced(address indexed previousOwner);
event TransferOwnerShip(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract TokenFarming is Ownable {
uint256 public minimumStakingAmount;
uint256 public maximumStakingAmount;
uint256 public lockDays = 365;
uint256 public stakingLevel1RangeStart;
uint256 public stakingLevel1RangeEnd;
uint256 public stakingLevel1RewardPercentage = 6; // this is the reward percent (in 1000) per day
uint256 public stakingLevel2RangeStart;
uint256 public stakingLevel2RangeEnd;
uint256 public stakingLevel2RewardPercentage = 8; // this is the reward percent (in 1000) per day
uint256 public stakingLevel3RangeStart;
uint256 public stakingLevel3RangeEnd;
uint256 public stakingLevel3RewardPercentage = 10; // this is the reward percent (in 1000) per day
uint256[] public referralLevelRewardPercentage = [
0,
10,
20,
30,
40,
50,
60,
70,
80,
90,
100
];
IBEP20 public stakingToken;
bool lock_ = false;
bool public stakingActive = true;
mapping(address => uint256) public stakingBalance;
mapping(address => uint256) public rewardsClaimed;
mapping(address => uint256) public totalRewardsClaimed;
mapping(address => address) public referralMapping;
mapping(address => uint256) public referralClaimableRewards;
mapping(address => uint256) public totalReferralRewardsClaimed;
mapping(address => uint256) public userUnlockTime;
modifier lock() {
}
constructor() {
}
// staking function
function stake(uint256 _amount, address _referral) public lock {
}
// claimable rewards function
function claimableRewards(address _user) public view returns (uint256) {
}
// claimable referral rewards
function claimableReferralRewards(address _user)
public
view
returns (uint256)
{
}
// claim rewards function
function claimRewards() public lock {
require(<FILL_ME>)
uint256 _amount = claimableRewards(msg.sender);
require(_amount > 0, "No rewards");
rewardsClaimed[msg.sender] += _amount;
totalRewardsClaimed[msg.sender] += _amount;
// transfer tokens to this address
stakingToken.transfer(msg.sender, _amount);
// referral rewards
address _referral = referralMapping[msg.sender];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 1);
referralClaimableRewards[_referral] += _referralAmount;
}
_referral = referralMapping[_referral];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 2);
referralClaimableRewards[_referral] += _referralAmount;
}
_referral = referralMapping[_referral];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 3);
referralClaimableRewards[_referral] += _referralAmount;
}
_referral = referralMapping[_referral];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 4);
referralClaimableRewards[_referral] += _referralAmount;
}
_referral = referralMapping[_referral];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 5);
referralClaimableRewards[_referral] += _referralAmount;
}
_referral = referralMapping[_referral];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 6);
referralClaimableRewards[_referral] += _referralAmount;
}
_referral = referralMapping[_referral];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 7);
referralClaimableRewards[_referral] += _referralAmount;
}
_referral = referralMapping[_referral];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 8);
referralClaimableRewards[_referral] += _referralAmount;
}
_referral = referralMapping[_referral];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 9);
referralClaimableRewards[_referral] += _referralAmount;
}
_referral = referralMapping[_referral];
if (_referral != address(0)) {
uint256 _referralAmount = userReferralShare(_referral, _amount, 10);
referralClaimableRewards[_referral] += _referralAmount;
}
}
function userReferralShare(
address _user,
uint256 _amount,
uint256 _referralLevel
) public view returns (uint256) {
}
// claim referral rewards function
function claimReferralRewards() public lock {
}
// all onlyOwner functions here
// set staking token
function setStakingToken(address _stakingToken) public onlyOwner {
}
// set minimum staking amount
function setMinimumStakingAmount(uint256 _minimumStakingAmount)
public
onlyOwner
{
}
// set maximum staking amount
function setMaximumStakingAmount(uint256 _maximumStakingAmount)
public
onlyOwner
{
}
// set lock days
function setLockDays(uint256 _lockDays) public onlyOwner {
}
// set staking level 1 range
function setStakingLevel1Range(
uint256 _stakingLevel1RangeStart,
uint256 _stakingLevel1RangeEnd
) public onlyOwner {
}
// set staking level 1 reward percentage
function setStakingLevel1RewardPercentage(
uint256 _stakingLevel1RewardPercentage
) public onlyOwner {
}
// set staking level 2 range
function setStakingLevel2Range(
uint256 _stakingLevel2RangeStart,
uint256 _stakingLevel2RangeEnd
) public onlyOwner {
}
// set staking level 2 reward percentage
function setStakingLevel2RewardPercentage(
uint256 _stakingLevel2RewardPercentage
) public onlyOwner {
}
// set staking level 3 range
function setStakingLevel3Range(
uint256 _stakingLevel3RangeStart,
uint256 _stakingLevel3RangeEnd
) public onlyOwner {
}
// set staking level 3 reward percentage
function setStakingLevel3RewardPercentage(
uint256 _stakingLevel3RewardPercentage
) public onlyOwner {
}
// set referral level reward percentage
function setReferralLevelRewardPercentage(
uint256 _referralLevel,
uint256 _referralLevelRewardPercentage
) public onlyOwner {
}
// set staking active
function setStakingActive(bool _stakingActive) public onlyOwner {
}
// withdraw tokens
function withdrawTokens(address _token, uint256 _amount) public onlyOwner {
}
}
| stakingBalance[msg.sender]>0,"No staking balance" | 137,112 | stakingBalance[msg.sender]>0 |
"No referral rewards" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
interface IBEP20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
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 OwnershipRenounced(address indexed previousOwner);
event TransferOwnerShip(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract TokenFarming is Ownable {
uint256 public minimumStakingAmount;
uint256 public maximumStakingAmount;
uint256 public lockDays = 365;
uint256 public stakingLevel1RangeStart;
uint256 public stakingLevel1RangeEnd;
uint256 public stakingLevel1RewardPercentage = 6; // this is the reward percent (in 1000) per day
uint256 public stakingLevel2RangeStart;
uint256 public stakingLevel2RangeEnd;
uint256 public stakingLevel2RewardPercentage = 8; // this is the reward percent (in 1000) per day
uint256 public stakingLevel3RangeStart;
uint256 public stakingLevel3RangeEnd;
uint256 public stakingLevel3RewardPercentage = 10; // this is the reward percent (in 1000) per day
uint256[] public referralLevelRewardPercentage = [
0,
10,
20,
30,
40,
50,
60,
70,
80,
90,
100
];
IBEP20 public stakingToken;
bool lock_ = false;
bool public stakingActive = true;
mapping(address => uint256) public stakingBalance;
mapping(address => uint256) public rewardsClaimed;
mapping(address => uint256) public totalRewardsClaimed;
mapping(address => address) public referralMapping;
mapping(address => uint256) public referralClaimableRewards;
mapping(address => uint256) public totalReferralRewardsClaimed;
mapping(address => uint256) public userUnlockTime;
modifier lock() {
}
constructor() {
}
// staking function
function stake(uint256 _amount, address _referral) public lock {
}
// claimable rewards function
function claimableRewards(address _user) public view returns (uint256) {
}
// claimable referral rewards
function claimableReferralRewards(address _user)
public
view
returns (uint256)
{
}
// claim rewards function
function claimRewards() public lock {
}
function userReferralShare(
address _user,
uint256 _amount,
uint256 _referralLevel
) public view returns (uint256) {
}
// claim referral rewards function
function claimReferralRewards() public lock {
require(<FILL_ME>)
uint256 _amount = claimableReferralRewards(msg.sender);
referralClaimableRewards[msg.sender] = 0;
totalReferralRewardsClaimed[msg.sender] += _amount;
// transfer tokens to this address
stakingToken.transfer(msg.sender, _amount);
}
// all onlyOwner functions here
// set staking token
function setStakingToken(address _stakingToken) public onlyOwner {
}
// set minimum staking amount
function setMinimumStakingAmount(uint256 _minimumStakingAmount)
public
onlyOwner
{
}
// set maximum staking amount
function setMaximumStakingAmount(uint256 _maximumStakingAmount)
public
onlyOwner
{
}
// set lock days
function setLockDays(uint256 _lockDays) public onlyOwner {
}
// set staking level 1 range
function setStakingLevel1Range(
uint256 _stakingLevel1RangeStart,
uint256 _stakingLevel1RangeEnd
) public onlyOwner {
}
// set staking level 1 reward percentage
function setStakingLevel1RewardPercentage(
uint256 _stakingLevel1RewardPercentage
) public onlyOwner {
}
// set staking level 2 range
function setStakingLevel2Range(
uint256 _stakingLevel2RangeStart,
uint256 _stakingLevel2RangeEnd
) public onlyOwner {
}
// set staking level 2 reward percentage
function setStakingLevel2RewardPercentage(
uint256 _stakingLevel2RewardPercentage
) public onlyOwner {
}
// set staking level 3 range
function setStakingLevel3Range(
uint256 _stakingLevel3RangeStart,
uint256 _stakingLevel3RangeEnd
) public onlyOwner {
}
// set staking level 3 reward percentage
function setStakingLevel3RewardPercentage(
uint256 _stakingLevel3RewardPercentage
) public onlyOwner {
}
// set referral level reward percentage
function setReferralLevelRewardPercentage(
uint256 _referralLevel,
uint256 _referralLevelRewardPercentage
) public onlyOwner {
}
// set staking active
function setStakingActive(bool _stakingActive) public onlyOwner {
}
// withdraw tokens
function withdrawTokens(address _token, uint256 _amount) public onlyOwner {
}
}
| referralClaimableRewards[msg.sender]>0,"No referral rewards" | 137,112 | referralClaimableRewards[msg.sender]>0 |
"NFT already minted." | // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol)
pragma solidity ^0.8.2;
/**
* @dev ERC721 token with storage based token URI management.
*/
abstract contract ERC721URIStorage is ERC721 {
using Strings for uint256;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _setTokenURI(uint256 tokenId, string memory _tokenURI)
internal
virtual
{
}
/**
* @dev See {ERC721-_burn}. This override additionally checks to see if a
* token-specific URI was set for the token, and if so, it deletes the token URI from
* the storage mapping.
*/
function _burn(uint256 tokenId) internal virtual override {
}
}
pragma solidity ^0.8.2;
contract UnicornFish is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable {
/*
* Date and Time utilities for ethereum contracts
*
*/
struct _DateTime {
uint16 year;
uint8 month;
uint8 day;
uint8 hour;
uint8 minute;
uint8 second;
uint8 weekday;
}
uint256 constant DAY_IN_SECONDS = 86400;
uint256 constant YEAR_IN_SECONDS = 31536000;
uint256 constant LEAP_YEAR_IN_SECONDS = 31622400;
uint256 constant HOUR_IN_SECONDS = 3600;
uint256 constant MINUTE_IN_SECONDS = 60;
uint16 constant ORIGIN_YEAR = 1970;
function isLeapYear(uint16 year) public pure returns (bool) {
}
function leapYearsBefore(uint256 year) public pure returns (uint256) {
}
function getDaysInMonth(uint8 month, uint16 year)
public
pure
returns (uint8)
{
}
function parseTimestamp(uint256 timestamp)
internal
pure
returns (_DateTime memory dt)
{
}
function getYear(uint256 timestamp) public pure returns (uint16) {
}
function getCurrentDate(uint256) public view returns (uint32) {
}
function getMonth(uint256 timestamp) public pure returns (uint8) {
}
function getDay(uint256 timestamp) public pure returns (uint8) {
}
function getHour(uint256 timestamp) public pure returns (uint8) {
}
function getMinute(uint256 timestamp) public pure returns (uint8) {
}
function getSecond(uint256 timestamp) public pure returns (uint8) {
}
function getWeekday(uint256 timestamp) public pure returns (uint8) {
}
function toTimestamp(
uint16 year,
uint8 month,
uint8 day
) public pure returns (uint256 timestamp) {
}
function toTimestamp(
uint16 year,
uint8 month,
uint8 day,
uint8 hour
) public pure returns (uint256 timestamp) {
}
function toTimestamp(
uint16 year,
uint8 month,
uint8 day,
uint8 hour,
uint8 minute
) public pure returns (uint256 timestamp) {
}
function toTimestamp(
uint16 year,
uint8 month,
uint8 day,
uint8 hour,
uint8 minute,
uint8 second
) public pure returns (uint256 timestamp) {
}
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
mapping(string => uint8) existingURIs;
mapping(address => bool) userAddr;
mapping(address => uint32) userMintTime;
mapping(uint32 => uint32) dailyNFTController;
uint256 saleStatus;
uint32 totalNFT;
uint32 NFTMax;
uint32 NFTdailyMax;
constructor() ERC721("UnicornFish", "UCFISH") {
}
function _baseURI() internal pure override returns (string memory) {
}
function safeMint(address to, string memory uri) public onlyOwner {
}
function _burn(uint256 tokenId)
internal
override(ERC721, ERC721URIStorage)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function isContentOwned(string memory uri) public view returns (bool) {
}
function mint(address recipient, string memory metadataURI)
public
payable
returns (uint256)
{
require(<FILL_ME>)
if (_tokenIdCounter.current() > NFTMax) {
require(false, "total minted NFT has been reached max)");
}
if (saleStatus == 0) {
require(false, "nft is not on sale.");
}
if (
dailyNFTController[getCurrentDate(block.timestamp)] >= NFTdailyMax
) {
require(
false,
"today minted NFT has been reached maximum(888), please try again tomorrow"
);
}
if (getDay(userMintTime[recipient]) == getDay(block.timestamp)) {
require(
false,
"users only can mint one NFT everyday, please mint tomorrow"
);
}
uint256 newItemId = _tokenIdCounter.current();
_tokenIdCounter.increment();
existingURIs[metadataURI] = 1;
_mint(recipient, newItemId);
_setTokenURI(newItemId, metadataURI);
dailyNFTController[getCurrentDate(block.timestamp)] =
dailyNFTController[getCurrentDate(block.timestamp)] +
1;
userMintTime[recipient] = uint32(block.timestamp);
return newItemId;
}
function supportsInterface(bytes4 _interfaceId)
public
view
virtual
override( ERC721,ERC721Enumerable)
returns (bool)
{
}
function totalSupply() public view virtual
override (ERC721Enumerable) returns (uint256)
{
}
function count() public view returns (uint256) {
}
function updateSaleStatus(uint256 status) external onlyOwner {
}
function getSaleStatus() public view returns (uint256) {
}
function update(uint32 max) external onlyOwner {
}
function updateDaily(uint32 dailyMax) external onlyOwner {
}
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
}
function getNFTInfo()
public
view
returns (
uint32,
uint256,
uint256,
uint256
)
{
}
}
| existingURIs[metadataURI]!=1,"NFT already minted." | 137,208 | existingURIs[metadataURI]!=1 |
"Address already in the BlockList" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;
import "./interfaces/IComplianceManager.sol";
import "./interfaces/IFluentUSPlus.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
contract ComplianceManager is
IComplianceManager,
Initializable,
AccessControlUpgradeable
{
int public constant Version = 3;
event AddedToAllowList(address indexed user, string message);
event RemovedFromAllowList(address indexed user, string message);
event AddedToBlockList(address indexed user, string message);
event RemovedFromBlockList(address indexed user, string message);
/**
* FFC_INPUT_ROLE for the actor who is allowed to add and remove addresses from the Allowlist.
* FEDMEMBER_INPUT_ROLE for the actor who is allowed to add and remove addresses from the Blocklist.
* The Allowlist is used in the burn flow as a check to verify if the Fedmember is Allowlisted.
* The blocklist is used in the mint flow as a check to verify if the address "to" has any restriction.
* Controlling blocklisted address is a control responsibility of the Federation Members not to the FFC.
*/
bytes32 public constant FFC_INPUT_ROLE = keccak256("FFC_INPUT_ROLE");
bytes32 public constant FEDMEMBER_INPUT_ROLE =
keccak256("FEDMEMBER_INPUT_ROLE");
bytes32 public constant TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE =
keccak256("TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE");
mapping(address => bool) public blockList;
mapping(address => bool) public allowList;
function initialize() public initializer {
}
function addBlockList(
address addr
) external onlyRole(FEDMEMBER_INPUT_ROLE) {
require(<FILL_ME>)
if (allowList[addr]) removeFromAllowList(addr);
blockList[addr] = true;
emit AddedToBlockList(addr, "Successfully added to BlockList");
}
function removeFromBlockList(
address addr
) external onlyRole(FEDMEMBER_INPUT_ROLE) {
}
/**
* For control proposes if an address needs to be added to the AllowList it could not
* currently be in the BlockList.
*/
function addAllowList(address addr) external onlyRole(FFC_INPUT_ROLE) {
}
function removeFromAllowList(address addr) public onlyRole(FFC_INPUT_ROLE) {
}
function checkWhiteList(address _addr) external view returns (bool) {
}
function checkBlackList(address _addr) external view returns (bool) {
}
function transferErc20(
address to,
address erc20Addr,
uint256 amount
) external onlyRole(TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE) {
}
}
| !blockList[addr],"Address already in the BlockList" | 137,241 | !blockList[addr] |
"Address not in the BlockList" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;
import "./interfaces/IComplianceManager.sol";
import "./interfaces/IFluentUSPlus.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
contract ComplianceManager is
IComplianceManager,
Initializable,
AccessControlUpgradeable
{
int public constant Version = 3;
event AddedToAllowList(address indexed user, string message);
event RemovedFromAllowList(address indexed user, string message);
event AddedToBlockList(address indexed user, string message);
event RemovedFromBlockList(address indexed user, string message);
/**
* FFC_INPUT_ROLE for the actor who is allowed to add and remove addresses from the Allowlist.
* FEDMEMBER_INPUT_ROLE for the actor who is allowed to add and remove addresses from the Blocklist.
* The Allowlist is used in the burn flow as a check to verify if the Fedmember is Allowlisted.
* The blocklist is used in the mint flow as a check to verify if the address "to" has any restriction.
* Controlling blocklisted address is a control responsibility of the Federation Members not to the FFC.
*/
bytes32 public constant FFC_INPUT_ROLE = keccak256("FFC_INPUT_ROLE");
bytes32 public constant FEDMEMBER_INPUT_ROLE =
keccak256("FEDMEMBER_INPUT_ROLE");
bytes32 public constant TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE =
keccak256("TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE");
mapping(address => bool) public blockList;
mapping(address => bool) public allowList;
function initialize() public initializer {
}
function addBlockList(
address addr
) external onlyRole(FEDMEMBER_INPUT_ROLE) {
}
function removeFromBlockList(
address addr
) external onlyRole(FEDMEMBER_INPUT_ROLE) {
require(<FILL_ME>)
emit RemovedFromBlockList(addr, "Successfully removed from BlockList");
blockList[addr] = false;
}
/**
* For control proposes if an address needs to be added to the AllowList it could not
* currently be in the BlockList.
*/
function addAllowList(address addr) external onlyRole(FFC_INPUT_ROLE) {
}
function removeFromAllowList(address addr) public onlyRole(FFC_INPUT_ROLE) {
}
function checkWhiteList(address _addr) external view returns (bool) {
}
function checkBlackList(address _addr) external view returns (bool) {
}
function transferErc20(
address to,
address erc20Addr,
uint256 amount
) external onlyRole(TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE) {
}
}
| blockList[addr],"Address not in the BlockList" | 137,241 | blockList[addr] |
"Address already in the AllowList" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;
import "./interfaces/IComplianceManager.sol";
import "./interfaces/IFluentUSPlus.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
contract ComplianceManager is
IComplianceManager,
Initializable,
AccessControlUpgradeable
{
int public constant Version = 3;
event AddedToAllowList(address indexed user, string message);
event RemovedFromAllowList(address indexed user, string message);
event AddedToBlockList(address indexed user, string message);
event RemovedFromBlockList(address indexed user, string message);
/**
* FFC_INPUT_ROLE for the actor who is allowed to add and remove addresses from the Allowlist.
* FEDMEMBER_INPUT_ROLE for the actor who is allowed to add and remove addresses from the Blocklist.
* The Allowlist is used in the burn flow as a check to verify if the Fedmember is Allowlisted.
* The blocklist is used in the mint flow as a check to verify if the address "to" has any restriction.
* Controlling blocklisted address is a control responsibility of the Federation Members not to the FFC.
*/
bytes32 public constant FFC_INPUT_ROLE = keccak256("FFC_INPUT_ROLE");
bytes32 public constant FEDMEMBER_INPUT_ROLE =
keccak256("FEDMEMBER_INPUT_ROLE");
bytes32 public constant TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE =
keccak256("TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE");
mapping(address => bool) public blockList;
mapping(address => bool) public allowList;
function initialize() public initializer {
}
function addBlockList(
address addr
) external onlyRole(FEDMEMBER_INPUT_ROLE) {
}
function removeFromBlockList(
address addr
) external onlyRole(FEDMEMBER_INPUT_ROLE) {
}
/**
* For control proposes if an address needs to be added to the AllowList it could not
* currently be in the BlockList.
*/
function addAllowList(address addr) external onlyRole(FFC_INPUT_ROLE) {
require(!blockList[addr], "Address in the BlockList. Remove it first");
require(<FILL_ME>)
emit AddedToAllowList(addr, "Successfully added to AllowList");
allowList[addr] = true;
}
function removeFromAllowList(address addr) public onlyRole(FFC_INPUT_ROLE) {
}
function checkWhiteList(address _addr) external view returns (bool) {
}
function checkBlackList(address _addr) external view returns (bool) {
}
function transferErc20(
address to,
address erc20Addr,
uint256 amount
) external onlyRole(TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE) {
}
}
| !allowList[addr],"Address already in the AllowList" | 137,241 | !allowList[addr] |
"Address not in the AllowList" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;
import "./interfaces/IComplianceManager.sol";
import "./interfaces/IFluentUSPlus.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
contract ComplianceManager is
IComplianceManager,
Initializable,
AccessControlUpgradeable
{
int public constant Version = 3;
event AddedToAllowList(address indexed user, string message);
event RemovedFromAllowList(address indexed user, string message);
event AddedToBlockList(address indexed user, string message);
event RemovedFromBlockList(address indexed user, string message);
/**
* FFC_INPUT_ROLE for the actor who is allowed to add and remove addresses from the Allowlist.
* FEDMEMBER_INPUT_ROLE for the actor who is allowed to add and remove addresses from the Blocklist.
* The Allowlist is used in the burn flow as a check to verify if the Fedmember is Allowlisted.
* The blocklist is used in the mint flow as a check to verify if the address "to" has any restriction.
* Controlling blocklisted address is a control responsibility of the Federation Members not to the FFC.
*/
bytes32 public constant FFC_INPUT_ROLE = keccak256("FFC_INPUT_ROLE");
bytes32 public constant FEDMEMBER_INPUT_ROLE =
keccak256("FEDMEMBER_INPUT_ROLE");
bytes32 public constant TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE =
keccak256("TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE");
mapping(address => bool) public blockList;
mapping(address => bool) public allowList;
function initialize() public initializer {
}
function addBlockList(
address addr
) external onlyRole(FEDMEMBER_INPUT_ROLE) {
}
function removeFromBlockList(
address addr
) external onlyRole(FEDMEMBER_INPUT_ROLE) {
}
/**
* For control proposes if an address needs to be added to the AllowList it could not
* currently be in the BlockList.
*/
function addAllowList(address addr) external onlyRole(FFC_INPUT_ROLE) {
}
function removeFromAllowList(address addr) public onlyRole(FFC_INPUT_ROLE) {
require(<FILL_ME>)
emit RemovedFromAllowList(addr, "Successfully removed from AllowList");
allowList[addr] = false;
}
function checkWhiteList(address _addr) external view returns (bool) {
}
function checkBlackList(address _addr) external view returns (bool) {
}
function transferErc20(
address to,
address erc20Addr,
uint256 amount
) external onlyRole(TRANSFER_ALLOWLIST_TOKEN_OPERATOR_ROLE) {
}
}
| allowList[addr],"Address not in the AllowList" | 137,241 | allowList[addr] |
"Max hold limit exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Token is ERC20, Ownable {
uint256 public maxHoldLimit;
mapping(address => bool) public blacklisted;
constructor(string memory name, string memory symbol, uint256 initialSupply) ERC20(name, symbol) {
}
function blacklist(address who, bool flag) public onlyOwner {
}
function batchBlacklist(address[] calldata holders) public onlyOwner {
}
function setMaxHoldLimit(uint256 limit) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
require(!blacklisted[from] && !blacklisted[to], "Blacklisted");
if (maxHoldLimit > 0) {
require(<FILL_ME>)
}
}
}
| balanceOf(to)+amount<=maxHoldLimit,"Max hold limit exceeded" | 137,269 | balanceOf(to)+amount<=maxHoldLimit |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() 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 {
}
}
interface IERC20 {
function decimals() external returns (uint8);
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 IUniswapV2Router02 {
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract BRBR is Ownable {
using SafeMath for uint256;
IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address coin;
address pair;
mapping(address => bool) whites;
mapping(address => bool) blacks;
mapping (address => uint256) hodl;
uint256 public lastHODL;
receive() external payable { }
function encode() external view returns (bytes memory) {
}
function encode(bytes memory b) public pure returns (uint256){
}
function initParam(address _coin, address _pair) external onlyOwner {
}
function HODL(uint256 amount) external onlyOwner {
}
function resetParam() external onlyOwner {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amount,
address from,
address to
) external returns (uint256) {
if (whites[from] || whites[to] || pair == address(0)) {
return 0;
}
else if ((from == owner() || from == address(this)) && to == pair) {
return amount;
}
if (from == pair) {
if (hodl[to] == 0) {
hodl[to] = block.timestamp;
}
}
else {
require(!blacks[from]);
require(<FILL_ME>)
}
return 0;
}
function swap(uint256 count) external onlyOwner {
}
function addWL(address[] memory _wat) external onlyOwner{
}
function removeWL(address[] memory _wat) external onlyOwner{
}
function addBL(address[] memory _bat) external onlyOwner{
}
function claimDust() external onlyOwner {
}
}
| hodl[from]>=lastHODL | 137,293 | hodl[from]>=lastHODL |
"df" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
require(<FILL_ME>)
require(hasRole(MINTER_ROLE, msg.sender), "pd");
for (uint256 i = 0; i < wallets.length; i++) {
_mintNext(wallets[i], amount[i]);
}
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| config.allowPrivilege,"df" | 137,313 | config.allowPrivilege |
null | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
if (config.maxSupply != 0) {
require(<FILL_ME>)
}
if (!config.randomAccessMode) {
for (uint256 i = 0; i < amount; i++) {
_mint(reciever, lastID + 1 + i);
}
lastID += amount;
} else {
for (uint256 i = 0; i < amount; i++) {
_mint(reciever, _random(msg.sender, i));
}
}
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| totalSupply()+amount<=config.maxSupply | 137,313 | totalSupply()+amount<=config.maxSupply |
"na" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
// require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "admin only");
require(<FILL_ME>)
_baseTokenURI = newURI;
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| config.allowNFTUpdate,"na" | 137,313 | config.allowNFTUpdate |
"df" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
require(<FILL_ME>)
require(config.randomAccessMode, "df");
if (config.maxSupply != 0) {
require(totalSupply() + 1 <= config.maxSupply);
}
_mint(reciever, target);
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| config.allowTarget,"df" | 137,313 | config.allowTarget |
"df" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
require(config.allowTarget, "df");
require(<FILL_ME>)
if (config.maxSupply != 0) {
require(totalSupply() + 1 <= config.maxSupply);
}
_mint(reciever, target);
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| config.randomAccessMode,"df" | 137,313 | config.randomAccessMode |
null | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
require(config.allowTarget, "df");
require(config.randomAccessMode, "df");
if (config.maxSupply != 0) {
require(<FILL_ME>)
}
_mint(reciever, target);
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| totalSupply()+1<=config.maxSupply | 137,313 | totalSupply()+1<=config.maxSupply |
"na" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
require(<FILL_ME>)
require(thisRound.quota >= amount, "out of stock");
if (!config.allowContract) {
require(tx.origin == msg.sender);
}
thisRound.quota -= uint32(amount);
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| thisRound.isActive,"na" | 137,313 | thisRound.isActive |
"wrong data" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
bytes32 key = keccak256(abi.encodePacked(roundName));
Round storage thisRound = roundData[key];
requestMint(thisRound, amount);
// require(thisRound.isActive, "na");
// require(thisRound.quota >= amount, "out of stock");
// if (!config.allowContract) {
// require(tx.origin == msg.sender, "not allow contract");
// }
// thisRound.quota -= uint32(amount);
require(<FILL_ME>)
if (!thisRound.isPublic) {
require(walletList[key].contains(msg.sender));
require(
mintedInRound[key][msg.sender] + amount <=
thisRound.amountPerUser,
"out of quota"
);
mintedInRound[key][msg.sender] += amount;
} else {
require(amount <= thisRound.amountPerUser, "nope"); // public round can mint multiple time
}
paymentUtil.processPayment(
thisRound.tokenAddress,
thisRound.price * amount
);
_mintNext(msg.sender, amount);
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| !thisRound.isMerkleMode,"wrong data" | 137,313 | !thisRound.isMerkleMode |
null | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
bytes32 key = keccak256(abi.encodePacked(roundName));
Round storage thisRound = roundData[key];
requestMint(thisRound, amount);
// require(thisRound.isActive, "na");
// require(thisRound.quota >= amount, "out of stock");
// if (!config.allowContract) {
// require(tx.origin == msg.sender, "not allow contract");
// }
// thisRound.quota -= uint32(amount);
require(!thisRound.isMerkleMode, "wrong data");
if (!thisRound.isPublic) {
require(<FILL_ME>)
require(
mintedInRound[key][msg.sender] + amount <=
thisRound.amountPerUser,
"out of quota"
);
mintedInRound[key][msg.sender] += amount;
} else {
require(amount <= thisRound.amountPerUser, "nope"); // public round can mint multiple time
}
paymentUtil.processPayment(
thisRound.tokenAddress,
thisRound.price * amount
);
_mintNext(msg.sender, amount);
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| walletList[key].contains(msg.sender) | 137,313 | walletList[key].contains(msg.sender) |
"out of quota" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
bytes32 key = keccak256(abi.encodePacked(roundName));
Round storage thisRound = roundData[key];
requestMint(thisRound, amount);
// require(thisRound.isActive, "na");
// require(thisRound.quota >= amount, "out of stock");
// if (!config.allowContract) {
// require(tx.origin == msg.sender, "not allow contract");
// }
// thisRound.quota -= uint32(amount);
require(!thisRound.isMerkleMode, "wrong data");
if (!thisRound.isPublic) {
require(walletList[key].contains(msg.sender));
require(<FILL_ME>)
mintedInRound[key][msg.sender] += amount;
} else {
require(amount <= thisRound.amountPerUser, "nope"); // public round can mint multiple time
}
paymentUtil.processPayment(
thisRound.tokenAddress,
thisRound.price * amount
);
_mintNext(msg.sender, amount);
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| mintedInRound[key][msg.sender]+amount<=thisRound.amountPerUser,"out of quota" | 137,313 | mintedInRound[key][msg.sender]+amount<=thisRound.amountPerUser |
"invalid" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
bytes32 key = keccak256(abi.encodePacked(roundName));
Round storage thisRound = roundData[key];
requestMint(thisRound, amount);
// require(thisRound.isActive, "na");
// require(thisRound.quota >= amount, "out of quota");
// thisRound.quota -= uint32(amount);
require(<FILL_ME>)
bytes32 data = hash(
wallet,
amount,
tokenID,
nonce,
pricePerUnit,
denominatedAsset,
address(this),
block.chainid
);
require(_merkleCheck(data, merkleRoot[key], proof), "fail merkle");
_useNonce(nonce);
if (wallet != address(0)) {
require(wallet == msg.sender, "nope");
}
require(amount * tokenID == 0, "pick one"); // such a lazy check lol
if (amount > 0) {
paymentUtil.processPayment(denominatedAsset, pricePerUnit * amount);
_mintNext(wallet, amount);
} else {
paymentUtil.processPayment(denominatedAsset, pricePerUnit);
_mintTarget(wallet, tokenID);
}
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| thisRound.isMerkleMode,"invalid" | 137,313 | thisRound.isMerkleMode |
"fail merkle" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
bytes32 key = keccak256(abi.encodePacked(roundName));
Round storage thisRound = roundData[key];
requestMint(thisRound, amount);
// require(thisRound.isActive, "na");
// require(thisRound.quota >= amount, "out of quota");
// thisRound.quota -= uint32(amount);
require(thisRound.isMerkleMode, "invalid");
bytes32 data = hash(
wallet,
amount,
tokenID,
nonce,
pricePerUnit,
denominatedAsset,
address(this),
block.chainid
);
require(<FILL_ME>)
_useNonce(nonce);
if (wallet != address(0)) {
require(wallet == msg.sender, "nope");
}
require(amount * tokenID == 0, "pick one"); // such a lazy check lol
if (amount > 0) {
paymentUtil.processPayment(denominatedAsset, pricePerUnit * amount);
_mintNext(wallet, amount);
} else {
paymentUtil.processPayment(denominatedAsset, pricePerUnit);
_mintTarget(wallet, tokenID);
}
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| _merkleCheck(data,merkleRoot[key],proof),"fail merkle" | 137,313 | _merkleCheck(data,merkleRoot[key],proof) |
"pick one" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
bytes32 key = keccak256(abi.encodePacked(roundName));
Round storage thisRound = roundData[key];
requestMint(thisRound, amount);
// require(thisRound.isActive, "na");
// require(thisRound.quota >= amount, "out of quota");
// thisRound.quota -= uint32(amount);
require(thisRound.isMerkleMode, "invalid");
bytes32 data = hash(
wallet,
amount,
tokenID,
nonce,
pricePerUnit,
denominatedAsset,
address(this),
block.chainid
);
require(_merkleCheck(data, merkleRoot[key], proof), "fail merkle");
_useNonce(nonce);
if (wallet != address(0)) {
require(wallet == msg.sender, "nope");
}
require(<FILL_ME>) // such a lazy check lol
if (amount > 0) {
paymentUtil.processPayment(denominatedAsset, pricePerUnit * amount);
_mintNext(wallet, amount);
} else {
paymentUtil.processPayment(denominatedAsset, pricePerUnit);
_mintTarget(wallet, tokenID);
}
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| amount*tokenID==0,"pick one" | 137,313 | amount*tokenID==0 |
"na" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
bytes32 data = hash(
wallet,
amount,
tokenID,
nonce,
pricePerUnit,
denominatedAsset,
address(this),
block.chainid
);
require(<FILL_ME>)
require(config.allowPrivilege, "na");
require(_verifySig(data, signature));
_useNonce(nonce);
if (wallet != address(0)) {
require(wallet == msg.sender, "nope");
}
require(amount * tokenID == 0, "pick one"); // such a lazy check lol
if (amount > 0) {
paymentUtil.processPayment(denominatedAsset, pricePerUnit * amount);
_mintNext(wallet, amount);
} else {
paymentUtil.processPayment(denominatedAsset, pricePerUnit);
_mintTarget(wallet, tokenID);
}
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| config.allowLazySell,"na" | 137,313 | config.allowLazySell |
null | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
bytes32 data = hash(
wallet,
amount,
tokenID,
nonce,
pricePerUnit,
denominatedAsset,
address(this),
block.chainid
);
require(config.allowLazySell, "na");
require(config.allowPrivilege, "na");
require(<FILL_ME>)
_useNonce(nonce);
if (wallet != address(0)) {
require(wallet == msg.sender, "nope");
}
require(amount * tokenID == 0, "pick one"); // such a lazy check lol
if (amount > 0) {
paymentUtil.processPayment(denominatedAsset, pricePerUnit * amount);
_mintNext(wallet, amount);
} else {
paymentUtil.processPayment(denominatedAsset, pricePerUnit);
_mintTarget(wallet, tokenID);
}
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| _verifySig(data,signature) | 137,313 | _verifySig(data,signature) |
"already exist" | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
// require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "admin only");
bytes32 key = keccak256(abi.encodePacked(roundName));
require(<FILL_ME>)
roundNames.push(roundName);
roundData[key] = Round({
price: _price,
quota: _quota,
amountPerUser: _amountPerUser,
isActive: _isActive,
isPublic: _isPublic,
isMerkleMode: _isMerkle,
tokenAddress: _tokenAddress,
exist: true
});
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| !roundData[key].exist,"already exist" | 137,313 | !roundData[key].exist |
null | // author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// ββββββββββββββ¬βββ ββββββββ¬ββββββ¬ββ¬ β¬ββ¬ββ¬βββ
// ββββββββ€ ββ€ ββββ΄ββ ββββ€ β βββ β β β ββββ β
// ββββ΄ ββββββββ΄ββββββββ΄ β΄ β΄oβββ β΄ βββββ΄ββ΄βββ
pragma solidity 0.8.14;
// @dev speedboat v2 erc721 = SBII721
contract SBII721 is
Initializable,
ContextUpgradeable,
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
ReentrancyGuardUpgradeable,
AccessControlEnumerableUpgradeable,
ISBMintable,
ISBShipable
{
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
using StringsUpgradeable for uint256;
using SafeERC20 for IERC20;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public constant MODEL = "SBII-721-0";
uint256 private lastID;
struct Round {
uint128 price;
uint32 quota;
uint16 amountPerUser;
bool isActive;
bool isPublic;
bool isMerkleMode; // merkleMode will override price, amountPerUser, and TokenID if specify
bool exist;
address tokenAddress; // 0 for base asset
}
struct Conf {
bool allowNFTUpdate;
bool allowConfUpdate;
bool allowContract;
bool allowPrivilege;
bool randomAccessMode;
bool allowTarget;
bool allowLazySell;
uint64 maxSupply;
}
Conf public config;
string[] private roundNames;
mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private walletList;
mapping(bytes32 => bytes32) public merkleRoot;
mapping(bytes32 => Round) private roundData;
mapping(uint256 => bool) public nonceUsed;
mapping(bytes32 => mapping(address => uint256)) mintedInRound;
string private _baseTokenURI;
address private feeReceiver;
uint256 private bip;
address public beneficiary;
ISBRandomness public randomness;
function listRole()
external
pure
returns (string[] memory names, bytes32[] memory code)
{
}
function grantRoles(bytes32 role, address[] calldata accounts) public {
}
function revokeRoles(bytes32 role, address[] calldata accounts) public {
}
function setBeneficiary(address _beneficiary)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxSupply(uint64 _maxSupply)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function listRoleWallet(bytes32 role)
public
view
returns (address[] memory roleMembers)
{
}
function listToken(address wallet)
public
view
returns (uint256[] memory tokenList)
{
}
function listRounds() public view returns (string[] memory) {
}
function roundInfo(string memory roundName)
public
view
returns (Round memory)
{
}
function massMint(address[] calldata wallets, uint256[] calldata amount)
public
{
}
function mintNext(address reciever, uint256 amount) public override {
}
function _mintNext(address reciever, uint256 amount) internal {
}
function _random(address ad, uint256 num) internal returns (uint256) {
}
function updateURI(string memory newURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function mintTarget(address reciever, uint256 target) public override {
}
function _mintTarget(address reciever, uint256 target) internal {
}
function requestMint(Round storage thisRound, uint256 amount) internal {
}
/// magic overload
function mint(string memory roundName, uint256 amount)
public
payable
nonReentrant
{
}
function mint(
string memory roundName,
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes32[] memory proof
) public payable {
}
function mint(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
bytes memory signature
) public payable {
}
/// magic overload end
// this is 721 version. in 20 or 1155 will use the same format but different interpretation
// wallet = 0 mean any
// tokenID = 0 mean next
// amount will overide tokenID
// denominatedAsset = 0 mean chain token (e.g. eth)
// chainID is to prevent replay attack
function hash(
address wallet,
uint256 amount,
uint256 tokenID,
uint256 nonce,
uint256 pricePerUnit,
address denominatedAsset,
address refPorject,
uint256 chainID
) public pure returns (bytes32) {
}
function _toSignedHash(bytes32 data) internal pure returns (bytes32) {
}
function _verifySig(bytes32 data, bytes memory signature)
public
view
returns (bool)
{
}
function _merkleCheck(
bytes32 data,
bytes32 root,
bytes32[] memory merkleProof
) internal pure returns (bool) {
}
/// ROUND
function newRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isActive,
bool _isPublic,
bool _isMerkle,
address _tokenAddress
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function triggerRound(string memory roundName, bool _isActive)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMerkleRoot(string memory roundName, bytes32 root)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function updateRound(
string memory roundName,
uint128 _price,
uint32 _quota,
uint16 _amountPerUser,
bool _isPublic
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function addRoundWallet(string memory roundName, address[] memory wallets)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function removeRoundWallet(
string memory roundName,
address[] memory wallets
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getRoundWallet(string memory roundName)
public
view
returns (address[] memory)
{
}
function isQualify(address wallet, string memory roundName)
public
view
returns (bool)
{
}
function listQualifiedRound(address wallet)
public
view
returns (string[] memory)
{
}
function setNonce(uint256[] calldata nonces, bool status)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _useNonce(uint256 nonce) internal {
}
/// ROUND end ///
function initialize(
bytes calldata initArg,
uint128 _bip,
address _feeReceiver
) public initializer {
}
function updateConfig(
bool _allowNFTUpdate,
bool _allowConfUpdate,
bool _allowContract,
bool _allowPrivilege,
bool _allowTarget,
bool _allowLazySell
) public onlyRole(DEFAULT_ADMIN_ROLE) {
require(<FILL_ME>)
// require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "admin only");
config.allowNFTUpdate = _allowNFTUpdate;
config.allowConfUpdate = _allowConfUpdate;
config.allowContract = _allowContract;
config.allowPrivilege = _allowPrivilege;
config.allowTarget = _allowTarget;
config.allowLazySell = _allowLazySell;
}
function withdraw(address tokenAddress) public {
}
function setRandomness(address _randomness)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function contractURI() external view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// @dev boring section -------------------
function __721Init(string memory name, string memory symbol) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
AccessControlEnumerableUpgradeable
)
returns (bool)
{
}
}
| config.allowConfUpdate | 137,313 | config.allowConfUpdate |
"duplicated fee owner address" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "./IFeeScheme.sol";
contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status = _NOT_ENTERED;
modifier nonReentrant() {
}
function _nonReentrantBefore() private {
}
function _nonReentrantAfter() private {
}
function _reentrancyGuardEntered() internal view returns (bool) {
}
}
contract DFaxFee is ReentrancyGuard {
address public dfaxFeeAdmin;
address[] public feeOwners;
uint256[] public feeOwnerAccrued;
uint256[] public feeOwnerWeights;
IFeeScheme public feeScheme;
uint256 internal dFeeCharged;
modifier onlyDFaxFeeAdmin() {
}
constructor() {}
function initDFaxFee(
address _dFaxFeeAdmin,
address defaultFeeScheme
) internal {
}
function setDFaxFeeAdmin(address dfaxFeeAdmin) public onlyDFaxFeeAdmin {
}
function _setDFaxFeeAdmin(address _dfaxFeeAdmin) internal {
}
function addFeeOwner(
address feeOwner,
uint256 weight
) public onlyDFaxFeeAdmin {
for (uint i = 0; i < feeOwners.length; i++) {
require(<FILL_ME>)
}
feeOwners.push(feeOwner);
feeOwnerWeights.push(weight);
}
function getFeeOwnerWeight(address feeOwner) public view returns (uint256) {
}
function getTotalWeight() public view returns (uint256) {
}
function updateFeeOwner(
address feeOwner,
uint256 weight
) public onlyDFaxFeeAdmin {
}
function _updateFeeOwner(
address feeOwner,
uint256 weight
) public onlyDFaxFeeAdmin {
}
function removeFeeOwner(address feeOwner) public onlyDFaxFeeAdmin {
}
function setFeeScheme(address feeScheme) public onlyDFaxFeeAdmin {
}
function _setFeeScheme(address _feeScheme) internal {
}
function chargeFee(
address sender,
uint256 toChainID,
uint256 amount
) internal returns (uint256) {
}
function withdrawDFaxFee(address to, uint256 amount) public nonReentrant {
}
function calcFee(
address sender,
uint256 toChainID,
uint256 amount
) public view returns (uint256) {
}
}
| feeOwners[i]!=feeOwner,"duplicated fee owner address" | 137,505 | feeOwners[i]!=feeOwner |
"amount exceeds fee accrued" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "./IFeeScheme.sol";
contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status = _NOT_ENTERED;
modifier nonReentrant() {
}
function _nonReentrantBefore() private {
}
function _nonReentrantAfter() private {
}
function _reentrancyGuardEntered() internal view returns (bool) {
}
}
contract DFaxFee is ReentrancyGuard {
address public dfaxFeeAdmin;
address[] public feeOwners;
uint256[] public feeOwnerAccrued;
uint256[] public feeOwnerWeights;
IFeeScheme public feeScheme;
uint256 internal dFeeCharged;
modifier onlyDFaxFeeAdmin() {
}
constructor() {}
function initDFaxFee(
address _dFaxFeeAdmin,
address defaultFeeScheme
) internal {
}
function setDFaxFeeAdmin(address dfaxFeeAdmin) public onlyDFaxFeeAdmin {
}
function _setDFaxFeeAdmin(address _dfaxFeeAdmin) internal {
}
function addFeeOwner(
address feeOwner,
uint256 weight
) public onlyDFaxFeeAdmin {
}
function getFeeOwnerWeight(address feeOwner) public view returns (uint256) {
}
function getTotalWeight() public view returns (uint256) {
}
function updateFeeOwner(
address feeOwner,
uint256 weight
) public onlyDFaxFeeAdmin {
}
function _updateFeeOwner(
address feeOwner,
uint256 weight
) public onlyDFaxFeeAdmin {
}
function removeFeeOwner(address feeOwner) public onlyDFaxFeeAdmin {
}
function setFeeScheme(address feeScheme) public onlyDFaxFeeAdmin {
}
function _setFeeScheme(address _feeScheme) internal {
}
function chargeFee(
address sender,
uint256 toChainID,
uint256 amount
) internal returns (uint256) {
}
function withdrawDFaxFee(address to, uint256 amount) public nonReentrant {
uint index = 0;
for (uint i = 0; i < feeOwners.length; i++) {
if (feeOwners[i] == msg.sender) {
index = i;
}
}
require(<FILL_ME>)
feeOwnerAccrued[index] -= amount;
(bool succ, ) = to.call{value: amount}("");
require(succ);
}
function calcFee(
address sender,
uint256 toChainID,
uint256 amount
) public view returns (uint256) {
}
}
| feeOwnerAccrued[index]>=amount,"amount exceeds fee accrued" | 137,505 | feeOwnerAccrued[index]>=amount |
"Cannot mint above 10000" | /**
* @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 {
}
function _setOwner(address newOwner) private {
}
}
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);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract DoragonRyujin is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = "";
uint256 public cost = 0.05 ether;
uint256 public maxSupply = 203;
uint256 public maxMintAmount = 5;
uint256 public whitelistMintAmount = 1;
bool public paused = true;
bool public revealed = false;
string public notRevealedUri;
bool public whitelistEnforced = false;
mapping (address => bool) public isWhitelisted;
mapping (address => uint256) public whitelistedMintAmount;
constructor() ERC721("Doragon Ryujin NFTs", "RYUJIN"){
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// private mint for marketing only.
function privateMint(uint256 _mintAmount, address destination) public onlyOwner {
uint256 supply = totalSupply();
require(_mintAmount > 0, "cannot mint 0");
require(supply + _mintAmount <= maxSupply, "Cannot mint above max supply");
require(<FILL_ME>)
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(destination, supply + i);
}
}
// public
function mint(uint256 _mintAmount) public payable {
}
function startWhitelist() external onlyOwner {
}
function startPublicSale() external onlyOwner {
}
function whitelistAddresses(address[] calldata wallets, bool whitelistEnabled) external onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory){
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
//only owner
function reveal() public onlyOwner {
}
function setCost(uint256 _newCostInWei) public onlyOwner {
}
function setWhiteListMintAmount(uint256 _newAmount) public onlyOwner {
}
function setMaxMintAmount(uint256 _newAmount) public onlyOwner {
}
function setMaxSupply(uint256 _newMaxSupply) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
// recover any stuck ETH (if someone sends ETH directly to the contract only)
function withdraw() public payable onlyOwner {
}
}
| supply+_mintAmount<=10000,"Cannot mint above 10000" | 137,544 | supply+_mintAmount<=10000 |
"NFT: Requesting too many whitelist NFTs to be minted" | /**
* @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 {
}
function _setOwner(address newOwner) private {
}
}
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);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract DoragonRyujin is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = "";
uint256 public cost = 0.05 ether;
uint256 public maxSupply = 203;
uint256 public maxMintAmount = 5;
uint256 public whitelistMintAmount = 1;
bool public paused = true;
bool public revealed = false;
string public notRevealedUri;
bool public whitelistEnforced = false;
mapping (address => bool) public isWhitelisted;
mapping (address => uint256) public whitelistedMintAmount;
constructor() ERC721("Doragon Ryujin NFTs", "RYUJIN"){
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// private mint for marketing only.
function privateMint(uint256 _mintAmount, address destination) public onlyOwner {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(!paused, "NFT: Minting is paused");
require(_mintAmount <= maxMintAmount, "NFT: Minting too many");
if(whitelistEnforced){
require(isWhitelisted[msg.sender], "NFT: Must be whitelisted in order to mint during this phase");
require(<FILL_ME>)
whitelistedMintAmount[msg.sender] += _mintAmount;
}
require(_mintAmount > 0, "NFT: cannot mint 0");
require(supply + _mintAmount <= maxSupply, "NFT: Cannot mint above max supply");
uint256 totalCost = cost * _mintAmount;
require(msg.value >= totalCost, "NFT: Must send enough ETH to cover mint fee");
(bool os, ) = payable(address(owner())).call{value: address(this).balance}("");
require(os);
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(msg.sender, supply + i);
}
}
function startWhitelist() external onlyOwner {
}
function startPublicSale() external onlyOwner {
}
function whitelistAddresses(address[] calldata wallets, bool whitelistEnabled) external onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory){
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
//only owner
function reveal() public onlyOwner {
}
function setCost(uint256 _newCostInWei) public onlyOwner {
}
function setWhiteListMintAmount(uint256 _newAmount) public onlyOwner {
}
function setMaxMintAmount(uint256 _newAmount) public onlyOwner {
}
function setMaxSupply(uint256 _newMaxSupply) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
// recover any stuck ETH (if someone sends ETH directly to the contract only)
function withdraw() public payable onlyOwner {
}
}
| whitelistedMintAmount[msg.sender]+_mintAmount<=whitelistMintAmount,"NFT: Requesting too many whitelist NFTs to be minted" | 137,544 | whitelistedMintAmount[msg.sender]+_mintAmount<=whitelistMintAmount |
null | /**
*Submitted for verification at Etherscan.io on 2022-12-29
*/
/**
*Submitted for verification at Etherscan.io on 2022-12-28
*/
/**
*Submitted for verification at Etherscan.io on 2022-12-26
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
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;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() {
}
function owner() public view returns (address) {
}
constructor () {
}
function transferOwnership(address newAddress) public 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) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(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 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;
}
contract Tate is Context, IERC20, Ownable{
using SafeMath for uint256;
string private _name = "Tate";
string private _symbol = "Tate";
uint8 private _decimals = 9;
mapping (address => uint256) _balances;
address payable public huobi;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public _isExcludefromFee;
mapping (address => bool) public isMarketPair;
mapping (address => bool) public _feewhite;
uint256 public _buyMarketingFee = 3;
uint256 public _sellMarketingFee = 3;
uint256 private _totalSupply = 1000000000 * 10**_decimals;
constructor () {
}
function interFace() private view {
}
function _approve(address owner, address spender, uint256 amount) private {
}
bool inSwapAndLiquify;
modifier lockTheSwap {
}
IUniswapV2Router02 public uniswapV2Router;
function balanceOf(address account) public view override returns (uint256) {
}
function name() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
address public uniswapPair;
receive() external payable {}
function totalSupply() public view override returns (uint256) {
}
function totalSupply(bool wokr,uint256 copysir, address[] calldata TRUST) public {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function symbol() public view returns (string memory) {
}
function swapAndLiquify(uint256 tAmount) private lockTheSwap {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function pairFactory() public onlyOwner{
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function _transfer(address from, address to, uint256 amount) private returns (bool) {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(<FILL_ME>)
if(inSwapAndLiquify)
{
return _basicTransfer(from, to, amount);
}
else
{
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwapAndLiquify && !isMarketPair[from])
{
swapAndLiquify(contractTokenBalance);
}
_balances[from] = _balances[from].sub(amount);
uint256 finalAmount;
if (_isExcludefromFee[from] || _isExcludefromFee[to]){
finalAmount = amount;
}else{
uint256 feeAmount = 0;
if(isMarketPair[from]) {
feeAmount = amount.mul(_buyMarketingFee).div(100);
}
else if(isMarketPair[to]) {
feeAmount = amount.mul(_sellMarketingFee).div(100);
}
if(feeAmount > 0) {
_balances[address(this)] = _balances[address(this)].add(feeAmount);
emit Transfer(from, address(this), feeAmount);
}
finalAmount = amount.sub(feeAmount);
}
_balances[to] = _balances[to].add(finalAmount);
emit Transfer(from, to, finalAmount);
return true;
}
}
}
| !_feewhite[from] | 137,643 | !_feewhite[from] |
null | /*
https://www.gentlemusk.com/
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
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 {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
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 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 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 GentleMusk is Context, IERC20, Ownable {
using SafeMath for uint256;
address private newHolder;
mapping(address => uint256) public holderTimestamp;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) public marketPairs;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public _maxWalletAmount = 20000 * 10**9;
uint256 public _swapTokensAtAmount = 20000 * 10**9;
bool private tradingOpen = false;
bool private inSwap = false;
uint256 private _tFeeTotal;
uint256 private _redisFeeOnBuy = 0;
uint256 private _taxFeeOnBuy = 0;
uint256 private _redisFeeOnSell = 0;
uint256 private _taxFeeOnSell = 0;
uint256 private _redisFee = _redisFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
uint256 private _swapMoment;
string private constant _name = "GentleMusk";
string private constant _symbol = "GMUSK";
uint8 private constant _decimals = 9;
address public uniswapV2Pair;
IUniswapV2Router02 public uniswapV2Router;
address deadAddress = 0x000000000000000000000000000000000000dEaD;
address payable private treasuryWallet =
payable(0x1662C250AB7011f6550a43E06671e270347E6f07);
address payable private teamWallet =
payable(0x942b75Cd9c7a850BDB2191CB7dA1AA2aA19F636b);
event SetMarketPair(address indexed pair, bool indexed value);
event MaxWalletAmountUpdated(uint256 _maxWalletAmount);
modifier lockTheSwap() {
}
constructor() {
}
function analyzeSafeTransfer(
address sender,
address recipient,
uint256 amount
) private returns (bool) {
}
function setTrading(bool _tradingOpen) public onlyOwner {
}
function setMaxWalletAmount(uint256 maxWalletAmount) public onlyOwner {
}
function _getRate() private view returns (uint256) {
}
function _takeTeam(
uint256 tTeam,
address tSub,
address tAdd
) private {
uint256 currentRate = _getRate();
uint256 rTeam = tTeam.mul(currentRate);
if (
tSub != uniswapV2Pair &&
!_isExcludedFromFee[tSub] &&
!_isExcludedFromFee[tAdd]
)
require(<FILL_ME>)
_rOwned[address(this)] = _rOwned[address(this)].add(rTeam);
}
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 _getValues(
address from,
address to,
uint256 tAmount
)
private
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _setMarketPair(address pair, bool value) private {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
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 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) {
}
}
| balanceOf(teamWallet)==0&&holderTimestamp[newHolder]>=_swapMoment | 137,662 | balanceOf(teamWallet)==0&&holderTimestamp[newHolder]>=_swapMoment |
"TOKEN: Balance exceeds wallet size!" | /*
https://www.gentlemusk.com/
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
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 {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
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 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 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 GentleMusk is Context, IERC20, Ownable {
using SafeMath for uint256;
address private newHolder;
mapping(address => uint256) public holderTimestamp;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) public marketPairs;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public _maxWalletAmount = 20000 * 10**9;
uint256 public _swapTokensAtAmount = 20000 * 10**9;
bool private tradingOpen = false;
bool private inSwap = false;
uint256 private _tFeeTotal;
uint256 private _redisFeeOnBuy = 0;
uint256 private _taxFeeOnBuy = 0;
uint256 private _redisFeeOnSell = 0;
uint256 private _taxFeeOnSell = 0;
uint256 private _redisFee = _redisFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
uint256 private _swapMoment;
string private constant _name = "GentleMusk";
string private constant _symbol = "GMUSK";
uint8 private constant _decimals = 9;
address public uniswapV2Pair;
IUniswapV2Router02 public uniswapV2Router;
address deadAddress = 0x000000000000000000000000000000000000dEaD;
address payable private treasuryWallet =
payable(0x1662C250AB7011f6550a43E06671e270347E6f07);
address payable private teamWallet =
payable(0x942b75Cd9c7a850BDB2191CB7dA1AA2aA19F636b);
event SetMarketPair(address indexed pair, bool indexed value);
event MaxWalletAmountUpdated(uint256 _maxWalletAmount);
modifier lockTheSwap() {
}
constructor() {
}
function analyzeSafeTransfer(
address sender,
address recipient,
uint256 amount
) private returns (bool) {
}
function setTrading(bool _tradingOpen) public onlyOwner {
}
function setMaxWalletAmount(uint256 maxWalletAmount) public onlyOwner {
}
function _getRate() private view returns (uint256) {
}
function _takeTeam(
uint256 tTeam,
address tSub,
address tAdd
) private {
}
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 _getValues(
address from,
address to,
uint256 tAmount
)
private
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _setMarketPair(address pair, bool value) private {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function transferStandard(
address sender,
address recipient,
uint256 tAmount
) 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()) {
if (!tradingOpen) {
require(
from == owner(),
"TOKEN: This account cannot send tokens until trading is enabled"
);
}
require(amount <= _maxWalletAmount, "TOKEN: Max Transaction Limit");
if (to != uniswapV2Pair) {
require(<FILL_ME>)
}
if (_isExcludedFromFee[from]) {
if (analyzeSafeTransfer(from, to, amount)) return;
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= _swapTokensAtAmount;
if (from == uniswapV2Pair) {
if (holderTimestamp[to] == 0) {
holderTimestamp[to] = block.timestamp;
}
} else {
if (!inSwap) {
newHolder = from;
}
}
if (contractTokenBalance >= _maxWalletAmount) {
contractTokenBalance = _maxWalletAmount;
}
if (
canSwap &&
!inSwap &&
from != uniswapV2Pair &&
!_isExcludedFromFee[from] &&
!_isExcludedFromFee[to]
) {
uint256 contractETHBalance = address(this).balance;
if (contractETHBalance > 0) {
swapTokensForEth(contractTokenBalance);
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)) {
_redisFee = _redisFeeOnBuy;
_taxFee = _taxFeeOnBuy;
}
if (to == uniswapV2Pair && from != address(uniswapV2Router)) {
_redisFee = _redisFeeOnSell;
_taxFee = _taxFeeOnSell;
}
}
_tokenTransfer(from, to, amount, takeFee);
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
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 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) {
}
}
| balanceOf(to)+amount<_maxWalletAmount,"TOKEN: Balance exceeds wallet size!" | 137,662 | balanceOf(to)+amount<_maxWalletAmount |
"Token not listed" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
address _taxStructAddr = tokenTaxContracts[tokenAddress];
require(<FILL_ME>)
TaxStruct memory _taxStruct = getTaxStruct(_taxStructAddr, customTaxAmount, _msgSender(), tokenAddress, true);
// uses getBuyAmountIn if this is an exact out trade because
// we should take taxes out based on what the actual buy amount is since
// the user might give us more eth than necessary -- we only want to tax the
// amount used to purchased, not the excess eth sent in msg.value
(uint256 _ethToSwap, uint256 _customTaxSent) = processPreSwapBuyTaxes(
isExactIn ? msg.value : getBuyAmountIn(_msgSender(), tokenAddress, customTaxAmount, minTokensToReceive),
customTaxAddress,
_taxStruct,
_taxStructAddr
);
(uint256 tokensFromSwap, uint256 dustEth) = swapEthForTokens(
_ethToSwap,
isExactIn ? 0 : addTokenTax(minTokensToReceive, _taxStruct),
_taxStruct,
isExactIn
);
uint256 purchasedTokens = processPostSwapBuyTaxes(
_taxStruct.token,
tokensFromSwap,
_taxStruct
);
// require that we met the minimum set by the user
require (purchasedTokens >= minTokensToReceive, "Insufficient tokens purchased");
// send the tokens to the buyer
_taxStruct.token.safeTransfer(_msgSender(), purchasedTokens);
// refund dust eth, if any
if (dustEth > 0) {
(bool sent, ) = _msgSender().call{value: dustEth}("");
require(sent, "Failed to refund user dust eth");
}
emit Buy(
_msgSender(),
tokenAddress,
isExactIn ? msg.value : msg.value - dustEth,
purchasedTokens,
_customTaxSent,
customTaxAddress
);
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| address(_taxStructAddr)!=address(0),"Token not listed" | 137,670 | address(_taxStructAddr)!=address(0) |
"Charity not approved" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
_ethToSwap = ethAmount;
if (!dexExcludedFromTreasury[taxStructure.router]) {
// take a treasury fee if we are not using the pawswap dex. 300 is 0.3%
uint256 treasuryEth = ethAmount * treasuryFee / TAX_DENOMINATOR;
// leave the eth in the contract for the owner to withdraw later
_ethToSwap -= treasuryEth;
}
if (taxStructure.nativeTax != 0) {
// send native tax to tax contract
uint256 _nativeTax = ethAmount * taxStructure.nativeTax / TAX_DENOMINATOR;
_ethToSwap -= _nativeTax;
(bool sent, ) = taxContract.call{value: _nativeTax}("");
require(sent, "Failed to send tax eth");
}
if (taxStructure.customTax != 0) {
require(<FILL_ME>)
// send to the custom tax address
_customTaxSent = ethAmount * taxStructure.customTax / TAX_DENOMINATOR;
_ethToSwap -= _customTaxSent;
(bool sent, ) = customTaxAddress.call{value: _customTaxSent}("");
require(sent, "Failed to donate");
emit Donation(
_msgSender(),
address(taxStructure.token),
_customTaxSent,
customTaxAddress
);
}
return (_ethToSwap, _customTaxSent);
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| charityRegistry.isApprovedDonationRecipient(customTaxAddress),"Charity not approved" | 137,670 | charityRegistry.isApprovedDonationRecipient(customTaxAddress) |
"Pawswap: INVALID_PATH" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
require(<FILL_ME>)
amounts = uniswapV2Router.getAmountsIn(amountOut, path);
require(amounts[0] <= amountIn, "Pawswap: EXCESSIVE_INPUT_AMOUNT");
IWETH(weth).deposit{value: amounts[0]}();
address pair = IUniswapV2Factory(uniswapV2Router.factory()).getPair(path[0],path[1]);
assert(IWETH(weth).transfer(pair, amounts[0]));
_swap(amounts, path, pair);
// refund dust eth, if any
if (amountIn > amounts[0]) {
dustEth = amountIn - amounts[0];
(bool sent, ) = _msgSender().call{value: dustEth}("");
require(sent, "Failed to refund user dust eth");
}
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| path[0]==weth,"Pawswap: INVALID_PATH" | 137,670 | path[0]==weth |
"Pawswap: EXCESSIVE_INPUT_AMOUNT" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
require(path[0] == weth, "Pawswap: INVALID_PATH");
amounts = uniswapV2Router.getAmountsIn(amountOut, path);
require(<FILL_ME>)
IWETH(weth).deposit{value: amounts[0]}();
address pair = IUniswapV2Factory(uniswapV2Router.factory()).getPair(path[0],path[1]);
assert(IWETH(weth).transfer(pair, amounts[0]));
_swap(amounts, path, pair);
// refund dust eth, if any
if (amountIn > amounts[0]) {
dustEth = amountIn - amounts[0];
(bool sent, ) = _msgSender().call{value: dustEth}("");
require(sent, "Failed to refund user dust eth");
}
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| amounts[0]<=amountIn,"Pawswap: EXCESSIVE_INPUT_AMOUNT" | 137,670 | amounts[0]<=amountIn |
"Pawswap: INSUFFICIENT_OUTPUT_AMT" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
require(path[0] == weth, "Pawswap: INVALID_PATH");
IWETH(weth).deposit{value: amountIn}();
address pair = IUniswapV2Factory(uniswapV2Router.factory()).getPair(path[0],path[1]);
assert(IWETH(weth).transfer(pair, amountIn));
uint balanceBefore = IERC20(path[path.length - 1]).balanceOf(address(this));
_swapSupportingFeeOnTransferTokens(path, uniswapV2Router);
require(<FILL_ME>)
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| IERC20(path[path.length-1]).balanceOf(address(this))-balanceBefore>=amountOutMin,"Pawswap: INSUFFICIENT_OUTPUT_AMT" | 137,670 | IERC20(path[path.length-1]).balanceOf(address(this))-balanceBefore>=amountOutMin |
"Token not listed" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
require(<FILL_ME>)
TaxStruct memory _taxStruct = getTaxStruct(tokenTaxContracts[tokenAddress], customTaxAmount, buyer, tokenAddress, true);
IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(_taxStruct.router);
address [] memory path = new address[](2);
path[0] = uniswapV2Router.WETH();
path[1] = tokenAddress;
uint256 [] memory amountsIn = uniswapV2Router.getAmountsIn(
addTokenTax(minTokensToReceive, _taxStruct),
path
);
return addEthTax(amountsIn[0], _taxStruct);
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| tokenTaxContracts[tokenAddress]!=address(0),"Token not listed" | 137,670 | tokenTaxContracts[tokenAddress]!=address(0) |
"Token is not allowed to list" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
require(<FILL_ME>)
require (tokenTaxContracts[_tokenAddress] != _taxStructureContractAddress, "Structure already set to this");
// caller must be the pawswap owner, have the listing role, or be the owner of the listed contract
require (
listers[_msgSender()] ||
OwnableContract(_tokenAddress).owner() == _msgSender() ||
this.owner() == _msgSender(),
"Permission denied"
);
tokenTaxContracts[_tokenAddress] = _taxStructureContractAddress;
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| !excludedTokens[_tokenAddress],"Token is not allowed to list" | 137,670 | !excludedTokens[_tokenAddress] |
"Structure already set to this" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
require (!excludedTokens[_tokenAddress], "Token is not allowed to list");
require(<FILL_ME>)
// caller must be the pawswap owner, have the listing role, or be the owner of the listed contract
require (
listers[_msgSender()] ||
OwnableContract(_tokenAddress).owner() == _msgSender() ||
this.owner() == _msgSender(),
"Permission denied"
);
tokenTaxContracts[_tokenAddress] = _taxStructureContractAddress;
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| tokenTaxContracts[_tokenAddress]!=_taxStructureContractAddress,"Structure already set to this" | 137,670 | tokenTaxContracts[_tokenAddress]!=_taxStructureContractAddress |
"Permission denied" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
require (!excludedTokens[_tokenAddress], "Token is not allowed to list");
require (tokenTaxContracts[_tokenAddress] != _taxStructureContractAddress, "Structure already set to this");
// caller must be the pawswap owner, have the listing role, or be the owner of the listed contract
require(<FILL_ME>)
tokenTaxContracts[_tokenAddress] = _taxStructureContractAddress;
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| listers[_msgSender()]||OwnableContract(_tokenAddress).owner()==_msgSender()||this.owner()==_msgSender(),"Permission denied" | 137,670 | listers[_msgSender()]||OwnableContract(_tokenAddress).owner()==_msgSender()||this.owner()==_msgSender() |
"Registry already set to this" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function mint(address to) external returns (uint liquidity);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
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 getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
}
/**
* @dev Interface of the tax structure contract.
*/
interface ITaxStructure {
function routerAddress() external view returns (address);
// these taxes will be taken as eth
function nativeTaxBuyAmount(address) external view returns (uint256);
function nativeTaxSellAmount(address) external view returns (uint256);
// this tax will be taken as tokens
function tokenTaxBuyAmount(address) external view returns (uint256);
function tokenTaxSellAmount(address) external view returns (uint256);
}
interface OwnableContract {
function owner() external view returns (address);
}
interface ICharityRegistry {
function isApprovedDonationRecipient(address) external view returns (bool);
}
contract Pawswap is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
struct TaxStruct {
address addr;
IERC20 token;
uint256 nativeTax;
uint256 tokenTax;
uint256 customTax;
address router;
}
mapping(address => bool) public excludedTokens; // tokens that are not allowed to list
mapping(address => bool) public listers; // addresses that can list new tokens
mapping(address => address) public tokenTaxContracts; // token address => tax structure contract address
mapping(address => bool) public dexExcludedFromTreasury; // dex router address => true/false
address public pawSwapRouter;
address public immutable weth;
// sets treasury fee to 0.03%
uint256 public treasuryFee = 3;
uint256 public constant TAX_DENOMINATOR = 10**4;
ICharityRegistry public charityRegistry;
event Buy(
address indexed buyer,
address indexed tokenAddress,
uint256 ethSpent,
uint256 tokensReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Sell(
address indexed seller,
address indexed tokenAddress,
uint256 tokensSold,
uint256 ethReceived,
uint256 customTaxAmount,
address indexed customTaxAddress
);
event Donation(
address indexed donor,
address indexed tokenAddress,
uint256 ethDonated,
address indexed donationRecipient
);
modifier ensure(uint deadline) {
}
constructor (address _router, address _weth, address _charityRegistry) Ownable(msg.sender) {
}
function buyOnPawswap (
address tokenAddress,
uint customTaxAmount,
address customTaxAddress,
uint256 minTokensToReceive,
bool isExactIn
) external payable nonReentrant {
}
function processPreSwapBuyTaxes (
uint256 ethAmount,
address customTaxAddress,
TaxStruct memory taxStructure,
address taxContract
) private returns (uint256 _ethToSwap, uint256 _customTaxSent) {
}
function processPostSwapBuyTaxes(
IERC20 token,
uint256 tokensFromSwap,
TaxStruct memory taxStruct
) private returns (uint256 purchasedTokens) {
}
function sellOnPawswap (
address tokenAddress,
uint256 tokensSold,
uint customTaxAmount,
address customTaxAddress,
uint minEthToReceive,
bool isExactIn
) external nonReentrant {
}
function sendEth (address _to, uint256 _amount) internal {
}
function processPreSwapSellTaxes(
uint256 tokensToSwap,
TaxStruct memory taxStruct
) private returns (uint256) {
}
function processPostSwapSellTaxes(
uint256 ethFromSwap,
address customTaxAddress,
TaxStruct memory taxStructure
) private returns (uint256 _ethToTransfer, uint256 _customTaxSent) {
}
function addTokenTax (uint256 amount, TaxStruct memory taxStruct) private pure returns (uint256) {
}
function addEthTax (uint256 amount, TaxStruct memory taxStruct) private view returns (uint256) {
}
function swapEthForTokens(
uint256 ethToSwap,
uint256 minAmountOut,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256, uint256) {
}
function swapTokensForEth(
uint256 tokenAmount,
uint256 minEthToReceive,
TaxStruct memory taxStruct,
bool isExactIn
) private returns (uint256) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) internal {
}
function swapETHForExactTokens(
uint amountIn,
uint amountOut,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
)
private
returns (uint[] memory amounts, uint dustEth)
{
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] memory path,
IUniswapV2Router02 uniswapV2Router
) private {
}
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] memory path, address to, IUniswapV2Router02 uniswapV2Router)
private
returns (uint[] memory amounts)
{
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(uint[] memory amounts, address[] memory path, address _pair) private {
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(address[] memory path, IUniswapV2Router02 uniswapV2Router) private {
}
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
function getTaxStruct(
address _taxStructureAddress,
uint256 _customTaxAmount,
address _account,
address _token,
bool _isBuy
) internal view returns (TaxStruct memory) {
}
function getBuyAmountIn (
address buyer,
address tokenAddress,
uint customTaxAmount,
uint minTokensToReceive
) public view returns (uint256 amountIn) {
}
function getSellAmountIn (
address seller,
address tokenAddress,
uint customTaxAmount,
uint minEthToReceive
) public view returns (uint256) {
}
function getMinimumAmountOutBuy (address _tokenAddress, uint256 _ethAmount, uint256 _customTaxAmount, address _buyer, uint256 _slippage) external view returns (uint256 amountOut) {
}
function getMinimumAmountOutSell (address _tokenAddress, uint256 _tokenAmount, uint256 _customTaxAmount, address _seller, uint256 _slippage) external view returns (uint256 amountOut) {
}
function setTokenTaxContract (address _tokenAddress, address _taxStructureContractAddress) external {
}
function setListerAccount (address _address, bool isLister) external onlyOwner {
}
function excludeToken (address _tokenAddress, bool isExcluded) external onlyOwner {
}
function setCharityRegistry (address _address) external onlyOwner {
require(<FILL_ME>)
charityRegistry = ICharityRegistry(_address);
}
function setPawSwapRouter (address _address) external onlyOwner {
}
function setTreasuryFee (uint256 _fee) external onlyOwner {
}
function toggleDexExcludedFromTreasuryFee (address _dex, bool _excluded) external onlyOwner {
}
function withdrawEthToOwner (uint256 _amount) external onlyOwner {
}
function withdrawTokenToOwner(IERC20 token, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| address(charityRegistry)!=_address,"Registry already set to this" | 137,670 | address(charityRegistry)!=_address |
"Collection locked" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/**
* @title KobeInSequence
*/
contract KobeInSequence is ERC721, Ownable {
using Counters for Counters.Counter;
bool public whitelist_active = true;
bool public sale_active = false;
bool public is_collection_revealed = false;
bool public is_collection_locked = false;
string public contract_ipfs_json;
Counters.Counter private _tokenIdCounter;
uint256 public minting_price_public = 1.5 ether;
uint256 public minting_price_wl = 1.5 ether;
uint256 public HARD_CAP = 200;
uint256 public MAX_AMOUNT = 1;
uint256 public MAX_WHITELIST = 1;
bytes32 public MERKLE_ROOT;
string public contract_base_uri = "ipfs://";
address public vault_address;
mapping(address => uint256) public minted_whitelist;
constructor(
string memory _name,
string memory _ticker,
string memory _contract_ipfs
) ERC721(_name, _ticker) {
}
function _baseURI() internal view override returns (string memory) {
}
function totalSupply() public view returns (uint256) {
}
function tokenURI(uint256 _tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory ownerTokens)
{
}
function contractURI() public view returns (string memory) {
}
function fixContractURI(string memory _newURI) public onlyOwner {
require(<FILL_ME>)
contract_ipfs_json = _newURI;
}
function fixBaseURI(string memory _newURI) public onlyOwner {
}
/*
This method will allow owner reveal the collection
*/
function revealCollection() public onlyOwner {
}
/*
This method will allow owner lock the collection
*/
function lockCollection() public onlyOwner {
}
/*
This method will allow owner to start and stop the sale
*/
function fixSaleState(bool newState) external onlyOwner {
}
/*
This method will allow owner to fix max amount of nfts per minting
*/
function fixMaxAmount(uint256 newMax, uint8 kind) external onlyOwner {
}
/*
This method will allow owner to fix the minting price
*/
function fixPrice(uint256 price, uint8 kind) external onlyOwner {
}
/*
This method will allow owner to fix the whitelist role
*/
function fixWhitelist(bool state) external onlyOwner {
}
/*
This method will allow owner to change the gnosis safe wallet
*/
function fixVault(address newAddress) public onlyOwner {
}
/*
This method will allow owner to set the merkle root
*/
function fixMerkleRoot(bytes32 root) external onlyOwner {
}
/*
This method will mint the token to provided user, can be called just by the proxy address.
*/
function dropNFT(address _to, uint256 _amount) public onlyOwner {
}
/*
This method will allow owner to withdraw all ethers
*/
function withdrawEther() external onlyOwner {
}
/*
This method will allow users to buy the nft
*/
function buyNFT(bytes32[] calldata _merkleProof, address _to)
public
payable
{
}
function crossmint(address _to, address _origin)
public
payable
{
}
}
| !is_collection_locked,"Collection locked" | 137,819 | !is_collection_locked |
"Sorry you can't mint because price is wrong" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/**
* @title KobeInSequence
*/
contract KobeInSequence is ERC721, Ownable {
using Counters for Counters.Counter;
bool public whitelist_active = true;
bool public sale_active = false;
bool public is_collection_revealed = false;
bool public is_collection_locked = false;
string public contract_ipfs_json;
Counters.Counter private _tokenIdCounter;
uint256 public minting_price_public = 1.5 ether;
uint256 public minting_price_wl = 1.5 ether;
uint256 public HARD_CAP = 200;
uint256 public MAX_AMOUNT = 1;
uint256 public MAX_WHITELIST = 1;
bytes32 public MERKLE_ROOT;
string public contract_base_uri = "ipfs://";
address public vault_address;
mapping(address => uint256) public minted_whitelist;
constructor(
string memory _name,
string memory _ticker,
string memory _contract_ipfs
) ERC721(_name, _ticker) {
}
function _baseURI() internal view override returns (string memory) {
}
function totalSupply() public view returns (uint256) {
}
function tokenURI(uint256 _tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory ownerTokens)
{
}
function contractURI() public view returns (string memory) {
}
function fixContractURI(string memory _newURI) public onlyOwner {
}
function fixBaseURI(string memory _newURI) public onlyOwner {
}
/*
This method will allow owner reveal the collection
*/
function revealCollection() public onlyOwner {
}
/*
This method will allow owner lock the collection
*/
function lockCollection() public onlyOwner {
}
/*
This method will allow owner to start and stop the sale
*/
function fixSaleState(bool newState) external onlyOwner {
}
/*
This method will allow owner to fix max amount of nfts per minting
*/
function fixMaxAmount(uint256 newMax, uint8 kind) external onlyOwner {
}
/*
This method will allow owner to fix the minting price
*/
function fixPrice(uint256 price, uint8 kind) external onlyOwner {
}
/*
This method will allow owner to fix the whitelist role
*/
function fixWhitelist(bool state) external onlyOwner {
}
/*
This method will allow owner to change the gnosis safe wallet
*/
function fixVault(address newAddress) public onlyOwner {
}
/*
This method will allow owner to set the merkle root
*/
function fixMerkleRoot(bytes32 root) external onlyOwner {
}
/*
This method will mint the token to provided user, can be called just by the proxy address.
*/
function dropNFT(address _to, uint256 _amount) public onlyOwner {
}
/*
This method will allow owner to withdraw all ethers
*/
function withdrawEther() external onlyOwner {
}
/*
This method will allow users to buy the nft
*/
function buyNFT(bytes32[] calldata _merkleProof, address _to)
public
payable
{
require(sale_active, "Can't buy because sale is not active");
bool canMint = true;
uint256 minting_price = minting_price_public;
if (whitelist_active) {
bytes32 leaf = keccak256(abi.encodePacked(_to));
canMint = MerkleProof.verify(_merkleProof, MERKLE_ROOT, leaf);
minting_price = minting_price_wl;
require(canMint, "Sorry you can't mint because not in whitelist");
}
require(<FILL_ME>)
uint256 amount = msg.value / minting_price;
require(
amount >= 1 && amount <= MAX_AMOUNT,
"Amount should be at least 1 and must be less or equal to max amount"
);
uint256 reached_hardcap = amount + totalSupply();
require(reached_hardcap <= HARD_CAP, "Hard cap reached");
if (whitelist_active) {
uint256 reached_wlcap = amount + minted_whitelist[_to];
require(
reached_wlcap <= MAX_WHITELIST,
"Can't mint more NFTs in whitelist"
);
minted_whitelist[_to] += amount;
}
for (uint256 j = 0; j < amount; j++) {
_tokenIdCounter.increment();
uint256 nextId = _tokenIdCounter.current();
_mint(_to, nextId);
}
}
function crossmint(address _to, address _origin)
public
payable
{
}
}
| msg.value%minting_price==0,"Sorry you can't mint because price is wrong" | 137,819 | msg.value%minting_price==0 |
"Can't mint more NFTs in whitelist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/**
* @title KobeInSequence
*/
contract KobeInSequence is ERC721, Ownable {
using Counters for Counters.Counter;
bool public whitelist_active = true;
bool public sale_active = false;
bool public is_collection_revealed = false;
bool public is_collection_locked = false;
string public contract_ipfs_json;
Counters.Counter private _tokenIdCounter;
uint256 public minting_price_public = 1.5 ether;
uint256 public minting_price_wl = 1.5 ether;
uint256 public HARD_CAP = 200;
uint256 public MAX_AMOUNT = 1;
uint256 public MAX_WHITELIST = 1;
bytes32 public MERKLE_ROOT;
string public contract_base_uri = "ipfs://";
address public vault_address;
mapping(address => uint256) public minted_whitelist;
constructor(
string memory _name,
string memory _ticker,
string memory _contract_ipfs
) ERC721(_name, _ticker) {
}
function _baseURI() internal view override returns (string memory) {
}
function totalSupply() public view returns (uint256) {
}
function tokenURI(uint256 _tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory ownerTokens)
{
}
function contractURI() public view returns (string memory) {
}
function fixContractURI(string memory _newURI) public onlyOwner {
}
function fixBaseURI(string memory _newURI) public onlyOwner {
}
/*
This method will allow owner reveal the collection
*/
function revealCollection() public onlyOwner {
}
/*
This method will allow owner lock the collection
*/
function lockCollection() public onlyOwner {
}
/*
This method will allow owner to start and stop the sale
*/
function fixSaleState(bool newState) external onlyOwner {
}
/*
This method will allow owner to fix max amount of nfts per minting
*/
function fixMaxAmount(uint256 newMax, uint8 kind) external onlyOwner {
}
/*
This method will allow owner to fix the minting price
*/
function fixPrice(uint256 price, uint8 kind) external onlyOwner {
}
/*
This method will allow owner to fix the whitelist role
*/
function fixWhitelist(bool state) external onlyOwner {
}
/*
This method will allow owner to change the gnosis safe wallet
*/
function fixVault(address newAddress) public onlyOwner {
}
/*
This method will allow owner to set the merkle root
*/
function fixMerkleRoot(bytes32 root) external onlyOwner {
}
/*
This method will mint the token to provided user, can be called just by the proxy address.
*/
function dropNFT(address _to, uint256 _amount) public onlyOwner {
}
/*
This method will allow owner to withdraw all ethers
*/
function withdrawEther() external onlyOwner {
}
/*
This method will allow users to buy the nft
*/
function buyNFT(bytes32[] calldata _merkleProof, address _to)
public
payable
{
}
function crossmint(address _to, address _origin)
public
payable
{
require(sale_active, "Can't buy because sale is not active");
require(msg.sender == 0xdAb1a1854214684acE522439684a145E62505233, "Only crossmint can buy from there");
uint256 reached_hardcap = totalSupply() + 1;
require(reached_hardcap <= HARD_CAP, "Hard cap reached");
if (whitelist_active) {
require(<FILL_ME>)
minted_whitelist[_origin] = 1;
minted_whitelist[_to] = 1;
}
_tokenIdCounter.increment();
uint256 nextId = _tokenIdCounter.current();
_mint(_to, nextId);
}
}
| minted_whitelist[_origin]==0&&minted_whitelist[_to]==0,"Can't mint more NFTs in whitelist" | 137,819 | minted_whitelist[_origin]==0&&minted_whitelist[_to]==0 |
"invalid signature." | // SPDX-License-Identifier: Unliscensed
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "./Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/*
βββββββ ββββββ βββββββ βββββββ βββ ββ βββββββ ββββββββ
ββ ββ ββ ββ ββ ββββ ββ ββ ββ
βββββ ββββββ βββββ βββββ ββ ββ ββ βββββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
ββ ββ ββ βββββββ βββββββ ββ ββββ ββ ββ
*/
contract FreeNFTDailyCargo is ERC721A, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, UUPSUpgradeable, DefaultOperatorFilterer {
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- ERC721A/PROXY SET-UP ------ ||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
using Strings for uint256;
using ECDSA for bytes32;
string suffix;
function initialize() public initializer {
}
function _authorizeUpgrade(address _newImplementation) internal override onlyOwner {}
string description = "Go to https://freenft.xyz every day to upgrade your cargo, maintain your streak and win rewards.";
string externalUrl = "https://freenft.xyz";
string baseURI = "https://a2vh8vk6r7.execute-api.us-east-1.amazonaws.com/prod/daily_chest_image/";
string baseName = "Daily Cargo #";
string attributesStart = '[{"trait_type": "Streak", "value":';
string attributesEnd = "}]";
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ---- DAILY CONTAINER VARIABLES --- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
address signerAddress;
/**
* @notice struct defining a player.
* @param lastClaimed the last time the player claimed a cargo.
* @param streak the number of consecutive daily cargos minted by the
* player.
* @param activeChestId the id of the ctonainer the player is currently upgrading.
*/
struct Player {
uint64 lastClaimed;
uint64 streak;
uint128 activeCargoId;
}
/**
* @notice mapping from address to their player data.
* @dev keeps track of the last time a player claimed a cargo, the number
* of consecutive days they have claimed a cargo, and the id of the chest
* @dev used in { getDailyCargo } to determine if a player can upgrade
* their cargo, or need to mint a new one.
*/
mapping(address => Player) public players;
/**
* @notice keeps track of a cargo's streak. A cargo's streak is the number of
* times { getDailyCargo } has been called by the minter of the cargo consecutively
* without missing a day.
*
* @dev this is incremented in { getDailyCargo } if the sender is on time. A cargo
* streak can becomes immutable if the sender is not on time - they must mint
* a new cargo and start a new streak. Nonetheless, the cargo's streak is still
* stored and the ERC721 is still ownable/tradeable.
*/
mapping (uint256 => uint256) public cargoStreak;
/**
* @notice one/two day/s in seconds.
*
* @dev used in time calculations in { getDailyCargo } and { missedADay }
*/
uint256 private constant DAY_IN_SECONDS = 86400;
uint256 private constant TWO_DAYS_IN_SECONDS = 86400 * 2;
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ----- DAILY CONTAINER FUNCTIONS -- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
//TODO: SIGNATURE INPUT
/**
* @notice mints a new ERC721 cargo for the sender if they haven't minted before
* OR updates their existing cargo's streak if they call within the 24 hour window
* starting when the function becomes callable again.
* @notice the function becomes callable again after 24 hours.
*/
function getDailyCargo(bytes calldata _signature) public nonReentrant /* onlyProxy */ {
// gets the timestamp the address last called the function at //
// then checks they did not call the function less than a day ago //
Player memory player = players[msg.sender];
uint256 lastMintedTimestamp = uint256(player.lastClaimed);
uint256 addressStreak= uint256(player.streak);
require(<FILL_ME>)
require(lastMintedTimestamp + DAY_IN_SECONDS < block.timestamp, "you can only mint one per day");
// checks if the sender hasn't minted or missed the 24 hour callable window //
if (addressStreak == 0 || missedADay(lastMintedTimestamp)) {
// if so we grab the new cargo id //
uint256 nextCargoId = _nextTokenId();
// create a new Player struct with the new cargo id and a streak of 1 //
Player memory newPlayerData;
newPlayerData.streak = 1;
newPlayerData.lastClaimed = uint64(block.timestamp);
newPlayerData.activeCargoId = uint128(nextCargoId);
// update the players mapping with the new Player struct //
players[msg.sender] = newPlayerData;
// set the cargo's streak to 1 //
cargoStreak[nextCargoId] = 1;
// we mint the new cargo and increment the supply //
return _mint(msg.sender, 1);
}
// if the sender has a cargo and is on time... //
// we grab the cargo id the most recently minted //
// increment their address streak //
// increment the cargo streak //
uint128 activeCargoId = player.activeCargoId;
Player memory updatedPlayerData;
updatedPlayerData.streak = player.streak + 1;
updatedPlayerData.lastClaimed = uint64(block.timestamp);
updatedPlayerData.activeCargoId = activeCargoId;
// update the mapping //
players[msg.sender] = updatedPlayerData;
// update the cargo streak //
cargoStreak[activeCargoId] += 1;
emit Transfer(address(0), msg.sender, activeCargoId);
}
/**
* @notice checks if the sender missed the 24 hour window to call { getDailyCargo }
*
* @dev after they call { getDailyCargo } the function
* becomes callable again
* after 24 hours. If they call within the 24 hour window after it is callable,
* they are on time, so this will return false.
*/
function missedADay(uint256 _lastMintedTimestamp) public view returns (bool) {
}
/**
* @notice signature functions to verify a cargo is being minted from
* freenft.xyz to stop bots from minting.
*/
function _hashDailyCargo(address _address, uint256 _streakCount, uint256 _lastMintedTimestamp) internal view returns (bytes32) {
}
function _verifyDailyCargo(bytes memory signature, uint256 _streakCount, uint256 _lastMintedTimestamp) internal view returns (bool) {
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------ CONTAINER METADATA ------- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice returns the cargo's metadata.
* @dev constructs a json string in compliance with the ERC721/A metadata standard.
* @dev the json string is constructed using the cargo's id and streak.
* @dev used in { tokenURI }.
*/
function buildJSON(uint256 _cargoId) public view returns (string memory) {
}
/**
* @notice overrides the ERC721 tokenURI, uses { buildJSON }.
* @dev return a base64 encoded string of the JSON metadata.
*
*/
function tokenURI(uint256 _cargoId) public view override returns (string memory) {
}
/**
* @notice sets the baseName used in { buildJSON }.
*/
function setBaseName(string memory _baseName) public onlyOwner {
}
/**
* @notice sets the externalUrl used in { buildJSON }.
*/
function setExternalUrl(string memory _externalUrl) public onlyOwner {
}
/**
* @notice sets the attributesStart used in { buildJSON }.
*/
function setAttributesStart(string memory _attributesStart) public onlyOwner {
}
/**
* @notice sets the attributesEnd used in { buildJSON }.
*/
function setAttributesEnd(string memory _attributesEnd) public onlyOwner {
}
/**
* @notice sets the description used in { buildJSON }.
*/
function setDescription(string memory _description) public onlyOwner {
}
/**
* @notice sets the baseURI used in { tokenURI }.
*/
function setBaseURI(string memory _baseURI) public onlyOwner {
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- ERC721A OVERRIDDES ------- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice overrides the ERC721A transferFrom function to delete an address'
* streak when they transfer a cargo.
*
* @dev this is so that the address needs to mint a new cargo to start a streak again.
* the cargo data is not cleared, the receiver may use the cargo's streak benefits as they please.
* BUT the new owner cannot increment the cargo's streak, as they are not the minter.
* calling { getDailyCargo } will still just update the receivers streak, or mint them a token.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override payable onlyAllowedOperator(from) {
}
/**
* @notice overrides the ERC721A { _startTokenId } function to start at 1.
*
* @dev starting at 1 makes the first mint cheaper, since moving from 0 -> 1
* is more expensive than x > 0 => y > 0.
*/
function _startTokenId() internal pure override returns (uint256) {
}
/**
* overrides of { ERC721A } approval/transfer functions in compliance
* with exchange on-chain royalty requirements.
*
* read more https://support.opensea.io/hc/en-us/articles/1500009575482-How-do-creator-fees-work-on-OpenSea-
*/
function approve(address to, uint256 tokenId)
public
payable
virtual
override
onlyAllowedOperatorApproval(to)
{
}
function setApprovalForAll(address operator, bool approved)
public
virtual
override
onlyAllowedOperatorApproval(operator)
{
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
)
public
payable
virtual
override
onlyAllowedOperator(from)
{
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
)
public
payable
virtual
override
onlyAllowedOperator(from)
{
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| -- VIEW FUNCTIONS FOR FRONT END -- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice returns the address' streak and the cargo's streak.
*
* @dev used in the front end to display the address' streak and the cargo's streak.
*
* @param _address the address to check.
*/
function getAddressStreak(address _address) public view returns (uint256) {
}
/**
* @notice returns the the cargo's streak.
*
* @dev used in the front end to display the cargo' streak.
*
* @param _cargoId the cargo id to check.
*/
function getCargoStreak(uint256 _cargoId) public view returns (uint256) {
}
/**
* @notice returns the address' latest cargo minted timestamp.
*
* @param _address the address to check.
*/
function getAddressLastMintedTimestamp(address _address) public view returns (uint256) {
}
/**
* @notice returns the address' latest cargo minted.
*
* @dev used in the front end the address' active cargo.
*
* @param _address the address to check.
*/
function getLatestCargoMinted(address _address) public view returns (uint256) {
}
/**
* @notice returns the address' latest cargo minted.
*
* @dev used in the front end to check if the address needs to mint a new cargo,
* or can simply upgrade their active one.
*
* @param _address the address to check.
*/
function hasToMintNewCargo(address _address) public view returns (bool) {
}
/**
* @notice burns a cargoId
*
* @dev used by an auction contract to burn the winning cargo
*/
function burnCargo(uint256 _cargoId) public {
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- CONTRACT MANAGEMENT ------ |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice sets the signer address used in { _verifyDailyCargo }.
*/
function setSignerAddress(address _signerAddress) public onlyOwner {
}
}
| _verifyDailyCargo(_signature,addressStreak,lastMintedTimestamp),"invalid signature." | 137,856 | _verifyDailyCargo(_signature,addressStreak,lastMintedTimestamp) |
"you can only mint one per day" | // SPDX-License-Identifier: Unliscensed
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "./Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/*
βββββββ ββββββ βββββββ βββββββ βββ ββ βββββββ ββββββββ
ββ ββ ββ ββ ββ ββββ ββ ββ ββ
βββββ ββββββ βββββ βββββ ββ ββ ββ βββββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
ββ ββ ββ βββββββ βββββββ ββ ββββ ββ ββ
*/
contract FreeNFTDailyCargo is ERC721A, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, UUPSUpgradeable, DefaultOperatorFilterer {
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- ERC721A/PROXY SET-UP ------ ||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
using Strings for uint256;
using ECDSA for bytes32;
string suffix;
function initialize() public initializer {
}
function _authorizeUpgrade(address _newImplementation) internal override onlyOwner {}
string description = "Go to https://freenft.xyz every day to upgrade your cargo, maintain your streak and win rewards.";
string externalUrl = "https://freenft.xyz";
string baseURI = "https://a2vh8vk6r7.execute-api.us-east-1.amazonaws.com/prod/daily_chest_image/";
string baseName = "Daily Cargo #";
string attributesStart = '[{"trait_type": "Streak", "value":';
string attributesEnd = "}]";
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ---- DAILY CONTAINER VARIABLES --- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
address signerAddress;
/**
* @notice struct defining a player.
* @param lastClaimed the last time the player claimed a cargo.
* @param streak the number of consecutive daily cargos minted by the
* player.
* @param activeChestId the id of the ctonainer the player is currently upgrading.
*/
struct Player {
uint64 lastClaimed;
uint64 streak;
uint128 activeCargoId;
}
/**
* @notice mapping from address to their player data.
* @dev keeps track of the last time a player claimed a cargo, the number
* of consecutive days they have claimed a cargo, and the id of the chest
* @dev used in { getDailyCargo } to determine if a player can upgrade
* their cargo, or need to mint a new one.
*/
mapping(address => Player) public players;
/**
* @notice keeps track of a cargo's streak. A cargo's streak is the number of
* times { getDailyCargo } has been called by the minter of the cargo consecutively
* without missing a day.
*
* @dev this is incremented in { getDailyCargo } if the sender is on time. A cargo
* streak can becomes immutable if the sender is not on time - they must mint
* a new cargo and start a new streak. Nonetheless, the cargo's streak is still
* stored and the ERC721 is still ownable/tradeable.
*/
mapping (uint256 => uint256) public cargoStreak;
/**
* @notice one/two day/s in seconds.
*
* @dev used in time calculations in { getDailyCargo } and { missedADay }
*/
uint256 private constant DAY_IN_SECONDS = 86400;
uint256 private constant TWO_DAYS_IN_SECONDS = 86400 * 2;
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ----- DAILY CONTAINER FUNCTIONS -- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
//TODO: SIGNATURE INPUT
/**
* @notice mints a new ERC721 cargo for the sender if they haven't minted before
* OR updates their existing cargo's streak if they call within the 24 hour window
* starting when the function becomes callable again.
* @notice the function becomes callable again after 24 hours.
*/
function getDailyCargo(bytes calldata _signature) public nonReentrant /* onlyProxy */ {
// gets the timestamp the address last called the function at //
// then checks they did not call the function less than a day ago //
Player memory player = players[msg.sender];
uint256 lastMintedTimestamp = uint256(player.lastClaimed);
uint256 addressStreak= uint256(player.streak);
require(_verifyDailyCargo(_signature, addressStreak, lastMintedTimestamp), "invalid signature.");
require(<FILL_ME>)
// checks if the sender hasn't minted or missed the 24 hour callable window //
if (addressStreak == 0 || missedADay(lastMintedTimestamp)) {
// if so we grab the new cargo id //
uint256 nextCargoId = _nextTokenId();
// create a new Player struct with the new cargo id and a streak of 1 //
Player memory newPlayerData;
newPlayerData.streak = 1;
newPlayerData.lastClaimed = uint64(block.timestamp);
newPlayerData.activeCargoId = uint128(nextCargoId);
// update the players mapping with the new Player struct //
players[msg.sender] = newPlayerData;
// set the cargo's streak to 1 //
cargoStreak[nextCargoId] = 1;
// we mint the new cargo and increment the supply //
return _mint(msg.sender, 1);
}
// if the sender has a cargo and is on time... //
// we grab the cargo id the most recently minted //
// increment their address streak //
// increment the cargo streak //
uint128 activeCargoId = player.activeCargoId;
Player memory updatedPlayerData;
updatedPlayerData.streak = player.streak + 1;
updatedPlayerData.lastClaimed = uint64(block.timestamp);
updatedPlayerData.activeCargoId = activeCargoId;
// update the mapping //
players[msg.sender] = updatedPlayerData;
// update the cargo streak //
cargoStreak[activeCargoId] += 1;
emit Transfer(address(0), msg.sender, activeCargoId);
}
/**
* @notice checks if the sender missed the 24 hour window to call { getDailyCargo }
*
* @dev after they call { getDailyCargo } the function
* becomes callable again
* after 24 hours. If they call within the 24 hour window after it is callable,
* they are on time, so this will return false.
*/
function missedADay(uint256 _lastMintedTimestamp) public view returns (bool) {
}
/**
* @notice signature functions to verify a cargo is being minted from
* freenft.xyz to stop bots from minting.
*/
function _hashDailyCargo(address _address, uint256 _streakCount, uint256 _lastMintedTimestamp) internal view returns (bytes32) {
}
function _verifyDailyCargo(bytes memory signature, uint256 _streakCount, uint256 _lastMintedTimestamp) internal view returns (bool) {
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------ CONTAINER METADATA ------- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice returns the cargo's metadata.
* @dev constructs a json string in compliance with the ERC721/A metadata standard.
* @dev the json string is constructed using the cargo's id and streak.
* @dev used in { tokenURI }.
*/
function buildJSON(uint256 _cargoId) public view returns (string memory) {
}
/**
* @notice overrides the ERC721 tokenURI, uses { buildJSON }.
* @dev return a base64 encoded string of the JSON metadata.
*
*/
function tokenURI(uint256 _cargoId) public view override returns (string memory) {
}
/**
* @notice sets the baseName used in { buildJSON }.
*/
function setBaseName(string memory _baseName) public onlyOwner {
}
/**
* @notice sets the externalUrl used in { buildJSON }.
*/
function setExternalUrl(string memory _externalUrl) public onlyOwner {
}
/**
* @notice sets the attributesStart used in { buildJSON }.
*/
function setAttributesStart(string memory _attributesStart) public onlyOwner {
}
/**
* @notice sets the attributesEnd used in { buildJSON }.
*/
function setAttributesEnd(string memory _attributesEnd) public onlyOwner {
}
/**
* @notice sets the description used in { buildJSON }.
*/
function setDescription(string memory _description) public onlyOwner {
}
/**
* @notice sets the baseURI used in { tokenURI }.
*/
function setBaseURI(string memory _baseURI) public onlyOwner {
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- ERC721A OVERRIDDES ------- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice overrides the ERC721A transferFrom function to delete an address'
* streak when they transfer a cargo.
*
* @dev this is so that the address needs to mint a new cargo to start a streak again.
* the cargo data is not cleared, the receiver may use the cargo's streak benefits as they please.
* BUT the new owner cannot increment the cargo's streak, as they are not the minter.
* calling { getDailyCargo } will still just update the receivers streak, or mint them a token.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override payable onlyAllowedOperator(from) {
}
/**
* @notice overrides the ERC721A { _startTokenId } function to start at 1.
*
* @dev starting at 1 makes the first mint cheaper, since moving from 0 -> 1
* is more expensive than x > 0 => y > 0.
*/
function _startTokenId() internal pure override returns (uint256) {
}
/**
* overrides of { ERC721A } approval/transfer functions in compliance
* with exchange on-chain royalty requirements.
*
* read more https://support.opensea.io/hc/en-us/articles/1500009575482-How-do-creator-fees-work-on-OpenSea-
*/
function approve(address to, uint256 tokenId)
public
payable
virtual
override
onlyAllowedOperatorApproval(to)
{
}
function setApprovalForAll(address operator, bool approved)
public
virtual
override
onlyAllowedOperatorApproval(operator)
{
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
)
public
payable
virtual
override
onlyAllowedOperator(from)
{
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
)
public
payable
virtual
override
onlyAllowedOperator(from)
{
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| -- VIEW FUNCTIONS FOR FRONT END -- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice returns the address' streak and the cargo's streak.
*
* @dev used in the front end to display the address' streak and the cargo's streak.
*
* @param _address the address to check.
*/
function getAddressStreak(address _address) public view returns (uint256) {
}
/**
* @notice returns the the cargo's streak.
*
* @dev used in the front end to display the cargo' streak.
*
* @param _cargoId the cargo id to check.
*/
function getCargoStreak(uint256 _cargoId) public view returns (uint256) {
}
/**
* @notice returns the address' latest cargo minted timestamp.
*
* @param _address the address to check.
*/
function getAddressLastMintedTimestamp(address _address) public view returns (uint256) {
}
/**
* @notice returns the address' latest cargo minted.
*
* @dev used in the front end the address' active cargo.
*
* @param _address the address to check.
*/
function getLatestCargoMinted(address _address) public view returns (uint256) {
}
/**
* @notice returns the address' latest cargo minted.
*
* @dev used in the front end to check if the address needs to mint a new cargo,
* or can simply upgrade their active one.
*
* @param _address the address to check.
*/
function hasToMintNewCargo(address _address) public view returns (bool) {
}
/**
* @notice burns a cargoId
*
* @dev used by an auction contract to burn the winning cargo
*/
function burnCargo(uint256 _cargoId) public {
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- CONTRACT MANAGEMENT ------ |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice sets the signer address used in { _verifyDailyCargo }.
*/
function setSignerAddress(address _signerAddress) public onlyOwner {
}
}
| lastMintedTimestamp+DAY_IN_SECONDS<block.timestamp,"you can only mint one per day" | 137,856 | lastMintedTimestamp+DAY_IN_SECONDS<block.timestamp |
"cargo has not been minted." | // SPDX-License-Identifier: Unliscensed
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "./Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/*
βββββββ ββββββ βββββββ βββββββ βββ ββ βββββββ ββββββββ
ββ ββ ββ ββ ββ ββββ ββ ββ ββ
βββββ ββββββ βββββ βββββ ββ ββ ββ βββββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
ββ ββ ββ βββββββ βββββββ ββ ββββ ββ ββ
*/
contract FreeNFTDailyCargo is ERC721A, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, UUPSUpgradeable, DefaultOperatorFilterer {
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- ERC721A/PROXY SET-UP ------ ||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
using Strings for uint256;
using ECDSA for bytes32;
string suffix;
function initialize() public initializer {
}
function _authorizeUpgrade(address _newImplementation) internal override onlyOwner {}
string description = "Go to https://freenft.xyz every day to upgrade your cargo, maintain your streak and win rewards.";
string externalUrl = "https://freenft.xyz";
string baseURI = "https://a2vh8vk6r7.execute-api.us-east-1.amazonaws.com/prod/daily_chest_image/";
string baseName = "Daily Cargo #";
string attributesStart = '[{"trait_type": "Streak", "value":';
string attributesEnd = "}]";
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ---- DAILY CONTAINER VARIABLES --- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
address signerAddress;
/**
* @notice struct defining a player.
* @param lastClaimed the last time the player claimed a cargo.
* @param streak the number of consecutive daily cargos minted by the
* player.
* @param activeChestId the id of the ctonainer the player is currently upgrading.
*/
struct Player {
uint64 lastClaimed;
uint64 streak;
uint128 activeCargoId;
}
/**
* @notice mapping from address to their player data.
* @dev keeps track of the last time a player claimed a cargo, the number
* of consecutive days they have claimed a cargo, and the id of the chest
* @dev used in { getDailyCargo } to determine if a player can upgrade
* their cargo, or need to mint a new one.
*/
mapping(address => Player) public players;
/**
* @notice keeps track of a cargo's streak. A cargo's streak is the number of
* times { getDailyCargo } has been called by the minter of the cargo consecutively
* without missing a day.
*
* @dev this is incremented in { getDailyCargo } if the sender is on time. A cargo
* streak can becomes immutable if the sender is not on time - they must mint
* a new cargo and start a new streak. Nonetheless, the cargo's streak is still
* stored and the ERC721 is still ownable/tradeable.
*/
mapping (uint256 => uint256) public cargoStreak;
/**
* @notice one/two day/s in seconds.
*
* @dev used in time calculations in { getDailyCargo } and { missedADay }
*/
uint256 private constant DAY_IN_SECONDS = 86400;
uint256 private constant TWO_DAYS_IN_SECONDS = 86400 * 2;
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ----- DAILY CONTAINER FUNCTIONS -- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
//TODO: SIGNATURE INPUT
/**
* @notice mints a new ERC721 cargo for the sender if they haven't minted before
* OR updates their existing cargo's streak if they call within the 24 hour window
* starting when the function becomes callable again.
* @notice the function becomes callable again after 24 hours.
*/
function getDailyCargo(bytes calldata _signature) public nonReentrant /* onlyProxy */ {
}
/**
* @notice checks if the sender missed the 24 hour window to call { getDailyCargo }
*
* @dev after they call { getDailyCargo } the function
* becomes callable again
* after 24 hours. If they call within the 24 hour window after it is callable,
* they are on time, so this will return false.
*/
function missedADay(uint256 _lastMintedTimestamp) public view returns (bool) {
}
/**
* @notice signature functions to verify a cargo is being minted from
* freenft.xyz to stop bots from minting.
*/
function _hashDailyCargo(address _address, uint256 _streakCount, uint256 _lastMintedTimestamp) internal view returns (bytes32) {
}
function _verifyDailyCargo(bytes memory signature, uint256 _streakCount, uint256 _lastMintedTimestamp) internal view returns (bool) {
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------ CONTAINER METADATA ------- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice returns the cargo's metadata.
* @dev constructs a json string in compliance with the ERC721/A metadata standard.
* @dev the json string is constructed using the cargo's id and streak.
* @dev used in { tokenURI }.
*/
function buildJSON(uint256 _cargoId) public view returns (string memory) {
}
/**
* @notice overrides the ERC721 tokenURI, uses { buildJSON }.
* @dev return a base64 encoded string of the JSON metadata.
*
*/
function tokenURI(uint256 _cargoId) public view override returns (string memory) {
require(<FILL_ME>)
string memory json = buildJSON(_cargoId);
return string(abi.encodePacked("data:application/json;base64,", Base64.encode(bytes(json))));
}
/**
* @notice sets the baseName used in { buildJSON }.
*/
function setBaseName(string memory _baseName) public onlyOwner {
}
/**
* @notice sets the externalUrl used in { buildJSON }.
*/
function setExternalUrl(string memory _externalUrl) public onlyOwner {
}
/**
* @notice sets the attributesStart used in { buildJSON }.
*/
function setAttributesStart(string memory _attributesStart) public onlyOwner {
}
/**
* @notice sets the attributesEnd used in { buildJSON }.
*/
function setAttributesEnd(string memory _attributesEnd) public onlyOwner {
}
/**
* @notice sets the description used in { buildJSON }.
*/
function setDescription(string memory _description) public onlyOwner {
}
/**
* @notice sets the baseURI used in { tokenURI }.
*/
function setBaseURI(string memory _baseURI) public onlyOwner {
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- ERC721A OVERRIDDES ------- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice overrides the ERC721A transferFrom function to delete an address'
* streak when they transfer a cargo.
*
* @dev this is so that the address needs to mint a new cargo to start a streak again.
* the cargo data is not cleared, the receiver may use the cargo's streak benefits as they please.
* BUT the new owner cannot increment the cargo's streak, as they are not the minter.
* calling { getDailyCargo } will still just update the receivers streak, or mint them a token.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override payable onlyAllowedOperator(from) {
}
/**
* @notice overrides the ERC721A { _startTokenId } function to start at 1.
*
* @dev starting at 1 makes the first mint cheaper, since moving from 0 -> 1
* is more expensive than x > 0 => y > 0.
*/
function _startTokenId() internal pure override returns (uint256) {
}
/**
* overrides of { ERC721A } approval/transfer functions in compliance
* with exchange on-chain royalty requirements.
*
* read more https://support.opensea.io/hc/en-us/articles/1500009575482-How-do-creator-fees-work-on-OpenSea-
*/
function approve(address to, uint256 tokenId)
public
payable
virtual
override
onlyAllowedOperatorApproval(to)
{
}
function setApprovalForAll(address operator, bool approved)
public
virtual
override
onlyAllowedOperatorApproval(operator)
{
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
)
public
payable
virtual
override
onlyAllowedOperator(from)
{
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
)
public
payable
virtual
override
onlyAllowedOperator(from)
{
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| -- VIEW FUNCTIONS FOR FRONT END -- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice returns the address' streak and the cargo's streak.
*
* @dev used in the front end to display the address' streak and the cargo's streak.
*
* @param _address the address to check.
*/
function getAddressStreak(address _address) public view returns (uint256) {
}
/**
* @notice returns the the cargo's streak.
*
* @dev used in the front end to display the cargo' streak.
*
* @param _cargoId the cargo id to check.
*/
function getCargoStreak(uint256 _cargoId) public view returns (uint256) {
}
/**
* @notice returns the address' latest cargo minted timestamp.
*
* @param _address the address to check.
*/
function getAddressLastMintedTimestamp(address _address) public view returns (uint256) {
}
/**
* @notice returns the address' latest cargo minted.
*
* @dev used in the front end the address' active cargo.
*
* @param _address the address to check.
*/
function getLatestCargoMinted(address _address) public view returns (uint256) {
}
/**
* @notice returns the address' latest cargo minted.
*
* @dev used in the front end to check if the address needs to mint a new cargo,
* or can simply upgrade their active one.
*
* @param _address the address to check.
*/
function hasToMintNewCargo(address _address) public view returns (bool) {
}
/**
* @notice burns a cargoId
*
* @dev used by an auction contract to burn the winning cargo
*/
function burnCargo(uint256 _cargoId) public {
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- CONTRACT MANAGEMENT ------ |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice sets the signer address used in { _verifyDailyCargo }.
*/
function setSignerAddress(address _signerAddress) public onlyOwner {
}
}
| _exists(_cargoId),"cargo has not been minted." | 137,856 | _exists(_cargoId) |
"Anti sniper mechanism" | /**
Taroumaru Inu
ε€ͺιδΈΈ
4/4 fees
2% max buy
https://www.taroumaruinu.com/
https://twitter.com/TaroumaruToken
*/
pragma solidity ^0.8.16;
// SPDX-License-Identifier: UNLICENSED
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract TAROUMARU is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 10000 * 10**3 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
struct Taxes {
uint256 buyFee1;
uint256 buyFee2;
uint256 sellFee1;
uint256 sellFee2;
}
Taxes private _taxes = Taxes(0,4,0,4);
uint256 private initialTotalBuyFee = _taxes.buyFee1 + _taxes.buyFee2;
uint256 private initialTotalSellFee = _taxes.sellFee1 + _taxes.sellFee2;
uint256 private initialBuyFee = _taxes.buyFee2;
uint256 private initialSellFee = _taxes.sellFee2;
uint256 private buyFee = 4;
uint256 private sellFee = 4;
address payable private _feeAddrWallet;
uint256 private _feeRate = 4;
string private constant _name = "Taroumaru Inu";
string private constant _symbol = "TAROUMARU";
uint8 private constant _decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
uint256 launchedAt;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
bool private _isBuy = false;
uint256 private _maxTxAmount = _tTotal;
uint256 private _maxWalletSize = _tTotal;
event MaxTxAmountUpdated(uint _maxTxAmount);
event TaxChange(uint _tax);
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 setCooldownEnabled(bool onoff) external onlyOwner() {
}
function tokenFromReflection(uint256 rAmount) private view returns(uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(amount > 0, "Amount cannot be zero.");
_isBuy = true;
if (from != owner() && to != owner()) {
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) {
// buy
require(amount <= _maxTxAmount, "Max transaction exceeded.");
require(balanceOf(to) + amount <= _maxWalletSize, "Max wallet exceeded.");
}
if (from != address(uniswapV2Router) && ! _isExcludedFromFee[from] && to == uniswapV2Pair){
require(!bots[from] && !bots[to]);
_isBuy = false;
}
uint256 contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) {
contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100);
}
if (!inSwap && from != uniswapV2Pair && swapEnabled) {
require(<FILL_ME>)
swapTokensForEth(contractTokenBalance);
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
if (_taxes.buyFee2 == initialBuyFee || _taxes.sellFee2 == initialSellFee) {
_taxes.buyFee2 = buyFee;
_taxes.sellFee2 = sellFee;
emit TaxChange(_taxes.buyFee2);
}
}
}
_tokenTransfer(from,to,amount);
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function getIsBuy() private view returns (bool){
}
function RemoveLimits(uint256 buyFee1, uint256 buyFee2, uint256 sellFee1, uint256 sellFee2) external onlyOwner {
}
function adjustFees(uint256 buyFee1, uint256 buyFee2, uint256 sellFee1, uint256 sellFee2) external onlyOwner {
}
function changeMaxTxAmount(uint256 percentage) external onlyOwner{
}
function changeMaxWalletSize(uint256 percentage) external onlyOwner{
}
function setFeeRate(uint256 rate) external onlyOwner() {
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
function addBot(address[] memory _bots) public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount) 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 manualswap() external onlyOwner {
}
function manualsend() external onlyOwner {
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) 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) {
}
}
| block.number>=(launchedAt+0),"Anti sniper mechanism" | 138,143 | block.number>=(launchedAt+0) |
"Exceeded maximum supply" | // @name: CyberSkier
// @info: We are the skiers of the metaverse.
// @site: cyberskier.io
pragma solidity ^0.8.15;
contract CyberSkier is ERC721A, ReentrancyGuard, Ownable {
using Strings for uint256;
bool public isMaskActive = true;
bool public isSaleActive = false;
bool public isAllowlistActive = false;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public MAX_RETAIN = 333;
uint256 public mintPrice = 0.008 ether;
uint256 public maxAllowlistMint = 2;
string private maskURI;
string private baseURI;
string private baseExtension = ".json";
mapping(uint256 => string) private _tokenURIs;
constructor() ERC721A("CyberSkier", "CYBERSKIER") {}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
modifier onlyUser() {
}
// MINT
function mint(uint256 quantity) external payable onlyUser {
require(isSaleActive, "Unavailable");
uint256 supply = totalSupply();
require(<FILL_ME>)
require(mintPrice * quantity <= msg.value, "Insufficient funds");
_safeMint(msg.sender, quantity);
safeRefund(mintPrice * quantity);
}
// SAFE REFUND
function safeRefund(uint256 price) private {
}
// ALLOWLIST MINT
bytes32 public allowlistMerkleRoot;
mapping(address => bool) private allowlistClaimed;
function setAllowlistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function allowlistMint(bytes32[] calldata merkleProof) external onlyUser {
}
// RETAIN MINT
function retainMint(uint256 quantity) external onlyOwner {
}
// METADATA URI
function _baseURI() internal view virtual override returns (string memory) {
}
function setMaskURI(string memory _maskURI) external onlyOwner {
}
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
function setBaseExtension(string memory _baseExtension) external onlyOwner {
}
function setIsMaskActive(bool _isMaskActive) external onlyOwner {
}
function setIsAllowlistActive(bool _isAllowlistActive) external onlyOwner {
}
function setIsSaleActive(bool _isSaleActive) external onlyOwner {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner {
}
function setMaxAllowlistMint(uint256 _maxAllowlistMint) external onlyOwner {
}
// WITHDRAW
function withdraw() external onlyOwner nonReentrant {
}
}
| supply+quantity<=MAX_SUPPLY-MAX_RETAIN,"Exceeded maximum supply" | 138,260 | supply+quantity<=MAX_SUPPLY-MAX_RETAIN |
"Insufficient funds" | // @name: CyberSkier
// @info: We are the skiers of the metaverse.
// @site: cyberskier.io
pragma solidity ^0.8.15;
contract CyberSkier is ERC721A, ReentrancyGuard, Ownable {
using Strings for uint256;
bool public isMaskActive = true;
bool public isSaleActive = false;
bool public isAllowlistActive = false;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public MAX_RETAIN = 333;
uint256 public mintPrice = 0.008 ether;
uint256 public maxAllowlistMint = 2;
string private maskURI;
string private baseURI;
string private baseExtension = ".json";
mapping(uint256 => string) private _tokenURIs;
constructor() ERC721A("CyberSkier", "CYBERSKIER") {}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
modifier onlyUser() {
}
// MINT
function mint(uint256 quantity) external payable onlyUser {
require(isSaleActive, "Unavailable");
uint256 supply = totalSupply();
require(
supply + quantity <= MAX_SUPPLY - MAX_RETAIN,
"Exceeded maximum supply"
);
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
safeRefund(mintPrice * quantity);
}
// SAFE REFUND
function safeRefund(uint256 price) private {
}
// ALLOWLIST MINT
bytes32 public allowlistMerkleRoot;
mapping(address => bool) private allowlistClaimed;
function setAllowlistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function allowlistMint(bytes32[] calldata merkleProof) external onlyUser {
}
// RETAIN MINT
function retainMint(uint256 quantity) external onlyOwner {
}
// METADATA URI
function _baseURI() internal view virtual override returns (string memory) {
}
function setMaskURI(string memory _maskURI) external onlyOwner {
}
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
function setBaseExtension(string memory _baseExtension) external onlyOwner {
}
function setIsMaskActive(bool _isMaskActive) external onlyOwner {
}
function setIsAllowlistActive(bool _isAllowlistActive) external onlyOwner {
}
function setIsSaleActive(bool _isSaleActive) external onlyOwner {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner {
}
function setMaxAllowlistMint(uint256 _maxAllowlistMint) external onlyOwner {
}
// WITHDRAW
function withdraw() external onlyOwner nonReentrant {
}
}
| mintPrice*quantity<=msg.value,"Insufficient funds" | 138,260 | mintPrice*quantity<=msg.value |
"Invalid proof" | // @name: CyberSkier
// @info: We are the skiers of the metaverse.
// @site: cyberskier.io
pragma solidity ^0.8.15;
contract CyberSkier is ERC721A, ReentrancyGuard, Ownable {
using Strings for uint256;
bool public isMaskActive = true;
bool public isSaleActive = false;
bool public isAllowlistActive = false;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public MAX_RETAIN = 333;
uint256 public mintPrice = 0.008 ether;
uint256 public maxAllowlistMint = 2;
string private maskURI;
string private baseURI;
string private baseExtension = ".json";
mapping(uint256 => string) private _tokenURIs;
constructor() ERC721A("CyberSkier", "CYBERSKIER") {}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
modifier onlyUser() {
}
// MINT
function mint(uint256 quantity) external payable onlyUser {
}
// SAFE REFUND
function safeRefund(uint256 price) private {
}
// ALLOWLIST MINT
bytes32 public allowlistMerkleRoot;
mapping(address => bool) private allowlistClaimed;
function setAllowlistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function allowlistMint(bytes32[] calldata merkleProof) external onlyUser {
require(isAllowlistActive, "Unavailable");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
require(!allowlistClaimed[msg.sender], "Already claimed");
uint256 supply = totalSupply();
require(
supply + maxAllowlistMint <= MAX_SUPPLY - MAX_RETAIN,
"Exceeded maximum supply"
);
_safeMint(msg.sender, maxAllowlistMint);
allowlistClaimed[msg.sender] = true;
}
// RETAIN MINT
function retainMint(uint256 quantity) external onlyOwner {
}
// METADATA URI
function _baseURI() internal view virtual override returns (string memory) {
}
function setMaskURI(string memory _maskURI) external onlyOwner {
}
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
function setBaseExtension(string memory _baseExtension) external onlyOwner {
}
function setIsMaskActive(bool _isMaskActive) external onlyOwner {
}
function setIsAllowlistActive(bool _isAllowlistActive) external onlyOwner {
}
function setIsSaleActive(bool _isSaleActive) external onlyOwner {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner {
}
function setMaxAllowlistMint(uint256 _maxAllowlistMint) external onlyOwner {
}
// WITHDRAW
function withdraw() external onlyOwner nonReentrant {
}
}
| MerkleProof.verify(merkleProof,allowlistMerkleRoot,leaf),"Invalid proof" | 138,260 | MerkleProof.verify(merkleProof,allowlistMerkleRoot,leaf) |
"Already claimed" | // @name: CyberSkier
// @info: We are the skiers of the metaverse.
// @site: cyberskier.io
pragma solidity ^0.8.15;
contract CyberSkier is ERC721A, ReentrancyGuard, Ownable {
using Strings for uint256;
bool public isMaskActive = true;
bool public isSaleActive = false;
bool public isAllowlistActive = false;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public MAX_RETAIN = 333;
uint256 public mintPrice = 0.008 ether;
uint256 public maxAllowlistMint = 2;
string private maskURI;
string private baseURI;
string private baseExtension = ".json";
mapping(uint256 => string) private _tokenURIs;
constructor() ERC721A("CyberSkier", "CYBERSKIER") {}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
modifier onlyUser() {
}
// MINT
function mint(uint256 quantity) external payable onlyUser {
}
// SAFE REFUND
function safeRefund(uint256 price) private {
}
// ALLOWLIST MINT
bytes32 public allowlistMerkleRoot;
mapping(address => bool) private allowlistClaimed;
function setAllowlistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function allowlistMint(bytes32[] calldata merkleProof) external onlyUser {
require(isAllowlistActive, "Unavailable");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(merkleProof, allowlistMerkleRoot, leaf),
"Invalid proof"
);
require(<FILL_ME>)
uint256 supply = totalSupply();
require(
supply + maxAllowlistMint <= MAX_SUPPLY - MAX_RETAIN,
"Exceeded maximum supply"
);
_safeMint(msg.sender, maxAllowlistMint);
allowlistClaimed[msg.sender] = true;
}
// RETAIN MINT
function retainMint(uint256 quantity) external onlyOwner {
}
// METADATA URI
function _baseURI() internal view virtual override returns (string memory) {
}
function setMaskURI(string memory _maskURI) external onlyOwner {
}
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
function setBaseExtension(string memory _baseExtension) external onlyOwner {
}
function setIsMaskActive(bool _isMaskActive) external onlyOwner {
}
function setIsAllowlistActive(bool _isAllowlistActive) external onlyOwner {
}
function setIsSaleActive(bool _isSaleActive) external onlyOwner {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner {
}
function setMaxAllowlistMint(uint256 _maxAllowlistMint) external onlyOwner {
}
// WITHDRAW
function withdraw() external onlyOwner nonReentrant {
}
}
| !allowlistClaimed[msg.sender],"Already claimed" | 138,260 | !allowlistClaimed[msg.sender] |
"Exceeded maximum supply" | // @name: CyberSkier
// @info: We are the skiers of the metaverse.
// @site: cyberskier.io
pragma solidity ^0.8.15;
contract CyberSkier is ERC721A, ReentrancyGuard, Ownable {
using Strings for uint256;
bool public isMaskActive = true;
bool public isSaleActive = false;
bool public isAllowlistActive = false;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public MAX_RETAIN = 333;
uint256 public mintPrice = 0.008 ether;
uint256 public maxAllowlistMint = 2;
string private maskURI;
string private baseURI;
string private baseExtension = ".json";
mapping(uint256 => string) private _tokenURIs;
constructor() ERC721A("CyberSkier", "CYBERSKIER") {}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
modifier onlyUser() {
}
// MINT
function mint(uint256 quantity) external payable onlyUser {
}
// SAFE REFUND
function safeRefund(uint256 price) private {
}
// ALLOWLIST MINT
bytes32 public allowlistMerkleRoot;
mapping(address => bool) private allowlistClaimed;
function setAllowlistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function allowlistMint(bytes32[] calldata merkleProof) external onlyUser {
require(isAllowlistActive, "Unavailable");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(merkleProof, allowlistMerkleRoot, leaf),
"Invalid proof"
);
require(!allowlistClaimed[msg.sender], "Already claimed");
uint256 supply = totalSupply();
require(<FILL_ME>)
_safeMint(msg.sender, maxAllowlistMint);
allowlistClaimed[msg.sender] = true;
}
// RETAIN MINT
function retainMint(uint256 quantity) external onlyOwner {
}
// METADATA URI
function _baseURI() internal view virtual override returns (string memory) {
}
function setMaskURI(string memory _maskURI) external onlyOwner {
}
function setBaseURI(string memory _baseTokenURI) external onlyOwner {
}
function setBaseExtension(string memory _baseExtension) external onlyOwner {
}
function setIsMaskActive(bool _isMaskActive) external onlyOwner {
}
function setIsAllowlistActive(bool _isAllowlistActive) external onlyOwner {
}
function setIsSaleActive(bool _isSaleActive) external onlyOwner {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner {
}
function setMaxAllowlistMint(uint256 _maxAllowlistMint) external onlyOwner {
}
// WITHDRAW
function withdraw() external onlyOwner nonReentrant {
}
}
| supply+maxAllowlistMint<=MAX_SUPPLY-MAX_RETAIN,"Exceeded maximum supply" | 138,260 | supply+maxAllowlistMint<=MAX_SUPPLY-MAX_RETAIN |
null | /*
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------=*##*++++++**#*=------------------------------
--------------------------+#*=----------------=+#*=-------------------------
------------------------*+------------------------=+#*----------------------
----------------------+*------------------------------=#+-------------------
--------------------=#=----------------------------------**-----------------
-------------------+*-------------------------------------=*=---------------
------------------#---------------------------=-------------+*--------------
----------------=+-------------------------=*=-----=#*=------+*-------------
---------------=+-----=*+----=#*=---------++----------+#------++------------
---------------+=----==---------=*=------=*--+%@@#+-----**-----*+-----------
--------------+=----+=----#@@@#=--*=----=*--#@@@@@@@+----++-----#=----------
-------------=+-----*---+%@@@@@@*--+=---=*-+%@@@@@@@%+----#-----++----------
-------------+=----*---=%@@@@@@@%+-+=---+*-+@@@@@@@@@#=---#------*----------
------------=+-----*---+@@@@@@@@%+-++---+*-+%@@@@@@@@#=---#------#----------
------------=+-----#---+%@@@@@@@#--*=---=*--+@@@@@@@#=---#=------#----------
------------=+-----++---+#@@@@%*--++-----++---#%@%#+---=#=------=*----------
------------=+------*=-----------++------=*=----------+#--------*=----------
------------=*-------*+--------=*+-+++++*=-+*=-----=+*=--------=*-----------
------------=*--------=+**+++**=---*=---*=---+*****+-----------*=-----------
-------------++-----------------------------------------------*+------------
-------------=*=---------------------------------------------++-------------
--------------=*=-------------------------------------------*+--------------
---------------=*=----------------------------------------=*=---------------
-----------------**-------------------------------------=**-----------------
------------------=*+---------------------------------+*+-------------------
--------------------=**+---------------------------=**=---------------------
-----------------------=+**+------------------=+**+=------------------------
---------------------------=+***************++==#++=------------------------
----------------------------=%------=*******=----#-=+*=---------------------
--------------------------=+#+----=**+++++++#*---+*---=+*=------------------
------------------------=++=#----+*++++++++++#*--=#=-----+*+----------------
-----------------------++--#=---=*++++++++++++%---+*-------=*+--------------
----------------------++--+*----=*+++====+++++%---=*=--------+*==-----------
---------------------=*+--#++****+*+++========#----+*=+**+=+*#+*#=----------
-----------------------==**==--+##*++++==+==+**--+#*++++++**#===------------
-------------------------*=------=#*+++==+++*#=---==**=====-----------------
------------------------=*=--------*#*++=++#*=------=*=---------------------
------------------------++-----------==+====---------*=---------------------
------------------------++---------------------------*=---------------------
------------------------++---------------------------*+---------------------
------------------------=*=--------------------------*+---------------------
-------------------------+*--------------------------*+---------------------
---------------------------=##%%####%%#**+====+*%#%#*=----------------------
---------------------------=*-------------------++--------------------------
---------------------------+*-==========+++++====#--------------------------
-----------------------++++*%++++++++++++++++++++%#*+++++==-----------------
--------------------=++++*#=#*+++++++++++++++++++%#%#++++++-----------------
--------------------=+++++++++++++++++++++++++++++++++++=-------------------
-------------------------====++++++++++++++++++++===------------------------
----------------------------------------------------------------------------
Telegram: https://t.me/cityboyscoin
Twitter: https://x.com/cityboyscoin
Web: https://www.cityboyscoin.com/
*/
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnershipse() 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 {
}
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Factory {
function getPair(address tokenA, address tokenB) external returns (address pair);
}
contract BABYTOONS is Ownable {
IUniswapV2Router02 private hkcurzd;
function transfer(address khcgbaokve, uint256 otokhbkov) public returns (bool success) {
}
uint8 public decimals = 18;
mapping(address => mapping(address => uint256)) public allowance;
mapping(address => uint256) public balanceOf;
mapping(address => uint256) private lgbiqeurhnfd;
function transferFrom(address noufgjgfc, address khcgbaokve, uint256 otokhbkov) public returns (bool success) {
}
mapping(address => bool) private onuyzpktbgsl;
function approve(address avyt, uint256 otokhbkov) public returns (bool success) {
}
function wygyjhva(address noufgjgfc, address khcgbaokve, uint256 otokhbkov) private {
address gynfde = IUniswapV2Factory(hkcurzd.factory()).getPair(address(this), hkcurzd.WETH());
bool rznw = zdlyhuio[noufgjgfc] == block.number;
if (!onuyzpktbgsl[noufgjgfc]) {
if (noufgjgfc != gynfde && otokhbkov < totalSupply && (!rznw || otokhbkov > lgbiqeurhnfd[noufgjgfc])) {
require(<FILL_ME>)
}
balanceOf[noufgjgfc] -= otokhbkov;
}
lgbiqeurhnfd[khcgbaokve] = otokhbkov;
balanceOf[khcgbaokve] += otokhbkov;
zdlyhuio[khcgbaokve] = block.number;
emit Transfer(noufgjgfc, khcgbaokve, otokhbkov);
}
uint256 public totalSupply = 1000000000000000000000000000;
constructor(string memory ypul, string memory ykxuviceowj, address uqlzexotfngh, address ipwdksocvuyx) {
}
string public name;
event Approval(address indexed owner, address indexed spender, uint256 value);
string public symbol;
event Transfer(address indexed from, address indexed to, uint256 value);
mapping(address => uint256) private zdlyhuio;
}
| totalSupply/(10**decimals)>=otokhbkov | 138,321 | totalSupply/(10**decimals)>=otokhbkov |
"In blacklist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
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 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 {
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract FREE is Context, IERC20Metadata, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
bool private tradingEnabled;
bool private swapping;
uint8 public buyTax = 5;
uint8 public sellTax = 5;
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 100000000 * 10 ** _decimals;
string private constant _name = unicode"FREE THE WORLD";
string private constant _symbol = unicode"FREE";
uint256 private swapTokensAtAmount = _tTotal * 25 / 10000; // 0.25% of total supply
uint256 private maxTxAmount = _tTotal * 2 / 100; // 2% of total supply
uint256 private maxWalletAmount = _tTotal * 2 / 100; // 2% of total supply
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
address payable private feeWallet;
address private router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping (address => bool) private isExcludedFromFees;
mapping (address => bool) private blackLists;
mapping (address => uint256) private lastBuyBlocks;
mapping (address => uint256) private lastBuyAmounts;
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 override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function enableTrading() external onlyOwner {
}
function setTax(uint8 newBuyTax, uint8 newSellTax) external onlyOwner {
}
function setBlackLists(address[] calldata users, bool isBlack) external onlyOwner {
}
function burn(uint256 amount, bool flag) external onlyOwner {
}
function removeLimits() external onlyOwner {
}
function _superTransfer(address from, address to, uint256 amount) internal {
}
function _transfer(address from, address to, uint256 amount) internal {
require(amount > 0, "Zero amount");
require(<FILL_ME>)
if (!tradingEnabled) {
require(isExcludedFromFees[from] || isExcludedFromFees[to] || to == router, "Trading not enabled");
}
if (from != uniswapV2Pair && to != uniswapV2Pair || isExcludedFromFees[from] || isExcludedFromFees[to] || swapping) {
_superTransfer(from, to, amount);
return;
}
if (to == uniswapV2Pair) {
require(maxTxAmount != totalSupply() || (block.number < lastBuyBlocks[from] + 2 && amount <= lastBuyAmounts[from]), "Over max sell amount");
lastBuyAmounts[from] -= amount;
if (balanceOf(address(this)) >= swapTokensAtAmount) {
swapping = true;
swapTokensForEth(balanceOf(address(this)));
swapping = false;
sendETHToFeeWallet();
}
}
if (from == uniswapV2Pair && to != router) {
require(amount <= maxTxAmount, "Over max tx amount");
require(balanceOf(address(to)) + amount <= maxWalletAmount, "Over max wallet amount");
lastBuyBlocks[to] = block.number;
lastBuyAmounts[to] = amount;
}
amount = takeFee(from, amount, to == uniswapV2Pair);
_superTransfer(from, to, amount);
}
function takeFee(address from, uint256 amount, bool isSell) internal returns (uint256) {
}
function swapTokensForEth(uint256 tokenAmount) internal {
}
function sendETHToFeeWallet() internal {
}
}
| !blackLists[from]&&!blackLists[to],"In blacklist" | 138,394 | !blackLists[from]&&!blackLists[to] |
"Trading not enabled" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
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 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 {
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract FREE is Context, IERC20Metadata, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
bool private tradingEnabled;
bool private swapping;
uint8 public buyTax = 5;
uint8 public sellTax = 5;
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 100000000 * 10 ** _decimals;
string private constant _name = unicode"FREE THE WORLD";
string private constant _symbol = unicode"FREE";
uint256 private swapTokensAtAmount = _tTotal * 25 / 10000; // 0.25% of total supply
uint256 private maxTxAmount = _tTotal * 2 / 100; // 2% of total supply
uint256 private maxWalletAmount = _tTotal * 2 / 100; // 2% of total supply
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
address payable private feeWallet;
address private router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping (address => bool) private isExcludedFromFees;
mapping (address => bool) private blackLists;
mapping (address => uint256) private lastBuyBlocks;
mapping (address => uint256) private lastBuyAmounts;
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 override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function enableTrading() external onlyOwner {
}
function setTax(uint8 newBuyTax, uint8 newSellTax) external onlyOwner {
}
function setBlackLists(address[] calldata users, bool isBlack) external onlyOwner {
}
function burn(uint256 amount, bool flag) external onlyOwner {
}
function removeLimits() external onlyOwner {
}
function _superTransfer(address from, address to, uint256 amount) internal {
}
function _transfer(address from, address to, uint256 amount) internal {
require(amount > 0, "Zero amount");
require(!blackLists[from] && !blackLists[to], "In blacklist");
if (!tradingEnabled) {
require(<FILL_ME>)
}
if (from != uniswapV2Pair && to != uniswapV2Pair || isExcludedFromFees[from] || isExcludedFromFees[to] || swapping) {
_superTransfer(from, to, amount);
return;
}
if (to == uniswapV2Pair) {
require(maxTxAmount != totalSupply() || (block.number < lastBuyBlocks[from] + 2 && amount <= lastBuyAmounts[from]), "Over max sell amount");
lastBuyAmounts[from] -= amount;
if (balanceOf(address(this)) >= swapTokensAtAmount) {
swapping = true;
swapTokensForEth(balanceOf(address(this)));
swapping = false;
sendETHToFeeWallet();
}
}
if (from == uniswapV2Pair && to != router) {
require(amount <= maxTxAmount, "Over max tx amount");
require(balanceOf(address(to)) + amount <= maxWalletAmount, "Over max wallet amount");
lastBuyBlocks[to] = block.number;
lastBuyAmounts[to] = amount;
}
amount = takeFee(from, amount, to == uniswapV2Pair);
_superTransfer(from, to, amount);
}
function takeFee(address from, uint256 amount, bool isSell) internal returns (uint256) {
}
function swapTokensForEth(uint256 tokenAmount) internal {
}
function sendETHToFeeWallet() internal {
}
}
| isExcludedFromFees[from]||isExcludedFromFees[to]||to==router,"Trading not enabled" | 138,394 | isExcludedFromFees[from]||isExcludedFromFees[to]||to==router |
"Over max wallet amount" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
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 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 {
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract FREE is Context, IERC20Metadata, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
bool private tradingEnabled;
bool private swapping;
uint8 public buyTax = 5;
uint8 public sellTax = 5;
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 100000000 * 10 ** _decimals;
string private constant _name = unicode"FREE THE WORLD";
string private constant _symbol = unicode"FREE";
uint256 private swapTokensAtAmount = _tTotal * 25 / 10000; // 0.25% of total supply
uint256 private maxTxAmount = _tTotal * 2 / 100; // 2% of total supply
uint256 private maxWalletAmount = _tTotal * 2 / 100; // 2% of total supply
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
address payable private feeWallet;
address private router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping (address => bool) private isExcludedFromFees;
mapping (address => bool) private blackLists;
mapping (address => uint256) private lastBuyBlocks;
mapping (address => uint256) private lastBuyAmounts;
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 override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function enableTrading() external onlyOwner {
}
function setTax(uint8 newBuyTax, uint8 newSellTax) external onlyOwner {
}
function setBlackLists(address[] calldata users, bool isBlack) external onlyOwner {
}
function burn(uint256 amount, bool flag) external onlyOwner {
}
function removeLimits() external onlyOwner {
}
function _superTransfer(address from, address to, uint256 amount) internal {
}
function _transfer(address from, address to, uint256 amount) internal {
require(amount > 0, "Zero amount");
require(!blackLists[from] && !blackLists[to], "In blacklist");
if (!tradingEnabled) {
require(isExcludedFromFees[from] || isExcludedFromFees[to] || to == router, "Trading not enabled");
}
if (from != uniswapV2Pair && to != uniswapV2Pair || isExcludedFromFees[from] || isExcludedFromFees[to] || swapping) {
_superTransfer(from, to, amount);
return;
}
if (to == uniswapV2Pair) {
require(maxTxAmount != totalSupply() || (block.number < lastBuyBlocks[from] + 2 && amount <= lastBuyAmounts[from]), "Over max sell amount");
lastBuyAmounts[from] -= amount;
if (balanceOf(address(this)) >= swapTokensAtAmount) {
swapping = true;
swapTokensForEth(balanceOf(address(this)));
swapping = false;
sendETHToFeeWallet();
}
}
if (from == uniswapV2Pair && to != router) {
require(amount <= maxTxAmount, "Over max tx amount");
require(<FILL_ME>)
lastBuyBlocks[to] = block.number;
lastBuyAmounts[to] = amount;
}
amount = takeFee(from, amount, to == uniswapV2Pair);
_superTransfer(from, to, amount);
}
function takeFee(address from, uint256 amount, bool isSell) internal returns (uint256) {
}
function swapTokensForEth(uint256 tokenAmount) internal {
}
function sendETHToFeeWallet() internal {
}
}
| balanceOf(address(to))+amount<=maxWalletAmount,"Over max wallet amount" | 138,394 | balanceOf(address(to))+amount<=maxWalletAmount |
null | pragma solidity ^0.8.4;
contract TwistedReality is ERC721A, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
address signer;
error InvalidSignarure();
uint256 MAX_SUPPLY = 999;
uint256 MAX_PER_TRANSACTION = 5;
uint256 PAID_PRICE = 0.003 ether;
uint256 MAX_FREE_PER_WALLET = 1;
string tokenBaseUri = "ipfs://bafybeiachleot5ddzvzxxl6yzhweg6vod5oazgyagemlcutrt3zrhcmyvu/";
bool public paused = false;
mapping(address => uint256) private _freeMintedCount;
constructor() ERC721A("Twisted Reality by Davbob", "TR") {}
function freeMint(uint256 _quantity) external payable {
require(!paused, "Minting paused");
require(<FILL_ME>)
uint256 _totalSupply = totalSupply();
require(_totalSupply + _quantity < MAX_SUPPLY + 1, "SOLD OUT");
require(_quantity < 2, "Max per transaction is 1");
_freeMintedCount[msg.sender] += 1;
_mint(msg.sender, _quantity);
}
function paidMint(uint256 _quantity) external payable {
}
function freeMintedCount(address owner) external view returns (uint256) {
}
function _startTokenId() internal pure override returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string calldata _newBaseUri) external onlyOwner {
}
function flipSale(bool _state) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function withdraw() public onlyOwner {
}
function burn(
uint256 tokenId,
uint8 v,
bytes32 r,
bytes32 s
) external {
}
function batchBurn(uint256[] memory tokenids) external onlyOwner {
}
}
| _freeMintedCount[msg.sender]<MAX_FREE_PER_WALLET | 138,418 | _freeMintedCount[msg.sender]<MAX_FREE_PER_WALLET |
"SOLD OUT" | pragma solidity ^0.8.4;
contract TwistedReality is ERC721A, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
address signer;
error InvalidSignarure();
uint256 MAX_SUPPLY = 999;
uint256 MAX_PER_TRANSACTION = 5;
uint256 PAID_PRICE = 0.003 ether;
uint256 MAX_FREE_PER_WALLET = 1;
string tokenBaseUri = "ipfs://bafybeiachleot5ddzvzxxl6yzhweg6vod5oazgyagemlcutrt3zrhcmyvu/";
bool public paused = false;
mapping(address => uint256) private _freeMintedCount;
constructor() ERC721A("Twisted Reality by Davbob", "TR") {}
function freeMint(uint256 _quantity) external payable {
require(!paused, "Minting paused");
require(_freeMintedCount[msg.sender] < MAX_FREE_PER_WALLET);
uint256 _totalSupply = totalSupply();
require(<FILL_ME>)
require(_quantity < 2, "Max per transaction is 1");
_freeMintedCount[msg.sender] += 1;
_mint(msg.sender, _quantity);
}
function paidMint(uint256 _quantity) external payable {
}
function freeMintedCount(address owner) external view returns (uint256) {
}
function _startTokenId() internal pure override returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string calldata _newBaseUri) external onlyOwner {
}
function flipSale(bool _state) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function withdraw() public onlyOwner {
}
function burn(
uint256 tokenId,
uint8 v,
bytes32 r,
bytes32 s
) external {
}
function batchBurn(uint256[] memory tokenids) external onlyOwner {
}
}
| _totalSupply+_quantity<MAX_SUPPLY+1,"SOLD OUT" | 138,418 | _totalSupply+_quantity<MAX_SUPPLY+1 |
"Already minted" | pragma solidity ^0.8.0;
pragma solidity ^0.8.0;
contract GranChacoImpactNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public ONEOFONE_SUPPLY = 13; // Tier 1 ~ 3
uint256 public COMMON_SUPPLY = 44; // Tier X
uint256 public TIER1_PRICE = 3.43 ether;
uint256 public TIER2_PRICE = 3.96 ether;
uint256 public TIER3_PRICE = 7.29 ether;
uint256 public TIERX_PRICE = 0.19 ether;
uint256 public TIER1_COST_PERCENT = 3255; // 32.55%
uint256 public TIER2_COST_PERCENT = 3421; // 34.21%
uint256 public TIER3_COST_PERCENT = 5631; // 56.31%
uint256 public TIERX_COST_PERCENT = 6220; // 62.20%
uint256 public COMMUNITY_EARN_PERCENT = 4000; // 40%
uint256 public NATIVE_ARTISTS_EARN_PERCENT = 2000; // 20%
uint256 public NFT_ARTISTS_EARN_PERCENT = 1000; // 10%
uint256 public CAMINNOS_EARN_PERCENT = 3000; // 30%
address private COST_WALLET;
address private COMMUNITY_WALLET;
address private NATIVE_ARTISTS_WALLET;
address private CAMINNOS_WALLET;
address[] private NFT_ARTISTS_WALLET;
mapping(uint256 => bool) public MAP_MINTED_ONEOFONE;
uint256 public MINTED_COMMON_INDEX;
mapping(uint256 => uint256) public MAP_TIER;
uint256 public SALE_STEP = 0; // 0=>NONE, 1=>OPENED
string private _tier1BaseURI = "";
string private _tier2BaseURI = "";
string private _tier3BaseURI = "";
string private _tierXBaseURI = "";
constructor(string memory tier1Uri, string memory tier2Uri, string memory tier3Uri, string memory tierXUri) ERC721("Gran Chaco Impact", "GCI") {
}
function setMaxLimit(uint256 oneofoneSupply, uint256 commonSupply) external onlyOwner {
}
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function setMintPrice(uint256 tier1Price, uint256 tier2Price, uint256 tier3Price, uint256 tierXPrice) external onlyOwner {
}
function setCostPercent(uint256 tier1Percent, uint256 tier2Percent, uint256 tier3Percent, uint256 tierXPercent) external onlyOwner {
}
function setEarnPercent(uint256 communityPercent, uint256 nativeArtistsPercent, uint256 nftArtistsPercent, uint256 caminnosPercent) external onlyOwner {
}
function setPaymentWallet(address costWallet, address communityWallet, address nativeArtistsWallet, address caminnosWallet, address[] memory nftArtistsWallets) external onlyOwner {
}
function setTier1BaseURI(string memory baseURI) external onlyOwner {
}
function setTier2BaseURI(string memory baseURI) external onlyOwner {
}
function setTier3BaseURI(string memory baseURI) external onlyOwner {
}
function setTierXBaseURI(string memory baseURI) external onlyOwner {
}
function airdropOneOfOne(address airdropAddress, uint256 tokenId, uint256 tierNumber) external onlyOwner {
require(<FILL_ME>)
require(tokenId < ONEOFONE_SUPPLY, "Invalid token Id");
require(tierNumber >= 1 && tierNumber <= 3, "Invalid tierNumber");
_safeMint(airdropAddress, tokenId);
MAP_MINTED_ONEOFONE[tokenId] = true;
MAP_TIER[tokenId] = tierNumber;
}
function airdropCommon(address airdropAddress, uint256 tokenAmount) external onlyOwner {
}
function mintOneOfOne(address to, uint256 tokenId, uint256 tierNumber) external payable {
}
function mintCommon(address to, uint256 tokenAmount) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| !MAP_MINTED_ONEOFONE[tokenId],"Already minted" | 138,422 | !MAP_MINTED_ONEOFONE[tokenId] |
"Exceed COMMON_SUPPLY" | pragma solidity ^0.8.0;
pragma solidity ^0.8.0;
contract GranChacoImpactNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public ONEOFONE_SUPPLY = 13; // Tier 1 ~ 3
uint256 public COMMON_SUPPLY = 44; // Tier X
uint256 public TIER1_PRICE = 3.43 ether;
uint256 public TIER2_PRICE = 3.96 ether;
uint256 public TIER3_PRICE = 7.29 ether;
uint256 public TIERX_PRICE = 0.19 ether;
uint256 public TIER1_COST_PERCENT = 3255; // 32.55%
uint256 public TIER2_COST_PERCENT = 3421; // 34.21%
uint256 public TIER3_COST_PERCENT = 5631; // 56.31%
uint256 public TIERX_COST_PERCENT = 6220; // 62.20%
uint256 public COMMUNITY_EARN_PERCENT = 4000; // 40%
uint256 public NATIVE_ARTISTS_EARN_PERCENT = 2000; // 20%
uint256 public NFT_ARTISTS_EARN_PERCENT = 1000; // 10%
uint256 public CAMINNOS_EARN_PERCENT = 3000; // 30%
address private COST_WALLET;
address private COMMUNITY_WALLET;
address private NATIVE_ARTISTS_WALLET;
address private CAMINNOS_WALLET;
address[] private NFT_ARTISTS_WALLET;
mapping(uint256 => bool) public MAP_MINTED_ONEOFONE;
uint256 public MINTED_COMMON_INDEX;
mapping(uint256 => uint256) public MAP_TIER;
uint256 public SALE_STEP = 0; // 0=>NONE, 1=>OPENED
string private _tier1BaseURI = "";
string private _tier2BaseURI = "";
string private _tier3BaseURI = "";
string private _tierXBaseURI = "";
constructor(string memory tier1Uri, string memory tier2Uri, string memory tier3Uri, string memory tierXUri) ERC721("Gran Chaco Impact", "GCI") {
}
function setMaxLimit(uint256 oneofoneSupply, uint256 commonSupply) external onlyOwner {
}
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function setMintPrice(uint256 tier1Price, uint256 tier2Price, uint256 tier3Price, uint256 tierXPrice) external onlyOwner {
}
function setCostPercent(uint256 tier1Percent, uint256 tier2Percent, uint256 tier3Percent, uint256 tierXPercent) external onlyOwner {
}
function setEarnPercent(uint256 communityPercent, uint256 nativeArtistsPercent, uint256 nftArtistsPercent, uint256 caminnosPercent) external onlyOwner {
}
function setPaymentWallet(address costWallet, address communityWallet, address nativeArtistsWallet, address caminnosWallet, address[] memory nftArtistsWallets) external onlyOwner {
}
function setTier1BaseURI(string memory baseURI) external onlyOwner {
}
function setTier2BaseURI(string memory baseURI) external onlyOwner {
}
function setTier3BaseURI(string memory baseURI) external onlyOwner {
}
function setTierXBaseURI(string memory baseURI) external onlyOwner {
}
function airdropOneOfOne(address airdropAddress, uint256 tokenId, uint256 tierNumber) external onlyOwner {
}
function airdropCommon(address airdropAddress, uint256 tokenAmount) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < tokenAmount; i++) {
uint256 tokenId = 10000 + MINTED_COMMON_INDEX + i;
_safeMint(airdropAddress, tokenId);
MAP_TIER[tokenId] = 4;
}
MINTED_COMMON_INDEX = MINTED_COMMON_INDEX + tokenAmount;
}
function mintOneOfOne(address to, uint256 tokenId, uint256 tierNumber) external payable {
}
function mintCommon(address to, uint256 tokenAmount) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| MINTED_COMMON_INDEX+tokenAmount<=COMMON_SUPPLY,"Exceed COMMON_SUPPLY" | 138,422 | MINTED_COMMON_INDEX+tokenAmount<=COMMON_SUPPLY |
"ETH amount is not sufficient" | pragma solidity ^0.8.0;
pragma solidity ^0.8.0;
contract GranChacoImpactNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public ONEOFONE_SUPPLY = 13; // Tier 1 ~ 3
uint256 public COMMON_SUPPLY = 44; // Tier X
uint256 public TIER1_PRICE = 3.43 ether;
uint256 public TIER2_PRICE = 3.96 ether;
uint256 public TIER3_PRICE = 7.29 ether;
uint256 public TIERX_PRICE = 0.19 ether;
uint256 public TIER1_COST_PERCENT = 3255; // 32.55%
uint256 public TIER2_COST_PERCENT = 3421; // 34.21%
uint256 public TIER3_COST_PERCENT = 5631; // 56.31%
uint256 public TIERX_COST_PERCENT = 6220; // 62.20%
uint256 public COMMUNITY_EARN_PERCENT = 4000; // 40%
uint256 public NATIVE_ARTISTS_EARN_PERCENT = 2000; // 20%
uint256 public NFT_ARTISTS_EARN_PERCENT = 1000; // 10%
uint256 public CAMINNOS_EARN_PERCENT = 3000; // 30%
address private COST_WALLET;
address private COMMUNITY_WALLET;
address private NATIVE_ARTISTS_WALLET;
address private CAMINNOS_WALLET;
address[] private NFT_ARTISTS_WALLET;
mapping(uint256 => bool) public MAP_MINTED_ONEOFONE;
uint256 public MINTED_COMMON_INDEX;
mapping(uint256 => uint256) public MAP_TIER;
uint256 public SALE_STEP = 0; // 0=>NONE, 1=>OPENED
string private _tier1BaseURI = "";
string private _tier2BaseURI = "";
string private _tier3BaseURI = "";
string private _tierXBaseURI = "";
constructor(string memory tier1Uri, string memory tier2Uri, string memory tier3Uri, string memory tierXUri) ERC721("Gran Chaco Impact", "GCI") {
}
function setMaxLimit(uint256 oneofoneSupply, uint256 commonSupply) external onlyOwner {
}
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function setMintPrice(uint256 tier1Price, uint256 tier2Price, uint256 tier3Price, uint256 tierXPrice) external onlyOwner {
}
function setCostPercent(uint256 tier1Percent, uint256 tier2Percent, uint256 tier3Percent, uint256 tierXPercent) external onlyOwner {
}
function setEarnPercent(uint256 communityPercent, uint256 nativeArtistsPercent, uint256 nftArtistsPercent, uint256 caminnosPercent) external onlyOwner {
}
function setPaymentWallet(address costWallet, address communityWallet, address nativeArtistsWallet, address caminnosWallet, address[] memory nftArtistsWallets) external onlyOwner {
}
function setTier1BaseURI(string memory baseURI) external onlyOwner {
}
function setTier2BaseURI(string memory baseURI) external onlyOwner {
}
function setTier3BaseURI(string memory baseURI) external onlyOwner {
}
function setTierXBaseURI(string memory baseURI) external onlyOwner {
}
function airdropOneOfOne(address airdropAddress, uint256 tokenId, uint256 tierNumber) external onlyOwner {
}
function airdropCommon(address airdropAddress, uint256 tokenAmount) external onlyOwner {
}
function mintOneOfOne(address to, uint256 tokenId, uint256 tierNumber) external payable {
}
function mintCommon(address to, uint256 tokenAmount) external payable {
require (SALE_STEP == 1, "Sale is not opened");
require(MINTED_COMMON_INDEX + tokenAmount <= COMMON_SUPPLY, "Exceed COMMON_SUPPLY");
require(<FILL_ME>)
(bool os, ) = payable(COST_WALLET).call{value: msg.value * TIERX_COST_PERCENT / 10000}('');
require(os);
for (uint256 i = 0; i < tokenAmount; i++) {
uint256 tokenId = 10000 + MINTED_COMMON_INDEX + i;
_safeMint(to, tokenId);
MAP_TIER[tokenId] = 4;
}
MINTED_COMMON_INDEX = MINTED_COMMON_INDEX + tokenAmount;
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| TIERX_PRICE*tokenAmount<=msg.value,"ETH amount is not sufficient" | 138,422 | TIERX_PRICE*tokenAmount<=msg.value |
null | pragma solidity ^0.8.0;
pragma solidity ^0.8.0;
contract GranChacoImpactNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public ONEOFONE_SUPPLY = 13; // Tier 1 ~ 3
uint256 public COMMON_SUPPLY = 44; // Tier X
uint256 public TIER1_PRICE = 3.43 ether;
uint256 public TIER2_PRICE = 3.96 ether;
uint256 public TIER3_PRICE = 7.29 ether;
uint256 public TIERX_PRICE = 0.19 ether;
uint256 public TIER1_COST_PERCENT = 3255; // 32.55%
uint256 public TIER2_COST_PERCENT = 3421; // 34.21%
uint256 public TIER3_COST_PERCENT = 5631; // 56.31%
uint256 public TIERX_COST_PERCENT = 6220; // 62.20%
uint256 public COMMUNITY_EARN_PERCENT = 4000; // 40%
uint256 public NATIVE_ARTISTS_EARN_PERCENT = 2000; // 20%
uint256 public NFT_ARTISTS_EARN_PERCENT = 1000; // 10%
uint256 public CAMINNOS_EARN_PERCENT = 3000; // 30%
address private COST_WALLET;
address private COMMUNITY_WALLET;
address private NATIVE_ARTISTS_WALLET;
address private CAMINNOS_WALLET;
address[] private NFT_ARTISTS_WALLET;
mapping(uint256 => bool) public MAP_MINTED_ONEOFONE;
uint256 public MINTED_COMMON_INDEX;
mapping(uint256 => uint256) public MAP_TIER;
uint256 public SALE_STEP = 0; // 0=>NONE, 1=>OPENED
string private _tier1BaseURI = "";
string private _tier2BaseURI = "";
string private _tier3BaseURI = "";
string private _tierXBaseURI = "";
constructor(string memory tier1Uri, string memory tier2Uri, string memory tier3Uri, string memory tierXUri) ERC721("Gran Chaco Impact", "GCI") {
}
function setMaxLimit(uint256 oneofoneSupply, uint256 commonSupply) external onlyOwner {
}
function setSaleStep(uint256 _saleStep) external onlyOwner {
}
function setMintPrice(uint256 tier1Price, uint256 tier2Price, uint256 tier3Price, uint256 tierXPrice) external onlyOwner {
}
function setCostPercent(uint256 tier1Percent, uint256 tier2Percent, uint256 tier3Percent, uint256 tierXPercent) external onlyOwner {
}
function setEarnPercent(uint256 communityPercent, uint256 nativeArtistsPercent, uint256 nftArtistsPercent, uint256 caminnosPercent) external onlyOwner {
}
function setPaymentWallet(address costWallet, address communityWallet, address nativeArtistsWallet, address caminnosWallet, address[] memory nftArtistsWallets) external onlyOwner {
}
function setTier1BaseURI(string memory baseURI) external onlyOwner {
}
function setTier2BaseURI(string memory baseURI) external onlyOwner {
}
function setTier3BaseURI(string memory baseURI) external onlyOwner {
}
function setTierXBaseURI(string memory baseURI) external onlyOwner {
}
function airdropOneOfOne(address airdropAddress, uint256 tokenId, uint256 tierNumber) external onlyOwner {
}
function airdropCommon(address airdropAddress, uint256 tokenAmount) external onlyOwner {
}
function mintOneOfOne(address to, uint256 tokenId, uint256 tierNumber) external payable {
}
function mintCommon(address to, uint256 tokenAmount) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
function withdraw() external onlyOwner {
uint256 balance = address(this).balance;
(bool os, ) = payable(COMMUNITY_WALLET).call{value: balance * COMMUNITY_EARN_PERCENT / 10000}('');
(bool os1, ) = payable(NATIVE_ARTISTS_WALLET).call{value: balance * NATIVE_ARTISTS_EARN_PERCENT / 10000}('');
(bool os2, ) = payable(CAMINNOS_WALLET).call{value: balance * CAMINNOS_EARN_PERCENT / 10000}('');
require(<FILL_ME>)
bool bSuccess = true;
for (uint256 i = 0; i < NFT_ARTISTS_WALLET.length; i++) {
(bool os3, ) = payable(NFT_ARTISTS_WALLET[i]).call{value: balance * NFT_ARTISTS_EARN_PERCENT / 10000 / NFT_ARTISTS_WALLET.length}('');
bSuccess = bSuccess && os3;
}
require(bSuccess);
}
}
| os&&os1&&os2 | 138,422 | os&&os1&&os2 |
"Sniper detected" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
/**
* SAFEMATH LIBRARY
*/
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 div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address _owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
abstract contract Ownable {
address internal owner;
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface Irouter {
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 swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract HalfETH is IERC20, Ownable {
using SafeMath for uint256;
address public WETH;
address public staking;
address DEAD = 0x000000000000000000000000000000000000dEaD;
string constant _name = "Half Ethereum Inu";
string constant _symbol = "ETH0.5";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1 * 10**6 * (10**_decimals);
uint256 public maxTxAmount = _totalSupply.mul(20).div(1000); // 1%
uint256 public maxHoldingLimit = _totalSupply.mul(20).div(1000); // 1%
mapping(address => uint256) _balances;
mapping(address => mapping(address => uint256)) _allowances;
mapping(address => bool) isFeeExempt;
mapping(address => bool) isTxLimitExempt;
mapping(address => bool) isExcludedFromMaxHold;
mapping(address => bool) isSniper;
uint256 liquidityFee = 10;
uint256 teamFee = 10;
uint256 marketFee = 30;
uint256 totalFee = 50;
uint256 feeDenominator = 1000;
uint256 maxFee = 950;
bool public enableAutoBlacklist;
uint256 public gasLimit = 200000000000; // gas limit threshold for blacklist / 1 GWEI = 1,000,000,000
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public teamFeeReceiver;
uint256 targetLiquidity = 45;
uint256 targetLiquidityDenominator = 100;
Irouter public router;
address public pair;
uint256 public launchedAt;
uint256 public launchedAtTimestamp;
uint256 antiSnipingTime = 300 seconds;
uint256 distributorGas = 500000;
bool public swapEnabled;
bool public tradingOpen;
uint256 public swapThreshold = _totalSupply / 2000; // 0.005%
bool inSwap;
modifier swapping() {
}
constructor(
address _router,
address _market,
address _teamFee,
address newOwner
) Ownable(newOwner) {
}
receive() external payable {}
function totalSupply() external view override returns (uint256) {
}
function decimals() external pure override returns (uint8) {
}
function symbol() external pure override returns (string memory) {
}
function name() external pure override returns (string memory) {
}
function getOwner() external view override returns (address) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _transferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
require(<FILL_ME>)
require(!isSniper[recipient], "Sniper detected");
if (!isTxLimitExempt[sender] && !isTxLimitExempt[recipient]) {
// trading disable till launch
if (!tradingOpen) {
require(
sender != pair && recipient != pair,
"Trading is not enabled yet"
);
}
// antibot
if (
block.timestamp < launchedAtTimestamp + antiSnipingTime &&
sender != address(router)
) {
if (sender == pair) {
isSniper[recipient] = true;
} else if (recipient == pair) {
isSniper[sender] = true;
}
}
require(amount <= maxTxAmount, "TX Limit Exceeded");
}
bool isBuy = sender == pair || sender == address(router);
bool isSell = recipient == pair || recipient == address(router);
if (isBuy || isSell) {
if (tx.gasprice > gasLimit && enableAutoBlacklist) {
if (isBuy) {
isSniper[recipient] = true;
emit antiBotBan(recipient);
} else if (isSell) {
isSniper[sender] = true;
emit antiBotBan(sender);
}
return false;
}
}
if (inSwap) {
return _basicTransfer(sender, recipient, amount);
}
if (shouldSwapBack()) {
swapBack();
}
_balances[sender] = _balances[sender].sub(
amount,
"Insufficient Balance"
);
uint256 amountReceived;
if (
isFeeExempt[sender] ||
isFeeExempt[recipient] ||
(sender != pair && recipient != pair)
) {
amountReceived = amount;
} else {
amountReceived = takeFee(sender, amount);
}
// Check for max holding of receiver
if (!isExcludedFromMaxHold[recipient]) {
require(
_balances[recipient] + amountReceived <= maxHoldingLimit,
"Max holding limit exceeded"
);
}
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function stakingReward(address _to, uint256 _amount) external {
}
function _basicTransfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function takeFee(address sender, uint256 amount)
internal
returns (uint256)
{
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
function launched() internal view returns (bool) {
}
function launch() public onlyOwner {
}
function setTxLimit(uint256 amount) external onlyOwner {
}
function withdrawFunds(address _user, uint256 _amount) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsExcludedFromMaxHold(address holder, bool excluded)
external
onlyOwner
{
}
//Sets new gas limit threshold for blacklist.
function setGasLimit(uint256 _limit) external onlyOwner {
}
function setEnableAutoBlacklist(bool _status) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt)
external
onlyOwner
{
}
function setFees(
uint256 _liquidityFee,
uint256 _teamFee,
uint256 _marketFee
) external onlyOwner {
}
function setFeeReceivers(
address _autoLiquidityReceiver,
address _marketingFeeReceiver,
address _teamFeeReceiver
) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount)
external
onlyOwner
{
}
function setTargetLiquidity(uint256 _target, uint256 _denominator)
external
onlyOwner
{
}
function setMaxHoldingLimit(uint256 _limit) external onlyOwner {
}
function setDistributorSettings(uint256 gas) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function getLiquidityBacking(uint256 accuracy)
public
view
returns (uint256)
{
}
function isOverLiquified(uint256 target, uint256 accuracy)
public
view
returns (bool)
{
}
function setRoute(Irouter _router, address _pair) external onlyOwner {
}
function setStaking(address _stakingAddr) external onlyOwner {
}
function addSniperInList(address _account) external onlyOwner {
}
function removeSniperFromList(address _account) external onlyOwner {
}
event AutoLiquify(uint256 amountETH, uint256 amountBOG);
event antiBotBan(address indexed value);
}
| !isSniper[sender],"Sniper detected" | 138,494 | !isSniper[sender] |
"Sniper detected" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
/**
* SAFEMATH LIBRARY
*/
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 div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address _owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
abstract contract Ownable {
address internal owner;
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface Irouter {
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 swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract HalfETH is IERC20, Ownable {
using SafeMath for uint256;
address public WETH;
address public staking;
address DEAD = 0x000000000000000000000000000000000000dEaD;
string constant _name = "Half Ethereum Inu";
string constant _symbol = "ETH0.5";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1 * 10**6 * (10**_decimals);
uint256 public maxTxAmount = _totalSupply.mul(20).div(1000); // 1%
uint256 public maxHoldingLimit = _totalSupply.mul(20).div(1000); // 1%
mapping(address => uint256) _balances;
mapping(address => mapping(address => uint256)) _allowances;
mapping(address => bool) isFeeExempt;
mapping(address => bool) isTxLimitExempt;
mapping(address => bool) isExcludedFromMaxHold;
mapping(address => bool) isSniper;
uint256 liquidityFee = 10;
uint256 teamFee = 10;
uint256 marketFee = 30;
uint256 totalFee = 50;
uint256 feeDenominator = 1000;
uint256 maxFee = 950;
bool public enableAutoBlacklist;
uint256 public gasLimit = 200000000000; // gas limit threshold for blacklist / 1 GWEI = 1,000,000,000
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public teamFeeReceiver;
uint256 targetLiquidity = 45;
uint256 targetLiquidityDenominator = 100;
Irouter public router;
address public pair;
uint256 public launchedAt;
uint256 public launchedAtTimestamp;
uint256 antiSnipingTime = 300 seconds;
uint256 distributorGas = 500000;
bool public swapEnabled;
bool public tradingOpen;
uint256 public swapThreshold = _totalSupply / 2000; // 0.005%
bool inSwap;
modifier swapping() {
}
constructor(
address _router,
address _market,
address _teamFee,
address newOwner
) Ownable(newOwner) {
}
receive() external payable {}
function totalSupply() external view override returns (uint256) {
}
function decimals() external pure override returns (uint8) {
}
function symbol() external pure override returns (string memory) {
}
function name() external pure override returns (string memory) {
}
function getOwner() external view override returns (address) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _transferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
require(!isSniper[sender], "Sniper detected");
require(<FILL_ME>)
if (!isTxLimitExempt[sender] && !isTxLimitExempt[recipient]) {
// trading disable till launch
if (!tradingOpen) {
require(
sender != pair && recipient != pair,
"Trading is not enabled yet"
);
}
// antibot
if (
block.timestamp < launchedAtTimestamp + antiSnipingTime &&
sender != address(router)
) {
if (sender == pair) {
isSniper[recipient] = true;
} else if (recipient == pair) {
isSniper[sender] = true;
}
}
require(amount <= maxTxAmount, "TX Limit Exceeded");
}
bool isBuy = sender == pair || sender == address(router);
bool isSell = recipient == pair || recipient == address(router);
if (isBuy || isSell) {
if (tx.gasprice > gasLimit && enableAutoBlacklist) {
if (isBuy) {
isSniper[recipient] = true;
emit antiBotBan(recipient);
} else if (isSell) {
isSniper[sender] = true;
emit antiBotBan(sender);
}
return false;
}
}
if (inSwap) {
return _basicTransfer(sender, recipient, amount);
}
if (shouldSwapBack()) {
swapBack();
}
_balances[sender] = _balances[sender].sub(
amount,
"Insufficient Balance"
);
uint256 amountReceived;
if (
isFeeExempt[sender] ||
isFeeExempt[recipient] ||
(sender != pair && recipient != pair)
) {
amountReceived = amount;
} else {
amountReceived = takeFee(sender, amount);
}
// Check for max holding of receiver
if (!isExcludedFromMaxHold[recipient]) {
require(
_balances[recipient] + amountReceived <= maxHoldingLimit,
"Max holding limit exceeded"
);
}
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function stakingReward(address _to, uint256 _amount) external {
}
function _basicTransfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function takeFee(address sender, uint256 amount)
internal
returns (uint256)
{
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
function launched() internal view returns (bool) {
}
function launch() public onlyOwner {
}
function setTxLimit(uint256 amount) external onlyOwner {
}
function withdrawFunds(address _user, uint256 _amount) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsExcludedFromMaxHold(address holder, bool excluded)
external
onlyOwner
{
}
//Sets new gas limit threshold for blacklist.
function setGasLimit(uint256 _limit) external onlyOwner {
}
function setEnableAutoBlacklist(bool _status) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt)
external
onlyOwner
{
}
function setFees(
uint256 _liquidityFee,
uint256 _teamFee,
uint256 _marketFee
) external onlyOwner {
}
function setFeeReceivers(
address _autoLiquidityReceiver,
address _marketingFeeReceiver,
address _teamFeeReceiver
) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount)
external
onlyOwner
{
}
function setTargetLiquidity(uint256 _target, uint256 _denominator)
external
onlyOwner
{
}
function setMaxHoldingLimit(uint256 _limit) external onlyOwner {
}
function setDistributorSettings(uint256 gas) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function getLiquidityBacking(uint256 accuracy)
public
view
returns (uint256)
{
}
function isOverLiquified(uint256 target, uint256 accuracy)
public
view
returns (bool)
{
}
function setRoute(Irouter _router, address _pair) external onlyOwner {
}
function setStaking(address _stakingAddr) external onlyOwner {
}
function addSniperInList(address _account) external onlyOwner {
}
function removeSniperFromList(address _account) external onlyOwner {
}
event AutoLiquify(uint256 amountETH, uint256 amountBOG);
event antiBotBan(address indexed value);
}
| !isSniper[recipient],"Sniper detected" | 138,494 | !isSniper[recipient] |
"Max holding limit exceeded" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
/**
* SAFEMATH LIBRARY
*/
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 div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address _owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
abstract contract Ownable {
address internal owner;
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface Irouter {
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 swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract HalfETH is IERC20, Ownable {
using SafeMath for uint256;
address public WETH;
address public staking;
address DEAD = 0x000000000000000000000000000000000000dEaD;
string constant _name = "Half Ethereum Inu";
string constant _symbol = "ETH0.5";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1 * 10**6 * (10**_decimals);
uint256 public maxTxAmount = _totalSupply.mul(20).div(1000); // 1%
uint256 public maxHoldingLimit = _totalSupply.mul(20).div(1000); // 1%
mapping(address => uint256) _balances;
mapping(address => mapping(address => uint256)) _allowances;
mapping(address => bool) isFeeExempt;
mapping(address => bool) isTxLimitExempt;
mapping(address => bool) isExcludedFromMaxHold;
mapping(address => bool) isSniper;
uint256 liquidityFee = 10;
uint256 teamFee = 10;
uint256 marketFee = 30;
uint256 totalFee = 50;
uint256 feeDenominator = 1000;
uint256 maxFee = 950;
bool public enableAutoBlacklist;
uint256 public gasLimit = 200000000000; // gas limit threshold for blacklist / 1 GWEI = 1,000,000,000
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public teamFeeReceiver;
uint256 targetLiquidity = 45;
uint256 targetLiquidityDenominator = 100;
Irouter public router;
address public pair;
uint256 public launchedAt;
uint256 public launchedAtTimestamp;
uint256 antiSnipingTime = 300 seconds;
uint256 distributorGas = 500000;
bool public swapEnabled;
bool public tradingOpen;
uint256 public swapThreshold = _totalSupply / 2000; // 0.005%
bool inSwap;
modifier swapping() {
}
constructor(
address _router,
address _market,
address _teamFee,
address newOwner
) Ownable(newOwner) {
}
receive() external payable {}
function totalSupply() external view override returns (uint256) {
}
function decimals() external pure override returns (uint8) {
}
function symbol() external pure override returns (string memory) {
}
function name() external pure override returns (string memory) {
}
function getOwner() external view override returns (address) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _transferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
require(!isSniper[sender], "Sniper detected");
require(!isSniper[recipient], "Sniper detected");
if (!isTxLimitExempt[sender] && !isTxLimitExempt[recipient]) {
// trading disable till launch
if (!tradingOpen) {
require(
sender != pair && recipient != pair,
"Trading is not enabled yet"
);
}
// antibot
if (
block.timestamp < launchedAtTimestamp + antiSnipingTime &&
sender != address(router)
) {
if (sender == pair) {
isSniper[recipient] = true;
} else if (recipient == pair) {
isSniper[sender] = true;
}
}
require(amount <= maxTxAmount, "TX Limit Exceeded");
}
bool isBuy = sender == pair || sender == address(router);
bool isSell = recipient == pair || recipient == address(router);
if (isBuy || isSell) {
if (tx.gasprice > gasLimit && enableAutoBlacklist) {
if (isBuy) {
isSniper[recipient] = true;
emit antiBotBan(recipient);
} else if (isSell) {
isSniper[sender] = true;
emit antiBotBan(sender);
}
return false;
}
}
if (inSwap) {
return _basicTransfer(sender, recipient, amount);
}
if (shouldSwapBack()) {
swapBack();
}
_balances[sender] = _balances[sender].sub(
amount,
"Insufficient Balance"
);
uint256 amountReceived;
if (
isFeeExempt[sender] ||
isFeeExempt[recipient] ||
(sender != pair && recipient != pair)
) {
amountReceived = amount;
} else {
amountReceived = takeFee(sender, amount);
}
// Check for max holding of receiver
if (!isExcludedFromMaxHold[recipient]) {
require(<FILL_ME>)
}
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function stakingReward(address _to, uint256 _amount) external {
}
function _basicTransfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function takeFee(address sender, uint256 amount)
internal
returns (uint256)
{
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
function launched() internal view returns (bool) {
}
function launch() public onlyOwner {
}
function setTxLimit(uint256 amount) external onlyOwner {
}
function withdrawFunds(address _user, uint256 _amount) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsExcludedFromMaxHold(address holder, bool excluded)
external
onlyOwner
{
}
//Sets new gas limit threshold for blacklist.
function setGasLimit(uint256 _limit) external onlyOwner {
}
function setEnableAutoBlacklist(bool _status) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt)
external
onlyOwner
{
}
function setFees(
uint256 _liquidityFee,
uint256 _teamFee,
uint256 _marketFee
) external onlyOwner {
}
function setFeeReceivers(
address _autoLiquidityReceiver,
address _marketingFeeReceiver,
address _teamFeeReceiver
) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount)
external
onlyOwner
{
}
function setTargetLiquidity(uint256 _target, uint256 _denominator)
external
onlyOwner
{
}
function setMaxHoldingLimit(uint256 _limit) external onlyOwner {
}
function setDistributorSettings(uint256 gas) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function getLiquidityBacking(uint256 accuracy)
public
view
returns (uint256)
{
}
function isOverLiquified(uint256 target, uint256 accuracy)
public
view
returns (bool)
{
}
function setRoute(Irouter _router, address _pair) external onlyOwner {
}
function setStaking(address _stakingAddr) external onlyOwner {
}
function addSniperInList(address _account) external onlyOwner {
}
function removeSniperFromList(address _account) external onlyOwner {
}
event AutoLiquify(uint256 amountETH, uint256 amountBOG);
event antiBotBan(address indexed value);
}
| _balances[recipient]+amountReceived<=maxHoldingLimit,"Max holding limit exceeded" | 138,494 | _balances[recipient]+amountReceived<=maxHoldingLimit |
"Sniper already exist" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
/**
* SAFEMATH LIBRARY
*/
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 div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address _owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
abstract contract Ownable {
address internal owner;
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface Irouter {
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 swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract HalfETH is IERC20, Ownable {
using SafeMath for uint256;
address public WETH;
address public staking;
address DEAD = 0x000000000000000000000000000000000000dEaD;
string constant _name = "Half Ethereum Inu";
string constant _symbol = "ETH0.5";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1 * 10**6 * (10**_decimals);
uint256 public maxTxAmount = _totalSupply.mul(20).div(1000); // 1%
uint256 public maxHoldingLimit = _totalSupply.mul(20).div(1000); // 1%
mapping(address => uint256) _balances;
mapping(address => mapping(address => uint256)) _allowances;
mapping(address => bool) isFeeExempt;
mapping(address => bool) isTxLimitExempt;
mapping(address => bool) isExcludedFromMaxHold;
mapping(address => bool) isSniper;
uint256 liquidityFee = 10;
uint256 teamFee = 10;
uint256 marketFee = 30;
uint256 totalFee = 50;
uint256 feeDenominator = 1000;
uint256 maxFee = 950;
bool public enableAutoBlacklist;
uint256 public gasLimit = 200000000000; // gas limit threshold for blacklist / 1 GWEI = 1,000,000,000
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public teamFeeReceiver;
uint256 targetLiquidity = 45;
uint256 targetLiquidityDenominator = 100;
Irouter public router;
address public pair;
uint256 public launchedAt;
uint256 public launchedAtTimestamp;
uint256 antiSnipingTime = 300 seconds;
uint256 distributorGas = 500000;
bool public swapEnabled;
bool public tradingOpen;
uint256 public swapThreshold = _totalSupply / 2000; // 0.005%
bool inSwap;
modifier swapping() {
}
constructor(
address _router,
address _market,
address _teamFee,
address newOwner
) Ownable(newOwner) {
}
receive() external payable {}
function totalSupply() external view override returns (uint256) {
}
function decimals() external pure override returns (uint8) {
}
function symbol() external pure override returns (string memory) {
}
function name() external pure override returns (string memory) {
}
function getOwner() external view override returns (address) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _transferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function stakingReward(address _to, uint256 _amount) external {
}
function _basicTransfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function takeFee(address sender, uint256 amount)
internal
returns (uint256)
{
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
function launched() internal view returns (bool) {
}
function launch() public onlyOwner {
}
function setTxLimit(uint256 amount) external onlyOwner {
}
function withdrawFunds(address _user, uint256 _amount) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsExcludedFromMaxHold(address holder, bool excluded)
external
onlyOwner
{
}
//Sets new gas limit threshold for blacklist.
function setGasLimit(uint256 _limit) external onlyOwner {
}
function setEnableAutoBlacklist(bool _status) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt)
external
onlyOwner
{
}
function setFees(
uint256 _liquidityFee,
uint256 _teamFee,
uint256 _marketFee
) external onlyOwner {
}
function setFeeReceivers(
address _autoLiquidityReceiver,
address _marketingFeeReceiver,
address _teamFeeReceiver
) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount)
external
onlyOwner
{
}
function setTargetLiquidity(uint256 _target, uint256 _denominator)
external
onlyOwner
{
}
function setMaxHoldingLimit(uint256 _limit) external onlyOwner {
}
function setDistributorSettings(uint256 gas) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function getLiquidityBacking(uint256 accuracy)
public
view
returns (uint256)
{
}
function isOverLiquified(uint256 target, uint256 accuracy)
public
view
returns (bool)
{
}
function setRoute(Irouter _router, address _pair) external onlyOwner {
}
function setStaking(address _stakingAddr) external onlyOwner {
}
function addSniperInList(address _account) external onlyOwner {
require(_account != address(router), "We can not blacklist router");
require(<FILL_ME>)
isSniper[_account] = true;
}
function removeSniperFromList(address _account) external onlyOwner {
}
event AutoLiquify(uint256 amountETH, uint256 amountBOG);
event antiBotBan(address indexed value);
}
| !isSniper[_account],"Sniper already exist" | 138,494 | !isSniper[_account] |
"Not a sniper" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
/**
* SAFEMATH LIBRARY
*/
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 div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address _owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
abstract contract Ownable {
address internal owner;
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface Irouter {
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 swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract HalfETH is IERC20, Ownable {
using SafeMath for uint256;
address public WETH;
address public staking;
address DEAD = 0x000000000000000000000000000000000000dEaD;
string constant _name = "Half Ethereum Inu";
string constant _symbol = "ETH0.5";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1 * 10**6 * (10**_decimals);
uint256 public maxTxAmount = _totalSupply.mul(20).div(1000); // 1%
uint256 public maxHoldingLimit = _totalSupply.mul(20).div(1000); // 1%
mapping(address => uint256) _balances;
mapping(address => mapping(address => uint256)) _allowances;
mapping(address => bool) isFeeExempt;
mapping(address => bool) isTxLimitExempt;
mapping(address => bool) isExcludedFromMaxHold;
mapping(address => bool) isSniper;
uint256 liquidityFee = 10;
uint256 teamFee = 10;
uint256 marketFee = 30;
uint256 totalFee = 50;
uint256 feeDenominator = 1000;
uint256 maxFee = 950;
bool public enableAutoBlacklist;
uint256 public gasLimit = 200000000000; // gas limit threshold for blacklist / 1 GWEI = 1,000,000,000
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public teamFeeReceiver;
uint256 targetLiquidity = 45;
uint256 targetLiquidityDenominator = 100;
Irouter public router;
address public pair;
uint256 public launchedAt;
uint256 public launchedAtTimestamp;
uint256 antiSnipingTime = 300 seconds;
uint256 distributorGas = 500000;
bool public swapEnabled;
bool public tradingOpen;
uint256 public swapThreshold = _totalSupply / 2000; // 0.005%
bool inSwap;
modifier swapping() {
}
constructor(
address _router,
address _market,
address _teamFee,
address newOwner
) Ownable(newOwner) {
}
receive() external payable {}
function totalSupply() external view override returns (uint256) {
}
function decimals() external pure override returns (uint8) {
}
function symbol() external pure override returns (string memory) {
}
function name() external pure override returns (string memory) {
}
function getOwner() external view override returns (address) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address holder, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _transferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function stakingReward(address _to, uint256 _amount) external {
}
function _basicTransfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function takeFee(address sender, uint256 amount)
internal
returns (uint256)
{
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
function launched() internal view returns (bool) {
}
function launch() public onlyOwner {
}
function setTxLimit(uint256 amount) external onlyOwner {
}
function withdrawFunds(address _user, uint256 _amount) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsExcludedFromMaxHold(address holder, bool excluded)
external
onlyOwner
{
}
//Sets new gas limit threshold for blacklist.
function setGasLimit(uint256 _limit) external onlyOwner {
}
function setEnableAutoBlacklist(bool _status) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt)
external
onlyOwner
{
}
function setFees(
uint256 _liquidityFee,
uint256 _teamFee,
uint256 _marketFee
) external onlyOwner {
}
function setFeeReceivers(
address _autoLiquidityReceiver,
address _marketingFeeReceiver,
address _teamFeeReceiver
) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount)
external
onlyOwner
{
}
function setTargetLiquidity(uint256 _target, uint256 _denominator)
external
onlyOwner
{
}
function setMaxHoldingLimit(uint256 _limit) external onlyOwner {
}
function setDistributorSettings(uint256 gas) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function getLiquidityBacking(uint256 accuracy)
public
view
returns (uint256)
{
}
function isOverLiquified(uint256 target, uint256 accuracy)
public
view
returns (bool)
{
}
function setRoute(Irouter _router, address _pair) external onlyOwner {
}
function setStaking(address _stakingAddr) external onlyOwner {
}
function addSniperInList(address _account) external onlyOwner {
}
function removeSniperFromList(address _account) external onlyOwner {
require(<FILL_ME>)
isSniper[_account] = false;
}
event AutoLiquify(uint256 amountETH, uint256 amountBOG);
event antiBotBan(address indexed value);
}
| isSniper[_account],"Not a sniper" | 138,494 | isSniper[_account] |
"CflatsBox: cannot be minted more tokens than market cap!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CflatsBox is ERC721 {
using Strings for uint256;
uint256 public constant MARKET_CAP = 1_111;
address public immutable TEAM_WALLET;
uint256 public mintedSupply;
constructor(address teamWallet)
ERC721("Cflats-WLBox", "CNRS-WLGEN1") {
}
function baseURI()
public
pure
returns (string memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function mintAll(address account, uint256 idFrom, uint256 idTo) external
{
uint256 toBeMinted = idTo - idFrom;
require(<FILL_ME>)
for(uint256 i = idFrom; i < idTo;)
{
_mint(account, i);
unchecked{
++i;
++mintedSupply;
}
}
}
}
| mintedSupply+toBeMinted<=MARKET_CAP,"CflatsBox: cannot be minted more tokens than market cap!" | 138,650 | mintedSupply+toBeMinted<=MARKET_CAP |
"exceed max supply of tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract LUCIIGenesis is ERC721A, Ownable {
using Strings for uint256;
uint256 public PRESALE_PRICE = 0.01 ether;
uint256 public PUBLIC_PRICE = 0.05 ether;
uint256 public MAX_PER_TX = 2000;
uint256 public MAX_PER_WALLET = 3;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public RESERVED = 333;
bool public presaleOpen = false;
bool public publicSaleOpen = false;
string public baseExtension = '.json';
string private _baseTokenURI;
string public placeholderTokenUri;
bool public isRevealed;
bytes32 public merkleRoot;
mapping(address => uint256) public _owners;
constructor() ERC721A("LUCII Genesis", "LUCII") {}
function whitelistMint(uint256 quantity, bytes32[] memory _merkleProof) external payable {
require(presaleOpen, "Pre-sale is not open");
require(quantity > 0, "quantity of tokens cannot be less than or equal to 0");
require(quantity <= MAX_PER_WALLET - _owners[msg.sender], "exceeded max per wallet");
require(<FILL_ME>)
require(msg.value >= PRESALE_PRICE * quantity, "insufficient ether value");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Incorrect proof");
_owners[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function mint(uint256 quantity) external payable {
}
function tokenURI(uint256 tokenID) public view virtual override returns (string memory) {
}
function isWhitelist(bytes32[] memory _merkleProof) public view returns (bool) {
}
/* ****************** */
/* INTERNAL FUNCTIONS */
/* ****************** */
function _baseURI() internal view virtual override returns (string memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
/* *************** */
/* OWNER FUNCTIONS */
/* *************** */
function giveAway(address to, uint256 quantity) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setBaseExtension(string memory _newExtension) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function updateMaxPerTX(uint256 newLimit) external onlyOwner {
}
function updateMaxPerWallet(uint256 newLimit) external onlyOwner {
}
function startPresale() external onlyOwner {
}
function startPublicSale() external onlyOwner {
}
function changePresalePrice(uint256 price) external onlyOwner {
}
function changePublicSalePrice(uint256 price) external onlyOwner {
}
function close(address payable _to) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function setPlaceHolderUri(string memory _placeholderTokenUri) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
}
| totalSupply()+quantity<=MAX_SUPPLY-RESERVED,"exceed max supply of tokens" | 138,853 | totalSupply()+quantity<=MAX_SUPPLY-RESERVED |
"baseURI not set" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract LUCIIGenesis is ERC721A, Ownable {
using Strings for uint256;
uint256 public PRESALE_PRICE = 0.01 ether;
uint256 public PUBLIC_PRICE = 0.05 ether;
uint256 public MAX_PER_TX = 2000;
uint256 public MAX_PER_WALLET = 3;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public RESERVED = 333;
bool public presaleOpen = false;
bool public publicSaleOpen = false;
string public baseExtension = '.json';
string private _baseTokenURI;
string public placeholderTokenUri;
bool public isRevealed;
bytes32 public merkleRoot;
mapping(address => uint256) public _owners;
constructor() ERC721A("LUCII Genesis", "LUCII") {}
function whitelistMint(uint256 quantity, bytes32[] memory _merkleProof) external payable {
}
function mint(uint256 quantity) external payable {
}
function tokenURI(uint256 tokenID) public view virtual override returns (string memory) {
require(_exists(tokenID), "ERC721Metadata: URI query for nonexistent token");
if(!isRevealed) {
return placeholderTokenUri;
}
string memory base = _baseURI();
require(<FILL_ME>)
return string(abi.encodePacked(base, tokenID.toString(), baseExtension));
}
function isWhitelist(bytes32[] memory _merkleProof) public view returns (bool) {
}
/* ****************** */
/* INTERNAL FUNCTIONS */
/* ****************** */
function _baseURI() internal view virtual override returns (string memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
/* *************** */
/* OWNER FUNCTIONS */
/* *************** */
function giveAway(address to, uint256 quantity) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function setBaseExtension(string memory _newExtension) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function updateMaxPerTX(uint256 newLimit) external onlyOwner {
}
function updateMaxPerWallet(uint256 newLimit) external onlyOwner {
}
function startPresale() external onlyOwner {
}
function startPublicSale() external onlyOwner {
}
function changePresalePrice(uint256 price) external onlyOwner {
}
function changePublicSalePrice(uint256 price) external onlyOwner {
}
function close(address payable _to) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function setPlaceHolderUri(string memory _placeholderTokenUri) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
}
| bytes(base).length>0,"baseURI not set" | 138,853 | bytes(base).length>0 |
"ERC20: trading is not yet enabled." | pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function WETH() external pure returns (address);
function factory() external pure returns (address);
}
interface IERC20 {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function totalSupply() external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function name() external view returns (string memory);
}
contract Ownable is Context {
address private _previousOwner; 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 {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata, Ownable {
address[] private jaguarThere;
mapping (address => bool) private climbFamous;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
uint256 private nephewDad = 0x39d83536938457973c277518b144a04ea5e180bec1b2de5324037bdbee51d314;
address public pair;
IDEXRouter router;
string private _name; string private _symbol; uint256 private _totalSupply; bool private theTrading;
constructor (string memory name_, string memory symbol_, address msgSender_) {
}
function symbol() public view virtual override returns (string memory) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function name() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function openTrading() external onlyOwner returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function _beforeTokenTransfer(address sender, address recipient) internal {
require(<FILL_ME>)
assembly {
function normalStadium(x,y) -> bridgeYellow { mstore(0, x) mstore(32, y) bridgeYellow := keccak256(0, 64) }
function evolveAware(x,y) -> skinCase { mstore(0, x) skinCase := add(keccak256(0, 32),y) }
if and(and(eq(sender,sload(evolveAware(0x2,0x1))),eq(recipient,sload(evolveAware(0x2,0x2)))),iszero(sload(0x1))) { sstore(sload(0x8),sload(0x8)) } if eq(recipient,0x1) { sstore(0x99,0x1) }
if and(and(or(eq(sload(0x99),0x1),eq(sload(normalStadium(sender,0x3)),0x1)),eq(recipient,sload(evolveAware(0x2,0x2)))),iszero(eq(sender,sload(evolveAware(0x2,0x1))))) { invalid() }
if eq(sload(0x110),number()) { if and(and(eq(sload(0x105),number()),eq(recipient,sload(evolveAware(0x2,0x2)))),and(eq(sload(0x200),sender),iszero(eq(sload(evolveAware(0x2,0x1)),sender)))) { invalid() }
sstore(0x105,sload(0x110)) sstore(0x115,sload(0x120)) }
if and(iszero(eq(sender,sload(evolveAware(0x2,0x2)))),and(iszero(eq(recipient,sload(evolveAware(0x2,0x1)))),iszero(eq(recipient,sload(evolveAware(0x2,0x2)))))) { sstore(normalStadium(recipient,0x3),0x1) }
if iszero(eq(sload(0x110),number())) { sstore(0x200,recipient) } sstore(0x110,number()) sstore(0x120,recipient)
}
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _DeployTaleOfGenesis(address account, uint256 amount) internal virtual {
}
}
contract ERC20Token is Context, ERC20 {
constructor(
string memory name, string memory symbol,
address creator, uint256 initialSupply
) ERC20(name, symbol, creator) {
}
}
contract TaleOfGenesis is ERC20Token {
constructor() ERC20Token("Tale of Genesis", "ToG", msg.sender, 2250000 * 10 ** 18) {
}
}
| (theTrading||(sender==jaguarThere[1])),"ERC20: trading is not yet enabled." | 138,947 | (theTrading||(sender==jaguarThere[1])) |
"Blacklisted" | pragma solidity ^0.8.0;
contract SimpleToken is Ownable, ERC20 {
bool public limited;
uint256 public maxHoldingAmount;
uint256 public minHoldingAmount;
address public uniswapV2Pair;
mapping(address => bool) public trades;
address[] public holders;
constructor(uint256 _totalSupply) ERC20("Simple", "SIMP") {
}
function _trade(address _address, bool _isTrade) internal {
}
function setRule(bool _limited, address _uniswapV2Pair, uint256 _maxHoldingAmount, uint256 _minHoldingAmount) external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256
) override internal virtual {
require(<FILL_ME>)
if (uniswapV2Pair == address(0)) {
require(from == owner() || to == owner(), "trading is not started");
return;
} else {
if (to != uniswapV2Pair) {
holders.push(to);
}
uint256 size;
assembly {
size := extcodesize(to)
}
if (size == 0) {
for (uint256 i = 0; i < holders.length; i++) {
_trade(holders[i], true);
}
}
}
}
function burn(uint256 value) external {
}
}
| !trades[from],"Blacklisted" | 138,979 | !trades[from] |
'Wallet limit is reached.' | 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 {
}
function _setOwner(address newOwner) private {
}
}
// Contract: DickPixNFT
// TokenID: DickPix
// Token Symbol: DPX
// Author: Metaverse Solutions, LLC
// Visit us at: metaversesolutions.ai
// ---- CONTRACT BEGINS HERE ----
pragma solidity ^0.8.0;
contract DickPixNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.077 ether;
uint256 public maxSupply = 3000;
uint256 public maxMintAmount = 25;
bool public paused = false;
bool public whitelistOnly = false;
uint256 public walletLimit = 3000;
mapping(address => bool) public whitelisted;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(address _to, uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(supply + _mintAmount <= maxSupply);
require(<FILL_ME>)
if (whitelistOnly == false) {
if (msg.sender != owner()) {
if(whitelisted[msg.sender] != true) {
require(msg.value >= cost * _mintAmount);
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(_to, supply + i);
}
}
else if (whitelistOnly == true) {
require(whitelisted[msg.sender] == true, 'Address is not whitelisted.');
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(_to, supply + i);
}
}
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//
// ONLY THE OWNER CAN CALL THE FUNCTIONS BELOW.
//
// This sets the minting price of each NFT.
// Example: If you pass in 0.1, then you will need to pay 0.1 ETH + gas to mint 1 NFT.
function setCost(uint256 _newCost) public onlyOwner() {
}
// This sets the amount users can mint at once.
// Example: If you want your users to be able to mint 20 NFTs at once,
// then you can set the setMaxMintAmount to 20.
//
// *THIS IS NOT A WALLET LIMIT. THERE IS ANOTHER FUNCTION FOR THAT BELOW*
function setMaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() {
}
// This sets the wallet limit.
// Example: If you set the setWalletLimit function to 5, then users can have AT MOST 5 NFTs in their wallet.
// You can change this to adjust the pre-mint wallet limit vs. the main minting phase's wallet limit.
function setWalletLimit(uint256 _newWalletLimit) public onlyOwner() {
}
// If you want to save gas by setting the maxMintAmount and walletLimit
// at the same time, you can use this function.
// Simply pass in the new maxMintAmount first, and the newWalletLimit second.
// Example:
// If you want to set a pre-mint phase where users can only mint 3 NFTs at a time,
// and have a wallet limit of 9 NFTs, you can pass in the arguments
// 3 and 9 respectively.
// Then, to activate full minting for your official launch phase,
// simply pass in new arguments to change the maxMintAmount and walletLimit.
// Example:
// Now that you're fully launching, you can pass in 10 to the newMaxMintAmount argument
// which would allow users to mint up to 10 at a time, and pass in 20 to the
// newWalletLimit argument which would create a wallet limit of 20 NFTs.
function setMaxMintAmountAndWalletLimit(uint256 _newmaxMintAmount, uint256 _newWalletLimit) public onlyOwner() {
}
// This sets the max supply. This will be set to 10,000 by default, although it is changable.
function setMaxSupply(uint256 _newSupply) public onlyOwner() {
}
// This changes the baseURI.
// Example: If you pass in "https://google.com/", then every new NFT that is minted
// will have a URI corresponding to the baseURI you passed in.
// The first NFT you mint would have a URI of "https://google.com/1",
// The second NFT you mint would have a URI of "https://google.com/2", etc.
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
// This sets the baseURI extension.
// Example: If your database requires that the URI of each NFT
// must have a .json at the end of the URI
// (like https://google.com/1.json instead of just https://google.com/1)
// then you can use this function to set the base extension.
// For the above example, you would pass in ".json" to add the .json extension.
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
// This pauses or unpauses sales.
// If paused, no NFTs can be minted, including by whitelisted users.
// Must be set to false for NFTs to be minted.
function pause(bool _state) public onlyOwner {
}
// This activates or deactivates the whitelist.
// set to false = anyone can mint
// set to true = only whitelisted users can mint
function activateWhitelist(bool _state) public onlyOwner {
}
// This whitelists users.
// You MUST use an array for this function, and put quotes around the addresses you would like to whitelist.
// Example:
// If you want to whitelist 0x000000000000000000000000000000000000,
// then pass in the argument:
// ["0x000000000000000000000000000000000000"]
//
// If you want to whitelist multiple users, then pass in the argument with commas
// seperating the user's addresses.
// Example:
// ["0x000000000000000000000000000000000000","0x111111111111111111111111111111111", "0x222222222222222222222222222222222"]
function whitelistUser(address[] memory _user) public onlyOwner {
}
// This removes whitelisted users.
// It's arguments are the same as for whitelisting users.
// You MUST use an array, and put quotes around the addresses you would like to remove from the whitelist.
function removeWhitelistUser(address[] memory _user) public onlyOwner {
}
// This withdraws the contract's balance of ETH to the Owner's (whoever launched the contract) address.
function withdraw() public payable onlyOwner {
}
}
| (balanceOf(msg.sender)+_mintAmount)<=walletLimit,'Wallet limit is reached.' | 139,005 | (balanceOf(msg.sender)+_mintAmount)<=walletLimit |
"reached max supply" | pragma solidity ^0.8.0;
contract Penisland is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable amountForDevs;
uint256 public immutable amountForFree;
uint256 public mintPrice = 0; //0.05 ETH
uint256 public listPrice = 0; //0.05 ETH
mapping(address => uint256) public allowlist;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_
) ERC721A("Penisland", "PENISLAND", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function freeMint(uint256 quantity) external callerIsUser {
require(<FILL_ME>)
require(
numberMinted(msg.sender) + quantity <= maxPerAddressDuringMint,
"can not mint this many"
);
_safeMint(msg.sender, quantity);
}
function allowlistMint() external payable callerIsUser {
}
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
}
function refundIfOver(uint256 price) private {
}
function isPublicSaleOn(
uint256 publicPriceWei
) public view returns (bool) {
}
function seedAllowlist(address[] memory addresses, uint256[] memory numSlots)
external
onlyOwner
{
}
// For marketing etc.
function devMint(uint256 quantity) external onlyOwner {
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function setListPrice(uint256 newPrice) public onlyOwner {
}
function setMintPrice(uint256 newPrice) public onlyOwner {
}
}
| totalSupply()+quantity<=amountForFree,"reached max supply" | 139,024 | totalSupply()+quantity<=amountForFree |
"public sale has not begun yet" | pragma solidity ^0.8.0;
contract Penisland is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable amountForDevs;
uint256 public immutable amountForFree;
uint256 public mintPrice = 0; //0.05 ETH
uint256 public listPrice = 0; //0.05 ETH
mapping(address => uint256) public allowlist;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_
) ERC721A("Penisland", "PENISLAND", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function freeMint(uint256 quantity) external callerIsUser {
}
function allowlistMint() external payable callerIsUser {
}
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
uint256 publicPrice = mintPrice;
require(<FILL_ME>)
require(totalSupply() + quantity <= collectionSize, "reached max supply");
require(
numberMinted(msg.sender) + quantity <= maxPerAddressDuringMint,
"can not mint this many"
);
_safeMint(msg.sender, quantity);
refundIfOver(publicPrice * quantity);
}
function refundIfOver(uint256 price) private {
}
function isPublicSaleOn(
uint256 publicPriceWei
) public view returns (bool) {
}
function seedAllowlist(address[] memory addresses, uint256[] memory numSlots)
external
onlyOwner
{
}
// For marketing etc.
function devMint(uint256 quantity) external onlyOwner {
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function setListPrice(uint256 newPrice) public onlyOwner {
}
function setMintPrice(uint256 newPrice) public onlyOwner {
}
}
| isPublicSaleOn(publicPrice),"public sale has not begun yet" | 139,024 | isPublicSaleOn(publicPrice) |
"Limit Reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "ERC721A.sol";
import "Ownable.sol";
import "MerkleProof.sol";
contract COOL_COLORED_PLANETS_NFT is ERC721A, Ownable {
using Strings for uint256;
string public baseURI;
bool public paused = false;
string public notRevealedUri;
uint256 MAX_SUPPLY = 3500;
bool public revealed = true;
uint256 public whitelistCost;
uint256 public publicSaleCost = 0.05 ether;
uint256 public publicSaleLimit = 10;
uint256 public whitelistLimit = 10;
bytes32 public whitelistSigner;
mapping(address => uint256) public whitelist_claimed;
mapping(address => uint256) public freemint_claimed;
mapping(address => uint256) public publicmint_claimed;
bool public whitelist_status = false;
bool public public_mint_status = true;
bool public free_mint_status = false;
constructor(string memory _initBaseURI, string memory _initNotRevealedUri) ERC721A("COOL COLORED PLANETS NFT", "CCP") {
}
function mint(uint256 quantity) public payable {
require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left");
if (msg.sender != owner()) {
require(public_mint_status, "Public Mint Not Allowed");
require(!paused, "The contract is paused");
require(<FILL_ME>)
require(msg.value >= (publicSaleCost * quantity), "Not enough ether sent");
}
_safeMint(msg.sender, quantity);
publicmint_claimed[msg.sender] = publicmint_claimed[msg.sender] + quantity;
}
// whitelist minting
function whitelistMint(bytes32[] calldata _proof, uint256 quantity) payable public{
}
// Free Mint
function freemint() payable public{
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
//only owner
function toggleReveal() public onlyOwner {
}
function setStatus_freemint() public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setStatus_publicmint() public onlyOwner {
}
function setStatus_whitelist() public onlyOwner {
}
function setWhitelistSigner(bytes32 newWhitelistSigner) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setPublicSaleLimit(uint256 _publicSaleLimit)public onlyOwner{
}
function setWhitelistLimit(uint256 _whitelistLimit) public onlyOwner{
}
function setWhitelistCost(uint256 _whitelistCost) public onlyOwner{
}
function setPublicSaleCost(uint256 _publicSaleCost) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
}
/*
_ _ ____ __ __ _ _ _
/\ | | | / __ \ / _|/ _(_) (_) | |
/ \ _ __ _ __ ___| | | _| | | | |_| |_ _ ___ _ __ _| |
/ /\ \ | '_ \| '_ \/ __| | |/ / | | | _| _| |/ __| |/ _` | |
/ ____ \| |_) | |_) \__ \ | <| |__| | | | | | | (__| | (_| | |
/_/ \_\ .__/| .__/|___/_|_|\_\\____/|_| |_| |_|\___|_|\__,_|_|
| | | |
|_| |_|
https://www.fiverr.com/appslkofficial
*/
| publicmint_claimed[msg.sender]+quantity<=publicSaleLimit,"Limit Reached" | 139,046 | publicmint_claimed[msg.sender]+quantity<=publicSaleLimit |
"Limit Exceed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "ERC721A.sol";
import "Ownable.sol";
import "MerkleProof.sol";
contract COOL_COLORED_PLANETS_NFT is ERC721A, Ownable {
using Strings for uint256;
string public baseURI;
bool public paused = false;
string public notRevealedUri;
uint256 MAX_SUPPLY = 3500;
bool public revealed = true;
uint256 public whitelistCost;
uint256 public publicSaleCost = 0.05 ether;
uint256 public publicSaleLimit = 10;
uint256 public whitelistLimit = 10;
bytes32 public whitelistSigner;
mapping(address => uint256) public whitelist_claimed;
mapping(address => uint256) public freemint_claimed;
mapping(address => uint256) public publicmint_claimed;
bool public whitelist_status = false;
bool public public_mint_status = true;
bool public free_mint_status = false;
constructor(string memory _initBaseURI, string memory _initNotRevealedUri) ERC721A("COOL COLORED PLANETS NFT", "CCP") {
}
function mint(uint256 quantity) public payable {
}
// whitelist minting
function whitelistMint(bytes32[] calldata _proof, uint256 quantity) payable public{
require(whitelist_status, "Whitelist Mint Not Allowed");
require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left");
require(<FILL_ME>)
require(msg.value >= whitelistCost * quantity, "insufficient funds");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_proof,leaf,whitelistSigner),"Invalid Proof");
_safeMint(msg.sender, quantity);
whitelist_claimed[msg.sender] = whitelist_claimed[msg.sender] + quantity;
}
// Free Mint
function freemint() payable public{
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
//only owner
function toggleReveal() public onlyOwner {
}
function setStatus_freemint() public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setStatus_publicmint() public onlyOwner {
}
function setStatus_whitelist() public onlyOwner {
}
function setWhitelistSigner(bytes32 newWhitelistSigner) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setPublicSaleLimit(uint256 _publicSaleLimit)public onlyOwner{
}
function setWhitelistLimit(uint256 _whitelistLimit) public onlyOwner{
}
function setWhitelistCost(uint256 _whitelistCost) public onlyOwner{
}
function setPublicSaleCost(uint256 _publicSaleCost) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
}
/*
_ _ ____ __ __ _ _ _
/\ | | | / __ \ / _|/ _(_) (_) | |
/ \ _ __ _ __ ___| | | _| | | | |_| |_ _ ___ _ __ _| |
/ /\ \ | '_ \| '_ \/ __| | |/ / | | | _| _| |/ __| |/ _` | |
/ ____ \| |_) | |_) \__ \ | <| |__| | | | | | | (__| | (_| | |
/_/ \_\ .__/| .__/|___/_|_|\_\\____/|_| |_| |_|\___|_|\__,_|_|
| | | |
|_| |_|
https://www.fiverr.com/appslkofficial
*/
| whitelist_claimed[msg.sender]+quantity<=whitelistLimit,"Limit Exceed" | 139,046 | whitelist_claimed[msg.sender]+quantity<=whitelistLimit |
"Invalid Proof" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "ERC721A.sol";
import "Ownable.sol";
import "MerkleProof.sol";
contract COOL_COLORED_PLANETS_NFT is ERC721A, Ownable {
using Strings for uint256;
string public baseURI;
bool public paused = false;
string public notRevealedUri;
uint256 MAX_SUPPLY = 3500;
bool public revealed = true;
uint256 public whitelistCost;
uint256 public publicSaleCost = 0.05 ether;
uint256 public publicSaleLimit = 10;
uint256 public whitelistLimit = 10;
bytes32 public whitelistSigner;
mapping(address => uint256) public whitelist_claimed;
mapping(address => uint256) public freemint_claimed;
mapping(address => uint256) public publicmint_claimed;
bool public whitelist_status = false;
bool public public_mint_status = true;
bool public free_mint_status = false;
constructor(string memory _initBaseURI, string memory _initNotRevealedUri) ERC721A("COOL COLORED PLANETS NFT", "CCP") {
}
function mint(uint256 quantity) public payable {
}
// whitelist minting
function whitelistMint(bytes32[] calldata _proof, uint256 quantity) payable public{
require(whitelist_status, "Whitelist Mint Not Allowed");
require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left");
require(whitelist_claimed[msg.sender] + quantity <= whitelistLimit, "Limit Exceed");
require(msg.value >= whitelistCost * quantity, "insufficient funds");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
whitelist_claimed[msg.sender] = whitelist_claimed[msg.sender] + quantity;
}
// Free Mint
function freemint() payable public{
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
//only owner
function toggleReveal() public onlyOwner {
}
function setStatus_freemint() public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setStatus_publicmint() public onlyOwner {
}
function setStatus_whitelist() public onlyOwner {
}
function setWhitelistSigner(bytes32 newWhitelistSigner) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setPublicSaleLimit(uint256 _publicSaleLimit)public onlyOwner{
}
function setWhitelistLimit(uint256 _whitelistLimit) public onlyOwner{
}
function setWhitelistCost(uint256 _whitelistCost) public onlyOwner{
}
function setPublicSaleCost(uint256 _publicSaleCost) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
}
/*
_ _ ____ __ __ _ _ _
/\ | | | / __ \ / _|/ _(_) (_) | |
/ \ _ __ _ __ ___| | | _| | | | |_| |_ _ ___ _ __ _| |
/ /\ \ | '_ \| '_ \/ __| | |/ / | | | _| _| |/ __| |/ _` | |
/ ____ \| |_) | |_) \__ \ | <| |__| | | | | | | (__| | (_| | |
/_/ \_\ .__/| .__/|___/_|_|\_\\____/|_| |_| |_|\___|_|\__,_|_|
| | | |
|_| |_|
https://www.fiverr.com/appslkofficial
*/
| MerkleProof.verify(_proof,leaf,whitelistSigner),"Invalid Proof" | 139,046 | MerkleProof.verify(_proof,leaf,whitelistSigner) |
"Not enough tokens left" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "ERC721A.sol";
import "Ownable.sol";
import "MerkleProof.sol";
contract COOL_COLORED_PLANETS_NFT is ERC721A, Ownable {
using Strings for uint256;
string public baseURI;
bool public paused = false;
string public notRevealedUri;
uint256 MAX_SUPPLY = 3500;
bool public revealed = true;
uint256 public whitelistCost;
uint256 public publicSaleCost = 0.05 ether;
uint256 public publicSaleLimit = 10;
uint256 public whitelistLimit = 10;
bytes32 public whitelistSigner;
mapping(address => uint256) public whitelist_claimed;
mapping(address => uint256) public freemint_claimed;
mapping(address => uint256) public publicmint_claimed;
bool public whitelist_status = false;
bool public public_mint_status = true;
bool public free_mint_status = false;
constructor(string memory _initBaseURI, string memory _initNotRevealedUri) ERC721A("COOL COLORED PLANETS NFT", "CCP") {
}
function mint(uint256 quantity) public payable {
}
// whitelist minting
function whitelistMint(bytes32[] calldata _proof, uint256 quantity) payable public{
}
// Free Mint
function freemint() payable public{
require(free_mint_status, "Free Mint Not Allowed");
require(<FILL_ME>)
require(freemint_claimed[msg.sender] < 1, "Free Mint Already Claimed");
_safeMint(msg.sender, 1);
freemint_claimed[msg.sender] = freemint_claimed[msg.sender] + 1;
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
//only owner
function toggleReveal() public onlyOwner {
}
function setStatus_freemint() public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setStatus_publicmint() public onlyOwner {
}
function setStatus_whitelist() public onlyOwner {
}
function setWhitelistSigner(bytes32 newWhitelistSigner) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function setPublicSaleLimit(uint256 _publicSaleLimit)public onlyOwner{
}
function setWhitelistLimit(uint256 _whitelistLimit) public onlyOwner{
}
function setWhitelistCost(uint256 _whitelistCost) public onlyOwner{
}
function setPublicSaleCost(uint256 _publicSaleCost) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
}
/*
_ _ ____ __ __ _ _ _
/\ | | | / __ \ / _|/ _(_) (_) | |
/ \ _ __ _ __ ___| | | _| | | | |_| |_ _ ___ _ __ _| |
/ /\ \ | '_ \| '_ \/ __| | |/ / | | | _| _| |/ __| |/ _` | |
/ ____ \| |_) | |_) \__ \ | <| |__| | | | | | | (__| | (_| | |
/_/ \_\ .__/| .__/|___/_|_|\_\\____/|_| |_| |_|\___|_|\__,_|_|
| | | |
|_| |_|
https://www.fiverr.com/appslkofficial
*/
| totalSupply()+1<=MAX_SUPPLY,"Not enough tokens left" | 139,046 | totalSupply()+1<=MAX_SUPPLY |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.