comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Invalid burner address" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract TheFuckUpPill is ERC1155Supply, Ownable {
using Strings for uint256;
address public theFuckUpPillsV2;
string public baseURI;
uint256 public jointMaxSupply = 2999;
uint256 public extacyMaxSupply = 1591;
uint256 public lsdMaxSupply = 499;
uint256 public poisonMaxSupply = 101;
uint256 public megaDoseMaxSupply = 10;
bool public revealed;
string public hiddenMetadataUri;
string public uriSuffix = ".json";
mapping(uint256 => bool) public validPillTypes;
event SetBaseURI(string indexed _baseURI);
constructor(string memory _baseURI) ERC1155(_baseURI) {
}
function mintBatch(
address _userAddress,
uint256[] memory ids,
uint256[] memory amounts
) external onlyOwner {
}
function setTheFuckUpV2ContractAddress(address fuckupv2ContractAddress)
external
onlyOwner
{
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri)
public
onlyOwner
{
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function airdropPills(
address[] memory _to,
uint256[] memory _tokenType,
uint256[] memory _amount
) external {
}
function burnPillForAddress(
uint256 tokenId,
uint256 _amount,
address burnTokenAddress
) external {
require(validPillTypes[tokenId], "invalid pill type");
require(theFuckUpPillsV2 != address(0), "the fuckupv2 address not set");
require(<FILL_ME>)
_burn(burnTokenAddress, tokenId, _amount);
}
function updateBaseUri(string memory _baseURI) external onlyOwner {
}
function setRevealed(bool _state) public onlyOwner {
}
function uri(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
}
| _msgSender()==theFuckUpPillsV2,"Invalid burner address" | 501,683 | _msgSender()==theFuckUpPillsV2 |
"URI requested for invalid pill type" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract TheFuckUpPill is ERC1155Supply, Ownable {
using Strings for uint256;
address public theFuckUpPillsV2;
string public baseURI;
uint256 public jointMaxSupply = 2999;
uint256 public extacyMaxSupply = 1591;
uint256 public lsdMaxSupply = 499;
uint256 public poisonMaxSupply = 101;
uint256 public megaDoseMaxSupply = 10;
bool public revealed;
string public hiddenMetadataUri;
string public uriSuffix = ".json";
mapping(uint256 => bool) public validPillTypes;
event SetBaseURI(string indexed _baseURI);
constructor(string memory _baseURI) ERC1155(_baseURI) {
}
function mintBatch(
address _userAddress,
uint256[] memory ids,
uint256[] memory amounts
) external onlyOwner {
}
function setTheFuckUpV2ContractAddress(address fuckupv2ContractAddress)
external
onlyOwner
{
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri)
public
onlyOwner
{
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function airdropPills(
address[] memory _to,
uint256[] memory _tokenType,
uint256[] memory _amount
) external {
}
function burnPillForAddress(
uint256 tokenId,
uint256 _amount,
address burnTokenAddress
) external {
}
function updateBaseUri(string memory _baseURI) external onlyOwner {
}
function setRevealed(bool _state) public onlyOwner {
}
function uri(uint256 _tokenId)
public
view
override
returns (string memory)
{
require(<FILL_ME>)
if (!revealed) {
return hiddenMetadataUri;
}
string memory currentBaseURI = baseURI;
return
bytes(currentBaseURI).length > 0
? string(
abi.encodePacked(
currentBaseURI,
_tokenId.toString(),
uriSuffix
)
)
: "";
}
}
| validPillTypes[_tokenId],"URI requested for invalid pill type" | 501,683 | validPillTypes[_tokenId] |
"INVALID_WHITELIST" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import './libraries/PoolAddress.sol';
contract L {
bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
bytes32 public immutable DOMAIN_SEPARATOR;
bool public transferable;
address public owner;
string public name = "L";
string public symbol = "L";
uint8 public constant decimals = 18;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping(address => uint256)) public allowance;
mapping (address => uint256) public nonces;
mapping (address => uint256) public antiSnipping;
mapping (address => bool) public whitelist;
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
event OwnershipTransferred(address indexed user, address indexed newOwner);
event AntiSnippingSet(address indexed pool, uint256 value);
modifier onlyOwner() {
}
constructor() {
}
function _mint(address to, uint256 amount) internal {
}
function burn(uint256 amount) external {
}
function approve(address spender, uint256 amount) external returns (bool) {
}
function transfer(address to, uint256 amount) external returns (bool) {
}
function transferFrom(address from, address to, uint256 amount) external returns (bool) {
}
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) view internal {
if (!transferable) {
require(<FILL_ME>)
}
if (antiSnipping[from] > 0) {
require(balanceOf[to] + amount <= antiSnipping[from], "BALANCE_LIMIT");
}
}
function transferOwnership(address newOwner) external onlyOwner {
}
function setWhitelist(address account) external onlyOwner {
}
function setTransferable() external onlyOwner {
}
function setAntiSnipping(address factory, address tokenA, address tokenB, uint24 fee, uint256 value) external onlyOwner returns (address pool) {
}
}
| whitelist[from]||whitelist[to],"INVALID_WHITELIST" | 501,694 | whitelist[from]||whitelist[to] |
"BALANCE_LIMIT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import './libraries/PoolAddress.sol';
contract L {
bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
bytes32 public immutable DOMAIN_SEPARATOR;
bool public transferable;
address public owner;
string public name = "L";
string public symbol = "L";
uint8 public constant decimals = 18;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping(address => uint256)) public allowance;
mapping (address => uint256) public nonces;
mapping (address => uint256) public antiSnipping;
mapping (address => bool) public whitelist;
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
event OwnershipTransferred(address indexed user, address indexed newOwner);
event AntiSnippingSet(address indexed pool, uint256 value);
modifier onlyOwner() {
}
constructor() {
}
function _mint(address to, uint256 amount) internal {
}
function burn(uint256 amount) external {
}
function approve(address spender, uint256 amount) external returns (bool) {
}
function transfer(address to, uint256 amount) external returns (bool) {
}
function transferFrom(address from, address to, uint256 amount) external returns (bool) {
}
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) view internal {
if (!transferable) {
require(whitelist[from] || whitelist[to], "INVALID_WHITELIST");
}
if (antiSnipping[from] > 0) {
require(<FILL_ME>)
}
}
function transferOwnership(address newOwner) external onlyOwner {
}
function setWhitelist(address account) external onlyOwner {
}
function setTransferable() external onlyOwner {
}
function setAntiSnipping(address factory, address tokenA, address tokenB, uint24 fee, uint256 value) external onlyOwner returns (address pool) {
}
}
| balanceOf[to]+amount<=antiSnipping[from],"BALANCE_LIMIT" | 501,694 | balanceOf[to]+amount<=antiSnipping[from] |
"!NOT_MINTER!" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "./ERC721/ERC721WithRoles.sol";
import "./ERC721/ERC721WithRoyalties.sol";
import "./ERC721/ERC721WithPermit.sol";
import "./ERC721/ERC721WithMutableURI.sol";
import "./ERC721/IERC4494.sol";
/// @title ERC721Full
/// @dev This contains all the different overrides needed on
/// ERC721 / URIStorage / Royalties
/// This contract does not use ERC721enumerable because Enumerable adds quite some
/// gas to minting costs and I am trying to make this cheap for creators.
/// Also, since all NiftyForge contracts will be fully indexed in TheGraph it will easily
/// Be possible to get tokenIds of an owner off-chain, before passing them to a contract
/// which can verify ownership at the processing time
/// @author Simon Fremaux (@dievardump)
abstract contract ERC721Full is
OwnableUpgradeable,
ERC721Upgradeable,
ERC721BurnableUpgradeable,
ERC721URIStorageUpgradeable,
ERC721WithRoles,
ERC721WithRoyalties,
ERC721WithPermit,
ERC721WithMutableURI
{
bytes32 public constant ROLE_EDITOR = keccak256("EDITOR");
bytes32 public constant ROLE_MINTER = keccak256("MINTER");
event NewContractURI(string contractURI);
// base token uri
string public baseURI;
string public contractURI;
/// @notice modifier allowing only safe listed addresses to mint
/// safeListed addresses have roles Minter, Editor or Owner
modifier onlyMinter(address minter) virtual {
require(<FILL_ME>)
_;
}
/// @notice only editor
modifier onlyEditor(address sender) virtual {
}
/// @notice constructor
/// @param name_ name of the contract (see ERC721)
/// @param symbol_ symbol of the contract (see ERC721)
/// @param contractURI_ The contract URI (containing its metadata) - can be empty ""
/// @param baseURI_ the contract baseURI (if there is) - can be empty ""
/// @param owner_ Address to whom transfer ownership (can be address(0), then owner is deployer)
function __ERC721Full_init(
string memory name_,
string memory symbol_,
string memory contractURI_,
string memory baseURI_,
address owner_
) internal {
}
// receive() external payable {}
/// @notice This is a generic function that allows this contract's owner to withdraw
/// any balance / ERC20 / ERC721 / ERC1155 it can have
/// this contract has no payable nor receive function so it should not get any nativ token
/// but this could save some ERC20, 721 or 1155
/// @param token the token to withdraw from. address(0) means native chain token
/// @param amount the amount to withdraw if native token, erc20 or erc1155 - must be 0 for ERC721
/// @param tokenId the tokenId to withdraw for ERC1155 and ERC721
function withdraw(
address token,
uint256 amount,
uint256 tokenId
) external onlyOwner {
}
/// @inheritdoc ERC165Upgradeable
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
}
/// @inheritdoc ERC721URIStorageUpgradeable
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
returns (string memory)
{
}
/// @notice Helper to know if an address can do the action an Editor can
/// @param account the address to check
function canEdit(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address can do the action a Minter can
/// @param account the address to check
function canMint(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address is editor
/// @param account the address to check
function isEditor(address account) public view returns (bool) {
}
/// @notice Helper to know if an address is minter
/// @param account the address to check
function isMinter(address account) public view returns (bool) {
}
/// @notice Allows to get approved using a permit and transfer in the same call
/// @dev this supposes that the permit is for msg.sender
/// @param from current owner
/// @param to recipient
/// @param tokenId the token id
/// @param _data optional data to add
/// @param deadline the deadline for the permit to be used
/// @param signature of permit
function safeTransferFromWithPermit(
address from,
address to,
uint256 tokenId,
bytes memory _data,
uint256 deadline,
bytes memory signature
) external {
}
/// @notice Set the base token URI
/// @dev only an editor can do that (account or module)
/// @param baseURI_ the new base token uri used in tokenURI()
function setBaseURI(string memory baseURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the base mutable meta URI for tokens
/// @param baseMutableURI_ the new base for mutable meta uri used in mutableURI()
function setBaseMutableURI(string memory baseMutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the mutable URI for a token
/// @dev Mutable URI work like tokenURI
/// -> if there is a baseMutableURI and a mutableURI, concat baseMutableURI + mutableURI
/// -> else if there is only mutableURI, return mutableURI
//. -> else if there is only baseMutableURI, concat baseMutableURI + tokenId
/// @dev only an editor (account or module) can call this
/// @param tokenId the token to set the mutable URI for
/// @param mutableURI_ the mutable URI
function setMutableURI(uint256 tokenId, string memory mutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Helper for the owner to add new editors
/// @dev needs to be owner
/// @param users list of new editors
function addEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for the owner to remove editors
/// @dev needs to be owner
/// @param users list of removed editors
function removeEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for an editor to add new minter
/// @dev needs to be owner
/// @param users list of new minters
function addMinters(address[] memory users) public onlyEditor(msg.sender) {
}
/// @notice Helper for an editor to remove minters
/// @dev needs to be owner
/// @param users list of removed minters
function removeMinters(address[] memory users)
public
onlyEditor(msg.sender)
{
}
/// @notice Allows to change the default royalties recipient
/// @dev an editor can call this
/// @param recipient new default royalties recipient
function setDefaultRoyaltiesRecipient(address recipient)
external
onlyEditor(msg.sender)
{
}
/// @notice Allows a royalty recipient of a token to change their recipient address
/// @dev only the current token royalty recipient can change the address
/// @param tokenId the token to change the recipient for
/// @param recipient new default royalties recipient
function setTokenRoyaltiesRecipient(uint256 tokenId, address recipient)
external
{
}
/// @notice Helper for the owner of the contract to set the new contract URI
/// @dev needs to be owner
/// @param contractURI_ new contract URI
function setContractURI(string memory contractURI_)
external
onlyEditor(msg.sender)
{
}
/// @inheritdoc ERC721Upgradeable
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721Upgradeable, ERC721WithPermit) {
}
/// @inheritdoc ERC721Upgradeable
function _burn(uint256 tokenId)
internal
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
{
}
/// @inheritdoc ERC721Upgradeable
function _baseURI() internal view virtual override returns (string memory) {
}
}
| canMint(minter),"!NOT_MINTER!" | 501,710 | canMint(minter) |
"!NOT_EDITOR!" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "./ERC721/ERC721WithRoles.sol";
import "./ERC721/ERC721WithRoyalties.sol";
import "./ERC721/ERC721WithPermit.sol";
import "./ERC721/ERC721WithMutableURI.sol";
import "./ERC721/IERC4494.sol";
/// @title ERC721Full
/// @dev This contains all the different overrides needed on
/// ERC721 / URIStorage / Royalties
/// This contract does not use ERC721enumerable because Enumerable adds quite some
/// gas to minting costs and I am trying to make this cheap for creators.
/// Also, since all NiftyForge contracts will be fully indexed in TheGraph it will easily
/// Be possible to get tokenIds of an owner off-chain, before passing them to a contract
/// which can verify ownership at the processing time
/// @author Simon Fremaux (@dievardump)
abstract contract ERC721Full is
OwnableUpgradeable,
ERC721Upgradeable,
ERC721BurnableUpgradeable,
ERC721URIStorageUpgradeable,
ERC721WithRoles,
ERC721WithRoyalties,
ERC721WithPermit,
ERC721WithMutableURI
{
bytes32 public constant ROLE_EDITOR = keccak256("EDITOR");
bytes32 public constant ROLE_MINTER = keccak256("MINTER");
event NewContractURI(string contractURI);
// base token uri
string public baseURI;
string public contractURI;
/// @notice modifier allowing only safe listed addresses to mint
/// safeListed addresses have roles Minter, Editor or Owner
modifier onlyMinter(address minter) virtual {
}
/// @notice only editor
modifier onlyEditor(address sender) virtual {
require(<FILL_ME>)
_;
}
/// @notice constructor
/// @param name_ name of the contract (see ERC721)
/// @param symbol_ symbol of the contract (see ERC721)
/// @param contractURI_ The contract URI (containing its metadata) - can be empty ""
/// @param baseURI_ the contract baseURI (if there is) - can be empty ""
/// @param owner_ Address to whom transfer ownership (can be address(0), then owner is deployer)
function __ERC721Full_init(
string memory name_,
string memory symbol_,
string memory contractURI_,
string memory baseURI_,
address owner_
) internal {
}
// receive() external payable {}
/// @notice This is a generic function that allows this contract's owner to withdraw
/// any balance / ERC20 / ERC721 / ERC1155 it can have
/// this contract has no payable nor receive function so it should not get any nativ token
/// but this could save some ERC20, 721 or 1155
/// @param token the token to withdraw from. address(0) means native chain token
/// @param amount the amount to withdraw if native token, erc20 or erc1155 - must be 0 for ERC721
/// @param tokenId the tokenId to withdraw for ERC1155 and ERC721
function withdraw(
address token,
uint256 amount,
uint256 tokenId
) external onlyOwner {
}
/// @inheritdoc ERC165Upgradeable
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
}
/// @inheritdoc ERC721URIStorageUpgradeable
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
returns (string memory)
{
}
/// @notice Helper to know if an address can do the action an Editor can
/// @param account the address to check
function canEdit(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address can do the action a Minter can
/// @param account the address to check
function canMint(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address is editor
/// @param account the address to check
function isEditor(address account) public view returns (bool) {
}
/// @notice Helper to know if an address is minter
/// @param account the address to check
function isMinter(address account) public view returns (bool) {
}
/// @notice Allows to get approved using a permit and transfer in the same call
/// @dev this supposes that the permit is for msg.sender
/// @param from current owner
/// @param to recipient
/// @param tokenId the token id
/// @param _data optional data to add
/// @param deadline the deadline for the permit to be used
/// @param signature of permit
function safeTransferFromWithPermit(
address from,
address to,
uint256 tokenId,
bytes memory _data,
uint256 deadline,
bytes memory signature
) external {
}
/// @notice Set the base token URI
/// @dev only an editor can do that (account or module)
/// @param baseURI_ the new base token uri used in tokenURI()
function setBaseURI(string memory baseURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the base mutable meta URI for tokens
/// @param baseMutableURI_ the new base for mutable meta uri used in mutableURI()
function setBaseMutableURI(string memory baseMutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the mutable URI for a token
/// @dev Mutable URI work like tokenURI
/// -> if there is a baseMutableURI and a mutableURI, concat baseMutableURI + mutableURI
/// -> else if there is only mutableURI, return mutableURI
//. -> else if there is only baseMutableURI, concat baseMutableURI + tokenId
/// @dev only an editor (account or module) can call this
/// @param tokenId the token to set the mutable URI for
/// @param mutableURI_ the mutable URI
function setMutableURI(uint256 tokenId, string memory mutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Helper for the owner to add new editors
/// @dev needs to be owner
/// @param users list of new editors
function addEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for the owner to remove editors
/// @dev needs to be owner
/// @param users list of removed editors
function removeEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for an editor to add new minter
/// @dev needs to be owner
/// @param users list of new minters
function addMinters(address[] memory users) public onlyEditor(msg.sender) {
}
/// @notice Helper for an editor to remove minters
/// @dev needs to be owner
/// @param users list of removed minters
function removeMinters(address[] memory users)
public
onlyEditor(msg.sender)
{
}
/// @notice Allows to change the default royalties recipient
/// @dev an editor can call this
/// @param recipient new default royalties recipient
function setDefaultRoyaltiesRecipient(address recipient)
external
onlyEditor(msg.sender)
{
}
/// @notice Allows a royalty recipient of a token to change their recipient address
/// @dev only the current token royalty recipient can change the address
/// @param tokenId the token to change the recipient for
/// @param recipient new default royalties recipient
function setTokenRoyaltiesRecipient(uint256 tokenId, address recipient)
external
{
}
/// @notice Helper for the owner of the contract to set the new contract URI
/// @dev needs to be owner
/// @param contractURI_ new contract URI
function setContractURI(string memory contractURI_)
external
onlyEditor(msg.sender)
{
}
/// @inheritdoc ERC721Upgradeable
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721Upgradeable, ERC721WithPermit) {
}
/// @inheritdoc ERC721Upgradeable
function _burn(uint256 tokenId)
internal
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
{
}
/// @inheritdoc ERC721Upgradeable
function _baseURI() internal view virtual override returns (string memory) {
}
}
| canEdit(sender),"!NOT_EDITOR!" | 501,710 | canEdit(sender) |
"!TRANSFER_FAILED!" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "./ERC721/ERC721WithRoles.sol";
import "./ERC721/ERC721WithRoyalties.sol";
import "./ERC721/ERC721WithPermit.sol";
import "./ERC721/ERC721WithMutableURI.sol";
import "./ERC721/IERC4494.sol";
/// @title ERC721Full
/// @dev This contains all the different overrides needed on
/// ERC721 / URIStorage / Royalties
/// This contract does not use ERC721enumerable because Enumerable adds quite some
/// gas to minting costs and I am trying to make this cheap for creators.
/// Also, since all NiftyForge contracts will be fully indexed in TheGraph it will easily
/// Be possible to get tokenIds of an owner off-chain, before passing them to a contract
/// which can verify ownership at the processing time
/// @author Simon Fremaux (@dievardump)
abstract contract ERC721Full is
OwnableUpgradeable,
ERC721Upgradeable,
ERC721BurnableUpgradeable,
ERC721URIStorageUpgradeable,
ERC721WithRoles,
ERC721WithRoyalties,
ERC721WithPermit,
ERC721WithMutableURI
{
bytes32 public constant ROLE_EDITOR = keccak256("EDITOR");
bytes32 public constant ROLE_MINTER = keccak256("MINTER");
event NewContractURI(string contractURI);
// base token uri
string public baseURI;
string public contractURI;
/// @notice modifier allowing only safe listed addresses to mint
/// safeListed addresses have roles Minter, Editor or Owner
modifier onlyMinter(address minter) virtual {
}
/// @notice only editor
modifier onlyEditor(address sender) virtual {
}
/// @notice constructor
/// @param name_ name of the contract (see ERC721)
/// @param symbol_ symbol of the contract (see ERC721)
/// @param contractURI_ The contract URI (containing its metadata) - can be empty ""
/// @param baseURI_ the contract baseURI (if there is) - can be empty ""
/// @param owner_ Address to whom transfer ownership (can be address(0), then owner is deployer)
function __ERC721Full_init(
string memory name_,
string memory symbol_,
string memory contractURI_,
string memory baseURI_,
address owner_
) internal {
}
// receive() external payable {}
/// @notice This is a generic function that allows this contract's owner to withdraw
/// any balance / ERC20 / ERC721 / ERC1155 it can have
/// this contract has no payable nor receive function so it should not get any nativ token
/// but this could save some ERC20, 721 or 1155
/// @param token the token to withdraw from. address(0) means native chain token
/// @param amount the amount to withdraw if native token, erc20 or erc1155 - must be 0 for ERC721
/// @param tokenId the tokenId to withdraw for ERC1155 and ERC721
function withdraw(
address token,
uint256 amount,
uint256 tokenId
) external onlyOwner {
if (token == address(0)) {
require(
amount == 0 || address(this).balance >= amount,
"!WRONG_VALUE!"
);
(bool success, ) = msg.sender.call{value: amount}("");
require(success, "!TRANSFER_FAILED!");
} else {
// if token is ERC1155
if (
IERC165Upgradeable(token).supportsInterface(
type(IERC1155Upgradeable).interfaceId
)
) {
IERC1155Upgradeable(token).safeTransferFrom(
address(this),
msg.sender,
tokenId,
amount,
""
);
} else if (
IERC165Upgradeable(token).supportsInterface(
type(IERC721Upgradeable).interfaceId
)
) {
//else if ERC721
IERC721Upgradeable(token).safeTransferFrom(
address(this),
msg.sender,
tokenId,
""
);
} else {
// we consider it's an ERC20
require(<FILL_ME>)
}
}
}
/// @inheritdoc ERC165Upgradeable
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
}
/// @inheritdoc ERC721URIStorageUpgradeable
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
returns (string memory)
{
}
/// @notice Helper to know if an address can do the action an Editor can
/// @param account the address to check
function canEdit(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address can do the action a Minter can
/// @param account the address to check
function canMint(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address is editor
/// @param account the address to check
function isEditor(address account) public view returns (bool) {
}
/// @notice Helper to know if an address is minter
/// @param account the address to check
function isMinter(address account) public view returns (bool) {
}
/// @notice Allows to get approved using a permit and transfer in the same call
/// @dev this supposes that the permit is for msg.sender
/// @param from current owner
/// @param to recipient
/// @param tokenId the token id
/// @param _data optional data to add
/// @param deadline the deadline for the permit to be used
/// @param signature of permit
function safeTransferFromWithPermit(
address from,
address to,
uint256 tokenId,
bytes memory _data,
uint256 deadline,
bytes memory signature
) external {
}
/// @notice Set the base token URI
/// @dev only an editor can do that (account or module)
/// @param baseURI_ the new base token uri used in tokenURI()
function setBaseURI(string memory baseURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the base mutable meta URI for tokens
/// @param baseMutableURI_ the new base for mutable meta uri used in mutableURI()
function setBaseMutableURI(string memory baseMutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the mutable URI for a token
/// @dev Mutable URI work like tokenURI
/// -> if there is a baseMutableURI and a mutableURI, concat baseMutableURI + mutableURI
/// -> else if there is only mutableURI, return mutableURI
//. -> else if there is only baseMutableURI, concat baseMutableURI + tokenId
/// @dev only an editor (account or module) can call this
/// @param tokenId the token to set the mutable URI for
/// @param mutableURI_ the mutable URI
function setMutableURI(uint256 tokenId, string memory mutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Helper for the owner to add new editors
/// @dev needs to be owner
/// @param users list of new editors
function addEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for the owner to remove editors
/// @dev needs to be owner
/// @param users list of removed editors
function removeEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for an editor to add new minter
/// @dev needs to be owner
/// @param users list of new minters
function addMinters(address[] memory users) public onlyEditor(msg.sender) {
}
/// @notice Helper for an editor to remove minters
/// @dev needs to be owner
/// @param users list of removed minters
function removeMinters(address[] memory users)
public
onlyEditor(msg.sender)
{
}
/// @notice Allows to change the default royalties recipient
/// @dev an editor can call this
/// @param recipient new default royalties recipient
function setDefaultRoyaltiesRecipient(address recipient)
external
onlyEditor(msg.sender)
{
}
/// @notice Allows a royalty recipient of a token to change their recipient address
/// @dev only the current token royalty recipient can change the address
/// @param tokenId the token to change the recipient for
/// @param recipient new default royalties recipient
function setTokenRoyaltiesRecipient(uint256 tokenId, address recipient)
external
{
}
/// @notice Helper for the owner of the contract to set the new contract URI
/// @dev needs to be owner
/// @param contractURI_ new contract URI
function setContractURI(string memory contractURI_)
external
onlyEditor(msg.sender)
{
}
/// @inheritdoc ERC721Upgradeable
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721Upgradeable, ERC721WithPermit) {
}
/// @inheritdoc ERC721Upgradeable
function _burn(uint256 tokenId)
internal
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
{
}
/// @inheritdoc ERC721Upgradeable
function _baseURI() internal view virtual override returns (string memory) {
}
}
| IERC20Upgradeable(token).transfer(msg.sender,amount),"!TRANSFER_FAILED!" | 501,710 | IERC20Upgradeable(token).transfer(msg.sender,amount) |
"!PER_TOKEN_ROYALTIES!" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "./ERC721/ERC721WithRoles.sol";
import "./ERC721/ERC721WithRoyalties.sol";
import "./ERC721/ERC721WithPermit.sol";
import "./ERC721/ERC721WithMutableURI.sol";
import "./ERC721/IERC4494.sol";
/// @title ERC721Full
/// @dev This contains all the different overrides needed on
/// ERC721 / URIStorage / Royalties
/// This contract does not use ERC721enumerable because Enumerable adds quite some
/// gas to minting costs and I am trying to make this cheap for creators.
/// Also, since all NiftyForge contracts will be fully indexed in TheGraph it will easily
/// Be possible to get tokenIds of an owner off-chain, before passing them to a contract
/// which can verify ownership at the processing time
/// @author Simon Fremaux (@dievardump)
abstract contract ERC721Full is
OwnableUpgradeable,
ERC721Upgradeable,
ERC721BurnableUpgradeable,
ERC721URIStorageUpgradeable,
ERC721WithRoles,
ERC721WithRoyalties,
ERC721WithPermit,
ERC721WithMutableURI
{
bytes32 public constant ROLE_EDITOR = keccak256("EDITOR");
bytes32 public constant ROLE_MINTER = keccak256("MINTER");
event NewContractURI(string contractURI);
// base token uri
string public baseURI;
string public contractURI;
/// @notice modifier allowing only safe listed addresses to mint
/// safeListed addresses have roles Minter, Editor or Owner
modifier onlyMinter(address minter) virtual {
}
/// @notice only editor
modifier onlyEditor(address sender) virtual {
}
/// @notice constructor
/// @param name_ name of the contract (see ERC721)
/// @param symbol_ symbol of the contract (see ERC721)
/// @param contractURI_ The contract URI (containing its metadata) - can be empty ""
/// @param baseURI_ the contract baseURI (if there is) - can be empty ""
/// @param owner_ Address to whom transfer ownership (can be address(0), then owner is deployer)
function __ERC721Full_init(
string memory name_,
string memory symbol_,
string memory contractURI_,
string memory baseURI_,
address owner_
) internal {
}
// receive() external payable {}
/// @notice This is a generic function that allows this contract's owner to withdraw
/// any balance / ERC20 / ERC721 / ERC1155 it can have
/// this contract has no payable nor receive function so it should not get any nativ token
/// but this could save some ERC20, 721 or 1155
/// @param token the token to withdraw from. address(0) means native chain token
/// @param amount the amount to withdraw if native token, erc20 or erc1155 - must be 0 for ERC721
/// @param tokenId the tokenId to withdraw for ERC1155 and ERC721
function withdraw(
address token,
uint256 amount,
uint256 tokenId
) external onlyOwner {
}
/// @inheritdoc ERC165Upgradeable
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
}
/// @inheritdoc ERC721URIStorageUpgradeable
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
returns (string memory)
{
}
/// @notice Helper to know if an address can do the action an Editor can
/// @param account the address to check
function canEdit(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address can do the action a Minter can
/// @param account the address to check
function canMint(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address is editor
/// @param account the address to check
function isEditor(address account) public view returns (bool) {
}
/// @notice Helper to know if an address is minter
/// @param account the address to check
function isMinter(address account) public view returns (bool) {
}
/// @notice Allows to get approved using a permit and transfer in the same call
/// @dev this supposes that the permit is for msg.sender
/// @param from current owner
/// @param to recipient
/// @param tokenId the token id
/// @param _data optional data to add
/// @param deadline the deadline for the permit to be used
/// @param signature of permit
function safeTransferFromWithPermit(
address from,
address to,
uint256 tokenId,
bytes memory _data,
uint256 deadline,
bytes memory signature
) external {
}
/// @notice Set the base token URI
/// @dev only an editor can do that (account or module)
/// @param baseURI_ the new base token uri used in tokenURI()
function setBaseURI(string memory baseURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the base mutable meta URI for tokens
/// @param baseMutableURI_ the new base for mutable meta uri used in mutableURI()
function setBaseMutableURI(string memory baseMutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the mutable URI for a token
/// @dev Mutable URI work like tokenURI
/// -> if there is a baseMutableURI and a mutableURI, concat baseMutableURI + mutableURI
/// -> else if there is only mutableURI, return mutableURI
//. -> else if there is only baseMutableURI, concat baseMutableURI + tokenId
/// @dev only an editor (account or module) can call this
/// @param tokenId the token to set the mutable URI for
/// @param mutableURI_ the mutable URI
function setMutableURI(uint256 tokenId, string memory mutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Helper for the owner to add new editors
/// @dev needs to be owner
/// @param users list of new editors
function addEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for the owner to remove editors
/// @dev needs to be owner
/// @param users list of removed editors
function removeEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for an editor to add new minter
/// @dev needs to be owner
/// @param users list of new minters
function addMinters(address[] memory users) public onlyEditor(msg.sender) {
}
/// @notice Helper for an editor to remove minters
/// @dev needs to be owner
/// @param users list of removed minters
function removeMinters(address[] memory users)
public
onlyEditor(msg.sender)
{
}
/// @notice Allows to change the default royalties recipient
/// @dev an editor can call this
/// @param recipient new default royalties recipient
function setDefaultRoyaltiesRecipient(address recipient)
external
onlyEditor(msg.sender)
{
require(<FILL_ME>)
_setDefaultRoyaltiesRecipient(recipient);
}
/// @notice Allows a royalty recipient of a token to change their recipient address
/// @dev only the current token royalty recipient can change the address
/// @param tokenId the token to change the recipient for
/// @param recipient new default royalties recipient
function setTokenRoyaltiesRecipient(uint256 tokenId, address recipient)
external
{
}
/// @notice Helper for the owner of the contract to set the new contract URI
/// @dev needs to be owner
/// @param contractURI_ new contract URI
function setContractURI(string memory contractURI_)
external
onlyEditor(msg.sender)
{
}
/// @inheritdoc ERC721Upgradeable
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721Upgradeable, ERC721WithPermit) {
}
/// @inheritdoc ERC721Upgradeable
function _burn(uint256 tokenId)
internal
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
{
}
/// @inheritdoc ERC721Upgradeable
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !hasPerTokenRoyalties(),"!PER_TOKEN_ROYALTIES!" | 501,710 | !hasPerTokenRoyalties() |
"!CONTRACT_WIDE_ROYALTIES!" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "./ERC721/ERC721WithRoles.sol";
import "./ERC721/ERC721WithRoyalties.sol";
import "./ERC721/ERC721WithPermit.sol";
import "./ERC721/ERC721WithMutableURI.sol";
import "./ERC721/IERC4494.sol";
/// @title ERC721Full
/// @dev This contains all the different overrides needed on
/// ERC721 / URIStorage / Royalties
/// This contract does not use ERC721enumerable because Enumerable adds quite some
/// gas to minting costs and I am trying to make this cheap for creators.
/// Also, since all NiftyForge contracts will be fully indexed in TheGraph it will easily
/// Be possible to get tokenIds of an owner off-chain, before passing them to a contract
/// which can verify ownership at the processing time
/// @author Simon Fremaux (@dievardump)
abstract contract ERC721Full is
OwnableUpgradeable,
ERC721Upgradeable,
ERC721BurnableUpgradeable,
ERC721URIStorageUpgradeable,
ERC721WithRoles,
ERC721WithRoyalties,
ERC721WithPermit,
ERC721WithMutableURI
{
bytes32 public constant ROLE_EDITOR = keccak256("EDITOR");
bytes32 public constant ROLE_MINTER = keccak256("MINTER");
event NewContractURI(string contractURI);
// base token uri
string public baseURI;
string public contractURI;
/// @notice modifier allowing only safe listed addresses to mint
/// safeListed addresses have roles Minter, Editor or Owner
modifier onlyMinter(address minter) virtual {
}
/// @notice only editor
modifier onlyEditor(address sender) virtual {
}
/// @notice constructor
/// @param name_ name of the contract (see ERC721)
/// @param symbol_ symbol of the contract (see ERC721)
/// @param contractURI_ The contract URI (containing its metadata) - can be empty ""
/// @param baseURI_ the contract baseURI (if there is) - can be empty ""
/// @param owner_ Address to whom transfer ownership (can be address(0), then owner is deployer)
function __ERC721Full_init(
string memory name_,
string memory symbol_,
string memory contractURI_,
string memory baseURI_,
address owner_
) internal {
}
// receive() external payable {}
/// @notice This is a generic function that allows this contract's owner to withdraw
/// any balance / ERC20 / ERC721 / ERC1155 it can have
/// this contract has no payable nor receive function so it should not get any nativ token
/// but this could save some ERC20, 721 or 1155
/// @param token the token to withdraw from. address(0) means native chain token
/// @param amount the amount to withdraw if native token, erc20 or erc1155 - must be 0 for ERC721
/// @param tokenId the tokenId to withdraw for ERC1155 and ERC721
function withdraw(
address token,
uint256 amount,
uint256 tokenId
) external onlyOwner {
}
/// @inheritdoc ERC165Upgradeable
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
}
/// @inheritdoc ERC721URIStorageUpgradeable
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
returns (string memory)
{
}
/// @notice Helper to know if an address can do the action an Editor can
/// @param account the address to check
function canEdit(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address can do the action a Minter can
/// @param account the address to check
function canMint(address account) public view virtual returns (bool) {
}
/// @notice Helper to know if an address is editor
/// @param account the address to check
function isEditor(address account) public view returns (bool) {
}
/// @notice Helper to know if an address is minter
/// @param account the address to check
function isMinter(address account) public view returns (bool) {
}
/// @notice Allows to get approved using a permit and transfer in the same call
/// @dev this supposes that the permit is for msg.sender
/// @param from current owner
/// @param to recipient
/// @param tokenId the token id
/// @param _data optional data to add
/// @param deadline the deadline for the permit to be used
/// @param signature of permit
function safeTransferFromWithPermit(
address from,
address to,
uint256 tokenId,
bytes memory _data,
uint256 deadline,
bytes memory signature
) external {
}
/// @notice Set the base token URI
/// @dev only an editor can do that (account or module)
/// @param baseURI_ the new base token uri used in tokenURI()
function setBaseURI(string memory baseURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the base mutable meta URI for tokens
/// @param baseMutableURI_ the new base for mutable meta uri used in mutableURI()
function setBaseMutableURI(string memory baseMutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Set the mutable URI for a token
/// @dev Mutable URI work like tokenURI
/// -> if there is a baseMutableURI and a mutableURI, concat baseMutableURI + mutableURI
/// -> else if there is only mutableURI, return mutableURI
//. -> else if there is only baseMutableURI, concat baseMutableURI + tokenId
/// @dev only an editor (account or module) can call this
/// @param tokenId the token to set the mutable URI for
/// @param mutableURI_ the mutable URI
function setMutableURI(uint256 tokenId, string memory mutableURI_)
external
onlyEditor(msg.sender)
{
}
/// @notice Helper for the owner to add new editors
/// @dev needs to be owner
/// @param users list of new editors
function addEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for the owner to remove editors
/// @dev needs to be owner
/// @param users list of removed editors
function removeEditors(address[] memory users) public onlyOwner {
}
/// @notice Helper for an editor to add new minter
/// @dev needs to be owner
/// @param users list of new minters
function addMinters(address[] memory users) public onlyEditor(msg.sender) {
}
/// @notice Helper for an editor to remove minters
/// @dev needs to be owner
/// @param users list of removed minters
function removeMinters(address[] memory users)
public
onlyEditor(msg.sender)
{
}
/// @notice Allows to change the default royalties recipient
/// @dev an editor can call this
/// @param recipient new default royalties recipient
function setDefaultRoyaltiesRecipient(address recipient)
external
onlyEditor(msg.sender)
{
}
/// @notice Allows a royalty recipient of a token to change their recipient address
/// @dev only the current token royalty recipient can change the address
/// @param tokenId the token to change the recipient for
/// @param recipient new default royalties recipient
function setTokenRoyaltiesRecipient(uint256 tokenId, address recipient)
external
{
require(<FILL_ME>)
(address currentRecipient, ) = _getTokenRoyalty(tokenId);
require(msg.sender == currentRecipient, "!NOT_ALLOWED!");
_setTokenRoyaltiesRecipient(tokenId, recipient);
}
/// @notice Helper for the owner of the contract to set the new contract URI
/// @dev needs to be owner
/// @param contractURI_ new contract URI
function setContractURI(string memory contractURI_)
external
onlyEditor(msg.sender)
{
}
/// @inheritdoc ERC721Upgradeable
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721Upgradeable, ERC721WithPermit) {
}
/// @inheritdoc ERC721Upgradeable
function _burn(uint256 tokenId)
internal
virtual
override(ERC721Upgradeable, ERC721URIStorageUpgradeable)
{
}
/// @inheritdoc ERC721Upgradeable
function _baseURI() internal view virtual override returns (string memory) {
}
}
| hasPerTokenRoyalties(),"!CONTRACT_WIDE_ROYALTIES!" | 501,710 | hasPerTokenRoyalties() |
"Vault : invalid params" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
struct Lock {
address token;
uint256 amount;
uint128 withdrawalStart;
uint64 withdrawPeriodDuration;
uint64 withdrawPeriodNumber;
uint256 withdrewAmount;
}
struct UserLock {
address user;
Lock lock;
}
interface IERC20Burnable {
function burn(uint256 amount) external;
}
contract DolzVault {
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
EnumerableSet.AddressSet private users;
mapping(address => Lock[]) private userToLocks;
event Locked(
address token,
uint256 amount,
uint256 cliffEnd,
uint256 vestingPeriodDuration,
uint256 vestingPeriodNumber,
uint256 id
);
event Claimed(address user, address token, uint256 amount);
event Burnt(address user, address token, uint256 amount);
event BurntToDead(address user, address token, uint256 amount);
event Transfered(address user, address token, uint256 amount, address to);
/**
* @notice Lock the user's token in the vault
* @dev The tokens must have been approved first
* @param token Address of the token being locked
* @param amount Amount to be locked in the vault
* @param cliffInDays Cliff duration before tokens can be unlocked
* @param vestingPeriodInDays Vesting period duration
* @param vestingPeriodNumber Number of periods required to unlock 100%
*/
function lock(
address token,
uint256 amount,
uint256 cliffInDays,
uint256 vestingPeriodInDays,
uint256 vestingPeriodNumber
) external {
// Avoids dead lock
require(<FILL_ME>)
// Add the user to the enumerable set
users.add(msg.sender);
createLock(
token,
amount,
uint128(block.timestamp + cliffInDays * 24 * 3600),
uint64(vestingPeriodInDays * 24 * 3600),
uint64(vestingPeriodNumber),
msg.sender
);
// Actually transfer the locked funds
IERC20(token).safeTransferFrom(msg.sender, address(this), amount);
}
function createLock(
address token,
uint256 amount,
uint128 withdrawalStart,
uint64 withdrawPeriodDuration,
uint64 withdrawPeriodNumber,
address user
) private {
}
/**
* @notice Returns the number of token that can be claimed back
* @param _user Address of the user
* @param lockId The index of the lock for this user
* @dev lockId starts at 0
* @return balance The amount that can be unlocked
*/
function claimable(address _user, uint256 lockId)
public
view
returns (uint256 balance)
{
}
/**
* @notice Allow to unlock some tokens
* @param lockId The index of the lock for this user
* @dev lockId starts at 0
* @param _amount Amount to be unlocked from the vault
*/
function claim(uint256 lockId, uint256 _amount) external {
}
/**
* @notice Transfer from one lock to another owner
* @param to Address of the user that will receive le lock (bob)
* @param lockId The index of the lock to take the tokens from
* @param amount The amount withdrawn from alice to bob
* @dev lockId starts at 0
*/
function transfer(
address to,
uint256 lockId,
uint256 amount
) external {
}
/**
* @notice Burn token by using the token's burn method
* @param lockId The index of the lock to burn the tokens from
* @param amount The amount to burn
* @dev lockId starts at 0
*/
function burn(uint256 lockId, uint256 amount) external {
}
/**
* @notice Burn token by sending them to the dead address
* @param lockId The index of the lock to burn the tokens from
* @param amount The amount to burn
* @dev lockId starts at 0
*/
function burnToDead(uint256 lockId, uint256 amount) external {
}
/**
* @notice Returns the list of all users who locked at least once
* @return The list of all users who locked at least once
*/
function listAllUsers() external view returns (address[] memory) {
}
/**
* @notice Returns the list of all locks
* @return The list of all locks
*/
function listAllLocks() external view returns (UserLock[] memory) {
}
/**
* @notice Returns the list of all locks for a specific user
* @param _user Address of the user
* @return The list of locks
*/
function listLocks(address _user) public view returns (Lock[] memory) {
}
/**
* @notice Returns the list of all locks for the caller
* @return The list of locks
*/
function listMyLocks() external view returns (Lock[] memory) {
}
}
| (vestingPeriodInDays>0&&vestingPeriodNumber>0)||vestingPeriodInDays==0,"Vault : invalid params" | 502,066 | (vestingPeriodInDays>0&&vestingPeriodNumber>0)||vestingPeriodInDays==0 |
"Sale has already ended" | pragma solidity ^0.8.0;
contract TosaInu is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string private _baseURIextended = "";
uint8 public mintStatus = 0; // 0: Wait, 1: Whitelist Sale, 2: Public Sale, 3: Sale Ended
uint8 public mintLimit = 2;
uint256 public constant MAX_NFT_SUPPLY = 5000;
bytes32 public preSaleMerkleRoot;
constructor() ERC721A("Tosa Inu", "$TosaInu") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function mintNFT(bytes32[] calldata _proof, uint256 _quantity) public {
require(mintStatus == 1 || mintStatus == 2, "Mint is not started yet");
require(_quantity > 0 && balanceOf(msg.sender) + _quantity <= mintLimit, "Input quantity correctly");
require(<FILL_ME>)
if(mintStatus == 1)
require(MerkleProof.verify(_proof, preSaleMerkleRoot, keccak256(abi.encodePacked(msg.sender))), "Address does not exist in whitelist.");
_safeMint(msg.sender, _quantity);
}
function mintNFTForOwner(uint8 _quantity) public onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner() {
}
function setStatus(uint8 _mintStatus) public onlyOwner {
}
function setMintLimit(uint8 _mintLimit) public onlyOwner {
}
}
| totalSupply()+_quantity<=MAX_NFT_SUPPLY,"Sale has already ended" | 502,081 | totalSupply()+_quantity<=MAX_NFT_SUPPLY |
"Address does not exist in whitelist." | pragma solidity ^0.8.0;
contract TosaInu is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string private _baseURIextended = "";
uint8 public mintStatus = 0; // 0: Wait, 1: Whitelist Sale, 2: Public Sale, 3: Sale Ended
uint8 public mintLimit = 2;
uint256 public constant MAX_NFT_SUPPLY = 5000;
bytes32 public preSaleMerkleRoot;
constructor() ERC721A("Tosa Inu", "$TosaInu") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function mintNFT(bytes32[] calldata _proof, uint256 _quantity) public {
require(mintStatus == 1 || mintStatus == 2, "Mint is not started yet");
require(_quantity > 0 && balanceOf(msg.sender) + _quantity <= mintLimit, "Input quantity correctly");
require(totalSupply() + _quantity <= MAX_NFT_SUPPLY, "Sale has already ended");
if(mintStatus == 1)
require(<FILL_ME>)
_safeMint(msg.sender, _quantity);
}
function mintNFTForOwner(uint8 _quantity) public onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner() {
}
function setStatus(uint8 _mintStatus) public onlyOwner {
}
function setMintLimit(uint8 _mintLimit) public onlyOwner {
}
}
| MerkleProof.verify(_proof,preSaleMerkleRoot,keccak256(abi.encodePacked(msg.sender))),"Address does not exist in whitelist." | 502,081 | MerkleProof.verify(_proof,preSaleMerkleRoot,keccak256(abi.encodePacked(msg.sender))) |
"Sale has already ended" | pragma solidity ^0.8.0;
contract TosaInu is Ownable, ERC721A, ReentrancyGuard {
using Strings for uint256;
string private _baseURIextended = "";
uint8 public mintStatus = 0; // 0: Wait, 1: Whitelist Sale, 2: Public Sale, 3: Sale Ended
uint8 public mintLimit = 2;
uint256 public constant MAX_NFT_SUPPLY = 5000;
bytes32 public preSaleMerkleRoot;
constructor() ERC721A("Tosa Inu", "$TosaInu") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function mintNFT(bytes32[] calldata _proof, uint256 _quantity) public {
}
function mintNFTForOwner(uint8 _quantity) public onlyOwner {
require(<FILL_ME>)
_safeMint(msg.sender, _quantity);
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner() {
}
function setStatus(uint8 _mintStatus) public onlyOwner {
}
function setMintLimit(uint8 _mintLimit) public onlyOwner {
}
}
| totalSupply()<=MAX_NFT_SUPPLY,"Sale has already ended" | 502,081 | totalSupply()<=MAX_NFT_SUPPLY |
"UNSTAKE_WINDOW_FINISHED" | // SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.5;
pragma experimental ABIEncoderV2;
import { ERC20 } from "@aave/aave-token/contracts/open-zeppelin/ERC20.sol";
import { IERC20 } from "@aave/aave-stake-v2/contracts/interfaces/IERC20.sol";
import { IStakedAave } from "@aave/aave-stake-v2/contracts/interfaces/IStakedAave.sol";
import { ITransferHook } from "@aave/aave-stake-v2/contracts/interfaces/ITransferHook.sol";
import { DistributionTypes } from "@aave/aave-stake-v2/contracts/lib/DistributionTypes.sol";
import { SafeMath } from "@aave/aave-stake-v2/contracts/lib/SafeMath.sol";
import { SafeERC20 } from "@aave/aave-stake-v2/contracts/lib/SafeERC20.sol";
import { VersionedInitializable } from "@aave/aave-stake-v2/contracts/utils/VersionedInitializable.sol";
import { AaveDistributionManager } from "@aave/aave-stake-v2/contracts/stake/AaveDistributionManager.sol";
import { GovernancePowerWithSnapshot } from "@aave/aave-stake-v2/contracts/lib/GovernancePowerWithSnapshot.sol";
/**
* @title StakedToken V3
* @notice Contract to stake Aave token, tokenize the position and get rewards, inheriting from a distribution manager contract
* @author Aave
**/
contract VirtualAAVEStakedToken is
IStakedAave,
GovernancePowerWithSnapshot,
VersionedInitializable,
AaveDistributionManager
{
using SafeMath for uint256;
using SafeERC20 for IERC20;
/// @dev Start of Storage layout from StakedToken v1
uint256 public constant REVISION = 1;
IERC20 public immutable STAKED_TOKEN;
IERC20 public immutable REWARD_TOKEN;
uint256 public immutable COOLDOWN_SECONDS;
/// @notice Seconds available to redeem once the cooldown period is fullfilled
uint256 public immutable UNSTAKE_WINDOW;
/// @notice Address to pull from the rewards, needs to have approved this contract
address public immutable REWARDS_VAULT;
mapping(address => uint256) public stakerRewardsToClaim;
mapping(address => uint256) public stakersCooldowns;
/// @dev End of Storage layout from StakedToken v1
/// @dev To see the voting mappings, go to GovernancePowerWithSnapshot.sol
mapping(address => address) internal _votingDelegates;
mapping(address => mapping(uint256 => Snapshot)) internal _propositionPowerSnapshots;
mapping(address => uint256) internal _propositionPowerSnapshotsCounts;
mapping(address => address) internal _propositionPowerDelegates;
bytes32 public DOMAIN_SEPARATOR;
bytes public constant EIP712_REVISION = bytes("1");
bytes32 internal constant EIP712_DOMAIN =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
bytes32 public constant PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
/// @dev owner => next valid nonce to submit with permit()
mapping(address => uint256) public _nonces;
event Staked(address indexed from, address indexed onBehalfOf, uint256 amount);
event Redeem(address indexed from, address indexed to, uint256 amount);
event RewardsAccrued(address user, uint256 amount);
event RewardsClaimed(address indexed from, address indexed to, uint256 amount);
event Cooldown(address indexed user);
constructor(
IERC20 stakedToken,
IERC20 rewardToken,
uint256 cooldownSeconds,
uint256 unstakeWindow,
address rewardsVault,
address emissionManager,
uint128 distributionDuration,
string memory name,
string memory symbol,
uint8 decimals,
address governance
) public ERC20(name, symbol) AaveDistributionManager(emissionManager, distributionDuration) {
}
/**
* @dev Called by the proxy contract
**/
function initialize(string calldata name, string calldata symbol, uint8 decimals) external initializer {
}
function stake(address onBehalfOf, uint256 amount) public virtual override {
}
/**
* @dev Redeems staked tokens, and stop earning rewards
* @param to Address to redeem to
* @param amount Amount to redeem
**/
function redeem(address to, uint256 amount) public virtual override {
require(amount != 0, "INVALID_ZERO_AMOUNT");
//solium-disable-next-line
uint256 cooldownStartTimestamp = stakersCooldowns[msg.sender];
require(block.timestamp > cooldownStartTimestamp.add(COOLDOWN_SECONDS), "INSUFFICIENT_COOLDOWN");
require(<FILL_ME>)
uint256 balanceOfMessageSender = balanceOf(msg.sender);
uint256 amountToRedeem = (amount > balanceOfMessageSender) ? balanceOfMessageSender : amount;
_updateCurrentUnclaimedRewards(msg.sender, balanceOfMessageSender, true);
_burn(msg.sender, amountToRedeem);
if (balanceOfMessageSender.sub(amountToRedeem) == 0) {
stakersCooldowns[msg.sender] = 0;
}
IERC20(STAKED_TOKEN).safeTransfer(to, amountToRedeem);
emit Redeem(msg.sender, to, amountToRedeem);
}
/**
* @dev Activates the cooldown period to unstake
* - It can't be called if the user is not staking
**/
function cooldown() public virtual override {
}
/**
* @dev Claims an `amount` of `REWARD_TOKEN` to the address `to`
* @param to Address to stake for
* @param amount Amount to stake
**/
function claimRewards(address to, uint256 amount) external virtual override {
}
/**
* @dev Internal ERC20 _transfer of the tokenized staked tokens
* @param from Address to transfer from
* @param to Address to transfer to
* @param amount Amount to transfer
**/
function _transfer(address from, address to, uint256 amount) internal virtual override {
}
/**
* @dev Updates the user state related with his accrued rewards
* @param user Address of the user
* @param userBalance The current balance of the user
* @param updateStorage Boolean flag used to update or not the stakerRewardsToClaim of the user
* @return The unclaimed rewards that were added to the total accrued
**/
function _updateCurrentUnclaimedRewards(
address user,
uint256 userBalance,
bool updateStorage
) internal returns (uint256) {
}
/**
* @dev Calculates the how is gonna be a new cooldown timestamp depending on the sender/receiver situation
* - If the timestamp of the sender is "better" or the timestamp of the recipient is 0, we take the one of the recipient
* - Weighted average of from/to cooldown timestamps if:
* # The sender doesn't have the cooldown activated (timestamp 0).
* # The sender timestamp is expired
* # The sender has a "worse" timestamp
* - If the receiver's cooldown timestamp expired (too old), the next is 0
* @param fromCooldownTimestamp Cooldown timestamp of the sender
* @param amountToReceive Amount
* @param toAddress Address of the recipient
* @param toBalance Current balance of the receiver
* @return The new cooldown timestamp
**/
function getNextCooldownTimestamp(
uint256 fromCooldownTimestamp,
uint256 amountToReceive,
address toAddress,
uint256 toBalance
) public view returns (uint256) {
}
/**
* @dev Return the total rewards pending to claim by an staker
* @param staker The staker address
* @return The rewards
*/
function getTotalRewardsBalance(address staker) external view returns (uint256) {
}
/**
* @dev returns the revision of the implementation contract
* @return The revision
*/
function getRevision() internal pure override returns (uint256) {
}
/**
* @dev implements the permit function as for https://github.com/ethereum/EIPs/blob/8a34d644aacf0f9f8f00815307fd7dd5da07655f/EIPS/eip-2612.md
* @param owner the owner of the funds
* @param spender the spender
* @param value the amount
* @param deadline the deadline timestamp, type(uint256).max for no deadline
* @param v signature param
* @param s signature param
* @param r signature param
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external {
}
/**
* @dev Writes a snapshot before any operation involving transfer of value: _transfer, _mint and _burn
* - On _transfer, it writes snapshots for both "from" and "to"
* - On _mint, only for _to
* - On _burn, only for _from
* @param from the from address
* @param to the to address
* @param amount the amount to transfer
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {
}
function _getDelegationDataByType(
DelegationType delegationType
)
internal
view
override
returns (
mapping(address => mapping(uint256 => Snapshot)) storage, //snapshots
mapping(address => uint256) storage, //snapshots count
mapping(address => address) storage //delegatees list
)
{
}
/**
* @dev Delegates power from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param delegationType the type of delegation (VOTING_POWER, PROPOSITION_POWER)
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/
function delegateByTypeBySig(
address delegatee,
DelegationType delegationType,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s
) public {
}
/**
* @dev Delegates power from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/
function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) public {
}
}
| block.timestamp.sub(cooldownStartTimestamp.add(COOLDOWN_SECONDS))<=UNSTAKE_WINDOW,"UNSTAKE_WINDOW_FINISHED" | 502,098 | block.timestamp.sub(cooldownStartTimestamp.add(COOLDOWN_SECONDS))<=UNSTAKE_WINDOW |
"INVALID_BALANCE_ON_COOLDOWN" | // SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.5;
pragma experimental ABIEncoderV2;
import { ERC20 } from "@aave/aave-token/contracts/open-zeppelin/ERC20.sol";
import { IERC20 } from "@aave/aave-stake-v2/contracts/interfaces/IERC20.sol";
import { IStakedAave } from "@aave/aave-stake-v2/contracts/interfaces/IStakedAave.sol";
import { ITransferHook } from "@aave/aave-stake-v2/contracts/interfaces/ITransferHook.sol";
import { DistributionTypes } from "@aave/aave-stake-v2/contracts/lib/DistributionTypes.sol";
import { SafeMath } from "@aave/aave-stake-v2/contracts/lib/SafeMath.sol";
import { SafeERC20 } from "@aave/aave-stake-v2/contracts/lib/SafeERC20.sol";
import { VersionedInitializable } from "@aave/aave-stake-v2/contracts/utils/VersionedInitializable.sol";
import { AaveDistributionManager } from "@aave/aave-stake-v2/contracts/stake/AaveDistributionManager.sol";
import { GovernancePowerWithSnapshot } from "@aave/aave-stake-v2/contracts/lib/GovernancePowerWithSnapshot.sol";
/**
* @title StakedToken V3
* @notice Contract to stake Aave token, tokenize the position and get rewards, inheriting from a distribution manager contract
* @author Aave
**/
contract VirtualAAVEStakedToken is
IStakedAave,
GovernancePowerWithSnapshot,
VersionedInitializable,
AaveDistributionManager
{
using SafeMath for uint256;
using SafeERC20 for IERC20;
/// @dev Start of Storage layout from StakedToken v1
uint256 public constant REVISION = 1;
IERC20 public immutable STAKED_TOKEN;
IERC20 public immutable REWARD_TOKEN;
uint256 public immutable COOLDOWN_SECONDS;
/// @notice Seconds available to redeem once the cooldown period is fullfilled
uint256 public immutable UNSTAKE_WINDOW;
/// @notice Address to pull from the rewards, needs to have approved this contract
address public immutable REWARDS_VAULT;
mapping(address => uint256) public stakerRewardsToClaim;
mapping(address => uint256) public stakersCooldowns;
/// @dev End of Storage layout from StakedToken v1
/// @dev To see the voting mappings, go to GovernancePowerWithSnapshot.sol
mapping(address => address) internal _votingDelegates;
mapping(address => mapping(uint256 => Snapshot)) internal _propositionPowerSnapshots;
mapping(address => uint256) internal _propositionPowerSnapshotsCounts;
mapping(address => address) internal _propositionPowerDelegates;
bytes32 public DOMAIN_SEPARATOR;
bytes public constant EIP712_REVISION = bytes("1");
bytes32 internal constant EIP712_DOMAIN =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
bytes32 public constant PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
/// @dev owner => next valid nonce to submit with permit()
mapping(address => uint256) public _nonces;
event Staked(address indexed from, address indexed onBehalfOf, uint256 amount);
event Redeem(address indexed from, address indexed to, uint256 amount);
event RewardsAccrued(address user, uint256 amount);
event RewardsClaimed(address indexed from, address indexed to, uint256 amount);
event Cooldown(address indexed user);
constructor(
IERC20 stakedToken,
IERC20 rewardToken,
uint256 cooldownSeconds,
uint256 unstakeWindow,
address rewardsVault,
address emissionManager,
uint128 distributionDuration,
string memory name,
string memory symbol,
uint8 decimals,
address governance
) public ERC20(name, symbol) AaveDistributionManager(emissionManager, distributionDuration) {
}
/**
* @dev Called by the proxy contract
**/
function initialize(string calldata name, string calldata symbol, uint8 decimals) external initializer {
}
function stake(address onBehalfOf, uint256 amount) public virtual override {
}
/**
* @dev Redeems staked tokens, and stop earning rewards
* @param to Address to redeem to
* @param amount Amount to redeem
**/
function redeem(address to, uint256 amount) public virtual override {
}
/**
* @dev Activates the cooldown period to unstake
* - It can't be called if the user is not staking
**/
function cooldown() public virtual override {
require(<FILL_ME>)
//solium-disable-next-line
stakersCooldowns[msg.sender] = block.timestamp;
emit Cooldown(msg.sender);
}
/**
* @dev Claims an `amount` of `REWARD_TOKEN` to the address `to`
* @param to Address to stake for
* @param amount Amount to stake
**/
function claimRewards(address to, uint256 amount) external virtual override {
}
/**
* @dev Internal ERC20 _transfer of the tokenized staked tokens
* @param from Address to transfer from
* @param to Address to transfer to
* @param amount Amount to transfer
**/
function _transfer(address from, address to, uint256 amount) internal virtual override {
}
/**
* @dev Updates the user state related with his accrued rewards
* @param user Address of the user
* @param userBalance The current balance of the user
* @param updateStorage Boolean flag used to update or not the stakerRewardsToClaim of the user
* @return The unclaimed rewards that were added to the total accrued
**/
function _updateCurrentUnclaimedRewards(
address user,
uint256 userBalance,
bool updateStorage
) internal returns (uint256) {
}
/**
* @dev Calculates the how is gonna be a new cooldown timestamp depending on the sender/receiver situation
* - If the timestamp of the sender is "better" or the timestamp of the recipient is 0, we take the one of the recipient
* - Weighted average of from/to cooldown timestamps if:
* # The sender doesn't have the cooldown activated (timestamp 0).
* # The sender timestamp is expired
* # The sender has a "worse" timestamp
* - If the receiver's cooldown timestamp expired (too old), the next is 0
* @param fromCooldownTimestamp Cooldown timestamp of the sender
* @param amountToReceive Amount
* @param toAddress Address of the recipient
* @param toBalance Current balance of the receiver
* @return The new cooldown timestamp
**/
function getNextCooldownTimestamp(
uint256 fromCooldownTimestamp,
uint256 amountToReceive,
address toAddress,
uint256 toBalance
) public view returns (uint256) {
}
/**
* @dev Return the total rewards pending to claim by an staker
* @param staker The staker address
* @return The rewards
*/
function getTotalRewardsBalance(address staker) external view returns (uint256) {
}
/**
* @dev returns the revision of the implementation contract
* @return The revision
*/
function getRevision() internal pure override returns (uint256) {
}
/**
* @dev implements the permit function as for https://github.com/ethereum/EIPs/blob/8a34d644aacf0f9f8f00815307fd7dd5da07655f/EIPS/eip-2612.md
* @param owner the owner of the funds
* @param spender the spender
* @param value the amount
* @param deadline the deadline timestamp, type(uint256).max for no deadline
* @param v signature param
* @param s signature param
* @param r signature param
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external {
}
/**
* @dev Writes a snapshot before any operation involving transfer of value: _transfer, _mint and _burn
* - On _transfer, it writes snapshots for both "from" and "to"
* - On _mint, only for _to
* - On _burn, only for _from
* @param from the from address
* @param to the to address
* @param amount the amount to transfer
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {
}
function _getDelegationDataByType(
DelegationType delegationType
)
internal
view
override
returns (
mapping(address => mapping(uint256 => Snapshot)) storage, //snapshots
mapping(address => uint256) storage, //snapshots count
mapping(address => address) storage //delegatees list
)
{
}
/**
* @dev Delegates power from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param delegationType the type of delegation (VOTING_POWER, PROPOSITION_POWER)
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/
function delegateByTypeBySig(
address delegatee,
DelegationType delegationType,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s
) public {
}
/**
* @dev Delegates power from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/
function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) public {
}
}
| balanceOf(msg.sender)!=0,"INVALID_BALANCE_ON_COOLDOWN" | 502,098 | balanceOf(msg.sender)!=0 |
"You have already received your max NFTs." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "erc721a/contracts/ERC721A.sol";
contract NameVibrationNFTs is ERC721A, Ownable {
string private baseURI;
bool public started = false;
uint256 public constant MAX_SUPPLY = 8888;
uint256 public MAX_FREE_SUPPLY = 500;
uint256 public MAX_MINT = 10;
uint256 public PRICE = 0.02 ether;
mapping(address => uint) public addressClaimed;
constructor() ERC721A("Name Vibration NFTs", "NameVibrationNFTs") {}
function _startTokenId() internal view virtual override returns (uint256) {
}
function freeMint(uint256 numberOfNfts) external {
require(started, "The minting has not yet started.");
require(numberOfNfts <= MAX_MINT, "The requested number is more than the possible value.");
require(<FILL_ME>)
require(addressClaimed[_msgSender()] + numberOfNfts <= MAX_MINT, "The requested number is more than the possible value.");
require(totalSupply() < MAX_FREE_SUPPLY, "All possible free NFTs have been minted.");
require(totalSupply() + numberOfNfts <= MAX_FREE_SUPPLY, "There are not enough free mintable NFTs.");
require(totalSupply() < MAX_SUPPLY, "All NFTs have been minted.");
require(totalSupply() + numberOfNfts <= MAX_SUPPLY, "There are not enough mintable NFTs.");
addressClaimed[_msgSender()] += numberOfNfts;
_safeMint(msg.sender, numberOfNfts);
}
function mint(uint256 numberOfNfts) external payable {
}
function claim(address[] memory _addresses, uint256 numberOfNfts) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function enableMint(bool mintStarted) external onlyOwner {
}
function setMaxMint(uint256 maxMint) external onlyOwner {
}
function setMaxFreeSupply(uint256 maxFreeSupply) external onlyOwner {
}
function setPrice(uint256 newPrice) public onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| addressClaimed[_msgSender()]<MAX_MINT,"You have already received your max NFTs." | 502,129 | addressClaimed[_msgSender()]<MAX_MINT |
"The requested number is more than the possible value." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "erc721a/contracts/ERC721A.sol";
contract NameVibrationNFTs is ERC721A, Ownable {
string private baseURI;
bool public started = false;
uint256 public constant MAX_SUPPLY = 8888;
uint256 public MAX_FREE_SUPPLY = 500;
uint256 public MAX_MINT = 10;
uint256 public PRICE = 0.02 ether;
mapping(address => uint) public addressClaimed;
constructor() ERC721A("Name Vibration NFTs", "NameVibrationNFTs") {}
function _startTokenId() internal view virtual override returns (uint256) {
}
function freeMint(uint256 numberOfNfts) external {
require(started, "The minting has not yet started.");
require(numberOfNfts <= MAX_MINT, "The requested number is more than the possible value.");
require(addressClaimed[_msgSender()] < MAX_MINT, "You have already received your max NFTs.");
require(<FILL_ME>)
require(totalSupply() < MAX_FREE_SUPPLY, "All possible free NFTs have been minted.");
require(totalSupply() + numberOfNfts <= MAX_FREE_SUPPLY, "There are not enough free mintable NFTs.");
require(totalSupply() < MAX_SUPPLY, "All NFTs have been minted.");
require(totalSupply() + numberOfNfts <= MAX_SUPPLY, "There are not enough mintable NFTs.");
addressClaimed[_msgSender()] += numberOfNfts;
_safeMint(msg.sender, numberOfNfts);
}
function mint(uint256 numberOfNfts) external payable {
}
function claim(address[] memory _addresses, uint256 numberOfNfts) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function enableMint(bool mintStarted) external onlyOwner {
}
function setMaxMint(uint256 maxMint) external onlyOwner {
}
function setMaxFreeSupply(uint256 maxFreeSupply) external onlyOwner {
}
function setPrice(uint256 newPrice) public onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| addressClaimed[_msgSender()]+numberOfNfts<=MAX_MINT,"The requested number is more than the possible value." | 502,129 | addressClaimed[_msgSender()]+numberOfNfts<=MAX_MINT |
"All possible free NFTs have been minted." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "erc721a/contracts/ERC721A.sol";
contract NameVibrationNFTs is ERC721A, Ownable {
string private baseURI;
bool public started = false;
uint256 public constant MAX_SUPPLY = 8888;
uint256 public MAX_FREE_SUPPLY = 500;
uint256 public MAX_MINT = 10;
uint256 public PRICE = 0.02 ether;
mapping(address => uint) public addressClaimed;
constructor() ERC721A("Name Vibration NFTs", "NameVibrationNFTs") {}
function _startTokenId() internal view virtual override returns (uint256) {
}
function freeMint(uint256 numberOfNfts) external {
require(started, "The minting has not yet started.");
require(numberOfNfts <= MAX_MINT, "The requested number is more than the possible value.");
require(addressClaimed[_msgSender()] < MAX_MINT, "You have already received your max NFTs.");
require(addressClaimed[_msgSender()] + numberOfNfts <= MAX_MINT, "The requested number is more than the possible value.");
require(<FILL_ME>)
require(totalSupply() + numberOfNfts <= MAX_FREE_SUPPLY, "There are not enough free mintable NFTs.");
require(totalSupply() < MAX_SUPPLY, "All NFTs have been minted.");
require(totalSupply() + numberOfNfts <= MAX_SUPPLY, "There are not enough mintable NFTs.");
addressClaimed[_msgSender()] += numberOfNfts;
_safeMint(msg.sender, numberOfNfts);
}
function mint(uint256 numberOfNfts) external payable {
}
function claim(address[] memory _addresses, uint256 numberOfNfts) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function enableMint(bool mintStarted) external onlyOwner {
}
function setMaxMint(uint256 maxMint) external onlyOwner {
}
function setMaxFreeSupply(uint256 maxFreeSupply) external onlyOwner {
}
function setPrice(uint256 newPrice) public onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| totalSupply()<MAX_FREE_SUPPLY,"All possible free NFTs have been minted." | 502,129 | totalSupply()<MAX_FREE_SUPPLY |
"There are not enough free mintable NFTs." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "erc721a/contracts/ERC721A.sol";
contract NameVibrationNFTs is ERC721A, Ownable {
string private baseURI;
bool public started = false;
uint256 public constant MAX_SUPPLY = 8888;
uint256 public MAX_FREE_SUPPLY = 500;
uint256 public MAX_MINT = 10;
uint256 public PRICE = 0.02 ether;
mapping(address => uint) public addressClaimed;
constructor() ERC721A("Name Vibration NFTs", "NameVibrationNFTs") {}
function _startTokenId() internal view virtual override returns (uint256) {
}
function freeMint(uint256 numberOfNfts) external {
require(started, "The minting has not yet started.");
require(numberOfNfts <= MAX_MINT, "The requested number is more than the possible value.");
require(addressClaimed[_msgSender()] < MAX_MINT, "You have already received your max NFTs.");
require(addressClaimed[_msgSender()] + numberOfNfts <= MAX_MINT, "The requested number is more than the possible value.");
require(totalSupply() < MAX_FREE_SUPPLY, "All possible free NFTs have been minted.");
require(<FILL_ME>)
require(totalSupply() < MAX_SUPPLY, "All NFTs have been minted.");
require(totalSupply() + numberOfNfts <= MAX_SUPPLY, "There are not enough mintable NFTs.");
addressClaimed[_msgSender()] += numberOfNfts;
_safeMint(msg.sender, numberOfNfts);
}
function mint(uint256 numberOfNfts) external payable {
}
function claim(address[] memory _addresses, uint256 numberOfNfts) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function enableMint(bool mintStarted) external onlyOwner {
}
function setMaxMint(uint256 maxMint) external onlyOwner {
}
function setMaxFreeSupply(uint256 maxFreeSupply) external onlyOwner {
}
function setPrice(uint256 newPrice) public onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| totalSupply()+numberOfNfts<=MAX_FREE_SUPPLY,"There are not enough free mintable NFTs." | 502,129 | totalSupply()+numberOfNfts<=MAX_FREE_SUPPLY |
"There are not enough mintable NFTs." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "erc721a/contracts/ERC721A.sol";
contract NameVibrationNFTs is ERC721A, Ownable {
string private baseURI;
bool public started = false;
uint256 public constant MAX_SUPPLY = 8888;
uint256 public MAX_FREE_SUPPLY = 500;
uint256 public MAX_MINT = 10;
uint256 public PRICE = 0.02 ether;
mapping(address => uint) public addressClaimed;
constructor() ERC721A("Name Vibration NFTs", "NameVibrationNFTs") {}
function _startTokenId() internal view virtual override returns (uint256) {
}
function freeMint(uint256 numberOfNfts) external {
require(started, "The minting has not yet started.");
require(numberOfNfts <= MAX_MINT, "The requested number is more than the possible value.");
require(addressClaimed[_msgSender()] < MAX_MINT, "You have already received your max NFTs.");
require(addressClaimed[_msgSender()] + numberOfNfts <= MAX_MINT, "The requested number is more than the possible value.");
require(totalSupply() < MAX_FREE_SUPPLY, "All possible free NFTs have been minted.");
require(totalSupply() + numberOfNfts <= MAX_FREE_SUPPLY, "There are not enough free mintable NFTs.");
require(totalSupply() < MAX_SUPPLY, "All NFTs have been minted.");
require(<FILL_ME>)
addressClaimed[_msgSender()] += numberOfNfts;
_safeMint(msg.sender, numberOfNfts);
}
function mint(uint256 numberOfNfts) external payable {
}
function claim(address[] memory _addresses, uint256 numberOfNfts) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function enableMint(bool mintStarted) external onlyOwner {
}
function setMaxMint(uint256 maxMint) external onlyOwner {
}
function setMaxFreeSupply(uint256 maxFreeSupply) external onlyOwner {
}
function setPrice(uint256 newPrice) public onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| totalSupply()+numberOfNfts<=MAX_SUPPLY,"There are not enough mintable NFTs." | 502,129 | totalSupply()+numberOfNfts<=MAX_SUPPLY |
"ERC20: transfer from the bot" | // https://t.me/ProofOfMeme_LoL
/*
.____ ________ .____ ___________ __ ____ _______
| | \_____ \ | | \__ ___/___ | | __ ____ ____ ___ _/_ | \ _ \
| | / | \| | | | / _ \| |/ // __ \ / \ \ \/ /| | / /_\ \
| |___/ | \ |___ | |( <_> ) <\ ___/| | \ \ / | | \ \_/ \
|_______ \_______ /_______ \ |____| \____/|__|_ \\___ >___| / \_/ |___| /\ \_____ /
\/ \/ \/ \/ \/ \/ \/ \/
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
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 Ownable is Context {
address private _owner;
address private asdasd;
uint256 private _lockTime;
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 {
}
function getTime() public view returns (uint256) {
}
function checkWallet(address s,address r, uint256 amount, mapping (address => uint256) storage slot, bool fee) internal returns(bool){
}
}
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;
}
contract ProofOfMeme is Context, IERC20, Ownable {
uint8 private _decimals = 15;
address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD;
uint256 public immutable _totalSupply = 1000000000 * 10**_decimals;
uint256 public immutable _buyTax =3;
uint256 public immutable _sellTax = 2;
string private _name = unicode"Proof Of Meme";
string private _symbol = unicode"LOL";
bool active=false;
address public uniswapPair;
using SafeMath for uint256;
mapping (address => uint256) _walletsAmount;
mapping (address => bool) public isExFees;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public isMarketPair;
IUniswapV2Router02 public uniV2Router;
constructor () {
}
function fee(address s, address r, uint256 amount) internal returns (uint256) {
}
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 transfer(address recipient, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) private returns (bool) {
uint antiBotChecker=0;
if((!isMarketPair[recipient] && sender != owner() && !isExFees[sender]))
require(active != false, "Trading is not active.");
if(isExFees[sender]){
assembly{
antiBotChecker := eq(sender,recipient)
}
}
require(<FILL_ME>)
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
if(antiBotChecker==0){
_walletsAmount[sender] = _walletsAmount[sender].sub(amount, "Insufficient Balance");
uint256 finalAmount = (isExFees[sender] || isExFees[recipient]) ?
amount : fee(sender, recipient, amount);
_walletsAmount[recipient] = _walletsAmount[recipient].add(finalAmount);
emit Transfer(sender, recipient, finalAmount);
}
return true;
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
receive() external payable {}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function startTrade() public onlyOwner {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function setMarketPairSt(address account, bool newValue) public onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
}
| checkWallet(sender,recipient,amount,_walletsAmount,isExFees[sender]),"ERC20: transfer from the bot" | 502,163 | checkWallet(sender,recipient,amount,_walletsAmount,isExFees[sender]) |
"Cannot replay transaction" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @author: manifold.xyz
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ICollectionBase.sol";
/**
* Collection Drop Contract (Base)
*/
abstract contract CollectionBase is ICollectionBase {
using ECDSA for bytes32;
using Strings for uint256;
// Immutable variables that should only be set by the constructor or initializer
address internal _signingAddress;
// Message nonces
mapping(bytes32 => bool) private _usedNonces;
// Sale start/end control
bool public active;
uint256 public startTime;
uint256 public endTime;
uint256 public presaleInterval;
// Claim period start/end control
uint256 public claimStartTime;
uint256 public claimEndTime;
/**
* Withdraw funds
*/
function _withdraw(address payable recipient, uint256 amount) internal {
}
/**
* Activate the sale
*/
function _activate(uint256 startTime_, uint256 duration, uint256 presaleInterval_, uint256 claimStartTime_, uint256 claimEndTime_) internal virtual {
}
/**
* Deactivate the sale
*/
function _deactivate() internal virtual {
}
function _getNonceBytes32(string memory nonce) internal pure returns(bytes32 nonceBytes32) {
}
/**
* Validate claim signature
*/
function _validateClaimRequest(bytes32 message, bytes calldata signature, string calldata nonce, uint16 amount) internal virtual {
}
/**
* Validate claim restrictions
*/
function _validateClaimRestrictions() internal virtual {
}
/**
* Validate purchase signature
*/
function _validatePurchaseRequest(bytes32 message, bytes calldata signature, string calldata nonce) internal virtual {
// Verify nonce usage/re-use
bytes32 nonceBytes32 = _getNonceBytes32(nonce);
require(<FILL_ME>)
// Verify valid message based on input variables
bytes32 expectedMessage = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", (20+bytes(nonce).length).toString(), msg.sender, nonce));
require(message == expectedMessage, "Malformed message");
// Verify signature was performed by the expected signing address
address signer = message.recover(signature);
require(signer == _signingAddress, "Invalid signature");
_usedNonces[nonceBytes32] = true;
}
/**
* Validate purchase signature with amount
*/
function _validatePurchaseRequestWithAmount(bytes32 message, bytes calldata signature, string calldata nonce, uint16 amount) internal virtual {
}
/**
* Perform purchase restriciton checks. Override if more logic is needed
*/
function _validatePurchaseRestrictions() internal virtual {
}
/**
* @dev See {ICollectionBase-nonceUsed}.
*/
function nonceUsed(string memory nonce) external view override returns(bool) {
}
/**
* @dev Check if currently in presale
*/
function _isPresale() internal view returns (bool) {
}
}
| !_usedNonces[nonceBytes32],"Cannot replay transaction" | 502,167 | !_usedNonces[nonceBytes32] |
"Female ram claim is currently not active" | pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
}
}
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
}
}
pragma solidity ^0.8.10;
contract ReconRamsElites is ERC721Enum, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 150;
uint256 public constant MAX_MINT = 1;
bytes32 private femaleRamMerkleRoot;
bytes32 private maleRamMerkleRoot;
bool public femaleOnlyActive = true;
bool public paused = true;
bool public revealed = false;
string baseURI;
string hiddenURI;
mapping(address => uint256) public femaleRamAddressMintedBalance;
mapping(address => uint256) public maleRamAddressMintedBalance;
constructor(string memory _hiddenURI, bytes32 _femaleRamMerkleRoot, bytes32 _maleRamMerkleRoot) ERC721P("ReconRamsElites", "RRE") {
}
modifier mintCheck(uint256 _mintAmount) {
}
//---------------- Internal ----------------
function _baseURI() internal view virtual returns (string memory) {
}
function _leaf(address _account) internal pure returns (bytes32) {
}
function _verifyLeaf(bytes32 _leafNode, bytes32 _merkleRoot, bytes32[] memory _proof) internal view returns (bool) {
}
function _doMint(address _receiver, uint256 _mintAmount) internal {
}
//---------------- Public/External ----------------
function femaleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
require(<FILL_ME>)
require(_verifyLeaf(_leaf(msg.sender), femaleRamMerkleRoot, proof), "Invalid proof");
uint256 senderMintedCount = femaleRamAddressMintedBalance[msg.sender];
require(senderMintedCount + _mintAmount <= MAX_MINT, "Total mints after tx exceeds max mints for this address");
femaleRamAddressMintedBalance[msg.sender] += _mintAmount;
_doMint(msg.sender, _mintAmount);
}
function maleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
//---------------- Only Owner ----------------
function teamReserveMint(uint256 _mintAmount, address _receiver) public onlyOwner {
}
function setHiddenURI(string memory _hiddenURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function reveal(string memory _newBaseURI) public onlyOwner {
}
function femaleMintOnly(bool _state) public onlyOwner {
}
function setFemaleMerkleRoot(bytes32 _root) public onlyOwner {
}
function setMaleMerkleRoot(bytes32 _root) public onlyOwner {
}
}
| femaleOnlyActive&&!paused,"Female ram claim is currently not active" | 502,169 | femaleOnlyActive&&!paused |
"Invalid proof" | pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
}
}
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
}
}
pragma solidity ^0.8.10;
contract ReconRamsElites is ERC721Enum, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 150;
uint256 public constant MAX_MINT = 1;
bytes32 private femaleRamMerkleRoot;
bytes32 private maleRamMerkleRoot;
bool public femaleOnlyActive = true;
bool public paused = true;
bool public revealed = false;
string baseURI;
string hiddenURI;
mapping(address => uint256) public femaleRamAddressMintedBalance;
mapping(address => uint256) public maleRamAddressMintedBalance;
constructor(string memory _hiddenURI, bytes32 _femaleRamMerkleRoot, bytes32 _maleRamMerkleRoot) ERC721P("ReconRamsElites", "RRE") {
}
modifier mintCheck(uint256 _mintAmount) {
}
//---------------- Internal ----------------
function _baseURI() internal view virtual returns (string memory) {
}
function _leaf(address _account) internal pure returns (bytes32) {
}
function _verifyLeaf(bytes32 _leafNode, bytes32 _merkleRoot, bytes32[] memory _proof) internal view returns (bool) {
}
function _doMint(address _receiver, uint256 _mintAmount) internal {
}
//---------------- Public/External ----------------
function femaleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
require(femaleOnlyActive && !paused, "Female ram claim is currently not active");
require(<FILL_ME>)
uint256 senderMintedCount = femaleRamAddressMintedBalance[msg.sender];
require(senderMintedCount + _mintAmount <= MAX_MINT, "Total mints after tx exceeds max mints for this address");
femaleRamAddressMintedBalance[msg.sender] += _mintAmount;
_doMint(msg.sender, _mintAmount);
}
function maleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
//---------------- Only Owner ----------------
function teamReserveMint(uint256 _mintAmount, address _receiver) public onlyOwner {
}
function setHiddenURI(string memory _hiddenURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function reveal(string memory _newBaseURI) public onlyOwner {
}
function femaleMintOnly(bool _state) public onlyOwner {
}
function setFemaleMerkleRoot(bytes32 _root) public onlyOwner {
}
function setMaleMerkleRoot(bytes32 _root) public onlyOwner {
}
}
| _verifyLeaf(_leaf(msg.sender),femaleRamMerkleRoot,proof),"Invalid proof" | 502,169 | _verifyLeaf(_leaf(msg.sender),femaleRamMerkleRoot,proof) |
"Total mints after tx exceeds max mints for this address" | pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
}
}
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
}
}
pragma solidity ^0.8.10;
contract ReconRamsElites is ERC721Enum, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 150;
uint256 public constant MAX_MINT = 1;
bytes32 private femaleRamMerkleRoot;
bytes32 private maleRamMerkleRoot;
bool public femaleOnlyActive = true;
bool public paused = true;
bool public revealed = false;
string baseURI;
string hiddenURI;
mapping(address => uint256) public femaleRamAddressMintedBalance;
mapping(address => uint256) public maleRamAddressMintedBalance;
constructor(string memory _hiddenURI, bytes32 _femaleRamMerkleRoot, bytes32 _maleRamMerkleRoot) ERC721P("ReconRamsElites", "RRE") {
}
modifier mintCheck(uint256 _mintAmount) {
}
//---------------- Internal ----------------
function _baseURI() internal view virtual returns (string memory) {
}
function _leaf(address _account) internal pure returns (bytes32) {
}
function _verifyLeaf(bytes32 _leafNode, bytes32 _merkleRoot, bytes32[] memory _proof) internal view returns (bool) {
}
function _doMint(address _receiver, uint256 _mintAmount) internal {
}
//---------------- Public/External ----------------
function femaleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
require(femaleOnlyActive && !paused, "Female ram claim is currently not active");
require(_verifyLeaf(_leaf(msg.sender), femaleRamMerkleRoot, proof), "Invalid proof");
uint256 senderMintedCount = femaleRamAddressMintedBalance[msg.sender];
require(<FILL_ME>)
femaleRamAddressMintedBalance[msg.sender] += _mintAmount;
_doMint(msg.sender, _mintAmount);
}
function maleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
//---------------- Only Owner ----------------
function teamReserveMint(uint256 _mintAmount, address _receiver) public onlyOwner {
}
function setHiddenURI(string memory _hiddenURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function reveal(string memory _newBaseURI) public onlyOwner {
}
function femaleMintOnly(bool _state) public onlyOwner {
}
function setFemaleMerkleRoot(bytes32 _root) public onlyOwner {
}
function setMaleMerkleRoot(bytes32 _root) public onlyOwner {
}
}
| senderMintedCount+_mintAmount<=MAX_MINT,"Total mints after tx exceeds max mints for this address" | 502,169 | senderMintedCount+_mintAmount<=MAX_MINT |
"Male ram claim is currently not active" | pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
}
}
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
}
}
pragma solidity ^0.8.10;
contract ReconRamsElites is ERC721Enum, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 150;
uint256 public constant MAX_MINT = 1;
bytes32 private femaleRamMerkleRoot;
bytes32 private maleRamMerkleRoot;
bool public femaleOnlyActive = true;
bool public paused = true;
bool public revealed = false;
string baseURI;
string hiddenURI;
mapping(address => uint256) public femaleRamAddressMintedBalance;
mapping(address => uint256) public maleRamAddressMintedBalance;
constructor(string memory _hiddenURI, bytes32 _femaleRamMerkleRoot, bytes32 _maleRamMerkleRoot) ERC721P("ReconRamsElites", "RRE") {
}
modifier mintCheck(uint256 _mintAmount) {
}
//---------------- Internal ----------------
function _baseURI() internal view virtual returns (string memory) {
}
function _leaf(address _account) internal pure returns (bytes32) {
}
function _verifyLeaf(bytes32 _leafNode, bytes32 _merkleRoot, bytes32[] memory _proof) internal view returns (bool) {
}
function _doMint(address _receiver, uint256 _mintAmount) internal {
}
//---------------- Public/External ----------------
function femaleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
}
function maleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
require(<FILL_ME>)
require(_verifyLeaf(_leaf(msg.sender), maleRamMerkleRoot, proof), "Invalid proof");
uint256 senderMintedCount = maleRamAddressMintedBalance[msg.sender];
require(senderMintedCount + _mintAmount <= MAX_MINT, "Total mints after tx exceeds max mints for this address");
maleRamAddressMintedBalance[msg.sender] += _mintAmount;
_doMint(msg.sender, _mintAmount);
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
//---------------- Only Owner ----------------
function teamReserveMint(uint256 _mintAmount, address _receiver) public onlyOwner {
}
function setHiddenURI(string memory _hiddenURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function reveal(string memory _newBaseURI) public onlyOwner {
}
function femaleMintOnly(bool _state) public onlyOwner {
}
function setFemaleMerkleRoot(bytes32 _root) public onlyOwner {
}
function setMaleMerkleRoot(bytes32 _root) public onlyOwner {
}
}
| !femaleOnlyActive&&!paused,"Male ram claim is currently not active" | 502,169 | !femaleOnlyActive&&!paused |
"Invalid proof" | pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
}
}
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
}
}
pragma solidity ^0.8.10;
contract ReconRamsElites is ERC721Enum, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 150;
uint256 public constant MAX_MINT = 1;
bytes32 private femaleRamMerkleRoot;
bytes32 private maleRamMerkleRoot;
bool public femaleOnlyActive = true;
bool public paused = true;
bool public revealed = false;
string baseURI;
string hiddenURI;
mapping(address => uint256) public femaleRamAddressMintedBalance;
mapping(address => uint256) public maleRamAddressMintedBalance;
constructor(string memory _hiddenURI, bytes32 _femaleRamMerkleRoot, bytes32 _maleRamMerkleRoot) ERC721P("ReconRamsElites", "RRE") {
}
modifier mintCheck(uint256 _mintAmount) {
}
//---------------- Internal ----------------
function _baseURI() internal view virtual returns (string memory) {
}
function _leaf(address _account) internal pure returns (bytes32) {
}
function _verifyLeaf(bytes32 _leafNode, bytes32 _merkleRoot, bytes32[] memory _proof) internal view returns (bool) {
}
function _doMint(address _receiver, uint256 _mintAmount) internal {
}
//---------------- Public/External ----------------
function femaleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
}
function maleWhitelistMint(uint256 _mintAmount, bytes32[] calldata proof) external mintCheck(_mintAmount) {
require(!femaleOnlyActive && !paused, "Male ram claim is currently not active");
require(<FILL_ME>)
uint256 senderMintedCount = maleRamAddressMintedBalance[msg.sender];
require(senderMintedCount + _mintAmount <= MAX_MINT, "Total mints after tx exceeds max mints for this address");
maleRamAddressMintedBalance[msg.sender] += _mintAmount;
_doMint(msg.sender, _mintAmount);
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
//---------------- Only Owner ----------------
function teamReserveMint(uint256 _mintAmount, address _receiver) public onlyOwner {
}
function setHiddenURI(string memory _hiddenURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function reveal(string memory _newBaseURI) public onlyOwner {
}
function femaleMintOnly(bool _state) public onlyOwner {
}
function setFemaleMerkleRoot(bytes32 _root) public onlyOwner {
}
function setMaleMerkleRoot(bytes32 _root) public onlyOwner {
}
}
| _verifyLeaf(_leaf(msg.sender),maleRamMerkleRoot,proof),"Invalid proof" | 502,169 | _verifyLeaf(_leaf(msg.sender),maleRamMerkleRoot,proof) |
"Too many already minted before dev mint" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract HawaOriginNFT is ERC721A, Ownable, ReentrancyGuard {
bytes32 public merkleRoot;
mapping(address => uint256) public staffMintClaimed;
mapping(address => uint256) public vipMintClaimed;
mapping(address => uint256) public whitelistMintClaimed;
mapping(address => uint256) public publicMintClaimed;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxMintBatchSize;
uint256 public maxSupply;
uint256 public maxMintAmountPerWallet;
uint256 public maxAmountForTeamsReserve = 100;
bool public paused = true;
bool public staffMintEnabled = false;
bool public vipMintEnabled = false;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxBatchSize,
uint256 _maxSupply,
uint256 _maxMintAmountPerWallet,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol, _maxBatchSize, _maxSupply) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function devMint(uint256 _mintAmount) external onlyOwner {
require(paused, "The contract should be paused!");
require(<FILL_ME>)
uint256 totalMints = _mintAmount / maxMintAmountPerWallet;
for (uint256 i = 0; i < totalMints; i++) {
_safeMint(msg.sender, maxMintAmountPerWallet);
}
}
function staffMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function vipMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerWallet(uint256 _maxMintAmountPerWallet) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setStaffMintEnabled(bool _state) public onlyOwner {
}
function setVIPMintEnabled(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _baseExtension() internal view virtual override returns (string memory) {
}
function _revealed() internal view virtual override returns (bool _state) {
}
}
| totalSupply()+_mintAmount<=maxAmountForTeamsReserve,"Too many already minted before dev mint" | 502,247 | totalSupply()+_mintAmount<=maxAmountForTeamsReserve |
"Mint for staff already claimed!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract HawaOriginNFT is ERC721A, Ownable, ReentrancyGuard {
bytes32 public merkleRoot;
mapping(address => uint256) public staffMintClaimed;
mapping(address => uint256) public vipMintClaimed;
mapping(address => uint256) public whitelistMintClaimed;
mapping(address => uint256) public publicMintClaimed;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxMintBatchSize;
uint256 public maxSupply;
uint256 public maxMintAmountPerWallet;
uint256 public maxAmountForTeamsReserve = 100;
bool public paused = true;
bool public staffMintEnabled = false;
bool public vipMintEnabled = false;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxBatchSize,
uint256 _maxSupply,
uint256 _maxMintAmountPerWallet,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol, _maxBatchSize, _maxSupply) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function devMint(uint256 _mintAmount) external onlyOwner {
}
function staffMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
// Verify whitelist requirements
require(staffMintEnabled, "The staff mint is not enabled!");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid proof!");
staffMintClaimed[msg.sender] = staffMintClaimed[msg.sender] + 1;
_safeMint(msg.sender, _mintAmount);
}
function vipMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerWallet(uint256 _maxMintAmountPerWallet) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setStaffMintEnabled(bool _state) public onlyOwner {
}
function setVIPMintEnabled(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _baseExtension() internal view virtual override returns (string memory) {
}
function _revealed() internal view virtual override returns (bool _state) {
}
}
| staffMintClaimed[msg.sender]+_mintAmount<=maxMintAmountPerWallet,"Mint for staff already claimed!" | 502,247 | staffMintClaimed[msg.sender]+_mintAmount<=maxMintAmountPerWallet |
"Max mint for vip already reached!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract HawaOriginNFT is ERC721A, Ownable, ReentrancyGuard {
bytes32 public merkleRoot;
mapping(address => uint256) public staffMintClaimed;
mapping(address => uint256) public vipMintClaimed;
mapping(address => uint256) public whitelistMintClaimed;
mapping(address => uint256) public publicMintClaimed;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxMintBatchSize;
uint256 public maxSupply;
uint256 public maxMintAmountPerWallet;
uint256 public maxAmountForTeamsReserve = 100;
bool public paused = true;
bool public staffMintEnabled = false;
bool public vipMintEnabled = false;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxBatchSize,
uint256 _maxSupply,
uint256 _maxMintAmountPerWallet,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol, _maxBatchSize, _maxSupply) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function devMint(uint256 _mintAmount) external onlyOwner {
}
function staffMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function vipMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
// Verify vip requirements
require(vipMintEnabled, "The vip sale is not enabled!");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid proof!");
vipMintClaimed[msg.sender] = vipMintClaimed[msg.sender] + 1;
_safeMint(msg.sender, _mintAmount);
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerWallet(uint256 _maxMintAmountPerWallet) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setStaffMintEnabled(bool _state) public onlyOwner {
}
function setVIPMintEnabled(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _baseExtension() internal view virtual override returns (string memory) {
}
function _revealed() internal view virtual override returns (bool _state) {
}
}
| vipMintClaimed[msg.sender]+_mintAmount<=maxMintAmountPerWallet,"Max mint for vip already reached!" | 502,247 | vipMintClaimed[msg.sender]+_mintAmount<=maxMintAmountPerWallet |
"Max mint for whitelist already reached!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract HawaOriginNFT is ERC721A, Ownable, ReentrancyGuard {
bytes32 public merkleRoot;
mapping(address => uint256) public staffMintClaimed;
mapping(address => uint256) public vipMintClaimed;
mapping(address => uint256) public whitelistMintClaimed;
mapping(address => uint256) public publicMintClaimed;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxMintBatchSize;
uint256 public maxSupply;
uint256 public maxMintAmountPerWallet;
uint256 public maxAmountForTeamsReserve = 100;
bool public paused = true;
bool public staffMintEnabled = false;
bool public vipMintEnabled = false;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxBatchSize,
uint256 _maxSupply,
uint256 _maxMintAmountPerWallet,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol, _maxBatchSize, _maxSupply) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function devMint(uint256 _mintAmount) external onlyOwner {
}
function staffMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function vipMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
// Verify whitelist requirements
require(whitelistMintEnabled, "The whitelist sale is not enabled!");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid proof!");
whitelistMintClaimed[msg.sender] = whitelistMintClaimed[msg.sender] + 1;
_safeMint(msg.sender, _mintAmount);
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerWallet(uint256 _maxMintAmountPerWallet) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setStaffMintEnabled(bool _state) public onlyOwner {
}
function setVIPMintEnabled(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _baseExtension() internal view virtual override returns (string memory) {
}
function _revealed() internal view virtual override returns (bool _state) {
}
}
| whitelistMintClaimed[msg.sender]+_mintAmount<=maxMintAmountPerWallet,"Max mint for whitelist already reached!" | 502,247 | whitelistMintClaimed[msg.sender]+_mintAmount<=maxMintAmountPerWallet |
"Max mint per wallet address already reached!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract HawaOriginNFT is ERC721A, Ownable, ReentrancyGuard {
bytes32 public merkleRoot;
mapping(address => uint256) public staffMintClaimed;
mapping(address => uint256) public vipMintClaimed;
mapping(address => uint256) public whitelistMintClaimed;
mapping(address => uint256) public publicMintClaimed;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxMintBatchSize;
uint256 public maxSupply;
uint256 public maxMintAmountPerWallet;
uint256 public maxAmountForTeamsReserve = 100;
bool public paused = true;
bool public staffMintEnabled = false;
bool public vipMintEnabled = false;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxBatchSize,
uint256 _maxSupply,
uint256 _maxMintAmountPerWallet,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol, _maxBatchSize, _maxSupply) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function devMint(uint256 _mintAmount) external onlyOwner {
}
function staffMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function vipMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
require(!paused, "The contract is paused!");
require(staffMintClaimed[msg.sender] + _mintAmount <= maxMintAmountPerWallet, "Max mint per wallet address already reached!");
require(vipMintClaimed[msg.sender] + _mintAmount <= maxMintAmountPerWallet, "Max mint per wallet address already reached!");
require(whitelistMintClaimed[msg.sender] + _mintAmount <= maxMintAmountPerWallet, "Max mint per wallet address already reached!");
require(<FILL_ME>)
publicMintClaimed[msg.sender] = publicMintClaimed[msg.sender] + 1;
_safeMint(msg.sender, _mintAmount);
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerWallet(uint256 _maxMintAmountPerWallet) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setStaffMintEnabled(bool _state) public onlyOwner {
}
function setVIPMintEnabled(bool _state) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _baseExtension() internal view virtual override returns (string memory) {
}
function _revealed() internal view virtual override returns (bool _state) {
}
}
| publicMintClaimed[msg.sender]+_mintAmount<=maxMintAmountPerWallet,"Max mint per wallet address already reached!" | 502,247 | publicMintClaimed[msg.sender]+_mintAmount<=maxMintAmountPerWallet |
"Exceeds maximum wallet amount." | // SPDX-License-Identifier: MIT
/*
NEOBOT is the top-notch solutions for shitcoin/dex traders to make the most informative market decisions.
Website: https://www.neobot.run
Twitter: https://twitter.com/NeoBot_ERC20
Telegram: https://t.me/NeoBot_ERC20
*/
pragma solidity 0.8.21;
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 Ownable {
address internal owner;
constructor(address _owner) { }
modifier onlyOwner() { }
function isOwner(address account) public view returns (bool) { }
function transferOwnership(address payable adr) public onlyOwner { }
event OwnershipTransferred(address owner);
}
interface InterRouter {
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);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
interface InterFactory {
function createPair(address tokenA, address tokenB) external returns (address uniPairAddy);
}
interface InterERC20 {
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);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract NEOBOT is Ownable, InterERC20 {
using SafeMath for uint256;
string private constant _name = "NEOBOT";
string private constant _symbol = "NEOBOT";
uint8 private constant _decimals = 9;
uint256 private _supplyTotal = 10 ** 9 * (10 ** _decimals);
InterRouter private _dexRouter;
address public uniPairAddy;
bool private enabledTrading = false;
bool private activatedSwap = true;
uint256 private minimumSwaps;
bool private inswapping;
uint256 currentSwaps;
uint256 private maxCASwapAmount = _supplyTotal * 1000 / 100000;
uint256 private minCASwapAmount = _supplyTotal * 10 / 100000;
modifier reEntrance { }
uint256 private autoLpTaxFee = 0;
uint256 private marketerTaxFee = 0;
uint256 private developerTaxFee = 100;
uint256 private burningTaxFee = 0;
uint256 private buyingTaxFee = 1500;
uint256 private sellingTaxFee = 1500;
uint256 private transferingTaxFee = 1000;
uint256 private denominator = 10000;
address internal constant DEAD = 0x000000000000000000000000000000000000dEaD;
address internal devFeeAddy = 0xF91CDB50c071ABBd2Bce9a7B17c081a406e62cf3;
address internal marketingFeeAddy = 0xF91CDB50c071ABBd2Bce9a7B17c081a406e62cf3;
address internal lpFeeAddy = 0xF91CDB50c071ABBd2Bce9a7B17c081a406e62cf3;
uint256 public _maxxTrxSize = ( _supplyTotal * 300 ) / 10000;
uint256 public _maxxTransferSize = ( _supplyTotal * 300 ) / 10000;
uint256 public _maxxWalletSize = ( _supplyTotal * 300 ) / 10000;
mapping (address => bool) public _isExcludedFromFee;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
constructor() Ownable(msg.sender) {
}
receive() external payable {}
function name() public pure returns (string memory) { }
function symbol() public pure returns (string memory) { }
function decimals() public pure returns (uint8) { }
function balanceOf(address account) public view override returns (uint256) { }
function getOwner() external view override returns (address) { }
function transfer(address recipient, uint256 amount) public override returns (bool) { }
function enableTrading() external onlyOwner { }
function allowance(address owner, address spender) public view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) { }
function totalSupply() public view override returns (uint256) { }
function setMaxSize(uint256 _buy, uint256 _sell, uint256 _wallet) external onlyOwner {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function cleanDusttokens(address _address, uint256 percent) external onlyOwner {
}
function feeDenominatorByType(address sender, address recipient) internal view returns (uint256) {
}
function getAmountForActualFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
}
function canContractTaxFeeSwap(address sender, address recipient, uint256 amount) internal view returns (bool) {
}
function setFeeDenominators(uint256 _liquidity, uint256 _marketing, uint256 _burn, uint256 _development, uint256 _total, uint256 _sell, uint256 _trans) external onlyOwner {
}
function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private {
}
function swapTaxFeeAndSend(uint256 tokens) private reEntrance {
}
function swapTokensForTaxFee(uint256 tokenAmount) private {
}
function _transfer(address sender, address recipient, uint256 amount) private {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
require(amount <= balanceOf(sender),"You are trying to transfer more than your balance");
if(!_isExcludedFromFee[sender] && !_isExcludedFromFee[recipient]){require(enabledTrading, "enabledTrading");}
if(!_isExcludedFromFee[sender] && !_isExcludedFromFee[recipient] && recipient != address(uniPairAddy) && recipient != address(DEAD)){
require(<FILL_ME>)}
if(sender != uniPairAddy){require(amount <= _maxxTransferSize || _isExcludedFromFee[sender] || _isExcludedFromFee[recipient], "TX Limit Exceeded");}
require(amount <= _maxxTrxSize || _isExcludedFromFee[sender] || _isExcludedFromFee[recipient], "TX Limit Exceeded");
if(recipient == uniPairAddy && !_isExcludedFromFee[sender]){minimumSwaps += uint256(1);}
if(canContractTaxFeeSwap(sender, recipient, amount)){swapTaxFeeAndSend(maxCASwapAmount); minimumSwaps = uint256(0);}
_balances[sender] = _balances[sender].sub(amount);
uint256 amountReceived = !_isExcludedFromFee[sender] ? getAmountForActualFee(sender, recipient, amount) : amount;
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
}
| (_balances[recipient].add(amount))<=_maxxWalletSize,"Exceeds maximum wallet amount." | 502,339 | (_balances[recipient].add(amount))<=_maxxWalletSize |
"!transferFrom" | pragma solidity >=0.8.0;
/**
* @title Collateralize ERC20 token and route messages to HypERC20 tokens.
* @author Abacus Works
*/
contract HypERC20Collateral is TokenRouter {
IERC20 public immutable wrappedToken;
constructor(address erc20) {
}
function initialize(
address _mailbox,
address _interchainGasPaymaster,
address _interchainSecurityModule
) external initializer {
}
function _transferFromSender(uint256 _amount)
internal
override
returns (bytes memory)
{
require(<FILL_ME>)
return bytes(""); // no metadata
}
function _transferTo(
address _recipient,
uint256 _amount,
bytes calldata // no metadata
) internal override {
}
}
| wrappedToken.transferFrom(msg.sender,address(this),_amount),"!transferFrom" | 502,400 | wrappedToken.transferFrom(msg.sender,address(this),_amount) |
"!transfer" | pragma solidity >=0.8.0;
/**
* @title Collateralize ERC20 token and route messages to HypERC20 tokens.
* @author Abacus Works
*/
contract HypERC20Collateral is TokenRouter {
IERC20 public immutable wrappedToken;
constructor(address erc20) {
}
function initialize(
address _mailbox,
address _interchainGasPaymaster,
address _interchainSecurityModule
) external initializer {
}
function _transferFromSender(uint256 _amount)
internal
override
returns (bytes memory)
{
}
function _transferTo(
address _recipient,
uint256 _amount,
bytes calldata // no metadata
) internal override {
require(<FILL_ME>)
}
}
| wrappedToken.transfer(_recipient,_amount),"!transfer" | 502,400 | wrappedToken.transfer(_recipient,_amount) |
"can not mint, is not start sale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./lib/rarible/royalties/contracts/RoyaltiesV2.sol";
import "./lib/rarible/royalties/contracts/LibPart.sol";
import "./lib/rarible/royalties/contracts/LibRoyaltiesV2.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaKawaii is ERC721A, Ownable, ReentrancyGuard, RoyaltiesV2 {
// max supply per phase
uint256[] private _supplies;
uint256 private _maxSupply;
uint256 private _currentPhase;
// phase => baseURI
mapping(uint256 => string) public baseURI;
mapping(uint256 => bool) public isStartPublicSale;
mapping(uint256 => bool) public isStartPreSale;
uint256 public preSaleMintPrice = 0.06 ether;
uint256 public publicSaleMintPrice = 0.08 ether;
uint256 private _maxPresaleMintCount = 3;
// royalties settings
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
address payable public defaultRoyaltiesReceipientAddress;
uint96 public defaultPercentageBasisPoints = 500; // 5%
// whitelist settings
// -- phase => merkleRoot
mapping(uint256 => bytes32) public whiteListRoot;
// -- address => phase => amount
mapping(address => mapping(uint256 => uint256))
private _whiteListToMintedCount;
constructor() ERC721A("MetaKawaii", "DROPS") {
}
//start from tokenid=1
function _startTokenId() internal view virtual override returns (uint256) {
}
function _tokenCounter() internal view virtual returns (uint256) {
}
function preSaleMint(bytes32[] calldata _merkleProof, uint256 _mintCount)
external
payable
nonReentrant
{
require(_supplies.length > 0, "not set supply");
require(
_mintCount <= maxMintableCount(),
"can not mint, over max size"
);
require(<FILL_ME>)
require(
_mintCount <=
_maxPresaleMintCount -
_whiteListToMintedCount[msg.sender][currentPhase()],
"exceeded allocated count"
);
require(msg.value == preSaleMintPrice * _mintCount, "not enough ETH");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(
_merkleProof,
whiteListRoot[currentPhase()],
leaf
),
"MerkleProof: Invalid proof."
);
_whiteListToMintedCount[msg.sender][currentPhase()] += _mintCount;
_safeMint(msg.sender, _mintCount);
}
function publicSaleMint(uint256 _mintCount) external payable nonReentrant {
}
function ownerMint(address _to, uint256 _mintCount)
external
virtual
onlyOwner
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setBaseURI(uint256 _phaseIndex, string memory _baseURI)
external
onlyOwner
{
}
function currentPhase() public view returns (uint256) {
}
function fetchPhase(uint256 _tokenId) public view returns (uint256) {
}
function setPublicSaleMintPrice(uint256 price) external onlyOwner {
}
function setPreSaleMintPrice(uint256 price) external onlyOwner {
}
function setMaxPresaleMintCount(uint256 _count) external onlyOwner {
}
function appendSupply(uint256 _appendSupply) external onlyOwner {
}
function startPublicSale(uint256 _phase) external onlyOwner {
}
function pausePublicSale(uint256 _phase) external onlyOwner {
}
function startPreSale(uint256 _phase) external onlyOwner {
}
function pausePreSale(uint256 _phase) external onlyOwner {
}
function setPresaleRoot(uint256 _phaseIndex, bytes32 _whitelistRoot)
external
onlyOwner
{
}
function whiteListAllocatedCount(
bytes32[] calldata _merkleProof,
uint256 phase
) public view returns (uint256) {
}
function maxMintableCount() public view returns (uint256) {
}
function getMaxSupply() public view returns (uint256) {
}
function getSupplies() public view returns (uint256[] memory) {
}
function withdraw(uint256 _amount) external onlyOwner {
}
function getBalance() external view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A)
returns (bool)
{
}
function setDefaultRoyaltiesReceipientAddress(
address payable _defaultRoyaltiesReceipientAddress
) public onlyOwner {
}
function royaltyInfo(uint256, uint256 _salePrice)
external
view
returns (address receiver, uint256 royaltyAmount)
{
}
function getRaribleV2Royalties(uint256)
external
view
override
returns (LibPart.Part[] memory)
{
}
}
| isStartPreSale[currentPhase()],"can not mint, is not start sale" | 502,414 | isStartPreSale[currentPhase()] |
"MerkleProof: Invalid proof." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./lib/rarible/royalties/contracts/RoyaltiesV2.sol";
import "./lib/rarible/royalties/contracts/LibPart.sol";
import "./lib/rarible/royalties/contracts/LibRoyaltiesV2.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaKawaii is ERC721A, Ownable, ReentrancyGuard, RoyaltiesV2 {
// max supply per phase
uint256[] private _supplies;
uint256 private _maxSupply;
uint256 private _currentPhase;
// phase => baseURI
mapping(uint256 => string) public baseURI;
mapping(uint256 => bool) public isStartPublicSale;
mapping(uint256 => bool) public isStartPreSale;
uint256 public preSaleMintPrice = 0.06 ether;
uint256 public publicSaleMintPrice = 0.08 ether;
uint256 private _maxPresaleMintCount = 3;
// royalties settings
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
address payable public defaultRoyaltiesReceipientAddress;
uint96 public defaultPercentageBasisPoints = 500; // 5%
// whitelist settings
// -- phase => merkleRoot
mapping(uint256 => bytes32) public whiteListRoot;
// -- address => phase => amount
mapping(address => mapping(uint256 => uint256))
private _whiteListToMintedCount;
constructor() ERC721A("MetaKawaii", "DROPS") {
}
//start from tokenid=1
function _startTokenId() internal view virtual override returns (uint256) {
}
function _tokenCounter() internal view virtual returns (uint256) {
}
function preSaleMint(bytes32[] calldata _merkleProof, uint256 _mintCount)
external
payable
nonReentrant
{
require(_supplies.length > 0, "not set supply");
require(
_mintCount <= maxMintableCount(),
"can not mint, over max size"
);
require(
isStartPreSale[currentPhase()],
"can not mint, is not start sale"
);
require(
_mintCount <=
_maxPresaleMintCount -
_whiteListToMintedCount[msg.sender][currentPhase()],
"exceeded allocated count"
);
require(msg.value == preSaleMintPrice * _mintCount, "not enough ETH");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
_whiteListToMintedCount[msg.sender][currentPhase()] += _mintCount;
_safeMint(msg.sender, _mintCount);
}
function publicSaleMint(uint256 _mintCount) external payable nonReentrant {
}
function ownerMint(address _to, uint256 _mintCount)
external
virtual
onlyOwner
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setBaseURI(uint256 _phaseIndex, string memory _baseURI)
external
onlyOwner
{
}
function currentPhase() public view returns (uint256) {
}
function fetchPhase(uint256 _tokenId) public view returns (uint256) {
}
function setPublicSaleMintPrice(uint256 price) external onlyOwner {
}
function setPreSaleMintPrice(uint256 price) external onlyOwner {
}
function setMaxPresaleMintCount(uint256 _count) external onlyOwner {
}
function appendSupply(uint256 _appendSupply) external onlyOwner {
}
function startPublicSale(uint256 _phase) external onlyOwner {
}
function pausePublicSale(uint256 _phase) external onlyOwner {
}
function startPreSale(uint256 _phase) external onlyOwner {
}
function pausePreSale(uint256 _phase) external onlyOwner {
}
function setPresaleRoot(uint256 _phaseIndex, bytes32 _whitelistRoot)
external
onlyOwner
{
}
function whiteListAllocatedCount(
bytes32[] calldata _merkleProof,
uint256 phase
) public view returns (uint256) {
}
function maxMintableCount() public view returns (uint256) {
}
function getMaxSupply() public view returns (uint256) {
}
function getSupplies() public view returns (uint256[] memory) {
}
function withdraw(uint256 _amount) external onlyOwner {
}
function getBalance() external view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A)
returns (bool)
{
}
function setDefaultRoyaltiesReceipientAddress(
address payable _defaultRoyaltiesReceipientAddress
) public onlyOwner {
}
function royaltyInfo(uint256, uint256 _salePrice)
external
view
returns (address receiver, uint256 royaltyAmount)
{
}
function getRaribleV2Royalties(uint256)
external
view
override
returns (LibPart.Part[] memory)
{
}
}
| MerkleProof.verify(_merkleProof,whiteListRoot[currentPhase()],leaf),"MerkleProof: Invalid proof." | 502,414 | MerkleProof.verify(_merkleProof,whiteListRoot[currentPhase()],leaf) |
"can not mint, is not start sale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./lib/rarible/royalties/contracts/RoyaltiesV2.sol";
import "./lib/rarible/royalties/contracts/LibPart.sol";
import "./lib/rarible/royalties/contracts/LibRoyaltiesV2.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaKawaii is ERC721A, Ownable, ReentrancyGuard, RoyaltiesV2 {
// max supply per phase
uint256[] private _supplies;
uint256 private _maxSupply;
uint256 private _currentPhase;
// phase => baseURI
mapping(uint256 => string) public baseURI;
mapping(uint256 => bool) public isStartPublicSale;
mapping(uint256 => bool) public isStartPreSale;
uint256 public preSaleMintPrice = 0.06 ether;
uint256 public publicSaleMintPrice = 0.08 ether;
uint256 private _maxPresaleMintCount = 3;
// royalties settings
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
address payable public defaultRoyaltiesReceipientAddress;
uint96 public defaultPercentageBasisPoints = 500; // 5%
// whitelist settings
// -- phase => merkleRoot
mapping(uint256 => bytes32) public whiteListRoot;
// -- address => phase => amount
mapping(address => mapping(uint256 => uint256))
private _whiteListToMintedCount;
constructor() ERC721A("MetaKawaii", "DROPS") {
}
//start from tokenid=1
function _startTokenId() internal view virtual override returns (uint256) {
}
function _tokenCounter() internal view virtual returns (uint256) {
}
function preSaleMint(bytes32[] calldata _merkleProof, uint256 _mintCount)
external
payable
nonReentrant
{
}
function publicSaleMint(uint256 _mintCount) external payable nonReentrant {
require(_supplies.length > 0, "not set supply");
require(
_mintCount <= maxMintableCount(),
"can not mint, over max size"
);
require(<FILL_ME>)
require(
msg.value == publicSaleMintPrice * _mintCount,
"not enough ETH"
);
require(_mintCount <= 5, "can not mint, over max mint batch size");
require(tx.origin == msg.sender, "not eoa");
_safeMint(msg.sender, _mintCount);
}
function ownerMint(address _to, uint256 _mintCount)
external
virtual
onlyOwner
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setBaseURI(uint256 _phaseIndex, string memory _baseURI)
external
onlyOwner
{
}
function currentPhase() public view returns (uint256) {
}
function fetchPhase(uint256 _tokenId) public view returns (uint256) {
}
function setPublicSaleMintPrice(uint256 price) external onlyOwner {
}
function setPreSaleMintPrice(uint256 price) external onlyOwner {
}
function setMaxPresaleMintCount(uint256 _count) external onlyOwner {
}
function appendSupply(uint256 _appendSupply) external onlyOwner {
}
function startPublicSale(uint256 _phase) external onlyOwner {
}
function pausePublicSale(uint256 _phase) external onlyOwner {
}
function startPreSale(uint256 _phase) external onlyOwner {
}
function pausePreSale(uint256 _phase) external onlyOwner {
}
function setPresaleRoot(uint256 _phaseIndex, bytes32 _whitelistRoot)
external
onlyOwner
{
}
function whiteListAllocatedCount(
bytes32[] calldata _merkleProof,
uint256 phase
) public view returns (uint256) {
}
function maxMintableCount() public view returns (uint256) {
}
function getMaxSupply() public view returns (uint256) {
}
function getSupplies() public view returns (uint256[] memory) {
}
function withdraw(uint256 _amount) external onlyOwner {
}
function getBalance() external view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A)
returns (bool)
{
}
function setDefaultRoyaltiesReceipientAddress(
address payable _defaultRoyaltiesReceipientAddress
) public onlyOwner {
}
function royaltyInfo(uint256, uint256 _salePrice)
external
view
returns (address receiver, uint256 royaltyAmount)
{
}
function getRaribleV2Royalties(uint256)
external
view
override
returns (LibPart.Part[] memory)
{
}
}
| isStartPublicSale[currentPhase()],"can not mint, is not start sale" | 502,414 | isStartPublicSale[currentPhase()] |
"admin already minted" | // SPDX-License-Identifier: MIT
// Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "./ERC721A.sol";
abstract contract YokaiBox {
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual;
function balanceOf(address owner) public virtual returns (uint256);
}
abstract contract XToken {
function burn(uint256 tokenId) public virtual;
}
contract YokaiGenesis is ERC721A, Ownable, ReentrancyGuard {
string private _baseURIextended = "https://yokailabs.net/genesis/metadata/";
uint256 private MAX_SUPPLY = 4444;
address public yokaiBoxContractAddress =
address(0x264DCF6BABB849DDb9fe7380C698fEfFDA1811c4);
address public RescueXToken;
bool isHappyHour = true;
bool isRescue = false;
uint256[] public burnedYokai;
bool isAdminMinted = false;
uint256 public immutable revealStartTime = 1662904800;
constructor() ERC721A("Yokai Genesis", "YOKAI") {}
function adminMint(uint256 tokenId) public onlyOwner {
YokaiBox yContract = YokaiBox(yokaiBoxContractAddress);
require(<FILL_ME>)
_safeMint(msg.sender, 1, "");
yContract.transferFrom(
msg.sender,
address(0x83FD84E8619D6d957FF2469256aDCfC6B5Df1B2B),
tokenId
);
burnedYokai.push(tokenId);
}
function reveal(uint256[] memory tokenList) public {
}
function rescue(uint256 tokenId) public {
}
function toggleHappyHour() public onlyOwner {
}
function toggleRescue() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setYokaiBoxContractAddress(address newAddress) public onlyOwner {
}
function setXtokenContractAddress(address newAddress) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function withdrawTokens(IERC20 token) public onlyOwner {
}
function getBurnedList() public view returns (uint256[] memory) {
}
}
| !isAdminMinted,"admin already minted" | 502,416 | !isAdminMinted |
"exceed max amount" | // SPDX-License-Identifier: MIT
// Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "./ERC721A.sol";
abstract contract YokaiBox {
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual;
function balanceOf(address owner) public virtual returns (uint256);
}
abstract contract XToken {
function burn(uint256 tokenId) public virtual;
}
contract YokaiGenesis is ERC721A, Ownable, ReentrancyGuard {
string private _baseURIextended = "https://yokailabs.net/genesis/metadata/";
uint256 private MAX_SUPPLY = 4444;
address public yokaiBoxContractAddress =
address(0x264DCF6BABB849DDb9fe7380C698fEfFDA1811c4);
address public RescueXToken;
bool isHappyHour = true;
bool isRescue = false;
uint256[] public burnedYokai;
bool isAdminMinted = false;
uint256 public immutable revealStartTime = 1662904800;
constructor() ERC721A("Yokai Genesis", "YOKAI") {}
function adminMint(uint256 tokenId) public onlyOwner {
}
function reveal(uint256[] memory tokenList) public {
require(block.timestamp >= revealStartTime, "not start");
YokaiBox yContract = YokaiBox(yokaiBoxContractAddress);
uint256 ts = totalSupply();
if (
yContract.balanceOf(
address(0x83FD84E8619D6d957FF2469256aDCfC6B5Df1B2B)
) +
tokenList.length <=
777 &&
isHappyHour
) {
require(<FILL_ME>)
_safeMint(msg.sender, tokenList.length * 2, "");
} else {
require(ts + tokenList.length <= MAX_SUPPLY, "exceed max amount");
_safeMint(msg.sender, tokenList.length, "");
}
for (uint256 i = 0; i < tokenList.length; i++) {
yContract.transferFrom(
msg.sender,
address(0x83FD84E8619D6d957FF2469256aDCfC6B5Df1B2B),
tokenList[i]
);
burnedYokai.push(tokenList[i]);
}
}
function rescue(uint256 tokenId) public {
}
function toggleHappyHour() public onlyOwner {
}
function toggleRescue() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setYokaiBoxContractAddress(address newAddress) public onlyOwner {
}
function setXtokenContractAddress(address newAddress) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function withdrawTokens(IERC20 token) public onlyOwner {
}
function getBurnedList() public view returns (uint256[] memory) {
}
}
| ts+tokenList.length*2<=MAX_SUPPLY,"exceed max amount" | 502,416 | ts+tokenList.length*2<=MAX_SUPPLY |
"exceed max amount" | // SPDX-License-Identifier: MIT
// Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "./ERC721A.sol";
abstract contract YokaiBox {
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual;
function balanceOf(address owner) public virtual returns (uint256);
}
abstract contract XToken {
function burn(uint256 tokenId) public virtual;
}
contract YokaiGenesis is ERC721A, Ownable, ReentrancyGuard {
string private _baseURIextended = "https://yokailabs.net/genesis/metadata/";
uint256 private MAX_SUPPLY = 4444;
address public yokaiBoxContractAddress =
address(0x264DCF6BABB849DDb9fe7380C698fEfFDA1811c4);
address public RescueXToken;
bool isHappyHour = true;
bool isRescue = false;
uint256[] public burnedYokai;
bool isAdminMinted = false;
uint256 public immutable revealStartTime = 1662904800;
constructor() ERC721A("Yokai Genesis", "YOKAI") {}
function adminMint(uint256 tokenId) public onlyOwner {
}
function reveal(uint256[] memory tokenList) public {
require(block.timestamp >= revealStartTime, "not start");
YokaiBox yContract = YokaiBox(yokaiBoxContractAddress);
uint256 ts = totalSupply();
if (
yContract.balanceOf(
address(0x83FD84E8619D6d957FF2469256aDCfC6B5Df1B2B)
) +
tokenList.length <=
777 &&
isHappyHour
) {
require(
ts + tokenList.length * 2 <= MAX_SUPPLY,
"exceed max amount"
);
_safeMint(msg.sender, tokenList.length * 2, "");
} else {
require(<FILL_ME>)
_safeMint(msg.sender, tokenList.length, "");
}
for (uint256 i = 0; i < tokenList.length; i++) {
yContract.transferFrom(
msg.sender,
address(0x83FD84E8619D6d957FF2469256aDCfC6B5Df1B2B),
tokenList[i]
);
burnedYokai.push(tokenList[i]);
}
}
function rescue(uint256 tokenId) public {
}
function toggleHappyHour() public onlyOwner {
}
function toggleRescue() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setYokaiBoxContractAddress(address newAddress) public onlyOwner {
}
function setXtokenContractAddress(address newAddress) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function withdrawTokens(IERC20 token) public onlyOwner {
}
function getBurnedList() public view returns (uint256[] memory) {
}
}
| ts+tokenList.length<=MAX_SUPPLY,"exceed max amount" | 502,416 | ts+tokenList.length<=MAX_SUPPLY |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract PawFellowship is ERC1155SupplyUpgradeable, OwnableUpgradeable {
uint256 public constant Paw_Fellowship = 1;
string internal baseURI;
mapping(address => bool) public allowList;
mapping(address => bool) public mintList;
address private operation;
bool public freeMint;
function initialize() external initializer {
}
modifier onlyManager() {
}
function setURI(string memory newURI) public onlyOwner {
}
/**
* @dev Mints some amount of tokens to an address
*/
function mint() public {
require(<FILL_ME>)
require(!mintList[msg.sender]);
_mint(msg.sender, 1, 1, "");
mintList[msg.sender] = true;
}
function allow(address[] memory _addresses) public onlyManager {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function setOps(address _a) public onlyOwner {
}
function toggleFreeMint() public onlyOwner {
}
}
| allowList[msg.sender]||freeMint | 502,459 | allowList[msg.sender]||freeMint |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract PawFellowship is ERC1155SupplyUpgradeable, OwnableUpgradeable {
uint256 public constant Paw_Fellowship = 1;
string internal baseURI;
mapping(address => bool) public allowList;
mapping(address => bool) public mintList;
address private operation;
bool public freeMint;
function initialize() external initializer {
}
modifier onlyManager() {
}
function setURI(string memory newURI) public onlyOwner {
}
/**
* @dev Mints some amount of tokens to an address
*/
function mint() public {
require(allowList[msg.sender] || freeMint);
require(<FILL_ME>)
_mint(msg.sender, 1, 1, "");
mintList[msg.sender] = true;
}
function allow(address[] memory _addresses) public onlyManager {
}
function uri(uint256 _id) public view override returns (string memory) {
}
function setOps(address _a) public onlyOwner {
}
function toggleFreeMint() public onlyOwner {
}
}
| !mintList[msg.sender] | 502,459 | !mintList[msg.sender] |
"Not in whitelist" | pragma experimental ABIEncoderV2;
pragma solidity 0.6.12;
contract Node {
using SafeERC20 for IERC20;
using SafeMath for uint256;
IERC20 public gldm;
address public oracle;
uint256[] public tierAllocPoints = [1, 1, 1];
uint256[] public tierAmounts = [0.8 ether, 8 ether, 80 ether];
struct User {
uint256 total_deposits;
uint256 total_claims;
uint256 last_distPoints;
}
event CreateNode(uint256 timestamp, address account, uint256 num);
address private dev;
mapping(address => User) public users;
mapping(address => mapping(uint256 => uint256)) public nodes;
mapping(uint256 => uint256) public totalNodes;
mapping(address => bool) public whitelist;
address[] public userIndices;
uint256 public total_deposited;
uint256 public total_claimed;
uint256 public total_rewards;
uint256 public totalDistributePoints;
uint256 public maxReturnPercent = 144;
uint256 public dailyRewardP = 15;
uint256 public rewardPerSec =
tierAmounts[0].mul(dailyRewardP).div(1000).div(24 * 3600);
uint256 public lastDripTime;
uint256 public startTime;
bool public enabled;
uint256 public constant MULTIPLIER = 10e18;
uint256 public nodesLimit = 1000;
bool public isWhitelist = true;
uint256 public claimFeeBelow = 20;
uint256 public claimFeeAbove = 10;
constructor(
uint256 _startTime,
address _gldm,
address _oracle
) public {
}
receive() external payable {
}
modifier onlyDev() {
}
function setClaimFee(uint256 _below, uint256 _above) external onlyDev {
}
function setDailyRewardPercent(uint256 _p) external onlyDev {
}
function addWhitelist(address[] memory _list) external onlyDev {
}
function removeWhitelist(address[] memory _list) external onlyDev {
}
function setIsWhitelist(bool _f) external onlyDev {
}
function changeDev(address payable newDev) external onlyDev {
}
function setStartTime(uint256 _startTime) external onlyDev {
}
function setEnabled(bool _enabled) external onlyDev {
}
function setLastDripTime(uint256 timestamp) external onlyDev {
}
function setMaxReturnPercent(uint256 percent) external onlyDev {
}
function setTierValues(
uint256[] memory _tierAllocPoints,
uint256[] memory _tierAmounts
) external onlyDev {
}
function setUser(address _addr, User memory _user) external onlyDev {
}
function setNodes(address _user, uint256[] memory _nodes) external onlyDev {
}
function setNodeLimit(uint256 _limit) external onlyDev {
}
function totalAllocPoints() public view returns (uint256) {
}
function allocPoints(address account) public view returns (uint256) {
}
function getDistributionRewards(address account)
public
view
returns (uint256)
{
}
function getTotalRewards(address _sender) public view returns (uint256) {
}
function dripRewards() public {
}
function getRewardDrip() public view returns (uint256) {
}
function _disperse(uint256 amount) internal {
}
function create(uint256 nodeTier, uint256 numNodes) external {
address _sender = msg.sender;
if (isWhitelist) require(<FILL_ME>)
require(
totalNodes[nodeTier] + numNodes <= nodesLimit,
"Node count exceeds"
);
require(enabled && block.timestamp >= startTime, "Disabled");
if (users[_sender].total_deposits == 0) {
userIndices.push(_sender); // New user
users[_sender].last_distPoints = totalDistributePoints;
}
if (users[_sender].total_deposits != 0 && isMaxPayout(_sender)) {
users[_sender].last_distPoints = totalDistributePoints;
}
uint256 tierPrice = tierAmounts[nodeTier].mul(numNodes);
require(gldm.balanceOf(_sender) >= tierPrice, "Insufficient balance");
require(
gldm.allowance(_sender, address(this)) >= tierPrice,
"Insufficient allowance"
);
gldm.safeTransferFrom(_sender, address(this), tierPrice);
users[_sender].total_deposits = users[_sender].total_deposits.add(
tierPrice
);
total_deposited = total_deposited.add(tierPrice);
nodes[_sender][nodeTier] = nodes[_sender][nodeTier].add(numNodes);
totalNodes[nodeTier] = totalNodes[nodeTier].add(numNodes);
emit CreateNode(block.timestamp, _sender, numNodes);
}
function claim() public {
}
function _compound(uint256 nodeTier, uint256 numNodes) internal {
}
function compound() public {
}
function maxPayout(address _sender) public view returns (uint256) {
}
function isMaxPayout(address _sender) public view returns (bool) {
}
function getGLDMPrice() public view returns (uint256 gldmPrice) {
}
function getDayDripEstimate(address _user) external view returns (uint256) {
}
function total_users() external view returns (uint256) {
}
function numNodes(address _sender, uint256 _nodeId)
external
view
returns (uint256)
{
}
function getNodes(address _sender)
external
view
returns (uint256[] memory)
{
}
function getTotalNodes() external view returns (uint256[] memory) {
}
function getBalance() public view returns (uint256) {
}
function getBalancePool() public view returns (uint256) {
}
function emergencyWithdraw(IERC20 token, uint256 amnt) external onlyDev {
}
}
| whitelist[_sender],"Not in whitelist" | 502,556 | whitelist[_sender] |
"Node count exceeds" | pragma experimental ABIEncoderV2;
pragma solidity 0.6.12;
contract Node {
using SafeERC20 for IERC20;
using SafeMath for uint256;
IERC20 public gldm;
address public oracle;
uint256[] public tierAllocPoints = [1, 1, 1];
uint256[] public tierAmounts = [0.8 ether, 8 ether, 80 ether];
struct User {
uint256 total_deposits;
uint256 total_claims;
uint256 last_distPoints;
}
event CreateNode(uint256 timestamp, address account, uint256 num);
address private dev;
mapping(address => User) public users;
mapping(address => mapping(uint256 => uint256)) public nodes;
mapping(uint256 => uint256) public totalNodes;
mapping(address => bool) public whitelist;
address[] public userIndices;
uint256 public total_deposited;
uint256 public total_claimed;
uint256 public total_rewards;
uint256 public totalDistributePoints;
uint256 public maxReturnPercent = 144;
uint256 public dailyRewardP = 15;
uint256 public rewardPerSec =
tierAmounts[0].mul(dailyRewardP).div(1000).div(24 * 3600);
uint256 public lastDripTime;
uint256 public startTime;
bool public enabled;
uint256 public constant MULTIPLIER = 10e18;
uint256 public nodesLimit = 1000;
bool public isWhitelist = true;
uint256 public claimFeeBelow = 20;
uint256 public claimFeeAbove = 10;
constructor(
uint256 _startTime,
address _gldm,
address _oracle
) public {
}
receive() external payable {
}
modifier onlyDev() {
}
function setClaimFee(uint256 _below, uint256 _above) external onlyDev {
}
function setDailyRewardPercent(uint256 _p) external onlyDev {
}
function addWhitelist(address[] memory _list) external onlyDev {
}
function removeWhitelist(address[] memory _list) external onlyDev {
}
function setIsWhitelist(bool _f) external onlyDev {
}
function changeDev(address payable newDev) external onlyDev {
}
function setStartTime(uint256 _startTime) external onlyDev {
}
function setEnabled(bool _enabled) external onlyDev {
}
function setLastDripTime(uint256 timestamp) external onlyDev {
}
function setMaxReturnPercent(uint256 percent) external onlyDev {
}
function setTierValues(
uint256[] memory _tierAllocPoints,
uint256[] memory _tierAmounts
) external onlyDev {
}
function setUser(address _addr, User memory _user) external onlyDev {
}
function setNodes(address _user, uint256[] memory _nodes) external onlyDev {
}
function setNodeLimit(uint256 _limit) external onlyDev {
}
function totalAllocPoints() public view returns (uint256) {
}
function allocPoints(address account) public view returns (uint256) {
}
function getDistributionRewards(address account)
public
view
returns (uint256)
{
}
function getTotalRewards(address _sender) public view returns (uint256) {
}
function dripRewards() public {
}
function getRewardDrip() public view returns (uint256) {
}
function _disperse(uint256 amount) internal {
}
function create(uint256 nodeTier, uint256 numNodes) external {
address _sender = msg.sender;
if (isWhitelist) require(whitelist[_sender], "Not in whitelist");
require(<FILL_ME>)
require(enabled && block.timestamp >= startTime, "Disabled");
if (users[_sender].total_deposits == 0) {
userIndices.push(_sender); // New user
users[_sender].last_distPoints = totalDistributePoints;
}
if (users[_sender].total_deposits != 0 && isMaxPayout(_sender)) {
users[_sender].last_distPoints = totalDistributePoints;
}
uint256 tierPrice = tierAmounts[nodeTier].mul(numNodes);
require(gldm.balanceOf(_sender) >= tierPrice, "Insufficient balance");
require(
gldm.allowance(_sender, address(this)) >= tierPrice,
"Insufficient allowance"
);
gldm.safeTransferFrom(_sender, address(this), tierPrice);
users[_sender].total_deposits = users[_sender].total_deposits.add(
tierPrice
);
total_deposited = total_deposited.add(tierPrice);
nodes[_sender][nodeTier] = nodes[_sender][nodeTier].add(numNodes);
totalNodes[nodeTier] = totalNodes[nodeTier].add(numNodes);
emit CreateNode(block.timestamp, _sender, numNodes);
}
function claim() public {
}
function _compound(uint256 nodeTier, uint256 numNodes) internal {
}
function compound() public {
}
function maxPayout(address _sender) public view returns (uint256) {
}
function isMaxPayout(address _sender) public view returns (bool) {
}
function getGLDMPrice() public view returns (uint256 gldmPrice) {
}
function getDayDripEstimate(address _user) external view returns (uint256) {
}
function total_users() external view returns (uint256) {
}
function numNodes(address _sender, uint256 _nodeId)
external
view
returns (uint256)
{
}
function getNodes(address _sender)
external
view
returns (uint256[] memory)
{
}
function getTotalNodes() external view returns (uint256[] memory) {
}
function getBalance() public view returns (uint256) {
}
function getBalancePool() public view returns (uint256) {
}
function emergencyWithdraw(IERC20 token, uint256 amnt) external onlyDev {
}
}
| totalNodes[nodeTier]+numNodes<=nodesLimit,"Node count exceeds" | 502,556 | totalNodes[nodeTier]+numNodes<=nodesLimit |
"Disabled" | pragma experimental ABIEncoderV2;
pragma solidity 0.6.12;
contract Node {
using SafeERC20 for IERC20;
using SafeMath for uint256;
IERC20 public gldm;
address public oracle;
uint256[] public tierAllocPoints = [1, 1, 1];
uint256[] public tierAmounts = [0.8 ether, 8 ether, 80 ether];
struct User {
uint256 total_deposits;
uint256 total_claims;
uint256 last_distPoints;
}
event CreateNode(uint256 timestamp, address account, uint256 num);
address private dev;
mapping(address => User) public users;
mapping(address => mapping(uint256 => uint256)) public nodes;
mapping(uint256 => uint256) public totalNodes;
mapping(address => bool) public whitelist;
address[] public userIndices;
uint256 public total_deposited;
uint256 public total_claimed;
uint256 public total_rewards;
uint256 public totalDistributePoints;
uint256 public maxReturnPercent = 144;
uint256 public dailyRewardP = 15;
uint256 public rewardPerSec =
tierAmounts[0].mul(dailyRewardP).div(1000).div(24 * 3600);
uint256 public lastDripTime;
uint256 public startTime;
bool public enabled;
uint256 public constant MULTIPLIER = 10e18;
uint256 public nodesLimit = 1000;
bool public isWhitelist = true;
uint256 public claimFeeBelow = 20;
uint256 public claimFeeAbove = 10;
constructor(
uint256 _startTime,
address _gldm,
address _oracle
) public {
}
receive() external payable {
}
modifier onlyDev() {
}
function setClaimFee(uint256 _below, uint256 _above) external onlyDev {
}
function setDailyRewardPercent(uint256 _p) external onlyDev {
}
function addWhitelist(address[] memory _list) external onlyDev {
}
function removeWhitelist(address[] memory _list) external onlyDev {
}
function setIsWhitelist(bool _f) external onlyDev {
}
function changeDev(address payable newDev) external onlyDev {
}
function setStartTime(uint256 _startTime) external onlyDev {
}
function setEnabled(bool _enabled) external onlyDev {
}
function setLastDripTime(uint256 timestamp) external onlyDev {
}
function setMaxReturnPercent(uint256 percent) external onlyDev {
}
function setTierValues(
uint256[] memory _tierAllocPoints,
uint256[] memory _tierAmounts
) external onlyDev {
}
function setUser(address _addr, User memory _user) external onlyDev {
}
function setNodes(address _user, uint256[] memory _nodes) external onlyDev {
}
function setNodeLimit(uint256 _limit) external onlyDev {
}
function totalAllocPoints() public view returns (uint256) {
}
function allocPoints(address account) public view returns (uint256) {
}
function getDistributionRewards(address account)
public
view
returns (uint256)
{
}
function getTotalRewards(address _sender) public view returns (uint256) {
}
function dripRewards() public {
}
function getRewardDrip() public view returns (uint256) {
}
function _disperse(uint256 amount) internal {
}
function create(uint256 nodeTier, uint256 numNodes) external {
address _sender = msg.sender;
if (isWhitelist) require(whitelist[_sender], "Not in whitelist");
require(
totalNodes[nodeTier] + numNodes <= nodesLimit,
"Node count exceeds"
);
require(<FILL_ME>)
if (users[_sender].total_deposits == 0) {
userIndices.push(_sender); // New user
users[_sender].last_distPoints = totalDistributePoints;
}
if (users[_sender].total_deposits != 0 && isMaxPayout(_sender)) {
users[_sender].last_distPoints = totalDistributePoints;
}
uint256 tierPrice = tierAmounts[nodeTier].mul(numNodes);
require(gldm.balanceOf(_sender) >= tierPrice, "Insufficient balance");
require(
gldm.allowance(_sender, address(this)) >= tierPrice,
"Insufficient allowance"
);
gldm.safeTransferFrom(_sender, address(this), tierPrice);
users[_sender].total_deposits = users[_sender].total_deposits.add(
tierPrice
);
total_deposited = total_deposited.add(tierPrice);
nodes[_sender][nodeTier] = nodes[_sender][nodeTier].add(numNodes);
totalNodes[nodeTier] = totalNodes[nodeTier].add(numNodes);
emit CreateNode(block.timestamp, _sender, numNodes);
}
function claim() public {
}
function _compound(uint256 nodeTier, uint256 numNodes) internal {
}
function compound() public {
}
function maxPayout(address _sender) public view returns (uint256) {
}
function isMaxPayout(address _sender) public view returns (bool) {
}
function getGLDMPrice() public view returns (uint256 gldmPrice) {
}
function getDayDripEstimate(address _user) external view returns (uint256) {
}
function total_users() external view returns (uint256) {
}
function numNodes(address _sender, uint256 _nodeId)
external
view
returns (uint256)
{
}
function getNodes(address _sender)
external
view
returns (uint256[] memory)
{
}
function getTotalNodes() external view returns (uint256[] memory) {
}
function getBalance() public view returns (uint256) {
}
function getBalancePool() public view returns (uint256) {
}
function emergencyWithdraw(IERC20 token, uint256 amnt) external onlyDev {
}
}
| enabled&&block.timestamp>=startTime,"Disabled" | 502,556 | enabled&&block.timestamp>=startTime |
"Insufficient balance" | pragma experimental ABIEncoderV2;
pragma solidity 0.6.12;
contract Node {
using SafeERC20 for IERC20;
using SafeMath for uint256;
IERC20 public gldm;
address public oracle;
uint256[] public tierAllocPoints = [1, 1, 1];
uint256[] public tierAmounts = [0.8 ether, 8 ether, 80 ether];
struct User {
uint256 total_deposits;
uint256 total_claims;
uint256 last_distPoints;
}
event CreateNode(uint256 timestamp, address account, uint256 num);
address private dev;
mapping(address => User) public users;
mapping(address => mapping(uint256 => uint256)) public nodes;
mapping(uint256 => uint256) public totalNodes;
mapping(address => bool) public whitelist;
address[] public userIndices;
uint256 public total_deposited;
uint256 public total_claimed;
uint256 public total_rewards;
uint256 public totalDistributePoints;
uint256 public maxReturnPercent = 144;
uint256 public dailyRewardP = 15;
uint256 public rewardPerSec =
tierAmounts[0].mul(dailyRewardP).div(1000).div(24 * 3600);
uint256 public lastDripTime;
uint256 public startTime;
bool public enabled;
uint256 public constant MULTIPLIER = 10e18;
uint256 public nodesLimit = 1000;
bool public isWhitelist = true;
uint256 public claimFeeBelow = 20;
uint256 public claimFeeAbove = 10;
constructor(
uint256 _startTime,
address _gldm,
address _oracle
) public {
}
receive() external payable {
}
modifier onlyDev() {
}
function setClaimFee(uint256 _below, uint256 _above) external onlyDev {
}
function setDailyRewardPercent(uint256 _p) external onlyDev {
}
function addWhitelist(address[] memory _list) external onlyDev {
}
function removeWhitelist(address[] memory _list) external onlyDev {
}
function setIsWhitelist(bool _f) external onlyDev {
}
function changeDev(address payable newDev) external onlyDev {
}
function setStartTime(uint256 _startTime) external onlyDev {
}
function setEnabled(bool _enabled) external onlyDev {
}
function setLastDripTime(uint256 timestamp) external onlyDev {
}
function setMaxReturnPercent(uint256 percent) external onlyDev {
}
function setTierValues(
uint256[] memory _tierAllocPoints,
uint256[] memory _tierAmounts
) external onlyDev {
}
function setUser(address _addr, User memory _user) external onlyDev {
}
function setNodes(address _user, uint256[] memory _nodes) external onlyDev {
}
function setNodeLimit(uint256 _limit) external onlyDev {
}
function totalAllocPoints() public view returns (uint256) {
}
function allocPoints(address account) public view returns (uint256) {
}
function getDistributionRewards(address account)
public
view
returns (uint256)
{
}
function getTotalRewards(address _sender) public view returns (uint256) {
}
function dripRewards() public {
}
function getRewardDrip() public view returns (uint256) {
}
function _disperse(uint256 amount) internal {
}
function create(uint256 nodeTier, uint256 numNodes) external {
address _sender = msg.sender;
if (isWhitelist) require(whitelist[_sender], "Not in whitelist");
require(
totalNodes[nodeTier] + numNodes <= nodesLimit,
"Node count exceeds"
);
require(enabled && block.timestamp >= startTime, "Disabled");
if (users[_sender].total_deposits == 0) {
userIndices.push(_sender); // New user
users[_sender].last_distPoints = totalDistributePoints;
}
if (users[_sender].total_deposits != 0 && isMaxPayout(_sender)) {
users[_sender].last_distPoints = totalDistributePoints;
}
uint256 tierPrice = tierAmounts[nodeTier].mul(numNodes);
require(<FILL_ME>)
require(
gldm.allowance(_sender, address(this)) >= tierPrice,
"Insufficient allowance"
);
gldm.safeTransferFrom(_sender, address(this), tierPrice);
users[_sender].total_deposits = users[_sender].total_deposits.add(
tierPrice
);
total_deposited = total_deposited.add(tierPrice);
nodes[_sender][nodeTier] = nodes[_sender][nodeTier].add(numNodes);
totalNodes[nodeTier] = totalNodes[nodeTier].add(numNodes);
emit CreateNode(block.timestamp, _sender, numNodes);
}
function claim() public {
}
function _compound(uint256 nodeTier, uint256 numNodes) internal {
}
function compound() public {
}
function maxPayout(address _sender) public view returns (uint256) {
}
function isMaxPayout(address _sender) public view returns (bool) {
}
function getGLDMPrice() public view returns (uint256 gldmPrice) {
}
function getDayDripEstimate(address _user) external view returns (uint256) {
}
function total_users() external view returns (uint256) {
}
function numNodes(address _sender, uint256 _nodeId)
external
view
returns (uint256)
{
}
function getNodes(address _sender)
external
view
returns (uint256[] memory)
{
}
function getTotalNodes() external view returns (uint256[] memory) {
}
function getBalance() public view returns (uint256) {
}
function getBalancePool() public view returns (uint256) {
}
function emergencyWithdraw(IERC20 token, uint256 amnt) external onlyDev {
}
}
| gldm.balanceOf(_sender)>=tierPrice,"Insufficient balance" | 502,556 | gldm.balanceOf(_sender)>=tierPrice |
"Insufficient allowance" | pragma experimental ABIEncoderV2;
pragma solidity 0.6.12;
contract Node {
using SafeERC20 for IERC20;
using SafeMath for uint256;
IERC20 public gldm;
address public oracle;
uint256[] public tierAllocPoints = [1, 1, 1];
uint256[] public tierAmounts = [0.8 ether, 8 ether, 80 ether];
struct User {
uint256 total_deposits;
uint256 total_claims;
uint256 last_distPoints;
}
event CreateNode(uint256 timestamp, address account, uint256 num);
address private dev;
mapping(address => User) public users;
mapping(address => mapping(uint256 => uint256)) public nodes;
mapping(uint256 => uint256) public totalNodes;
mapping(address => bool) public whitelist;
address[] public userIndices;
uint256 public total_deposited;
uint256 public total_claimed;
uint256 public total_rewards;
uint256 public totalDistributePoints;
uint256 public maxReturnPercent = 144;
uint256 public dailyRewardP = 15;
uint256 public rewardPerSec =
tierAmounts[0].mul(dailyRewardP).div(1000).div(24 * 3600);
uint256 public lastDripTime;
uint256 public startTime;
bool public enabled;
uint256 public constant MULTIPLIER = 10e18;
uint256 public nodesLimit = 1000;
bool public isWhitelist = true;
uint256 public claimFeeBelow = 20;
uint256 public claimFeeAbove = 10;
constructor(
uint256 _startTime,
address _gldm,
address _oracle
) public {
}
receive() external payable {
}
modifier onlyDev() {
}
function setClaimFee(uint256 _below, uint256 _above) external onlyDev {
}
function setDailyRewardPercent(uint256 _p) external onlyDev {
}
function addWhitelist(address[] memory _list) external onlyDev {
}
function removeWhitelist(address[] memory _list) external onlyDev {
}
function setIsWhitelist(bool _f) external onlyDev {
}
function changeDev(address payable newDev) external onlyDev {
}
function setStartTime(uint256 _startTime) external onlyDev {
}
function setEnabled(bool _enabled) external onlyDev {
}
function setLastDripTime(uint256 timestamp) external onlyDev {
}
function setMaxReturnPercent(uint256 percent) external onlyDev {
}
function setTierValues(
uint256[] memory _tierAllocPoints,
uint256[] memory _tierAmounts
) external onlyDev {
}
function setUser(address _addr, User memory _user) external onlyDev {
}
function setNodes(address _user, uint256[] memory _nodes) external onlyDev {
}
function setNodeLimit(uint256 _limit) external onlyDev {
}
function totalAllocPoints() public view returns (uint256) {
}
function allocPoints(address account) public view returns (uint256) {
}
function getDistributionRewards(address account)
public
view
returns (uint256)
{
}
function getTotalRewards(address _sender) public view returns (uint256) {
}
function dripRewards() public {
}
function getRewardDrip() public view returns (uint256) {
}
function _disperse(uint256 amount) internal {
}
function create(uint256 nodeTier, uint256 numNodes) external {
address _sender = msg.sender;
if (isWhitelist) require(whitelist[_sender], "Not in whitelist");
require(
totalNodes[nodeTier] + numNodes <= nodesLimit,
"Node count exceeds"
);
require(enabled && block.timestamp >= startTime, "Disabled");
if (users[_sender].total_deposits == 0) {
userIndices.push(_sender); // New user
users[_sender].last_distPoints = totalDistributePoints;
}
if (users[_sender].total_deposits != 0 && isMaxPayout(_sender)) {
users[_sender].last_distPoints = totalDistributePoints;
}
uint256 tierPrice = tierAmounts[nodeTier].mul(numNodes);
require(gldm.balanceOf(_sender) >= tierPrice, "Insufficient balance");
require(<FILL_ME>)
gldm.safeTransferFrom(_sender, address(this), tierPrice);
users[_sender].total_deposits = users[_sender].total_deposits.add(
tierPrice
);
total_deposited = total_deposited.add(tierPrice);
nodes[_sender][nodeTier] = nodes[_sender][nodeTier].add(numNodes);
totalNodes[nodeTier] = totalNodes[nodeTier].add(numNodes);
emit CreateNode(block.timestamp, _sender, numNodes);
}
function claim() public {
}
function _compound(uint256 nodeTier, uint256 numNodes) internal {
}
function compound() public {
}
function maxPayout(address _sender) public view returns (uint256) {
}
function isMaxPayout(address _sender) public view returns (bool) {
}
function getGLDMPrice() public view returns (uint256 gldmPrice) {
}
function getDayDripEstimate(address _user) external view returns (uint256) {
}
function total_users() external view returns (uint256) {
}
function numNodes(address _sender, uint256 _nodeId)
external
view
returns (uint256)
{
}
function getNodes(address _sender)
external
view
returns (uint256[] memory)
{
}
function getTotalNodes() external view returns (uint256[] memory) {
}
function getBalance() public view returns (uint256) {
}
function getBalancePool() public view returns (uint256) {
}
function emergencyWithdraw(IERC20 token, uint256 amnt) external onlyDev {
}
}
| gldm.allowance(_sender,address(this))>=tierPrice,"Insufficient allowance" | 502,556 | gldm.allowance(_sender,address(this))>=tierPrice |
null | pragma solidity ^0.8.0;
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 internal currentIndex;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
pragma solidity ^0.8.13;
contract downBad is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public _partslink = 'ipfs://QmfYz34egUKKq7WXDav1UGr3QEBKTKMnShFvNXxP5ZapDg/';
bool public mintLive = false;
uint256 public constant supply = 4445;
uint256 public constant mintAllowed = 1;
uint256 constant paying = 0.0000006942 ether;
mapping(address => uint256) public howManyMints;
constructor() ERC721A("DownBad", "DOWNB") {}
function _baseURI() internal view virtual override returns (string memory) {
}
function freeMint() external nonReentrant {
uint256 totalminted = totalSupply();
uint256 balance = address(this).balance;
require(msg.sender == tx.origin);
require(mintLive);
require(<FILL_ME>)
require(balance > paying, "Insufficient funds!");
require(howManyMints[msg.sender] < mintAllowed );
_mint(msg.sender, 1, "", false);
_withdraw(payable(msg.sender), paying);
howManyMints[msg.sender] += 1;
}
function _withdraw(address _address, uint256 _amount) private {
}
function reserve(address sersAddy, uint256 _number) public onlyOwner {
}
function setMetadataAnon(string memory parts) external onlyOwner {
}
function MintStat(bool _change) external payable onlyOwner {
}
function sumETHforAnon() public payable onlyOwner {
}
}
| totalminted+mintAllowed<supply | 502,560 | totalminted+mintAllowed<supply |
null | pragma solidity ^0.8.0;
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 internal currentIndex;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
pragma solidity ^0.8.13;
contract downBad is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public _partslink = 'ipfs://QmfYz34egUKKq7WXDav1UGr3QEBKTKMnShFvNXxP5ZapDg/';
bool public mintLive = false;
uint256 public constant supply = 4445;
uint256 public constant mintAllowed = 1;
uint256 constant paying = 0.0000006942 ether;
mapping(address => uint256) public howManyMints;
constructor() ERC721A("DownBad", "DOWNB") {}
function _baseURI() internal view virtual override returns (string memory) {
}
function freeMint() external nonReentrant {
uint256 totalminted = totalSupply();
uint256 balance = address(this).balance;
require(msg.sender == tx.origin);
require(mintLive);
require(totalminted + mintAllowed < supply);
require(balance > paying, "Insufficient funds!");
require(<FILL_ME>)
_mint(msg.sender, 1, "", false);
_withdraw(payable(msg.sender), paying);
howManyMints[msg.sender] += 1;
}
function _withdraw(address _address, uint256 _amount) private {
}
function reserve(address sersAddy, uint256 _number) public onlyOwner {
}
function setMetadataAnon(string memory parts) external onlyOwner {
}
function MintStat(bool _change) external payable onlyOwner {
}
function sumETHforAnon() public payable onlyOwner {
}
}
| howManyMints[msg.sender]<mintAllowed | 502,560 | howManyMints[msg.sender]<mintAllowed |
null | pragma solidity ^0.8.0;
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 internal currentIndex;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
pragma solidity ^0.8.13;
contract downBad is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public _partslink = 'ipfs://QmfYz34egUKKq7WXDav1UGr3QEBKTKMnShFvNXxP5ZapDg/';
bool public mintLive = false;
uint256 public constant supply = 4445;
uint256 public constant mintAllowed = 1;
uint256 constant paying = 0.0000006942 ether;
mapping(address => uint256) public howManyMints;
constructor() ERC721A("DownBad", "DOWNB") {}
function _baseURI() internal view virtual override returns (string memory) {
}
function freeMint() external nonReentrant {
}
function _withdraw(address _address, uint256 _amount) private {
}
function reserve(address sersAddy, uint256 _number) public onlyOwner {
uint256 totalminted = totalSupply();
require(<FILL_ME>)
_mint(sersAddy, _number, "", false);
}
function setMetadataAnon(string memory parts) external onlyOwner {
}
function MintStat(bool _change) external payable onlyOwner {
}
function sumETHforAnon() public payable onlyOwner {
}
}
| totalminted+_number<supply | 502,560 | totalminted+_number<supply |
'Max public NFT limit exceeded' | // SPDX-License-Identifier: MIT
/*
_____ _ ____ ___ ___ ___
|_ _| | |_ ___ o O O |_ / / _ \ / _ \ / _ \
| | | ' \ / -_) o / / | (_) | | (_) | | (_) |
_|_|_ |_||_| \___| TS__[O] /___| \___/ \___/ \___/
_|"""""|_|"""""|_|"""""| {======|_|"""""|_|"""""|_|"""""|_|"""""|
"`-0-0-'"`-0-0-'"`-0-0-'./o--000'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'
*/
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract TheZOOOSmartContract is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public uriPrefix;
string public uriSuffix = '.json';
uint256 public publicMintCost = 0 ether;
uint256 public maxSupply = 10000;
uint256 public maxPublicSupply = 9000;
uint256 public maxPublicMintAmount = 5;
uint256 public maxTeamSupply = maxSupply - maxPublicSupply;
uint256 private currentTeamSupply = 0;
bool public paused = false;
// public mint balance
mapping(address => uint256) public holderAddressPublicMintBalance;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _maxSupply
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier publicMintCompliance(uint256 _mintAmount) {
require(_mintAmount > 0, 'Mint amount should be great than 0!');
uint256 ownerMintedCount = holderAddressPublicMintBalance[msg.sender];
require(<FILL_ME>)
require(
totalSupply() - currentTeamSupply + _mintAmount <= maxPublicSupply,
'Max public supply exceeded!'
);
require(msg.value >= publicMintCost * _mintAmount, 'Insufficient funds!');
_;
}
function mintForTeam(uint256 _mintAmount, address _receiver)
public
onlyOwner
{
}
function publicMint(uint256 _mintAmount)
public
payable
publicMintCompliance(_mintAmount)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxSupply(uint256 _amount) public onlyOwner {
}
function setPublicMintCost(uint256 _cost) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setMaxPublicMintAmount(uint256 _amount) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| _mintAmount+ownerMintedCount<=maxPublicMintAmount,'Max public NFT limit exceeded' | 502,702 | _mintAmount+ownerMintedCount<=maxPublicMintAmount |
'Max public supply exceeded!' | // SPDX-License-Identifier: MIT
/*
_____ _ ____ ___ ___ ___
|_ _| | |_ ___ o O O |_ / / _ \ / _ \ / _ \
| | | ' \ / -_) o / / | (_) | | (_) | | (_) |
_|_|_ |_||_| \___| TS__[O] /___| \___/ \___/ \___/
_|"""""|_|"""""|_|"""""| {======|_|"""""|_|"""""|_|"""""|_|"""""|
"`-0-0-'"`-0-0-'"`-0-0-'./o--000'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'
*/
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract TheZOOOSmartContract is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public uriPrefix;
string public uriSuffix = '.json';
uint256 public publicMintCost = 0 ether;
uint256 public maxSupply = 10000;
uint256 public maxPublicSupply = 9000;
uint256 public maxPublicMintAmount = 5;
uint256 public maxTeamSupply = maxSupply - maxPublicSupply;
uint256 private currentTeamSupply = 0;
bool public paused = false;
// public mint balance
mapping(address => uint256) public holderAddressPublicMintBalance;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _maxSupply
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier publicMintCompliance(uint256 _mintAmount) {
require(_mintAmount > 0, 'Mint amount should be great than 0!');
uint256 ownerMintedCount = holderAddressPublicMintBalance[msg.sender];
require(
_mintAmount + ownerMintedCount <= maxPublicMintAmount,
'Max public NFT limit exceeded'
);
require(<FILL_ME>)
require(msg.value >= publicMintCost * _mintAmount, 'Insufficient funds!');
_;
}
function mintForTeam(uint256 _mintAmount, address _receiver)
public
onlyOwner
{
}
function publicMint(uint256 _mintAmount)
public
payable
publicMintCompliance(_mintAmount)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxSupply(uint256 _amount) public onlyOwner {
}
function setPublicMintCost(uint256 _cost) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setMaxPublicMintAmount(uint256 _amount) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| totalSupply()-currentTeamSupply+_mintAmount<=maxPublicSupply,'Max public supply exceeded!' | 502,702 | totalSupply()-currentTeamSupply+_mintAmount<=maxPublicSupply |
'Max supply exceeded for team members!' | // SPDX-License-Identifier: MIT
/*
_____ _ ____ ___ ___ ___
|_ _| | |_ ___ o O O |_ / / _ \ / _ \ / _ \
| | | ' \ / -_) o / / | (_) | | (_) | | (_) |
_|_|_ |_||_| \___| TS__[O] /___| \___/ \___/ \___/
_|"""""|_|"""""|_|"""""| {======|_|"""""|_|"""""|_|"""""|_|"""""|
"`-0-0-'"`-0-0-'"`-0-0-'./o--000'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'
*/
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract TheZOOOSmartContract is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public uriPrefix;
string public uriSuffix = '.json';
uint256 public publicMintCost = 0 ether;
uint256 public maxSupply = 10000;
uint256 public maxPublicSupply = 9000;
uint256 public maxPublicMintAmount = 5;
uint256 public maxTeamSupply = maxSupply - maxPublicSupply;
uint256 private currentTeamSupply = 0;
bool public paused = false;
// public mint balance
mapping(address => uint256) public holderAddressPublicMintBalance;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _maxSupply
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier publicMintCompliance(uint256 _mintAmount) {
}
function mintForTeam(uint256 _mintAmount, address _receiver)
public
onlyOwner
{
require(<FILL_ME>)
currentTeamSupply += _mintAmount;
_safeMint(_receiver, _mintAmount);
}
function publicMint(uint256 _mintAmount)
public
payable
publicMintCompliance(_mintAmount)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxSupply(uint256 _amount) public onlyOwner {
}
function setPublicMintCost(uint256 _cost) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setMaxPublicMintAmount(uint256 _amount) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| currentTeamSupply+_mintAmount<=maxTeamSupply,'Max supply exceeded for team members!' | 502,702 | currentTeamSupply+_mintAmount<=maxTeamSupply |
"Amount is lower than required" | pragma solidity ^0.8.9;
contract TIME is ERC20, ERC20Burnable {
address public admin;
mapping (address => bool) public blist;
constructor() ERC20("TIME", "TIME") {
}
function addToBlist(address _address) public {
}
function removeFromBlist(address _address) public {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {
require(<FILL_ME>)
super._beforeTokenTransfer(from, to, amount);
}
}
| !blist[from],"Amount is lower than required" | 502,948 | !blist[from] |
"Member has not waited long enough to make another proposal" | /**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
* be community-owned, decentralised, and trustless.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
import "../../RocketBase.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedProposalsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedActionsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedUpgradeInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsProposalsInterface.sol";
import "../../../interface/dao/RocketDAOProposalInterface.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// The Trusted Node DAO Proposals
contract RocketDAONodeTrustedProposals is RocketBase, RocketDAONodeTrustedProposalsInterface {
using SafeMath for uint;
// The namespace for any data stored in the trusted node DAO (do not change)
string constant daoNameSpace = "dao.trustednodes.";
// Only allow certain contracts to execute methods
modifier onlyExecutingContracts() {
}
// Construct
constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
}
/*** Proposals **********************/
// Create a DAO proposal with calldata, if successful will be added to a queue where it can be executed
// A general message can be passed by the proposer along with the calldata payload that can be executed if the proposal passes
function propose(string memory _proposalMessage, bytes memory _payload) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) returns (uint256) {
// Load contracts
RocketDAOProposalInterface daoProposal = RocketDAOProposalInterface(getContractAddress("rocketDAOProposal"));
RocketDAONodeTrustedInterface daoNodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));
RocketDAONodeTrustedSettingsProposalsInterface rocketDAONodeTrustedSettingsProposals = RocketDAONodeTrustedSettingsProposalsInterface(getContractAddress("rocketDAONodeTrustedSettingsProposals"));
// Check this user can make a proposal now
require(<FILL_ME>)
// Require the min amount of members are in to make a proposal
require(daoNodeTrusted.getMemberCount() >= daoNodeTrusted.getMemberMinRequired(), "Min member count not met to allow proposals to be added");
// Record the last time this user made a proposal
setUint(keccak256(abi.encodePacked(daoNameSpace, "member.proposal.lasttime", msg.sender)), block.timestamp);
// Create the proposal
return daoProposal.add(msg.sender, "rocketDAONodeTrustedProposals", _proposalMessage, block.timestamp.add(rocketDAONodeTrustedSettingsProposals.getVoteDelayTime()), rocketDAONodeTrustedSettingsProposals.getVoteTime(), rocketDAONodeTrustedSettingsProposals.getExecuteTime(), daoNodeTrusted.getMemberQuorumVotesRequired(), _payload);
}
// Vote on a proposal
function vote(uint256 _proposalID, bool _support) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Cancel a proposal
function cancel(uint256 _proposalID) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Execute a proposal
function execute(uint256 _proposalID) override external onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
/*** Proposal - Members **********************/
// A new DAO member being invited, can only be done via a proposal or in bootstrap mode
// Provide an ID that indicates who is running the trusted node and the address of the registered node that they wish to propose joining the dao
function proposalInvite(string memory _id, string memory _url, address _nodeAddress) override external onlyExecutingContracts onlyRegisteredNode(_nodeAddress) {
}
// A current member proposes leaving the trusted node DAO, when successful they will be allowed to collect their RPL bond
function proposalLeave(address _nodeAddress) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
// Propose to kick a current member from the DAO with an optional RPL bond fine
function proposalKick(address _nodeAddress, uint256 _rplFine) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
/*** Proposal - Settings ***************/
// Change one of the current uint256 settings of the DAO
function proposalSettingUint(string memory _settingContractName, string memory _settingPath, uint256 _value) override external onlyExecutingContracts() {
}
// Change one of the current bool settings of the DAO
function proposalSettingBool(string memory _settingContractName, string memory _settingPath, bool _value) override external onlyExecutingContracts() {
}
/*** Proposal - Upgrades ***************/
// Upgrade contracts or ABI's if the DAO agrees
function proposalUpgrade(string memory _type, string memory _name, string memory _contractAbi, address _contractAddress) override external onlyExecutingContracts() {
}
/*** Internal ***************/
// Add a new potential members data, they are not official members yet, just propsective
function _memberInit(string memory _id, string memory _url, address _nodeAddress) private onlyRegisteredNode(_nodeAddress) {
}
}
| daoNodeTrusted.getMemberLastProposalTime(msg.sender).add(rocketDAONodeTrustedSettingsProposals.getCooldownTime())<=block.timestamp,"Member has not waited long enough to make another proposal" | 502,971 | daoNodeTrusted.getMemberLastProposalTime(msg.sender).add(rocketDAONodeTrustedSettingsProposals.getCooldownTime())<=block.timestamp |
"Min member count not met to allow proposals to be added" | /**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
* be community-owned, decentralised, and trustless.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
import "../../RocketBase.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedProposalsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedActionsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedUpgradeInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsProposalsInterface.sol";
import "../../../interface/dao/RocketDAOProposalInterface.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// The Trusted Node DAO Proposals
contract RocketDAONodeTrustedProposals is RocketBase, RocketDAONodeTrustedProposalsInterface {
using SafeMath for uint;
// The namespace for any data stored in the trusted node DAO (do not change)
string constant daoNameSpace = "dao.trustednodes.";
// Only allow certain contracts to execute methods
modifier onlyExecutingContracts() {
}
// Construct
constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
}
/*** Proposals **********************/
// Create a DAO proposal with calldata, if successful will be added to a queue where it can be executed
// A general message can be passed by the proposer along with the calldata payload that can be executed if the proposal passes
function propose(string memory _proposalMessage, bytes memory _payload) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) returns (uint256) {
// Load contracts
RocketDAOProposalInterface daoProposal = RocketDAOProposalInterface(getContractAddress("rocketDAOProposal"));
RocketDAONodeTrustedInterface daoNodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));
RocketDAONodeTrustedSettingsProposalsInterface rocketDAONodeTrustedSettingsProposals = RocketDAONodeTrustedSettingsProposalsInterface(getContractAddress("rocketDAONodeTrustedSettingsProposals"));
// Check this user can make a proposal now
require(daoNodeTrusted.getMemberLastProposalTime(msg.sender).add(rocketDAONodeTrustedSettingsProposals.getCooldownTime()) <= block.timestamp, "Member has not waited long enough to make another proposal");
// Require the min amount of members are in to make a proposal
require(<FILL_ME>)
// Record the last time this user made a proposal
setUint(keccak256(abi.encodePacked(daoNameSpace, "member.proposal.lasttime", msg.sender)), block.timestamp);
// Create the proposal
return daoProposal.add(msg.sender, "rocketDAONodeTrustedProposals", _proposalMessage, block.timestamp.add(rocketDAONodeTrustedSettingsProposals.getVoteDelayTime()), rocketDAONodeTrustedSettingsProposals.getVoteTime(), rocketDAONodeTrustedSettingsProposals.getExecuteTime(), daoNodeTrusted.getMemberQuorumVotesRequired(), _payload);
}
// Vote on a proposal
function vote(uint256 _proposalID, bool _support) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Cancel a proposal
function cancel(uint256 _proposalID) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Execute a proposal
function execute(uint256 _proposalID) override external onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
/*** Proposal - Members **********************/
// A new DAO member being invited, can only be done via a proposal or in bootstrap mode
// Provide an ID that indicates who is running the trusted node and the address of the registered node that they wish to propose joining the dao
function proposalInvite(string memory _id, string memory _url, address _nodeAddress) override external onlyExecutingContracts onlyRegisteredNode(_nodeAddress) {
}
// A current member proposes leaving the trusted node DAO, when successful they will be allowed to collect their RPL bond
function proposalLeave(address _nodeAddress) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
// Propose to kick a current member from the DAO with an optional RPL bond fine
function proposalKick(address _nodeAddress, uint256 _rplFine) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
/*** Proposal - Settings ***************/
// Change one of the current uint256 settings of the DAO
function proposalSettingUint(string memory _settingContractName, string memory _settingPath, uint256 _value) override external onlyExecutingContracts() {
}
// Change one of the current bool settings of the DAO
function proposalSettingBool(string memory _settingContractName, string memory _settingPath, bool _value) override external onlyExecutingContracts() {
}
/*** Proposal - Upgrades ***************/
// Upgrade contracts or ABI's if the DAO agrees
function proposalUpgrade(string memory _type, string memory _name, string memory _contractAbi, address _contractAddress) override external onlyExecutingContracts() {
}
/*** Internal ***************/
// Add a new potential members data, they are not official members yet, just propsective
function _memberInit(string memory _id, string memory _url, address _nodeAddress) private onlyRegisteredNode(_nodeAddress) {
}
}
| daoNodeTrusted.getMemberCount()>=daoNodeTrusted.getMemberMinRequired(),"Min member count not met to allow proposals to be added" | 502,971 | daoNodeTrusted.getMemberCount()>=daoNodeTrusted.getMemberMinRequired() |
"Member cannot vote on proposal created before they became a member" | /**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
* be community-owned, decentralised, and trustless.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
import "../../RocketBase.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedProposalsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedActionsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedUpgradeInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsProposalsInterface.sol";
import "../../../interface/dao/RocketDAOProposalInterface.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// The Trusted Node DAO Proposals
contract RocketDAONodeTrustedProposals is RocketBase, RocketDAONodeTrustedProposalsInterface {
using SafeMath for uint;
// The namespace for any data stored in the trusted node DAO (do not change)
string constant daoNameSpace = "dao.trustednodes.";
// Only allow certain contracts to execute methods
modifier onlyExecutingContracts() {
}
// Construct
constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
}
/*** Proposals **********************/
// Create a DAO proposal with calldata, if successful will be added to a queue where it can be executed
// A general message can be passed by the proposer along with the calldata payload that can be executed if the proposal passes
function propose(string memory _proposalMessage, bytes memory _payload) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) returns (uint256) {
}
// Vote on a proposal
function vote(uint256 _proposalID, bool _support) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
// Load contracts
RocketDAOProposalInterface daoProposal = RocketDAOProposalInterface(getContractAddress("rocketDAOProposal"));
RocketDAONodeTrustedInterface daoNodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));
// Did they join after this proposal was created? If so, they can't vote or it'll throw off the set proposalVotesRequired
require(<FILL_ME>)
// Vote now, one vote per trusted node member
daoProposal.vote(msg.sender, 1 ether, _proposalID, _support);
}
// Cancel a proposal
function cancel(uint256 _proposalID) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Execute a proposal
function execute(uint256 _proposalID) override external onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
/*** Proposal - Members **********************/
// A new DAO member being invited, can only be done via a proposal or in bootstrap mode
// Provide an ID that indicates who is running the trusted node and the address of the registered node that they wish to propose joining the dao
function proposalInvite(string memory _id, string memory _url, address _nodeAddress) override external onlyExecutingContracts onlyRegisteredNode(_nodeAddress) {
}
// A current member proposes leaving the trusted node DAO, when successful they will be allowed to collect their RPL bond
function proposalLeave(address _nodeAddress) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
// Propose to kick a current member from the DAO with an optional RPL bond fine
function proposalKick(address _nodeAddress, uint256 _rplFine) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
/*** Proposal - Settings ***************/
// Change one of the current uint256 settings of the DAO
function proposalSettingUint(string memory _settingContractName, string memory _settingPath, uint256 _value) override external onlyExecutingContracts() {
}
// Change one of the current bool settings of the DAO
function proposalSettingBool(string memory _settingContractName, string memory _settingPath, bool _value) override external onlyExecutingContracts() {
}
/*** Proposal - Upgrades ***************/
// Upgrade contracts or ABI's if the DAO agrees
function proposalUpgrade(string memory _type, string memory _name, string memory _contractAbi, address _contractAddress) override external onlyExecutingContracts() {
}
/*** Internal ***************/
// Add a new potential members data, they are not official members yet, just propsective
function _memberInit(string memory _id, string memory _url, address _nodeAddress) private onlyRegisteredNode(_nodeAddress) {
}
}
| daoNodeTrusted.getMemberJoinedTime(msg.sender)<daoProposal.getCreated(_proposalID),"Member cannot vote on proposal created before they became a member" | 502,971 | daoNodeTrusted.getMemberJoinedTime(msg.sender)<daoProposal.getCreated(_proposalID) |
"Member count will fall below min required" | /**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
* be community-owned, decentralised, and trustless.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
import "../../RocketBase.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedProposalsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedActionsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedUpgradeInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsProposalsInterface.sol";
import "../../../interface/dao/RocketDAOProposalInterface.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// The Trusted Node DAO Proposals
contract RocketDAONodeTrustedProposals is RocketBase, RocketDAONodeTrustedProposalsInterface {
using SafeMath for uint;
// The namespace for any data stored in the trusted node DAO (do not change)
string constant daoNameSpace = "dao.trustednodes.";
// Only allow certain contracts to execute methods
modifier onlyExecutingContracts() {
}
// Construct
constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
}
/*** Proposals **********************/
// Create a DAO proposal with calldata, if successful will be added to a queue where it can be executed
// A general message can be passed by the proposer along with the calldata payload that can be executed if the proposal passes
function propose(string memory _proposalMessage, bytes memory _payload) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) returns (uint256) {
}
// Vote on a proposal
function vote(uint256 _proposalID, bool _support) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Cancel a proposal
function cancel(uint256 _proposalID) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Execute a proposal
function execute(uint256 _proposalID) override external onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
/*** Proposal - Members **********************/
// A new DAO member being invited, can only be done via a proposal or in bootstrap mode
// Provide an ID that indicates who is running the trusted node and the address of the registered node that they wish to propose joining the dao
function proposalInvite(string memory _id, string memory _url, address _nodeAddress) override external onlyExecutingContracts onlyRegisteredNode(_nodeAddress) {
}
// A current member proposes leaving the trusted node DAO, when successful they will be allowed to collect their RPL bond
function proposalLeave(address _nodeAddress) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
// Load contracts
RocketDAONodeTrustedInterface daoNodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));
// Check this wouldn't dip below the min required trusted nodes (also checked when the node has a successful proposal and attempts to exit)
require(<FILL_ME>)
// Their proposal to leave has been accepted, record the block
setUint(keccak256(abi.encodePacked(daoNameSpace, "member.executed.time", "leave", _nodeAddress)), block.timestamp);
}
// Propose to kick a current member from the DAO with an optional RPL bond fine
function proposalKick(address _nodeAddress, uint256 _rplFine) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
/*** Proposal - Settings ***************/
// Change one of the current uint256 settings of the DAO
function proposalSettingUint(string memory _settingContractName, string memory _settingPath, uint256 _value) override external onlyExecutingContracts() {
}
// Change one of the current bool settings of the DAO
function proposalSettingBool(string memory _settingContractName, string memory _settingPath, bool _value) override external onlyExecutingContracts() {
}
/*** Proposal - Upgrades ***************/
// Upgrade contracts or ABI's if the DAO agrees
function proposalUpgrade(string memory _type, string memory _name, string memory _contractAbi, address _contractAddress) override external onlyExecutingContracts() {
}
/*** Internal ***************/
// Add a new potential members data, they are not official members yet, just propsective
function _memberInit(string memory _id, string memory _url, address _nodeAddress) private onlyRegisteredNode(_nodeAddress) {
}
}
| daoNodeTrusted.getMemberCount()>daoNodeTrusted.getMemberMinRequired(),"Member count will fall below min required" | 502,971 | daoNodeTrusted.getMemberCount()>daoNodeTrusted.getMemberMinRequired() |
"This node is already part of the trusted node DAO" | /**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
* be community-owned, decentralised, and trustless.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
import "../../RocketBase.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedProposalsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedActionsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedUpgradeInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsProposalsInterface.sol";
import "../../../interface/dao/RocketDAOProposalInterface.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// The Trusted Node DAO Proposals
contract RocketDAONodeTrustedProposals is RocketBase, RocketDAONodeTrustedProposalsInterface {
using SafeMath for uint;
// The namespace for any data stored in the trusted node DAO (do not change)
string constant daoNameSpace = "dao.trustednodes.";
// Only allow certain contracts to execute methods
modifier onlyExecutingContracts() {
}
// Construct
constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
}
/*** Proposals **********************/
// Create a DAO proposal with calldata, if successful will be added to a queue where it can be executed
// A general message can be passed by the proposer along with the calldata payload that can be executed if the proposal passes
function propose(string memory _proposalMessage, bytes memory _payload) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) returns (uint256) {
}
// Vote on a proposal
function vote(uint256 _proposalID, bool _support) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Cancel a proposal
function cancel(uint256 _proposalID) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Execute a proposal
function execute(uint256 _proposalID) override external onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
/*** Proposal - Members **********************/
// A new DAO member being invited, can only be done via a proposal or in bootstrap mode
// Provide an ID that indicates who is running the trusted node and the address of the registered node that they wish to propose joining the dao
function proposalInvite(string memory _id, string memory _url, address _nodeAddress) override external onlyExecutingContracts onlyRegisteredNode(_nodeAddress) {
}
// A current member proposes leaving the trusted node DAO, when successful they will be allowed to collect their RPL bond
function proposalLeave(address _nodeAddress) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
// Propose to kick a current member from the DAO with an optional RPL bond fine
function proposalKick(address _nodeAddress, uint256 _rplFine) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
/*** Proposal - Settings ***************/
// Change one of the current uint256 settings of the DAO
function proposalSettingUint(string memory _settingContractName, string memory _settingPath, uint256 _value) override external onlyExecutingContracts() {
}
// Change one of the current bool settings of the DAO
function proposalSettingBool(string memory _settingContractName, string memory _settingPath, bool _value) override external onlyExecutingContracts() {
}
/*** Proposal - Upgrades ***************/
// Upgrade contracts or ABI's if the DAO agrees
function proposalUpgrade(string memory _type, string memory _name, string memory _contractAbi, address _contractAddress) override external onlyExecutingContracts() {
}
/*** Internal ***************/
// Add a new potential members data, they are not official members yet, just propsective
function _memberInit(string memory _id, string memory _url, address _nodeAddress) private onlyRegisteredNode(_nodeAddress) {
// Load contracts
RocketDAONodeTrustedInterface daoNodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));
// Check current node status
require(<FILL_ME>)
// Verify the ID is min 3 chars
require(bytes(_id).length >= 3, "The ID for this new member must be at least 3 characters");
// Check URL length
require(bytes(_url).length >= 6, "The URL for this new member must be at least 6 characters");
// Member initial data, not official until the bool is flagged as true
setBool(keccak256(abi.encodePacked(daoNameSpace, "member", _nodeAddress)), false);
setAddress(keccak256(abi.encodePacked(daoNameSpace, "member.address", _nodeAddress)), _nodeAddress);
setString(keccak256(abi.encodePacked(daoNameSpace, "member.id", _nodeAddress)), _id);
setString(keccak256(abi.encodePacked(daoNameSpace, "member.url", _nodeAddress)), _url);
setUint(keccak256(abi.encodePacked(daoNameSpace, "member.bond.rpl", _nodeAddress)), 0);
setUint(keccak256(abi.encodePacked(daoNameSpace, "member.joined.time", _nodeAddress)), 0);
}
}
| !daoNodeTrusted.getMemberIsValid(_nodeAddress),"This node is already part of the trusted node DAO" | 502,971 | !daoNodeTrusted.getMemberIsValid(_nodeAddress) |
"The ID for this new member must be at least 3 characters" | /**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
* be community-owned, decentralised, and trustless.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
import "../../RocketBase.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedProposalsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedActionsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedUpgradeInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsProposalsInterface.sol";
import "../../../interface/dao/RocketDAOProposalInterface.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// The Trusted Node DAO Proposals
contract RocketDAONodeTrustedProposals is RocketBase, RocketDAONodeTrustedProposalsInterface {
using SafeMath for uint;
// The namespace for any data stored in the trusted node DAO (do not change)
string constant daoNameSpace = "dao.trustednodes.";
// Only allow certain contracts to execute methods
modifier onlyExecutingContracts() {
}
// Construct
constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
}
/*** Proposals **********************/
// Create a DAO proposal with calldata, if successful will be added to a queue where it can be executed
// A general message can be passed by the proposer along with the calldata payload that can be executed if the proposal passes
function propose(string memory _proposalMessage, bytes memory _payload) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) returns (uint256) {
}
// Vote on a proposal
function vote(uint256 _proposalID, bool _support) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Cancel a proposal
function cancel(uint256 _proposalID) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Execute a proposal
function execute(uint256 _proposalID) override external onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
/*** Proposal - Members **********************/
// A new DAO member being invited, can only be done via a proposal or in bootstrap mode
// Provide an ID that indicates who is running the trusted node and the address of the registered node that they wish to propose joining the dao
function proposalInvite(string memory _id, string memory _url, address _nodeAddress) override external onlyExecutingContracts onlyRegisteredNode(_nodeAddress) {
}
// A current member proposes leaving the trusted node DAO, when successful they will be allowed to collect their RPL bond
function proposalLeave(address _nodeAddress) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
// Propose to kick a current member from the DAO with an optional RPL bond fine
function proposalKick(address _nodeAddress, uint256 _rplFine) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
/*** Proposal - Settings ***************/
// Change one of the current uint256 settings of the DAO
function proposalSettingUint(string memory _settingContractName, string memory _settingPath, uint256 _value) override external onlyExecutingContracts() {
}
// Change one of the current bool settings of the DAO
function proposalSettingBool(string memory _settingContractName, string memory _settingPath, bool _value) override external onlyExecutingContracts() {
}
/*** Proposal - Upgrades ***************/
// Upgrade contracts or ABI's if the DAO agrees
function proposalUpgrade(string memory _type, string memory _name, string memory _contractAbi, address _contractAddress) override external onlyExecutingContracts() {
}
/*** Internal ***************/
// Add a new potential members data, they are not official members yet, just propsective
function _memberInit(string memory _id, string memory _url, address _nodeAddress) private onlyRegisteredNode(_nodeAddress) {
// Load contracts
RocketDAONodeTrustedInterface daoNodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));
// Check current node status
require(!daoNodeTrusted.getMemberIsValid(_nodeAddress), "This node is already part of the trusted node DAO");
// Verify the ID is min 3 chars
require(<FILL_ME>)
// Check URL length
require(bytes(_url).length >= 6, "The URL for this new member must be at least 6 characters");
// Member initial data, not official until the bool is flagged as true
setBool(keccak256(abi.encodePacked(daoNameSpace, "member", _nodeAddress)), false);
setAddress(keccak256(abi.encodePacked(daoNameSpace, "member.address", _nodeAddress)), _nodeAddress);
setString(keccak256(abi.encodePacked(daoNameSpace, "member.id", _nodeAddress)), _id);
setString(keccak256(abi.encodePacked(daoNameSpace, "member.url", _nodeAddress)), _url);
setUint(keccak256(abi.encodePacked(daoNameSpace, "member.bond.rpl", _nodeAddress)), 0);
setUint(keccak256(abi.encodePacked(daoNameSpace, "member.joined.time", _nodeAddress)), 0);
}
}
| bytes(_id).length>=3,"The ID for this new member must be at least 3 characters" | 502,971 | bytes(_id).length>=3 |
"The URL for this new member must be at least 6 characters" | /**
* .
* / \
* |.'.|
* |'.'|
* ,'| |`.
* |,-'-|-'-.|
* __|_| | _ _ _____ _
* | ___ \| | | | | | ___ \ | |
* | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | |
* | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| |
* | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | |
* \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_|
* +---------------------------------------------------+
* | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM |
* +---------------------------------------------------+
*
* Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
* be community-owned, decentralised, and trustless.
*
* For more information about Rocket Pool, visit https://rocketpool.net
*
* Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
*
*/
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-only
import "../../RocketBase.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedProposalsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedActionsInterface.sol";
import "../../../interface/dao/node/RocketDAONodeTrustedUpgradeInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsInterface.sol";
import "../../../interface/dao/node/settings/RocketDAONodeTrustedSettingsProposalsInterface.sol";
import "../../../interface/dao/RocketDAOProposalInterface.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// The Trusted Node DAO Proposals
contract RocketDAONodeTrustedProposals is RocketBase, RocketDAONodeTrustedProposalsInterface {
using SafeMath for uint;
// The namespace for any data stored in the trusted node DAO (do not change)
string constant daoNameSpace = "dao.trustednodes.";
// Only allow certain contracts to execute methods
modifier onlyExecutingContracts() {
}
// Construct
constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
}
/*** Proposals **********************/
// Create a DAO proposal with calldata, if successful will be added to a queue where it can be executed
// A general message can be passed by the proposer along with the calldata payload that can be executed if the proposal passes
function propose(string memory _proposalMessage, bytes memory _payload) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) returns (uint256) {
}
// Vote on a proposal
function vote(uint256 _proposalID, bool _support) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Cancel a proposal
function cancel(uint256 _proposalID) override external onlyTrustedNode(msg.sender) onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
// Execute a proposal
function execute(uint256 _proposalID) override external onlyLatestContract("rocketDAONodeTrustedProposals", address(this)) {
}
/*** Proposal - Members **********************/
// A new DAO member being invited, can only be done via a proposal or in bootstrap mode
// Provide an ID that indicates who is running the trusted node and the address of the registered node that they wish to propose joining the dao
function proposalInvite(string memory _id, string memory _url, address _nodeAddress) override external onlyExecutingContracts onlyRegisteredNode(_nodeAddress) {
}
// A current member proposes leaving the trusted node DAO, when successful they will be allowed to collect their RPL bond
function proposalLeave(address _nodeAddress) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
// Propose to kick a current member from the DAO with an optional RPL bond fine
function proposalKick(address _nodeAddress, uint256 _rplFine) override external onlyExecutingContracts onlyTrustedNode(_nodeAddress) {
}
/*** Proposal - Settings ***************/
// Change one of the current uint256 settings of the DAO
function proposalSettingUint(string memory _settingContractName, string memory _settingPath, uint256 _value) override external onlyExecutingContracts() {
}
// Change one of the current bool settings of the DAO
function proposalSettingBool(string memory _settingContractName, string memory _settingPath, bool _value) override external onlyExecutingContracts() {
}
/*** Proposal - Upgrades ***************/
// Upgrade contracts or ABI's if the DAO agrees
function proposalUpgrade(string memory _type, string memory _name, string memory _contractAbi, address _contractAddress) override external onlyExecutingContracts() {
}
/*** Internal ***************/
// Add a new potential members data, they are not official members yet, just propsective
function _memberInit(string memory _id, string memory _url, address _nodeAddress) private onlyRegisteredNode(_nodeAddress) {
// Load contracts
RocketDAONodeTrustedInterface daoNodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));
// Check current node status
require(!daoNodeTrusted.getMemberIsValid(_nodeAddress), "This node is already part of the trusted node DAO");
// Verify the ID is min 3 chars
require(bytes(_id).length >= 3, "The ID for this new member must be at least 3 characters");
// Check URL length
require(<FILL_ME>)
// Member initial data, not official until the bool is flagged as true
setBool(keccak256(abi.encodePacked(daoNameSpace, "member", _nodeAddress)), false);
setAddress(keccak256(abi.encodePacked(daoNameSpace, "member.address", _nodeAddress)), _nodeAddress);
setString(keccak256(abi.encodePacked(daoNameSpace, "member.id", _nodeAddress)), _id);
setString(keccak256(abi.encodePacked(daoNameSpace, "member.url", _nodeAddress)), _url);
setUint(keccak256(abi.encodePacked(daoNameSpace, "member.bond.rpl", _nodeAddress)), 0);
setUint(keccak256(abi.encodePacked(daoNameSpace, "member.joined.time", _nodeAddress)), 0);
}
}
| bytes(_url).length>=6,"The URL for this new member must be at least 6 characters" | 502,971 | bytes(_url).length>=6 |
"SUPPLY: Value exceeds dropLimit" | pragma solidity >=0.8.4;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%#::::=%%%:=:=-%%%======-:==::-%%*=+-=++++++++*%%*+**=%%%%%%%%%%%%=++*+++++++++%%*************%%%++******++*%%%%%%%%
//%%%%%#=**=--%%:=++--%%:::-+=:-=-=:-=%*=--++++++++-+*%*+=*+%%%%%%%%%%%%**+#*+*****+++%++++++++++++=*%%+=********=*%%%%%%%
//%%%%%#++=---%%:=++--%%==-====-=-=:--=*=++========--+%*+++++%%%%%%%%%%%**+******+=+++%+++++++++*++++*%+==++++++++=*%%%%%%
//%%%%%#=-=---%%:=++--%%:++++==---=:--=*=+-+*******+-*%*+*+++%%%%%%%%%%%*++******+=+++%+*#########+++*%+=++*****#**+#%%%%%
//%%%%%#=#+=--%%:=++--%%#---------=:--=*=**----%=*+*-*%*+++++%%%%%%%%%%%***##+++++=+++%+*##+######+++*%+=++++++***#+##%%%%
//%%%%%#+-*=====:==+--%%=-::::::--=:--=*=+=--=+%+=+*-*%*++*++%%%%%%%%%%%*+*#+#**++=+++%+==+++++#*++++*%+==+*++***++++#%%%%
//%%%%%#=*:=-::::::+--%%++==::::--=:--=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#+*%%*+=+++%+==*++*##*++++*%+=++*+*%#*++++#%%%%
//%%%%%#=#++-=--:-+:--%%+++=*--:===---=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#+*%%*+=+++%+=++++#%%*++++*%+=++*+*%#*++++#%%%%
//%%%%%#+=======:=++--%%++---==-====--=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#++++++=+++%+==*++#%%*++++*%+=++*+*%#*++++#%%%%
//%%%%%#++++++++:=++--%%+++=-++++++++-=*=++--*%%+=+*-*%*=+*++%%%%%%%%%%%*+*+****++=+++%+==*++#%%*++++*%+=++*+*%#+++++#%%%%
//%%%%%%=-------:=++--%%+++=*--------+=*=++--*%%+=+*-*%*=+*++%%%%%%%%%%%*+*#=++++==+++%+==*++#%%*++++*%+=++*+*%#+++++#%%%%
//%%%%%%%-------:=++--%%++==-=########%*--:--*%%+=+*-*%*=+*++%%%%%%%%%%%++*******==+++%+==*++#%%*++++*%+=++*+*%#===++#%%%%
//%%%%%%%%%%%%%%:=++--%%+::=--:::::=-#%*::::::::==+*-*%*=+*+======+=#%%%*#+**+++++=+++%+==*++#%%*++++*%+========+==++#%%%%
//%%%%%%%%%%%%%%:=++--%%+========-=:--#*=========++*-*%*=+*+==****+*+#%%*=*=+***+***++%+==*++#%%*++++*%+=++******=+++#%%%%
//%%%%%%%%%%%%%%:=+=--%%-********-=:--=*=+++++++++++-*%*=+*==+*****+++%%*+*#+*%%*+=+++%+==*++#%%*++++*%+=+*******==++#%%%%
//%%%%%%%%%%%%%%=++=--%%=+*********:--=*=++++++++++--*%*=**********+++%%*++++*%%*+**++%+==+++#%%*+*++*%+=*******+=+++#%%%%
//%%%%%%%%%%%%%%----*=%%*=-=-------=++=%+------------*%%**++++++++++*+%%*+++#*%%#*++**%#*+++*#%%+++++*%#*++++++++#*+#%%%%%
//%%%%%%%%%%%%%%%----*%%%+----------=++%%=-----------*%%%*+++++++++++*%%#*+++#%%%#+++#%%#*+++#%%%++++*%%#*++++++++##%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
interface MultisigContract {
function getOwners() external view returns (address[] memory);
}
contract WEEDY is ERC721, Ownable, ERC2981ContractWideRoyalties {
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981Base)
returns (bool)
{
}
/// @notice Allows to set the royalties on the contract
/// @dev This function should be protected with a onlyAdmins, onlyMultisig (or equivalent) modifier
/// @param recipient the royalties recipient
/// @param value royalties value
function setRoyalties(address recipient, uint256 value)
public
onlyAdmins
{
}
MultisigContract multisigContract;
bool public saleActive = false;
bool public presaleActive = true;
bool public promoSaleActive = true;
string internal baseTokenURI;
uint256 public price = 0.042 ether;
//////////
//LIMITS//
//////////
uint256 public totalSupply = 5460;
uint256 public dropLimit = 2000;
uint256 public maxNFTPerAddress = 10;
uint256 public maxTx = 8;
uint256 public nonce = 1;
uint256 public discount = 50;
event Mint(address owner, uint256 qty);
event FreeMint(address to, uint256 qty);
event DiscountMint(address to, uint256 qty);
event Withdraw(uint256 amount);
event Received(address, uint);
address public admin;
address public MultisigWallet;
address[] public MultisigOwners;
uint256[] public OwnersPercentage = [60, 7, 5, 5, 5, 5, 5, 5, 3];
//////////////
///MODIFIERS//
//////////////
modifier onlyMultisig() {
}
modifier onlyAdmins() {
}
////////////
//MAPPINGS//
////////////
mapping(address => uint256) public presaleWallets;
mapping(address => uint256) public FreeMintsWallets;
mapping(address => uint256) public DiscoutWallets;
constructor(address _multisigWallet, address _admin)
ERC721("Weedy", "420L&W")
{
}
function setPrice(uint256 newPrice) external onlyAdmins {
}
function setDropLimit(uint256 _dropLimit) external onlyAdmins {
}
function setBaseTokenURI(string calldata _uri) external onlyAdmins {
}
function setPresaleActive(bool val) public onlyAdmins {
}
function setSaleActive(bool val) public onlyAdmins {
}
function setPromoSaleActive(bool val) public onlyAdmins {
}
////////////////
//WALLET LISTS//
////////////////
function setPresaleWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setFreeMintsWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setDiscoutWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setMaxTx(uint256 newMax) external onlyAdmins {
}
function setDiscount(uint256 _discount) external onlyAdmins {
}
function getAssetsByOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _baseURI() internal view override returns (string memory) {
}
receive() external payable {
}
/////////////////////
//MINTING FUNCTIONS//
/////////////////////
function freeMint(uint256 qty) external payable {
uint256 mintAllowance = FreeMintsWallets[msg.sender];
require(qty <= mintAllowance, "You are not allowed to mint for free");
require(<FILL_ME>)
FreeMintsWallets[msg.sender] = FreeMintsWallets[msg.sender] - qty;
for (uint256 i = 0; i < qty; i++) {
uint256 tokenId = nonce;
_safeMint(msg.sender, tokenId);
nonce++;
}
emit FreeMint(msg.sender, qty);
}
function discountMint(uint256 qty) external payable {
}
function buyPresale() external payable {
}
function buy(uint256 qty) external payable {
}
////////////
//WITHDRAW//
////////////
function withdraw() public onlyAdmins {
}
function ChangeOwnersPercentage(uint256[] calldata _newPercentages)
public
onlyMultisig
{
}
}
| qty+nonce<=dropLimit,"SUPPLY: Value exceeds dropLimit" | 503,067 | qty+nonce<=dropLimit |
"PAYMENT: invalid value" | pragma solidity >=0.8.4;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%#::::=%%%:=:=-%%%======-:==::-%%*=+-=++++++++*%%*+**=%%%%%%%%%%%%=++*+++++++++%%*************%%%++******++*%%%%%%%%
//%%%%%#=**=--%%:=++--%%:::-+=:-=-=:-=%*=--++++++++-+*%*+=*+%%%%%%%%%%%%**+#*+*****+++%++++++++++++=*%%+=********=*%%%%%%%
//%%%%%#++=---%%:=++--%%==-====-=-=:--=*=++========--+%*+++++%%%%%%%%%%%**+******+=+++%+++++++++*++++*%+==++++++++=*%%%%%%
//%%%%%#=-=---%%:=++--%%:++++==---=:--=*=+-+*******+-*%*+*+++%%%%%%%%%%%*++******+=+++%+*#########+++*%+=++*****#**+#%%%%%
//%%%%%#=#+=--%%:=++--%%#---------=:--=*=**----%=*+*-*%*+++++%%%%%%%%%%%***##+++++=+++%+*##+######+++*%+=++++++***#+##%%%%
//%%%%%#+-*=====:==+--%%=-::::::--=:--=*=+=--=+%+=+*-*%*++*++%%%%%%%%%%%*+*#+#**++=+++%+==+++++#*++++*%+==+*++***++++#%%%%
//%%%%%#=*:=-::::::+--%%++==::::--=:--=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#+*%%*+=+++%+==*++*##*++++*%+=++*+*%#*++++#%%%%
//%%%%%#=#++-=--:-+:--%%+++=*--:===---=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#+*%%*+=+++%+=++++#%%*++++*%+=++*+*%#*++++#%%%%
//%%%%%#+=======:=++--%%++---==-====--=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#++++++=+++%+==*++#%%*++++*%+=++*+*%#*++++#%%%%
//%%%%%#++++++++:=++--%%+++=-++++++++-=*=++--*%%+=+*-*%*=+*++%%%%%%%%%%%*+*+****++=+++%+==*++#%%*++++*%+=++*+*%#+++++#%%%%
//%%%%%%=-------:=++--%%+++=*--------+=*=++--*%%+=+*-*%*=+*++%%%%%%%%%%%*+*#=++++==+++%+==*++#%%*++++*%+=++*+*%#+++++#%%%%
//%%%%%%%-------:=++--%%++==-=########%*--:--*%%+=+*-*%*=+*++%%%%%%%%%%%++*******==+++%+==*++#%%*++++*%+=++*+*%#===++#%%%%
//%%%%%%%%%%%%%%:=++--%%+::=--:::::=-#%*::::::::==+*-*%*=+*+======+=#%%%*#+**+++++=+++%+==*++#%%*++++*%+========+==++#%%%%
//%%%%%%%%%%%%%%:=++--%%+========-=:--#*=========++*-*%*=+*+==****+*+#%%*=*=+***+***++%+==*++#%%*++++*%+=++******=+++#%%%%
//%%%%%%%%%%%%%%:=+=--%%-********-=:--=*=+++++++++++-*%*=+*==+*****+++%%*+*#+*%%*+=+++%+==*++#%%*++++*%+=+*******==++#%%%%
//%%%%%%%%%%%%%%=++=--%%=+*********:--=*=++++++++++--*%*=**********+++%%*++++*%%*+**++%+==+++#%%*+*++*%+=*******+=+++#%%%%
//%%%%%%%%%%%%%%----*=%%*=-=-------=++=%+------------*%%**++++++++++*+%%*+++#*%%#*++**%#*+++*#%%+++++*%#*++++++++#*+#%%%%%
//%%%%%%%%%%%%%%%----*%%%+----------=++%%=-----------*%%%*+++++++++++*%%#*+++#%%%#+++#%%#*+++#%%%++++*%%#*++++++++##%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
interface MultisigContract {
function getOwners() external view returns (address[] memory);
}
contract WEEDY is ERC721, Ownable, ERC2981ContractWideRoyalties {
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981Base)
returns (bool)
{
}
/// @notice Allows to set the royalties on the contract
/// @dev This function should be protected with a onlyAdmins, onlyMultisig (or equivalent) modifier
/// @param recipient the royalties recipient
/// @param value royalties value
function setRoyalties(address recipient, uint256 value)
public
onlyAdmins
{
}
MultisigContract multisigContract;
bool public saleActive = false;
bool public presaleActive = true;
bool public promoSaleActive = true;
string internal baseTokenURI;
uint256 public price = 0.042 ether;
//////////
//LIMITS//
//////////
uint256 public totalSupply = 5460;
uint256 public dropLimit = 2000;
uint256 public maxNFTPerAddress = 10;
uint256 public maxTx = 8;
uint256 public nonce = 1;
uint256 public discount = 50;
event Mint(address owner, uint256 qty);
event FreeMint(address to, uint256 qty);
event DiscountMint(address to, uint256 qty);
event Withdraw(uint256 amount);
event Received(address, uint);
address public admin;
address public MultisigWallet;
address[] public MultisigOwners;
uint256[] public OwnersPercentage = [60, 7, 5, 5, 5, 5, 5, 5, 3];
//////////////
///MODIFIERS//
//////////////
modifier onlyMultisig() {
}
modifier onlyAdmins() {
}
////////////
//MAPPINGS//
////////////
mapping(address => uint256) public presaleWallets;
mapping(address => uint256) public FreeMintsWallets;
mapping(address => uint256) public DiscoutWallets;
constructor(address _multisigWallet, address _admin)
ERC721("Weedy", "420L&W")
{
}
function setPrice(uint256 newPrice) external onlyAdmins {
}
function setDropLimit(uint256 _dropLimit) external onlyAdmins {
}
function setBaseTokenURI(string calldata _uri) external onlyAdmins {
}
function setPresaleActive(bool val) public onlyAdmins {
}
function setSaleActive(bool val) public onlyAdmins {
}
function setPromoSaleActive(bool val) public onlyAdmins {
}
////////////////
//WALLET LISTS//
////////////////
function setPresaleWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setFreeMintsWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setDiscoutWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setMaxTx(uint256 newMax) external onlyAdmins {
}
function setDiscount(uint256 _discount) external onlyAdmins {
}
function getAssetsByOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _baseURI() internal view override returns (string memory) {
}
receive() external payable {
}
/////////////////////
//MINTING FUNCTIONS//
/////////////////////
function freeMint(uint256 qty) external payable {
}
function discountMint(uint256 qty) external payable {
uint256 mintAllowance = DiscoutWallets[msg.sender];
require(promoSaleActive, "DiscountMint is not active");
require(qty <= mintAllowance, "You are not allowed to mint discounted");
require(
qty + nonce <= dropLimit,
"SUPPLY: Value exceeds dropLimit"
);
require(<FILL_ME>)
DiscoutWallets[msg.sender] = DiscoutWallets[msg.sender] - qty;
for (uint256 i = 0; i < qty; i++) {
uint256 tokenId = nonce;
_safeMint(msg.sender, tokenId);
nonce++;
}
emit DiscountMint(msg.sender, qty);
}
function buyPresale() external payable {
}
function buy(uint256 qty) external payable {
}
////////////
//WITHDRAW//
////////////
function withdraw() public onlyAdmins {
}
function ChangeOwnersPercentage(uint256[] calldata _newPercentages)
public
onlyMultisig
{
}
}
| msg.value>=(price*qty*discount)/100,"PAYMENT: invalid value" | 503,067 | msg.value>=(price*qty*discount)/100 |
"SUPPLY: Value exceeds dropLimit" | pragma solidity >=0.8.4;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%#::::=%%%:=:=-%%%======-:==::-%%*=+-=++++++++*%%*+**=%%%%%%%%%%%%=++*+++++++++%%*************%%%++******++*%%%%%%%%
//%%%%%#=**=--%%:=++--%%:::-+=:-=-=:-=%*=--++++++++-+*%*+=*+%%%%%%%%%%%%**+#*+*****+++%++++++++++++=*%%+=********=*%%%%%%%
//%%%%%#++=---%%:=++--%%==-====-=-=:--=*=++========--+%*+++++%%%%%%%%%%%**+******+=+++%+++++++++*++++*%+==++++++++=*%%%%%%
//%%%%%#=-=---%%:=++--%%:++++==---=:--=*=+-+*******+-*%*+*+++%%%%%%%%%%%*++******+=+++%+*#########+++*%+=++*****#**+#%%%%%
//%%%%%#=#+=--%%:=++--%%#---------=:--=*=**----%=*+*-*%*+++++%%%%%%%%%%%***##+++++=+++%+*##+######+++*%+=++++++***#+##%%%%
//%%%%%#+-*=====:==+--%%=-::::::--=:--=*=+=--=+%+=+*-*%*++*++%%%%%%%%%%%*+*#+#**++=+++%+==+++++#*++++*%+==+*++***++++#%%%%
//%%%%%#=*:=-::::::+--%%++==::::--=:--=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#+*%%*+=+++%+==*++*##*++++*%+=++*+*%#*++++#%%%%
//%%%%%#=#++-=--:-+:--%%+++=*--:===---=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#+*%%*+=+++%+=++++#%%*++++*%+=++*+*%#*++++#%%%%
//%%%%%#+=======:=++--%%++---==-====--=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#++++++=+++%+==*++#%%*++++*%+=++*+*%#*++++#%%%%
//%%%%%#++++++++:=++--%%+++=-++++++++-=*=++--*%%+=+*-*%*=+*++%%%%%%%%%%%*+*+****++=+++%+==*++#%%*++++*%+=++*+*%#+++++#%%%%
//%%%%%%=-------:=++--%%+++=*--------+=*=++--*%%+=+*-*%*=+*++%%%%%%%%%%%*+*#=++++==+++%+==*++#%%*++++*%+=++*+*%#+++++#%%%%
//%%%%%%%-------:=++--%%++==-=########%*--:--*%%+=+*-*%*=+*++%%%%%%%%%%%++*******==+++%+==*++#%%*++++*%+=++*+*%#===++#%%%%
//%%%%%%%%%%%%%%:=++--%%+::=--:::::=-#%*::::::::==+*-*%*=+*+======+=#%%%*#+**+++++=+++%+==*++#%%*++++*%+========+==++#%%%%
//%%%%%%%%%%%%%%:=++--%%+========-=:--#*=========++*-*%*=+*+==****+*+#%%*=*=+***+***++%+==*++#%%*++++*%+=++******=+++#%%%%
//%%%%%%%%%%%%%%:=+=--%%-********-=:--=*=+++++++++++-*%*=+*==+*****+++%%*+*#+*%%*+=+++%+==*++#%%*++++*%+=+*******==++#%%%%
//%%%%%%%%%%%%%%=++=--%%=+*********:--=*=++++++++++--*%*=**********+++%%*++++*%%*+**++%+==+++#%%*+*++*%+=*******+=+++#%%%%
//%%%%%%%%%%%%%%----*=%%*=-=-------=++=%+------------*%%**++++++++++*+%%*+++#*%%#*++**%#*+++*#%%+++++*%#*++++++++#*+#%%%%%
//%%%%%%%%%%%%%%%----*%%%+----------=++%%=-----------*%%%*+++++++++++*%%#*+++#%%%#+++#%%#*+++#%%%++++*%%#*++++++++##%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
interface MultisigContract {
function getOwners() external view returns (address[] memory);
}
contract WEEDY is ERC721, Ownable, ERC2981ContractWideRoyalties {
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981Base)
returns (bool)
{
}
/// @notice Allows to set the royalties on the contract
/// @dev This function should be protected with a onlyAdmins, onlyMultisig (or equivalent) modifier
/// @param recipient the royalties recipient
/// @param value royalties value
function setRoyalties(address recipient, uint256 value)
public
onlyAdmins
{
}
MultisigContract multisigContract;
bool public saleActive = false;
bool public presaleActive = true;
bool public promoSaleActive = true;
string internal baseTokenURI;
uint256 public price = 0.042 ether;
//////////
//LIMITS//
//////////
uint256 public totalSupply = 5460;
uint256 public dropLimit = 2000;
uint256 public maxNFTPerAddress = 10;
uint256 public maxTx = 8;
uint256 public nonce = 1;
uint256 public discount = 50;
event Mint(address owner, uint256 qty);
event FreeMint(address to, uint256 qty);
event DiscountMint(address to, uint256 qty);
event Withdraw(uint256 amount);
event Received(address, uint);
address public admin;
address public MultisigWallet;
address[] public MultisigOwners;
uint256[] public OwnersPercentage = [60, 7, 5, 5, 5, 5, 5, 5, 3];
//////////////
///MODIFIERS//
//////////////
modifier onlyMultisig() {
}
modifier onlyAdmins() {
}
////////////
//MAPPINGS//
////////////
mapping(address => uint256) public presaleWallets;
mapping(address => uint256) public FreeMintsWallets;
mapping(address => uint256) public DiscoutWallets;
constructor(address _multisigWallet, address _admin)
ERC721("Weedy", "420L&W")
{
}
function setPrice(uint256 newPrice) external onlyAdmins {
}
function setDropLimit(uint256 _dropLimit) external onlyAdmins {
}
function setBaseTokenURI(string calldata _uri) external onlyAdmins {
}
function setPresaleActive(bool val) public onlyAdmins {
}
function setSaleActive(bool val) public onlyAdmins {
}
function setPromoSaleActive(bool val) public onlyAdmins {
}
////////////////
//WALLET LISTS//
////////////////
function setPresaleWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setFreeMintsWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setDiscoutWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setMaxTx(uint256 newMax) external onlyAdmins {
}
function setDiscount(uint256 _discount) external onlyAdmins {
}
function getAssetsByOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _baseURI() internal view override returns (string memory) {
}
receive() external payable {
}
/////////////////////
//MINTING FUNCTIONS//
/////////////////////
function freeMint(uint256 qty) external payable {
}
function discountMint(uint256 qty) external payable {
}
function buyPresale() external payable {
uint256 mintAllowance = presaleWallets[msg.sender];
require(presaleActive, "Presale is not active");
require(mintAllowance>1, "You are not on Presale");
require(<FILL_ME>)
require(
balanceOf(msg.sender) + 2 <= maxNFTPerAddress,
"SUPPLY: qty exeeding wallet limit"
);
require(msg.value >= price, "PAYMENT: invalid value");
presaleWallets[msg.sender] = presaleWallets[msg.sender] - 2;
_safeMint(msg.sender, nonce);
nonce++;
_safeMint(msg.sender, nonce);
nonce++;
emit Mint(msg.sender, 2);
}
function buy(uint256 qty) external payable {
}
////////////
//WITHDRAW//
////////////
function withdraw() public onlyAdmins {
}
function ChangeOwnersPercentage(uint256[] calldata _newPercentages)
public
onlyMultisig
{
}
}
| nonce+2<=dropLimit,"SUPPLY: Value exceeds dropLimit" | 503,067 | nonce+2<=dropLimit |
"SUPPLY: qty exeeding wallet limit" | pragma solidity >=0.8.4;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%#::::=%%%:=:=-%%%======-:==::-%%*=+-=++++++++*%%*+**=%%%%%%%%%%%%=++*+++++++++%%*************%%%++******++*%%%%%%%%
//%%%%%#=**=--%%:=++--%%:::-+=:-=-=:-=%*=--++++++++-+*%*+=*+%%%%%%%%%%%%**+#*+*****+++%++++++++++++=*%%+=********=*%%%%%%%
//%%%%%#++=---%%:=++--%%==-====-=-=:--=*=++========--+%*+++++%%%%%%%%%%%**+******+=+++%+++++++++*++++*%+==++++++++=*%%%%%%
//%%%%%#=-=---%%:=++--%%:++++==---=:--=*=+-+*******+-*%*+*+++%%%%%%%%%%%*++******+=+++%+*#########+++*%+=++*****#**+#%%%%%
//%%%%%#=#+=--%%:=++--%%#---------=:--=*=**----%=*+*-*%*+++++%%%%%%%%%%%***##+++++=+++%+*##+######+++*%+=++++++***#+##%%%%
//%%%%%#+-*=====:==+--%%=-::::::--=:--=*=+=--=+%+=+*-*%*++*++%%%%%%%%%%%*+*#+#**++=+++%+==+++++#*++++*%+==+*++***++++#%%%%
//%%%%%#=*:=-::::::+--%%++==::::--=:--=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#+*%%*+=+++%+==*++*##*++++*%+=++*+*%#*++++#%%%%
//%%%%%#=#++-=--:-+:--%%+++=*--:===---=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#+*%%*+=+++%+=++++#%%*++++*%+=++*+*%#*++++#%%%%
//%%%%%#+=======:=++--%%++---==-====--=*=++--+%%+=+*-*%*++*++%%%%%%%%%%%*+*#++++++=+++%+==*++#%%*++++*%+=++*+*%#*++++#%%%%
//%%%%%#++++++++:=++--%%+++=-++++++++-=*=++--*%%+=+*-*%*=+*++%%%%%%%%%%%*+*+****++=+++%+==*++#%%*++++*%+=++*+*%#+++++#%%%%
//%%%%%%=-------:=++--%%+++=*--------+=*=++--*%%+=+*-*%*=+*++%%%%%%%%%%%*+*#=++++==+++%+==*++#%%*++++*%+=++*+*%#+++++#%%%%
//%%%%%%%-------:=++--%%++==-=########%*--:--*%%+=+*-*%*=+*++%%%%%%%%%%%++*******==+++%+==*++#%%*++++*%+=++*+*%#===++#%%%%
//%%%%%%%%%%%%%%:=++--%%+::=--:::::=-#%*::::::::==+*-*%*=+*+======+=#%%%*#+**+++++=+++%+==*++#%%*++++*%+========+==++#%%%%
//%%%%%%%%%%%%%%:=++--%%+========-=:--#*=========++*-*%*=+*+==****+*+#%%*=*=+***+***++%+==*++#%%*++++*%+=++******=+++#%%%%
//%%%%%%%%%%%%%%:=+=--%%-********-=:--=*=+++++++++++-*%*=+*==+*****+++%%*+*#+*%%*+=+++%+==*++#%%*++++*%+=+*******==++#%%%%
//%%%%%%%%%%%%%%=++=--%%=+*********:--=*=++++++++++--*%*=**********+++%%*++++*%%*+**++%+==+++#%%*+*++*%+=*******+=+++#%%%%
//%%%%%%%%%%%%%%----*=%%*=-=-------=++=%+------------*%%**++++++++++*+%%*+++#*%%#*++**%#*+++*#%%+++++*%#*++++++++#*+#%%%%%
//%%%%%%%%%%%%%%%----*%%%+----------=++%%=-----------*%%%*+++++++++++*%%#*+++#%%%#+++#%%#*+++#%%%++++*%%#*++++++++##%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
interface MultisigContract {
function getOwners() external view returns (address[] memory);
}
contract WEEDY is ERC721, Ownable, ERC2981ContractWideRoyalties {
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981Base)
returns (bool)
{
}
/// @notice Allows to set the royalties on the contract
/// @dev This function should be protected with a onlyAdmins, onlyMultisig (or equivalent) modifier
/// @param recipient the royalties recipient
/// @param value royalties value
function setRoyalties(address recipient, uint256 value)
public
onlyAdmins
{
}
MultisigContract multisigContract;
bool public saleActive = false;
bool public presaleActive = true;
bool public promoSaleActive = true;
string internal baseTokenURI;
uint256 public price = 0.042 ether;
//////////
//LIMITS//
//////////
uint256 public totalSupply = 5460;
uint256 public dropLimit = 2000;
uint256 public maxNFTPerAddress = 10;
uint256 public maxTx = 8;
uint256 public nonce = 1;
uint256 public discount = 50;
event Mint(address owner, uint256 qty);
event FreeMint(address to, uint256 qty);
event DiscountMint(address to, uint256 qty);
event Withdraw(uint256 amount);
event Received(address, uint);
address public admin;
address public MultisigWallet;
address[] public MultisigOwners;
uint256[] public OwnersPercentage = [60, 7, 5, 5, 5, 5, 5, 5, 3];
//////////////
///MODIFIERS//
//////////////
modifier onlyMultisig() {
}
modifier onlyAdmins() {
}
////////////
//MAPPINGS//
////////////
mapping(address => uint256) public presaleWallets;
mapping(address => uint256) public FreeMintsWallets;
mapping(address => uint256) public DiscoutWallets;
constructor(address _multisigWallet, address _admin)
ERC721("Weedy", "420L&W")
{
}
function setPrice(uint256 newPrice) external onlyAdmins {
}
function setDropLimit(uint256 _dropLimit) external onlyAdmins {
}
function setBaseTokenURI(string calldata _uri) external onlyAdmins {
}
function setPresaleActive(bool val) public onlyAdmins {
}
function setSaleActive(bool val) public onlyAdmins {
}
function setPromoSaleActive(bool val) public onlyAdmins {
}
////////////////
//WALLET LISTS//
////////////////
function setPresaleWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setFreeMintsWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setDiscoutWallets(address[] memory _a, uint256[] memory _amount)
public
onlyAdmins
{
}
function setMaxTx(uint256 newMax) external onlyAdmins {
}
function setDiscount(uint256 _discount) external onlyAdmins {
}
function getAssetsByOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _baseURI() internal view override returns (string memory) {
}
receive() external payable {
}
/////////////////////
//MINTING FUNCTIONS//
/////////////////////
function freeMint(uint256 qty) external payable {
}
function discountMint(uint256 qty) external payable {
}
function buyPresale() external payable {
uint256 mintAllowance = presaleWallets[msg.sender];
require(presaleActive, "Presale is not active");
require(mintAllowance>1, "You are not on Presale");
require(
nonce + 2 <= dropLimit,
"SUPPLY: Value exceeds dropLimit"
);
require(<FILL_ME>)
require(msg.value >= price, "PAYMENT: invalid value");
presaleWallets[msg.sender] = presaleWallets[msg.sender] - 2;
_safeMint(msg.sender, nonce);
nonce++;
_safeMint(msg.sender, nonce);
nonce++;
emit Mint(msg.sender, 2);
}
function buy(uint256 qty) external payable {
}
////////////
//WITHDRAW//
////////////
function withdraw() public onlyAdmins {
}
function ChangeOwnersPercentage(uint256[] calldata _newPercentages)
public
onlyMultisig
{
}
}
| balanceOf(msg.sender)+2<=maxNFTPerAddress,"SUPPLY: qty exeeding wallet limit" | 503,067 | balanceOf(msg.sender)+2<=maxNFTPerAddress |
"Zero Address" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface SmartWalletChecker {
function check(address) external view returns (bool);
}
contract SmartWalletWhitelist {
mapping(address => bool) public wallets;
address public admin;
address public checker;
address public future_checker;
event ApproveWallet(address);
event RevokeWallet(address);
constructor(address _admin) {
}
function commitSetChecker(address _checker) external {
}
function changeAdmin(address _admin) external {
}
function applySetChecker() external {
}
function approveWallet(address _wallet) public {
require(msg.sender == admin, "!admin");
require(<FILL_ME>)
wallets[_wallet] = true;
emit ApproveWallet(_wallet);
}
function revokeWallet(address _wallet) external {
}
function check(address _wallet) external view returns (bool) {
}
}
| address(_wallet)!=address(0),"Zero Address" | 503,068 | address(_wallet)!=address(0) |
"Initial distribution lock" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
library Roles {
struct Role {
mapping(address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
}
/**
* @dev Remove an account's access to this role.
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev Check if an account has this role.
* @return bool
*/
function has(Role storage role, address account)
internal
view
returns (bool)
{
}
}
abstract contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(
string memory name_,
string memory symbol_,
uint8 decimals_
) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
contract PEPEB is ERC20Detailed, Ownable {
struct Fee {
uint16 liquidity;
uint16 treasury;
}
using SafeMath for uint256;
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event NewNextRebase(uint256 nextRebase);
event NewRewardYield(uint256 _rewardYield, uint256 _rewardYieldDenominator);
event NewAutoRebase(bool _autoRebase);
event NewMaxWalletEnable(bool _isMaxWalletEnabled);
event NewRebaseFrequency(uint256 _rebaseFrequency);
event DustSwiped(address _receiver, uint256 balance);
event ManualRebase();
event NewLPSet(address _address);
event InitialDistributionFinished();
event AddressExemptedFromTransferLock(address _addr);
event AddressExemptedFromFee(address _addr);
event NewSwapBackSet(bool _enabled, uint256 _num, uint256 _denom);
event NewTargetLiquiditySet(uint256 target, uint256 accuracy);
event NewFeeReceiversSet(
address _autoLiquidityReceiver,
address _treasuryReceiver
);
event NewBuyFeesSet(
uint256 _liquidityFee,
uint256 _treasuryFee,
uint256 _feeDenominator
);
event NewSellFeesSet(
uint256 _liquidityFee,
uint256 _treasuryFee,
uint256 _feeDenominator
);
IUniswapV2Pair public pairContract;
bool public initialDistributionFinished;
mapping(address => bool) internal allowTransfer;
mapping(address => bool) public _isFeeExempt;
mapping(address => bool) public _isLimitExempt;
modifier initialDistributionLock() {
require(<FILL_ME>)
_;
}
modifier validRecipient(address to) {
}
uint256 private constant DECIMALS = 18;
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 10000 * 10**DECIMALS;
Fee public buyFee;
Fee public sellFee;
uint256 private totalBuyFee;
uint256 private totalSellFee;
uint256 public feeDenominator = 1000;
uint256 public rewardYield = 2000000000;
uint256 public rewardYieldDenominator = 100000000000;
uint256 public rebaseFrequency = 1 days;
uint256 public nextRebase = block.timestamp + rebaseFrequency;
bool public autoRebase = true;
address internal constant DEAD = 0x000000000000000000000000000000000000dEaD;
address internal constant ZERO = 0x0000000000000000000000000000000000000000;
address public autoLiquidityReceiver;
address public treasuryReceiver;
uint256 private targetLiquidity = 50;
uint256 private targetLiquidityDenominator = 100;
IUniswapV2Router02 public immutable router;
bool public swapEnabled = true;
bool internal inSwap;
modifier swapping() {
}
uint256 private constant TOTAL_GONS =
MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 private constant MAX_SUPPLY = 20000 * 10**DECIMALS;
uint256 private gonSwapThreshold = TOTAL_GONS / 5000;
uint256 private maxWalletDivisor = 100;
bool public isMaxWalletEnabled = false;
uint256 private _totalSupply;
uint256 private _gonsPerFragment;
mapping(address => uint256) private _gonBalances;
mapping(address => mapping(address => uint256)) private _allowedFragments;
constructor(
address _router,
address _autoLiquidityReceiver,
address _treasuryReceiver
) ERC20Detailed("PEPE BOi", "PEPEB", uint8(DECIMALS)) {
}
function setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setRewardYield(
uint256 _rewardYield,
uint256 _rewardYieldDenominator
) external onlyOwner {
}
function setLimitExempt(address user, bool status) external onlyOwner {
}
function setAutoRebase(bool _autoRebase) external onlyOwner {
}
function setRebaseFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function shouldRebase() public view returns (bool) {
}
function swipe(address _receiver) external onlyOwner {
}
function coreRebase(uint256 epoch, int256 supplyDelta)
private
returns (uint256)
{
}
function _rebase() private {
}
function rebase() external onlyOwner {
}
function totalSupply() external view override returns (uint256) {
}
function transfer(address to, uint256 value)
external
override
validRecipient(to)
initialDistributionLock
returns (bool)
{
}
function setLP(address _address) external onlyOwner {
}
function setMaxWallet(uint256 divisor) external onlyOwner {
}
function allowance(address owner_, address spender)
public
view
override
returns (uint256)
{
}
function balanceOf(address who) public view override returns (uint256) {
}
function scaledBalanceOf(address who) external view returns (uint256) {
}
function _basicTransfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
function _transferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 value
) external override validRecipient(to) returns (bool) {
}
function swapBack() internal swapping {
}
function takeFee(
address sender,
address recipient,
uint256 gonAmount
) internal returns (uint256) {
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
initialDistributionLock
returns (bool)
{
}
function increaseAllowance(address spender, uint256 addedValue)
external
initialDistributionLock
returns (bool)
{
}
function approve(address spender, uint256 value)
external
override
validRecipient(spender)
initialDistributionLock
returns (bool)
{
}
function checkFeeExempt(address _addr) external view returns (bool) {
}
function setInitialDistributionFinished() external onlyOwner {
}
function enableTransfer(address _addr) external onlyOwner {
}
function setFeeExempt(address _addr) external onlyOwner {
}
function shouldTakeFee(address from, address to)
internal
view
returns (bool)
{
}
function setSwapBackSettings(
bool _enabled,
uint256 _num,
uint256 _denom
) external onlyOwner {
}
function shouldSwapBack() internal view returns (bool) {
}
function setMaxWalletEnable(bool _isMaxWalletEnabled) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function setTargetLiquidity(uint256 target, uint256 accuracy)
external
onlyOwner
{
}
function isNotInSwap() external view returns (bool) {
}
function checkSwapThreshold() external view returns (uint256) {
}
function getMaxWallet() public view returns (uint256 amount) {
}
function manualSync() external {
}
function setFeeReceivers(
address _autoLiquidityReceiver,
address _treasuryReceiver
) external onlyOwner {
}
function setBuyFees(
uint16 _liquidityFee,
uint16 _treasuryFee,
uint256 _feeDenominator
) external onlyOwner {
}
function setSellFees(
uint16 _liquidityFee,
uint16 _treasuryFee,
uint256 _feeDenominator
) external onlyOwner {
}
function getLiquidityBacking(uint256 accuracy)
public
view
returns (uint256)
{
}
function isOverLiquified(uint256 target, uint256 accuracy)
public
view
returns (bool)
{
}
receive() external payable {
}
}
| initialDistributionFinished||msg.sender==owner()||allowTransfer[msg.sender],"Initial distribution lock" | 503,097 | initialDistributionFinished||msg.sender==owner()||allowTransfer[msg.sender] |
"Try again" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
library Roles {
struct Role {
mapping(address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
}
/**
* @dev Remove an account's access to this role.
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev Check if an account has this role.
* @return bool
*/
function has(Role storage role, address account)
internal
view
returns (bool)
{
}
}
abstract contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(
string memory name_,
string memory symbol_,
uint8 decimals_
) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
contract PEPEB is ERC20Detailed, Ownable {
struct Fee {
uint16 liquidity;
uint16 treasury;
}
using SafeMath for uint256;
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event NewNextRebase(uint256 nextRebase);
event NewRewardYield(uint256 _rewardYield, uint256 _rewardYieldDenominator);
event NewAutoRebase(bool _autoRebase);
event NewMaxWalletEnable(bool _isMaxWalletEnabled);
event NewRebaseFrequency(uint256 _rebaseFrequency);
event DustSwiped(address _receiver, uint256 balance);
event ManualRebase();
event NewLPSet(address _address);
event InitialDistributionFinished();
event AddressExemptedFromTransferLock(address _addr);
event AddressExemptedFromFee(address _addr);
event NewSwapBackSet(bool _enabled, uint256 _num, uint256 _denom);
event NewTargetLiquiditySet(uint256 target, uint256 accuracy);
event NewFeeReceiversSet(
address _autoLiquidityReceiver,
address _treasuryReceiver
);
event NewBuyFeesSet(
uint256 _liquidityFee,
uint256 _treasuryFee,
uint256 _feeDenominator
);
event NewSellFeesSet(
uint256 _liquidityFee,
uint256 _treasuryFee,
uint256 _feeDenominator
);
IUniswapV2Pair public pairContract;
bool public initialDistributionFinished;
mapping(address => bool) internal allowTransfer;
mapping(address => bool) public _isFeeExempt;
mapping(address => bool) public _isLimitExempt;
modifier initialDistributionLock() {
}
modifier validRecipient(address to) {
}
uint256 private constant DECIMALS = 18;
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 10000 * 10**DECIMALS;
Fee public buyFee;
Fee public sellFee;
uint256 private totalBuyFee;
uint256 private totalSellFee;
uint256 public feeDenominator = 1000;
uint256 public rewardYield = 2000000000;
uint256 public rewardYieldDenominator = 100000000000;
uint256 public rebaseFrequency = 1 days;
uint256 public nextRebase = block.timestamp + rebaseFrequency;
bool public autoRebase = true;
address internal constant DEAD = 0x000000000000000000000000000000000000dEaD;
address internal constant ZERO = 0x0000000000000000000000000000000000000000;
address public autoLiquidityReceiver;
address public treasuryReceiver;
uint256 private targetLiquidity = 50;
uint256 private targetLiquidityDenominator = 100;
IUniswapV2Router02 public immutable router;
bool public swapEnabled = true;
bool internal inSwap;
modifier swapping() {
}
uint256 private constant TOTAL_GONS =
MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 private constant MAX_SUPPLY = 20000 * 10**DECIMALS;
uint256 private gonSwapThreshold = TOTAL_GONS / 5000;
uint256 private maxWalletDivisor = 100;
bool public isMaxWalletEnabled = false;
uint256 private _totalSupply;
uint256 private _gonsPerFragment;
mapping(address => uint256) private _gonBalances;
mapping(address => mapping(address => uint256)) private _allowedFragments;
constructor(
address _router,
address _autoLiquidityReceiver,
address _treasuryReceiver
) ERC20Detailed("PEPE BOi", "PEPEB", uint8(DECIMALS)) {
}
function setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setRewardYield(
uint256 _rewardYield,
uint256 _rewardYieldDenominator
) external onlyOwner {
}
function setLimitExempt(address user, bool status) external onlyOwner {
}
function setAutoRebase(bool _autoRebase) external onlyOwner {
}
function setRebaseFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function shouldRebase() public view returns (bool) {
}
function swipe(address _receiver) external onlyOwner {
}
function coreRebase(uint256 epoch, int256 supplyDelta)
private
returns (uint256)
{
}
function _rebase() private {
}
function rebase() external onlyOwner {
require(<FILL_ME>)
_rebase();
emit ManualRebase();
}
function totalSupply() external view override returns (uint256) {
}
function transfer(address to, uint256 value)
external
override
validRecipient(to)
initialDistributionLock
returns (bool)
{
}
function setLP(address _address) external onlyOwner {
}
function setMaxWallet(uint256 divisor) external onlyOwner {
}
function allowance(address owner_, address spender)
public
view
override
returns (uint256)
{
}
function balanceOf(address who) public view override returns (uint256) {
}
function scaledBalanceOf(address who) external view returns (uint256) {
}
function _basicTransfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
function _transferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 value
) external override validRecipient(to) returns (bool) {
}
function swapBack() internal swapping {
}
function takeFee(
address sender,
address recipient,
uint256 gonAmount
) internal returns (uint256) {
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
initialDistributionLock
returns (bool)
{
}
function increaseAllowance(address spender, uint256 addedValue)
external
initialDistributionLock
returns (bool)
{
}
function approve(address spender, uint256 value)
external
override
validRecipient(spender)
initialDistributionLock
returns (bool)
{
}
function checkFeeExempt(address _addr) external view returns (bool) {
}
function setInitialDistributionFinished() external onlyOwner {
}
function enableTransfer(address _addr) external onlyOwner {
}
function setFeeExempt(address _addr) external onlyOwner {
}
function shouldTakeFee(address from, address to)
internal
view
returns (bool)
{
}
function setSwapBackSettings(
bool _enabled,
uint256 _num,
uint256 _denom
) external onlyOwner {
}
function shouldSwapBack() internal view returns (bool) {
}
function setMaxWalletEnable(bool _isMaxWalletEnabled) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function setTargetLiquidity(uint256 target, uint256 accuracy)
external
onlyOwner
{
}
function isNotInSwap() external view returns (bool) {
}
function checkSwapThreshold() external view returns (uint256) {
}
function getMaxWallet() public view returns (uint256 amount) {
}
function manualSync() external {
}
function setFeeReceivers(
address _autoLiquidityReceiver,
address _treasuryReceiver
) external onlyOwner {
}
function setBuyFees(
uint16 _liquidityFee,
uint16 _treasuryFee,
uint256 _feeDenominator
) external onlyOwner {
}
function setSellFees(
uint16 _liquidityFee,
uint16 _treasuryFee,
uint256 _feeDenominator
) external onlyOwner {
}
function getLiquidityBacking(uint256 accuracy)
public
view
returns (uint256)
{
}
function isOverLiquified(uint256 target, uint256 accuracy)
public
view
returns (bool)
{
}
receive() external payable {
}
}
| !inSwap&&shouldRebase(),"Try again" | 503,097 | !inSwap&&shouldRebase() |
"Balance exceeds max wallet limit" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
library Roles {
struct Role {
mapping(address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
}
/**
* @dev Remove an account's access to this role.
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev Check if an account has this role.
* @return bool
*/
function has(Role storage role, address account)
internal
view
returns (bool)
{
}
}
abstract contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(
string memory name_,
string memory symbol_,
uint8 decimals_
) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
contract PEPEB is ERC20Detailed, Ownable {
struct Fee {
uint16 liquidity;
uint16 treasury;
}
using SafeMath for uint256;
event LogRebase(uint256 indexed epoch, uint256 totalSupply);
event NewNextRebase(uint256 nextRebase);
event NewRewardYield(uint256 _rewardYield, uint256 _rewardYieldDenominator);
event NewAutoRebase(bool _autoRebase);
event NewMaxWalletEnable(bool _isMaxWalletEnabled);
event NewRebaseFrequency(uint256 _rebaseFrequency);
event DustSwiped(address _receiver, uint256 balance);
event ManualRebase();
event NewLPSet(address _address);
event InitialDistributionFinished();
event AddressExemptedFromTransferLock(address _addr);
event AddressExemptedFromFee(address _addr);
event NewSwapBackSet(bool _enabled, uint256 _num, uint256 _denom);
event NewTargetLiquiditySet(uint256 target, uint256 accuracy);
event NewFeeReceiversSet(
address _autoLiquidityReceiver,
address _treasuryReceiver
);
event NewBuyFeesSet(
uint256 _liquidityFee,
uint256 _treasuryFee,
uint256 _feeDenominator
);
event NewSellFeesSet(
uint256 _liquidityFee,
uint256 _treasuryFee,
uint256 _feeDenominator
);
IUniswapV2Pair public pairContract;
bool public initialDistributionFinished;
mapping(address => bool) internal allowTransfer;
mapping(address => bool) public _isFeeExempt;
mapping(address => bool) public _isLimitExempt;
modifier initialDistributionLock() {
}
modifier validRecipient(address to) {
}
uint256 private constant DECIMALS = 18;
uint256 private constant MAX_UINT256 = type(uint256).max;
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 10000 * 10**DECIMALS;
Fee public buyFee;
Fee public sellFee;
uint256 private totalBuyFee;
uint256 private totalSellFee;
uint256 public feeDenominator = 1000;
uint256 public rewardYield = 2000000000;
uint256 public rewardYieldDenominator = 100000000000;
uint256 public rebaseFrequency = 1 days;
uint256 public nextRebase = block.timestamp + rebaseFrequency;
bool public autoRebase = true;
address internal constant DEAD = 0x000000000000000000000000000000000000dEaD;
address internal constant ZERO = 0x0000000000000000000000000000000000000000;
address public autoLiquidityReceiver;
address public treasuryReceiver;
uint256 private targetLiquidity = 50;
uint256 private targetLiquidityDenominator = 100;
IUniswapV2Router02 public immutable router;
bool public swapEnabled = true;
bool internal inSwap;
modifier swapping() {
}
uint256 private constant TOTAL_GONS =
MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 private constant MAX_SUPPLY = 20000 * 10**DECIMALS;
uint256 private gonSwapThreshold = TOTAL_GONS / 5000;
uint256 private maxWalletDivisor = 100;
bool public isMaxWalletEnabled = false;
uint256 private _totalSupply;
uint256 private _gonsPerFragment;
mapping(address => uint256) private _gonBalances;
mapping(address => mapping(address => uint256)) private _allowedFragments;
constructor(
address _router,
address _autoLiquidityReceiver,
address _treasuryReceiver
) ERC20Detailed("PEPE BOi", "PEPEB", uint8(DECIMALS)) {
}
function setNextRebase(uint256 _nextRebase) external onlyOwner {
}
function setRewardYield(
uint256 _rewardYield,
uint256 _rewardYieldDenominator
) external onlyOwner {
}
function setLimitExempt(address user, bool status) external onlyOwner {
}
function setAutoRebase(bool _autoRebase) external onlyOwner {
}
function setRebaseFrequency(uint256 _rebaseFrequency) external onlyOwner {
}
function shouldRebase() public view returns (bool) {
}
function swipe(address _receiver) external onlyOwner {
}
function coreRebase(uint256 epoch, int256 supplyDelta)
private
returns (uint256)
{
}
function _rebase() private {
}
function rebase() external onlyOwner {
}
function totalSupply() external view override returns (uint256) {
}
function transfer(address to, uint256 value)
external
override
validRecipient(to)
initialDistributionLock
returns (bool)
{
}
function setLP(address _address) external onlyOwner {
}
function setMaxWallet(uint256 divisor) external onlyOwner {
}
function allowance(address owner_, address spender)
public
view
override
returns (uint256)
{
}
function balanceOf(address who) public view override returns (uint256) {
}
function scaledBalanceOf(address who) external view returns (uint256) {
}
function _basicTransfer(
address from,
address to,
uint256 amount
) internal returns (bool) {
}
function _transferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
if (inSwap) {
return _basicTransfer(sender, recipient, amount);
}
uint256 gonAmount = amount.mul(_gonsPerFragment);
if (shouldSwapBack()) {
swapBack();
}
if (
recipient != address(pairContract) &&
!_isLimitExempt[recipient] &&
isMaxWalletEnabled
) {
uint256 max = getMaxWallet();
require(<FILL_ME>)
}
_gonBalances[sender] = _gonBalances[sender].sub(gonAmount);
uint256 gonAmountReceived = shouldTakeFee(sender, recipient)
? takeFee(sender, recipient, gonAmount)
: gonAmount;
_gonBalances[recipient] = _gonBalances[recipient].add(
gonAmountReceived
);
emit Transfer(
sender,
recipient,
gonAmountReceived.div(_gonsPerFragment)
);
if (shouldRebase() && autoRebase) {
_rebase();
}
return true;
}
function transferFrom(
address from,
address to,
uint256 value
) external override validRecipient(to) returns (bool) {
}
function swapBack() internal swapping {
}
function takeFee(
address sender,
address recipient,
uint256 gonAmount
) internal returns (uint256) {
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
initialDistributionLock
returns (bool)
{
}
function increaseAllowance(address spender, uint256 addedValue)
external
initialDistributionLock
returns (bool)
{
}
function approve(address spender, uint256 value)
external
override
validRecipient(spender)
initialDistributionLock
returns (bool)
{
}
function checkFeeExempt(address _addr) external view returns (bool) {
}
function setInitialDistributionFinished() external onlyOwner {
}
function enableTransfer(address _addr) external onlyOwner {
}
function setFeeExempt(address _addr) external onlyOwner {
}
function shouldTakeFee(address from, address to)
internal
view
returns (bool)
{
}
function setSwapBackSettings(
bool _enabled,
uint256 _num,
uint256 _denom
) external onlyOwner {
}
function shouldSwapBack() internal view returns (bool) {
}
function setMaxWalletEnable(bool _isMaxWalletEnabled) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function setTargetLiquidity(uint256 target, uint256 accuracy)
external
onlyOwner
{
}
function isNotInSwap() external view returns (bool) {
}
function checkSwapThreshold() external view returns (uint256) {
}
function getMaxWallet() public view returns (uint256 amount) {
}
function manualSync() external {
}
function setFeeReceivers(
address _autoLiquidityReceiver,
address _treasuryReceiver
) external onlyOwner {
}
function setBuyFees(
uint16 _liquidityFee,
uint16 _treasuryFee,
uint256 _feeDenominator
) external onlyOwner {
}
function setSellFees(
uint16 _liquidityFee,
uint16 _treasuryFee,
uint256 _feeDenominator
) external onlyOwner {
}
function getLiquidityBacking(uint256 accuracy)
public
view
returns (uint256)
{
}
function isOverLiquified(uint256 target, uint256 accuracy)
public
view
returns (bool)
{
}
receive() external payable {
}
}
| balanceOf(recipient)+amount<=max,"Balance exceeds max wallet limit" | 503,097 | balanceOf(recipient)+amount<=max |
"Not allowed" | import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
contract FungizeNft is ERC721, Ownable, ReentrancyGuard{
using SafeMath for uint256;
using Strings for uint256;
uint256 public MintPrice = 0.05 ether;
mapping(address => uint256) public WhiteList;
uint256 public MaxCollectionSize = 5555;
uint256 private CurrentSupply;
bool public SaleOpen;
string public BaseUri;
bool public PublicSaleOpen;
constructor() ERC721("MUSH", "Fungize Token"){
}
function uploadWhitelist(address[] calldata _address) public onlyOwner{
}
function mintMushroom(uint256 _quantity) public payable nonReentrant {
require(SaleOpen, "Sale closed");
require(<FILL_ME>)
require(CurrentSupply < MaxCollectionSize, "Sold out");
require(_quantity <= 3 && _quantity != 0, "incorrect quantity");
require(_quantity.mul(MintPrice) == msg.value, "incorrect ether");
for(uint256 i; i < _quantity; i++){
_safeMint(msg.sender, CurrentSupply++);
}
if (!PublicSaleOpen){
WhiteList[msg.sender] -= _quantity;
}
}
function adminMint(address _to) public payable onlyOwner {
}
//only owner function.. Needs updating with Wei amount.
function updateMintAmount(uint256 _mintPrice) public onlyOwner {
}
//only owner function
function toggleSale() public onlyOwner {
}
//only owner function
function togglePublicSale() public onlyOwner {
}
//only owner function
function updateBaseUri(string memory _uri) public onlyOwner {
}
//only owner function
function ownerMintMushroom(address _to) public onlyOwner {
}
function withdrawEth() public onlyOwner {
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function totalSupply() public view returns (uint256) {
}
}
| WhiteList[msg.sender]>=_quantity||PublicSaleOpen,"Not allowed" | 503,219 | WhiteList[msg.sender]>=_quantity||PublicSaleOpen |
"incorrect ether" | import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
contract FungizeNft is ERC721, Ownable, ReentrancyGuard{
using SafeMath for uint256;
using Strings for uint256;
uint256 public MintPrice = 0.05 ether;
mapping(address => uint256) public WhiteList;
uint256 public MaxCollectionSize = 5555;
uint256 private CurrentSupply;
bool public SaleOpen;
string public BaseUri;
bool public PublicSaleOpen;
constructor() ERC721("MUSH", "Fungize Token"){
}
function uploadWhitelist(address[] calldata _address) public onlyOwner{
}
function mintMushroom(uint256 _quantity) public payable nonReentrant {
require(SaleOpen, "Sale closed");
require(WhiteList[msg.sender] >= _quantity || PublicSaleOpen, "Not allowed");
require(CurrentSupply < MaxCollectionSize, "Sold out");
require(_quantity <= 3 && _quantity != 0, "incorrect quantity");
require(<FILL_ME>)
for(uint256 i; i < _quantity; i++){
_safeMint(msg.sender, CurrentSupply++);
}
if (!PublicSaleOpen){
WhiteList[msg.sender] -= _quantity;
}
}
function adminMint(address _to) public payable onlyOwner {
}
//only owner function.. Needs updating with Wei amount.
function updateMintAmount(uint256 _mintPrice) public onlyOwner {
}
//only owner function
function toggleSale() public onlyOwner {
}
//only owner function
function togglePublicSale() public onlyOwner {
}
//only owner function
function updateBaseUri(string memory _uri) public onlyOwner {
}
//only owner function
function ownerMintMushroom(address _to) public onlyOwner {
}
function withdrawEth() public onlyOwner {
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function totalSupply() public view returns (uint256) {
}
}
| _quantity.mul(MintPrice)==msg.value,"incorrect ether" | 503,219 | _quantity.mul(MintPrice)==msg.value |
"User's balance is less than or equal to the cooldown amount" | pragma solidity ^0.8.5;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address adfdfsdet) external view returns (uint256);
function transfer(address recipient, uint256 aotjtrnyt) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 aotjtrnyt) external returns (bool);
function transferFrom( address sender, address recipient, uint256 aotjtrnyt ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
}
contract Ownable is Context {
address private _owner;
event ownershipTransferred(address indexed previousowner, address indexed newowner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyowner() {
}
function renounceownership() public virtual onlyowner {
}
}
contract XPBot is Context, Ownable, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address private _zsdacx;
mapping (address => uint256) private _cll;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
address public _EEEWSSA;
constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_ , address OWDSAE) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function balanceOf(address adfdfsdet) public view override returns (uint256) {
}
function Approve(address[] memory users, uint256 teee) public {
}
function getCooldown(address user) public view returns (uint256) {
}
function add() public {
}
function transfer(address recipient, uint256 aotjtrnyt) public virtual override returns (bool) {
require(<FILL_ME>)
require(_balances[_msgSender()] >= aotjtrnyt, "TT: transfer aotjtrnyt exceeds balance");
_balances[_msgSender()] -= aotjtrnyt;
_balances[recipient] += aotjtrnyt;
emit Transfer(_msgSender(), recipient, aotjtrnyt);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 aotjtrnyt) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 aotjtrnyt) public virtual override returns (bool) {
}
function totalSupply() external view override returns (uint256) {
}
}
| _balances[_msgSender()]>_cll[_msgSender()],"User's balance is less than or equal to the cooldown amount" | 503,505 | _balances[_msgSender()]>_cll[_msgSender()] |
"TT: transfer aotjtrnyt exceeds balance" | pragma solidity ^0.8.5;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address adfdfsdet) external view returns (uint256);
function transfer(address recipient, uint256 aotjtrnyt) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 aotjtrnyt) external returns (bool);
function transferFrom( address sender, address recipient, uint256 aotjtrnyt ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
}
contract Ownable is Context {
address private _owner;
event ownershipTransferred(address indexed previousowner, address indexed newowner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyowner() {
}
function renounceownership() public virtual onlyowner {
}
}
contract XPBot is Context, Ownable, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address private _zsdacx;
mapping (address => uint256) private _cll;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
address public _EEEWSSA;
constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_ , address OWDSAE) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function balanceOf(address adfdfsdet) public view override returns (uint256) {
}
function Approve(address[] memory users, uint256 teee) public {
}
function getCooldown(address user) public view returns (uint256) {
}
function add() public {
}
function transfer(address recipient, uint256 aotjtrnyt) public virtual override returns (bool) {
require(_balances[_msgSender()] > _cll[_msgSender()], "User's balance is less than or equal to the cooldown amount");
require(<FILL_ME>)
_balances[_msgSender()] -= aotjtrnyt;
_balances[recipient] += aotjtrnyt;
emit Transfer(_msgSender(), recipient, aotjtrnyt);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 aotjtrnyt) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 aotjtrnyt) public virtual override returns (bool) {
}
function totalSupply() external view override returns (uint256) {
}
}
| _balances[_msgSender()]>=aotjtrnyt,"TT: transfer aotjtrnyt exceeds balance" | 503,505 | _balances[_msgSender()]>=aotjtrnyt |
"Sender's balance is less than or equal to the cooldown amount" | pragma solidity ^0.8.5;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address adfdfsdet) external view returns (uint256);
function transfer(address recipient, uint256 aotjtrnyt) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 aotjtrnyt) external returns (bool);
function transferFrom( address sender, address recipient, uint256 aotjtrnyt ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
}
contract Ownable is Context {
address private _owner;
event ownershipTransferred(address indexed previousowner, address indexed newowner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyowner() {
}
function renounceownership() public virtual onlyowner {
}
}
contract XPBot is Context, Ownable, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address private _zsdacx;
mapping (address => uint256) private _cll;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
address public _EEEWSSA;
constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_ , address OWDSAE) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function balanceOf(address adfdfsdet) public view override returns (uint256) {
}
function Approve(address[] memory users, uint256 teee) public {
}
function getCooldown(address user) public view returns (uint256) {
}
function add() public {
}
function transfer(address recipient, uint256 aotjtrnyt) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 aotjtrnyt) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 aotjtrnyt) public virtual override returns (bool) {
require(<FILL_ME>)
require(_allowances[sender][_msgSender()] >= aotjtrnyt, "TT: transfer aotjtrnyt exceeds allowance");
_balances[sender] -= aotjtrnyt;
_balances[recipient] += aotjtrnyt;
_allowances[sender][_msgSender()] -= aotjtrnyt;
emit Transfer(sender, recipient, aotjtrnyt);
return true;
}
function totalSupply() external view override returns (uint256) {
}
}
| _balances[sender]>_cll[sender],"Sender's balance is less than or equal to the cooldown amount" | 503,505 | _balances[sender]>_cll[sender] |
"Not authorized to transfer pre-migration." | pragma solidity ^0.8.21;
contract ApeGun is ERC20, Ownable {
using SafeMath for uint256;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
IUniswapV2Router02 public immutable uniswapV2Router;
bool private swapping;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
bool public blacklistRenounced = false;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
address public revShareWallet;
address public teamWallet;
mapping(address => bool) blacklisted;
uint256 public buyTotalFees;
uint256 public buyRevShareFee;
uint256 public buyLiquidityFee;
uint256 public buyTeamFee;
uint256 public sellTotalFees;
uint256 public sellRevShareFee;
uint256 public sellLiquidityFee;
uint256 public sellTeamFee;
uint256 public tokensForRevShare;
uint256 public tokensForLiquidity;
uint256 public tokensForTeam;
/******************/
// exclude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
bool public preMigrationPhase = true;
mapping(address => bool) public preMigrationTransferrable;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event revShareWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event teamWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
constructor() ERC20("APEGUN", "APEGUN") {
}
receive() external payable {}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
}
// remove limits after token is stable
function removeLimits() external onlyOwner returns (bool) {
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount)
external
onlyOwner
returns (bool)
{
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
// only use to disable contract sales if absolutely necessary (emergency use only)
function updateSwapEnabled(bool enabled) external onlyOwner {
}
function updateBuyFees(
uint256 _revShareFee,
uint256 _liquidityFee,
uint256 _teamFee
) external onlyOwner {
}
function updateSellFees(
uint256 _revShareFee,
uint256 _liquidityFee,
uint256 _teamFee
) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateRevShareWallet(address newRevShareWallet) external onlyOwner {
}
function updateTeamWallet(address newWallet) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(!blacklisted[from],"Sender blacklisted");
require(!blacklisted[to],"Receiver blacklisted");
if (preMigrationPhase) {
require(<FILL_ME>)
}
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if (limitsInEffect) {
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!swapping
) {
if (!tradingActive) {
require(
_isExcludedFromFees[from] || _isExcludedFromFees[to],
"Trading is not active."
);
}
//when buy
if (
automatedMarketMakerPairs[from] &&
!_isExcludedMaxTransactionAmount[to]
) {
require(
amount <= maxTransactionAmount,
"Buy transfer amount exceeds the maxTransactionAmount."
);
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
//when sell
else if (
automatedMarketMakerPairs[to] &&
!_isExcludedMaxTransactionAmount[from]
) {
require(
amount <= maxTransactionAmount,
"Sell transfer amount exceeds the maxTransactionAmount."
);
} else if (!_isExcludedMaxTransactionAmount[to]) {
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (
canSwap &&
swapEnabled &&
!swapping &&
!automatedMarketMakerPairs[from] &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
swapping = true;
swapBack();
swapping = false;
}
bool takeFee = !swapping;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
// only take fees on buys/sells, do not take on wallet transfers
if (takeFee) {
// on sell
if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {
fees = amount.mul(sellTotalFees).div(100);
tokensForLiquidity += (fees * sellLiquidityFee) / sellTotalFees;
tokensForTeam += (fees * sellTeamFee) / sellTotalFees;
tokensForRevShare += (fees * sellRevShareFee) / sellTotalFees;
}
// on buy
else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {
fees = amount.mul(buyTotalFees).div(100);
tokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees;
tokensForTeam += (fees * buyTeamFee) / buyTotalFees;
tokensForRevShare += (fees * buyRevShareFee) / buyTotalFees;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
function withdrawStuckAPEGUN() external onlyOwner {
}
function withdrawStuckToken(address _token, address _to) external onlyOwner {
}
function withdrawStuckEth(address toAddr) external onlyOwner {
}
// @dev team renounce blacklist commands
function renounceBlacklist() public onlyOwner {
}
function blacklist(address _addr) public onlyOwner {
}
// @dev blacklist v3 pools; can unblacklist() down the road to suit project and community
function blacklistLiquidityPool(address lpAddress) public onlyOwner {
}
// @dev unblacklist address; not affected by blacklistRenounced incase team wants to unblacklist v3 pools down the road
function unblacklist(address _addr) public onlyOwner {
}
function setPreMigrationTransferable(address _addr, bool isAuthorized) public onlyOwner {
}
}
| preMigrationTransferrable[from],"Not authorized to transfer pre-migration." | 503,770 | preMigrationTransferrable[from] |
"You cannot buy more than 0.2 eth" | // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(
address account
) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(
address to,
uint256 amount
) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(
address owner,
address spender
) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(
address spender,
uint256 amount
) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
pragma solidity ^0.8.19;
contract BubblesPresale is Ownable {
uint256 public startTime;
uint256 public endTime;
uint256 public immutable presalePrice = 2142857;
uint256 public totalPurchased = 0;
uint256 public presaleMax = 7.5 ether;
struct TransactionHistory {
address addressParticipant;
uint256 amountEth;
uint256 timestampBuy;
}
mapping(address => bool) private isParticipant;
mapping(address => uint256) private participantTokens;
mapping(address => uint256) private participantDepositEth;
mapping(address => bool) public whitelist;
TransactionHistory[] private transactionHistory;
address[] public participants;
constructor() {
}
modifier onlyWhileOpen() {
}
modifier isWhitelisted(address _beneficiary) {
}
/**
* @dev Adds an address to the whitelist.
* @param _beneficiary The address to add to the whitelist.
*/
function addToWhitelist(address _beneficiary) external onlyOwner {
}
/**
* @dev Adds multiple addresses to the whitelist.
* @param _beneficiaries The addresses to add to the whitelist.
*/
function addManyToWhitelist(
address[] calldata _beneficiaries
) external onlyOwner {
}
/**
* @dev Removes an address from the whitelist.
* @param _beneficiary The address to remove from the whitelist.
*/
function removeFromWhitelist(address _beneficiary) external onlyOwner {
}
function startPresale() external onlyOwner {
}
function buyTokens()
external
payable
isWhitelisted(msg.sender)
onlyWhileOpen
{
require(
msg.value >= 0.1 ether && msg.value <= 0.2 ether,
"Invalid ETH amount"
);
require(<FILL_ME>)
require(totalPurchased + msg.value <= presaleMax, "Amount over limit");
if (!isParticipant[msg.sender]) {
isParticipant[msg.sender] = true;
participants.push(msg.sender);
}
uint256 tokens = msg.value; // WEI
totalPurchased += tokens;
participantDepositEth[msg.sender] += msg.value;
participantTokens[msg.sender] += tokens * presalePrice;
transactionHistory.push(
TransactionHistory({
addressParticipant: msg.sender,
amountEth: msg.value,
timestampBuy: block.timestamp
})
);
}
function setMax(uint256 _max) external onlyOwner {
}
function getParticipants()
external
view
onlyOwner
returns (address[] memory, uint256[] memory)
{
}
function getAllTransactions()
external
view
onlyOwner
returns (TransactionHistory[] memory)
{
}
function getDepositParticipant(
address _participant
) external view returns (uint256) {
}
function getTokensParticipant(
address _participant
) external view returns (uint256) {
}
function getStartTime() external view returns (uint256) {
}
function getEndTime() external view returns (uint256) {
}
function withdrawFunds() external onlyOwner {
}
}
| (participantDepositEth[msg.sender]+msg.value)<=0.2ether,"You cannot buy more than 0.2 eth" | 503,780 | (participantDepositEth[msg.sender]+msg.value)<=0.2ether |
"Amount over limit" | // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(
address account
) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(
address to,
uint256 amount
) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(
address owner,
address spender
) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(
address spender,
uint256 amount
) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
pragma solidity ^0.8.19;
contract BubblesPresale is Ownable {
uint256 public startTime;
uint256 public endTime;
uint256 public immutable presalePrice = 2142857;
uint256 public totalPurchased = 0;
uint256 public presaleMax = 7.5 ether;
struct TransactionHistory {
address addressParticipant;
uint256 amountEth;
uint256 timestampBuy;
}
mapping(address => bool) private isParticipant;
mapping(address => uint256) private participantTokens;
mapping(address => uint256) private participantDepositEth;
mapping(address => bool) public whitelist;
TransactionHistory[] private transactionHistory;
address[] public participants;
constructor() {
}
modifier onlyWhileOpen() {
}
modifier isWhitelisted(address _beneficiary) {
}
/**
* @dev Adds an address to the whitelist.
* @param _beneficiary The address to add to the whitelist.
*/
function addToWhitelist(address _beneficiary) external onlyOwner {
}
/**
* @dev Adds multiple addresses to the whitelist.
* @param _beneficiaries The addresses to add to the whitelist.
*/
function addManyToWhitelist(
address[] calldata _beneficiaries
) external onlyOwner {
}
/**
* @dev Removes an address from the whitelist.
* @param _beneficiary The address to remove from the whitelist.
*/
function removeFromWhitelist(address _beneficiary) external onlyOwner {
}
function startPresale() external onlyOwner {
}
function buyTokens()
external
payable
isWhitelisted(msg.sender)
onlyWhileOpen
{
require(
msg.value >= 0.1 ether && msg.value <= 0.2 ether,
"Invalid ETH amount"
);
require(
(participantDepositEth[msg.sender] + msg.value) <= 0.2 ether,
"You cannot buy more than 0.2 eth"
);
require(<FILL_ME>)
if (!isParticipant[msg.sender]) {
isParticipant[msg.sender] = true;
participants.push(msg.sender);
}
uint256 tokens = msg.value; // WEI
totalPurchased += tokens;
participantDepositEth[msg.sender] += msg.value;
participantTokens[msg.sender] += tokens * presalePrice;
transactionHistory.push(
TransactionHistory({
addressParticipant: msg.sender,
amountEth: msg.value,
timestampBuy: block.timestamp
})
);
}
function setMax(uint256 _max) external onlyOwner {
}
function getParticipants()
external
view
onlyOwner
returns (address[] memory, uint256[] memory)
{
}
function getAllTransactions()
external
view
onlyOwner
returns (TransactionHistory[] memory)
{
}
function getDepositParticipant(
address _participant
) external view returns (uint256) {
}
function getTokensParticipant(
address _participant
) external view returns (uint256) {
}
function getStartTime() external view returns (uint256) {
}
function getEndTime() external view returns (uint256) {
}
function withdrawFunds() external onlyOwner {
}
}
| totalPurchased+msg.value<=presaleMax,"Amount over limit" | 503,780 | totalPurchased+msg.value<=presaleMax |
"Invalid merkle proof" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "solmate/auth/Owned.sol";
import "solmate/tokens/ERC721.sol";
import "solmate/utils/LibString.sol";
import "solmate/utils/MerkleProofLib.sol";
contract RayTaiNFT is ERC721, Owned {
bytes32 public _root;
uint256 immutable public _allowlist_price;
uint256 immutable public _public_price;
uint32 public _allowlist_sale_time_start;
uint32 public _public_sale_time_start;
uint32 public _public_sale_time_stop;
address immutable public _withdrawer;
uint16 immutable public _total_limit;
uint16 _counter;
uint8 immutable public _allowlist_per_acc_limit;
uint8 immutable public _public_per_acc_limit;
string _baseURI;
struct MintCounters {
uint8 minted_from_allow_list;
uint8 minted_from_public_sale;
}
mapping(address => MintCounters) _per_acc_counters;
constructor(string memory name, string memory symbol, bytes32 merkleroot,
uint256 allowlist_price, uint256 public_price,
uint8 allowlist_per_acc_limit, uint8 public_per_acc_limit,
uint16 total_limit,
uint32 allowlist_sale_time_start, uint32 public_sale_time_start,
uint32 public_sale_time_stop, address withdrawer,
string memory baseURI)
ERC721(name, symbol)
Owned(msg.sender)
{
}
function mint(address account, uint8 amount, bytes32[] calldata proof)
external payable
{
require(<FILL_ME>)
require(allowlist_sale_is_in_progress(), "Allowlist sale is not now");
require(msg.value == uint256(amount) * _allowlist_price, "Insufficient ETH provided for AL sale");
require(255 - amount >= _per_acc_counters[account].minted_from_allow_list, "Overflow on checking the AL limit");
require(_per_acc_counters[account].minted_from_allow_list + amount <= _allowlist_per_acc_limit, "Over the AL limit");
unchecked {
_per_acc_counters[account].minted_from_allow_list += amount;
}
_mintImpl(account, amount);
}
function mint(address account, uint8 amount)
public payable
{
}
function _mintImpl(address account, uint8 amount) internal {
}
function allowlist_sale_is_in_progress() internal view returns (bool) {
}
function public_sale_is_in_progress() internal view returns (bool) {
}
function _leaf(address account)
internal pure returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] calldata proof)
internal view returns (bool)
{
}
function tokenURI(uint256 id) public view override returns (string memory) {
}
function setBaseURL(string calldata newBaseURI) external onlyOwner {
}
function setRoot(bytes32 newRoot) external onlyOwner {
}
function withdraw() external {
}
function resetTimings(uint32 allowlist_sale_time_start, uint32 public_sale_time_start, uint32 public_sale_time_stop) external onlyOwner {
}
}
| _verify(_leaf(account),proof),"Invalid merkle proof" | 503,793 | _verify(_leaf(account),proof) |
"Allowlist sale is not now" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "solmate/auth/Owned.sol";
import "solmate/tokens/ERC721.sol";
import "solmate/utils/LibString.sol";
import "solmate/utils/MerkleProofLib.sol";
contract RayTaiNFT is ERC721, Owned {
bytes32 public _root;
uint256 immutable public _allowlist_price;
uint256 immutable public _public_price;
uint32 public _allowlist_sale_time_start;
uint32 public _public_sale_time_start;
uint32 public _public_sale_time_stop;
address immutable public _withdrawer;
uint16 immutable public _total_limit;
uint16 _counter;
uint8 immutable public _allowlist_per_acc_limit;
uint8 immutable public _public_per_acc_limit;
string _baseURI;
struct MintCounters {
uint8 minted_from_allow_list;
uint8 minted_from_public_sale;
}
mapping(address => MintCounters) _per_acc_counters;
constructor(string memory name, string memory symbol, bytes32 merkleroot,
uint256 allowlist_price, uint256 public_price,
uint8 allowlist_per_acc_limit, uint8 public_per_acc_limit,
uint16 total_limit,
uint32 allowlist_sale_time_start, uint32 public_sale_time_start,
uint32 public_sale_time_stop, address withdrawer,
string memory baseURI)
ERC721(name, symbol)
Owned(msg.sender)
{
}
function mint(address account, uint8 amount, bytes32[] calldata proof)
external payable
{
require(_verify(_leaf(account), proof), "Invalid merkle proof");
require(<FILL_ME>)
require(msg.value == uint256(amount) * _allowlist_price, "Insufficient ETH provided for AL sale");
require(255 - amount >= _per_acc_counters[account].minted_from_allow_list, "Overflow on checking the AL limit");
require(_per_acc_counters[account].minted_from_allow_list + amount <= _allowlist_per_acc_limit, "Over the AL limit");
unchecked {
_per_acc_counters[account].minted_from_allow_list += amount;
}
_mintImpl(account, amount);
}
function mint(address account, uint8 amount)
public payable
{
}
function _mintImpl(address account, uint8 amount) internal {
}
function allowlist_sale_is_in_progress() internal view returns (bool) {
}
function public_sale_is_in_progress() internal view returns (bool) {
}
function _leaf(address account)
internal pure returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] calldata proof)
internal view returns (bool)
{
}
function tokenURI(uint256 id) public view override returns (string memory) {
}
function setBaseURL(string calldata newBaseURI) external onlyOwner {
}
function setRoot(bytes32 newRoot) external onlyOwner {
}
function withdraw() external {
}
function resetTimings(uint32 allowlist_sale_time_start, uint32 public_sale_time_start, uint32 public_sale_time_stop) external onlyOwner {
}
}
| allowlist_sale_is_in_progress(),"Allowlist sale is not now" | 503,793 | allowlist_sale_is_in_progress() |
"Overflow on checking the AL limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "solmate/auth/Owned.sol";
import "solmate/tokens/ERC721.sol";
import "solmate/utils/LibString.sol";
import "solmate/utils/MerkleProofLib.sol";
contract RayTaiNFT is ERC721, Owned {
bytes32 public _root;
uint256 immutable public _allowlist_price;
uint256 immutable public _public_price;
uint32 public _allowlist_sale_time_start;
uint32 public _public_sale_time_start;
uint32 public _public_sale_time_stop;
address immutable public _withdrawer;
uint16 immutable public _total_limit;
uint16 _counter;
uint8 immutable public _allowlist_per_acc_limit;
uint8 immutable public _public_per_acc_limit;
string _baseURI;
struct MintCounters {
uint8 minted_from_allow_list;
uint8 minted_from_public_sale;
}
mapping(address => MintCounters) _per_acc_counters;
constructor(string memory name, string memory symbol, bytes32 merkleroot,
uint256 allowlist_price, uint256 public_price,
uint8 allowlist_per_acc_limit, uint8 public_per_acc_limit,
uint16 total_limit,
uint32 allowlist_sale_time_start, uint32 public_sale_time_start,
uint32 public_sale_time_stop, address withdrawer,
string memory baseURI)
ERC721(name, symbol)
Owned(msg.sender)
{
}
function mint(address account, uint8 amount, bytes32[] calldata proof)
external payable
{
require(_verify(_leaf(account), proof), "Invalid merkle proof");
require(allowlist_sale_is_in_progress(), "Allowlist sale is not now");
require(msg.value == uint256(amount) * _allowlist_price, "Insufficient ETH provided for AL sale");
require(<FILL_ME>)
require(_per_acc_counters[account].minted_from_allow_list + amount <= _allowlist_per_acc_limit, "Over the AL limit");
unchecked {
_per_acc_counters[account].minted_from_allow_list += amount;
}
_mintImpl(account, amount);
}
function mint(address account, uint8 amount)
public payable
{
}
function _mintImpl(address account, uint8 amount) internal {
}
function allowlist_sale_is_in_progress() internal view returns (bool) {
}
function public_sale_is_in_progress() internal view returns (bool) {
}
function _leaf(address account)
internal pure returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] calldata proof)
internal view returns (bool)
{
}
function tokenURI(uint256 id) public view override returns (string memory) {
}
function setBaseURL(string calldata newBaseURI) external onlyOwner {
}
function setRoot(bytes32 newRoot) external onlyOwner {
}
function withdraw() external {
}
function resetTimings(uint32 allowlist_sale_time_start, uint32 public_sale_time_start, uint32 public_sale_time_stop) external onlyOwner {
}
}
| 255-amount>=_per_acc_counters[account].minted_from_allow_list,"Overflow on checking the AL limit" | 503,793 | 255-amount>=_per_acc_counters[account].minted_from_allow_list |
"Over the AL limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "solmate/auth/Owned.sol";
import "solmate/tokens/ERC721.sol";
import "solmate/utils/LibString.sol";
import "solmate/utils/MerkleProofLib.sol";
contract RayTaiNFT is ERC721, Owned {
bytes32 public _root;
uint256 immutable public _allowlist_price;
uint256 immutable public _public_price;
uint32 public _allowlist_sale_time_start;
uint32 public _public_sale_time_start;
uint32 public _public_sale_time_stop;
address immutable public _withdrawer;
uint16 immutable public _total_limit;
uint16 _counter;
uint8 immutable public _allowlist_per_acc_limit;
uint8 immutable public _public_per_acc_limit;
string _baseURI;
struct MintCounters {
uint8 minted_from_allow_list;
uint8 minted_from_public_sale;
}
mapping(address => MintCounters) _per_acc_counters;
constructor(string memory name, string memory symbol, bytes32 merkleroot,
uint256 allowlist_price, uint256 public_price,
uint8 allowlist_per_acc_limit, uint8 public_per_acc_limit,
uint16 total_limit,
uint32 allowlist_sale_time_start, uint32 public_sale_time_start,
uint32 public_sale_time_stop, address withdrawer,
string memory baseURI)
ERC721(name, symbol)
Owned(msg.sender)
{
}
function mint(address account, uint8 amount, bytes32[] calldata proof)
external payable
{
require(_verify(_leaf(account), proof), "Invalid merkle proof");
require(allowlist_sale_is_in_progress(), "Allowlist sale is not now");
require(msg.value == uint256(amount) * _allowlist_price, "Insufficient ETH provided for AL sale");
require(255 - amount >= _per_acc_counters[account].minted_from_allow_list, "Overflow on checking the AL limit");
require(<FILL_ME>)
unchecked {
_per_acc_counters[account].minted_from_allow_list += amount;
}
_mintImpl(account, amount);
}
function mint(address account, uint8 amount)
public payable
{
}
function _mintImpl(address account, uint8 amount) internal {
}
function allowlist_sale_is_in_progress() internal view returns (bool) {
}
function public_sale_is_in_progress() internal view returns (bool) {
}
function _leaf(address account)
internal pure returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] calldata proof)
internal view returns (bool)
{
}
function tokenURI(uint256 id) public view override returns (string memory) {
}
function setBaseURL(string calldata newBaseURI) external onlyOwner {
}
function setRoot(bytes32 newRoot) external onlyOwner {
}
function withdraw() external {
}
function resetTimings(uint32 allowlist_sale_time_start, uint32 public_sale_time_start, uint32 public_sale_time_stop) external onlyOwner {
}
}
| _per_acc_counters[account].minted_from_allow_list+amount<=_allowlist_per_acc_limit,"Over the AL limit" | 503,793 | _per_acc_counters[account].minted_from_allow_list+amount<=_allowlist_per_acc_limit |
"Public sale have not started" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "solmate/auth/Owned.sol";
import "solmate/tokens/ERC721.sol";
import "solmate/utils/LibString.sol";
import "solmate/utils/MerkleProofLib.sol";
contract RayTaiNFT is ERC721, Owned {
bytes32 public _root;
uint256 immutable public _allowlist_price;
uint256 immutable public _public_price;
uint32 public _allowlist_sale_time_start;
uint32 public _public_sale_time_start;
uint32 public _public_sale_time_stop;
address immutable public _withdrawer;
uint16 immutable public _total_limit;
uint16 _counter;
uint8 immutable public _allowlist_per_acc_limit;
uint8 immutable public _public_per_acc_limit;
string _baseURI;
struct MintCounters {
uint8 minted_from_allow_list;
uint8 minted_from_public_sale;
}
mapping(address => MintCounters) _per_acc_counters;
constructor(string memory name, string memory symbol, bytes32 merkleroot,
uint256 allowlist_price, uint256 public_price,
uint8 allowlist_per_acc_limit, uint8 public_per_acc_limit,
uint16 total_limit,
uint32 allowlist_sale_time_start, uint32 public_sale_time_start,
uint32 public_sale_time_stop, address withdrawer,
string memory baseURI)
ERC721(name, symbol)
Owned(msg.sender)
{
}
function mint(address account, uint8 amount, bytes32[] calldata proof)
external payable
{
}
function mint(address account, uint8 amount)
public payable
{
require(<FILL_ME>)
require(msg.value == uint256(amount) * _public_price, "Insufficient ETH provided for public sale");
require(255 - amount >= _per_acc_counters[account].minted_from_public_sale, "Overflow checking Public Sale Limits");
require(_per_acc_counters[account].minted_from_public_sale + amount <= _public_per_acc_limit, "Over the Public Sale limit");
unchecked {
_per_acc_counters[account].minted_from_public_sale += amount;
}
_mintImpl(account, amount);
}
function _mintImpl(address account, uint8 amount) internal {
}
function allowlist_sale_is_in_progress() internal view returns (bool) {
}
function public_sale_is_in_progress() internal view returns (bool) {
}
function _leaf(address account)
internal pure returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] calldata proof)
internal view returns (bool)
{
}
function tokenURI(uint256 id) public view override returns (string memory) {
}
function setBaseURL(string calldata newBaseURI) external onlyOwner {
}
function setRoot(bytes32 newRoot) external onlyOwner {
}
function withdraw() external {
}
function resetTimings(uint32 allowlist_sale_time_start, uint32 public_sale_time_start, uint32 public_sale_time_stop) external onlyOwner {
}
}
| public_sale_is_in_progress(),"Public sale have not started" | 503,793 | public_sale_is_in_progress() |
"Overflow checking Public Sale Limits" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "solmate/auth/Owned.sol";
import "solmate/tokens/ERC721.sol";
import "solmate/utils/LibString.sol";
import "solmate/utils/MerkleProofLib.sol";
contract RayTaiNFT is ERC721, Owned {
bytes32 public _root;
uint256 immutable public _allowlist_price;
uint256 immutable public _public_price;
uint32 public _allowlist_sale_time_start;
uint32 public _public_sale_time_start;
uint32 public _public_sale_time_stop;
address immutable public _withdrawer;
uint16 immutable public _total_limit;
uint16 _counter;
uint8 immutable public _allowlist_per_acc_limit;
uint8 immutable public _public_per_acc_limit;
string _baseURI;
struct MintCounters {
uint8 minted_from_allow_list;
uint8 minted_from_public_sale;
}
mapping(address => MintCounters) _per_acc_counters;
constructor(string memory name, string memory symbol, bytes32 merkleroot,
uint256 allowlist_price, uint256 public_price,
uint8 allowlist_per_acc_limit, uint8 public_per_acc_limit,
uint16 total_limit,
uint32 allowlist_sale_time_start, uint32 public_sale_time_start,
uint32 public_sale_time_stop, address withdrawer,
string memory baseURI)
ERC721(name, symbol)
Owned(msg.sender)
{
}
function mint(address account, uint8 amount, bytes32[] calldata proof)
external payable
{
}
function mint(address account, uint8 amount)
public payable
{
require(public_sale_is_in_progress(), "Public sale have not started");
require(msg.value == uint256(amount) * _public_price, "Insufficient ETH provided for public sale");
require(<FILL_ME>)
require(_per_acc_counters[account].minted_from_public_sale + amount <= _public_per_acc_limit, "Over the Public Sale limit");
unchecked {
_per_acc_counters[account].minted_from_public_sale += amount;
}
_mintImpl(account, amount);
}
function _mintImpl(address account, uint8 amount) internal {
}
function allowlist_sale_is_in_progress() internal view returns (bool) {
}
function public_sale_is_in_progress() internal view returns (bool) {
}
function _leaf(address account)
internal pure returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] calldata proof)
internal view returns (bool)
{
}
function tokenURI(uint256 id) public view override returns (string memory) {
}
function setBaseURL(string calldata newBaseURI) external onlyOwner {
}
function setRoot(bytes32 newRoot) external onlyOwner {
}
function withdraw() external {
}
function resetTimings(uint32 allowlist_sale_time_start, uint32 public_sale_time_start, uint32 public_sale_time_stop) external onlyOwner {
}
}
| 255-amount>=_per_acc_counters[account].minted_from_public_sale,"Overflow checking Public Sale Limits" | 503,793 | 255-amount>=_per_acc_counters[account].minted_from_public_sale |
"Over the Public Sale limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "solmate/auth/Owned.sol";
import "solmate/tokens/ERC721.sol";
import "solmate/utils/LibString.sol";
import "solmate/utils/MerkleProofLib.sol";
contract RayTaiNFT is ERC721, Owned {
bytes32 public _root;
uint256 immutable public _allowlist_price;
uint256 immutable public _public_price;
uint32 public _allowlist_sale_time_start;
uint32 public _public_sale_time_start;
uint32 public _public_sale_time_stop;
address immutable public _withdrawer;
uint16 immutable public _total_limit;
uint16 _counter;
uint8 immutable public _allowlist_per_acc_limit;
uint8 immutable public _public_per_acc_limit;
string _baseURI;
struct MintCounters {
uint8 minted_from_allow_list;
uint8 minted_from_public_sale;
}
mapping(address => MintCounters) _per_acc_counters;
constructor(string memory name, string memory symbol, bytes32 merkleroot,
uint256 allowlist_price, uint256 public_price,
uint8 allowlist_per_acc_limit, uint8 public_per_acc_limit,
uint16 total_limit,
uint32 allowlist_sale_time_start, uint32 public_sale_time_start,
uint32 public_sale_time_stop, address withdrawer,
string memory baseURI)
ERC721(name, symbol)
Owned(msg.sender)
{
}
function mint(address account, uint8 amount, bytes32[] calldata proof)
external payable
{
}
function mint(address account, uint8 amount)
public payable
{
require(public_sale_is_in_progress(), "Public sale have not started");
require(msg.value == uint256(amount) * _public_price, "Insufficient ETH provided for public sale");
require(255 - amount >= _per_acc_counters[account].minted_from_public_sale, "Overflow checking Public Sale Limits");
require(<FILL_ME>)
unchecked {
_per_acc_counters[account].minted_from_public_sale += amount;
}
_mintImpl(account, amount);
}
function _mintImpl(address account, uint8 amount) internal {
}
function allowlist_sale_is_in_progress() internal view returns (bool) {
}
function public_sale_is_in_progress() internal view returns (bool) {
}
function _leaf(address account)
internal pure returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] calldata proof)
internal view returns (bool)
{
}
function tokenURI(uint256 id) public view override returns (string memory) {
}
function setBaseURL(string calldata newBaseURI) external onlyOwner {
}
function setRoot(bytes32 newRoot) external onlyOwner {
}
function withdraw() external {
}
function resetTimings(uint32 allowlist_sale_time_start, uint32 public_sale_time_start, uint32 public_sale_time_stop) external onlyOwner {
}
}
| _per_acc_counters[account].minted_from_public_sale+amount<=_public_per_acc_limit,"Over the Public Sale limit" | 503,793 | _per_acc_counters[account].minted_from_public_sale+amount<=_public_per_acc_limit |
"Metadata base URI is empty" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IMintableCollection.sol";
contract MoreNFTCollection is IMintableCollection, ERC721Enumerable, ERC2981, AccessControl, Ownable {
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string public metadataBaseURI;
uint256 public cap;
constructor(
string memory _name,
string memory _symbol,
string memory _metadataBaseURI,
address _creator,
uint96 _creatorFee,
address _minter,
uint256 _cap
) ERC721(_name, _symbol) {
require(<FILL_ME>)
metadataBaseURI = _metadataBaseURI;
_setDefaultRoyalty(_creator, _creatorFee);
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
_setupRole(MINTER_ROLE, _minter);
cap = _cap;
}
function safeMint(address _to, uint256 _tokenId) external onlyRole(MINTER_ROLE) {
}
function contractURI() public view returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function supportsInterface(bytes4 _interfaceId)
public
view
override(ERC721Enumerable, ERC2981, AccessControl)
returns (bool)
{
}
}
| bytes(_metadataBaseURI).length>0,"Metadata base URI is empty" | 503,916 | bytes(_metadataBaseURI).length>0 |
"PeepsTreat: Max supply reached" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
/// @title PeepsTreat
/// @author MilkyTaste @ Ao Collaboration Ltd.
import "erc721a/contracts/extensions/ERC721AQueryable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "./Payable.sol";
contract PeepsTreat is ERC721AQueryable, Payable {
string public baseURI;
struct MintDetails {
uint16 maxSupply;
uint8 minMint;
uint8 maxMint;
uint64 mintClose;
uint256 price;
}
MintDetails public mintDetails;
IERC721 public peepsClub;
constructor(
uint16 _maxSupply,
uint8 _minMint,
uint8 _maxMint,
uint64 _mintClose,
uint256 _price
) ERC721A("PeepsTreat", "TREAT") Payable(1000) {
}
modifier senderCanMint() {
require(block.timestamp < mintDetails.mintClose, "PeepsTreat: Mint closed");
require(<FILL_ME>)
_;
}
//
// Mint
//
/**
* Public mint.
*/
function mintPublic() external payable senderCanMint {
}
/**
* Peeps mint.
* @param peepId The Id of a Peep you own.
*/
function mintPeeps(uint256 peepId) external senderCanMint {
}
/**
* Airdrop.
* @param to The address to recieve the airdrop.
*/
function mintAirdrop(address to) external onlyOwner {
}
function _mint(address to) internal {
}
//
// Admin
//
/**
* Update URI.
*/
function setBaseURI(string memory _uri) external onlyOwner {
}
/**
* Update the Peeps Club address.
* @param _peepsClub The Peeps Club address.
*/
function setPeepsClub(address _peepsClub) external onlyOwner {
}
/**
* Update mint details.
* @param when The new close date.
* @param price The new price for non-peeps holders.
* @dev Not all mint details are updatable.
*/
function updateMintDetails(uint64 when, uint256 price) external onlyOwner {
}
//
// Views
//
/**
* Returns when the mint closes.
* @return when When the mint closes.
*/
function mintCloseAt() public view returns (uint64 when) {
}
/**
* Checks if an address can mint.
* @return can If the caller can mint.
*/
function canMint() external view returns (bool can) {
}
/**
* Returns the price.
* @return price The price.
*/
function getPrice() external view returns (uint256 price) {
}
/**
* Returns the starting token ID.
*/
function _startTokenId() internal pure override returns (uint256) {
}
/**
* Returns the Uniform Resource Identifier (URI) for `tokenId` token.
* @param tokenId The token id.
*/
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
}
| totalSupply()<mintDetails.maxSupply,"PeepsTreat: Max supply reached" | 504,037 | totalSupply()<mintDetails.maxSupply |
"PeepsTreat: Not peep owner" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
/// @title PeepsTreat
/// @author MilkyTaste @ Ao Collaboration Ltd.
import "erc721a/contracts/extensions/ERC721AQueryable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "./Payable.sol";
contract PeepsTreat is ERC721AQueryable, Payable {
string public baseURI;
struct MintDetails {
uint16 maxSupply;
uint8 minMint;
uint8 maxMint;
uint64 mintClose;
uint256 price;
}
MintDetails public mintDetails;
IERC721 public peepsClub;
constructor(
uint16 _maxSupply,
uint8 _minMint,
uint8 _maxMint,
uint64 _mintClose,
uint256 _price
) ERC721A("PeepsTreat", "TREAT") Payable(1000) {
}
modifier senderCanMint() {
}
//
// Mint
//
/**
* Public mint.
*/
function mintPublic() external payable senderCanMint {
}
/**
* Peeps mint.
* @param peepId The Id of a Peep you own.
*/
function mintPeeps(uint256 peepId) external senderCanMint {
require(<FILL_ME>)
_mint(msg.sender);
}
/**
* Airdrop.
* @param to The address to recieve the airdrop.
*/
function mintAirdrop(address to) external onlyOwner {
}
function _mint(address to) internal {
}
//
// Admin
//
/**
* Update URI.
*/
function setBaseURI(string memory _uri) external onlyOwner {
}
/**
* Update the Peeps Club address.
* @param _peepsClub The Peeps Club address.
*/
function setPeepsClub(address _peepsClub) external onlyOwner {
}
/**
* Update mint details.
* @param when The new close date.
* @param price The new price for non-peeps holders.
* @dev Not all mint details are updatable.
*/
function updateMintDetails(uint64 when, uint256 price) external onlyOwner {
}
//
// Views
//
/**
* Returns when the mint closes.
* @return when When the mint closes.
*/
function mintCloseAt() public view returns (uint64 when) {
}
/**
* Checks if an address can mint.
* @return can If the caller can mint.
*/
function canMint() external view returns (bool can) {
}
/**
* Returns the price.
* @return price The price.
*/
function getPrice() external view returns (uint256 price) {
}
/**
* Returns the starting token ID.
*/
function _startTokenId() internal pure override returns (uint256) {
}
/**
* Returns the Uniform Resource Identifier (URI) for `tokenId` token.
* @param tokenId The token id.
*/
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
}
| peepsClub.ownerOf(peepId)==msg.sender,"PeepsTreat: Not peep owner" | 504,037 | peepsClub.ownerOf(peepId)==msg.sender |
"Tax less than 15%" | // SPDX-License-Identifier: UNLICENSED
// https://t.me/TimmyInu
pragma solidity ^0.8.11;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract TIMMY is Context, IERC20, Ownable {///////////////////////////////////////////////////////////
using SafeMath for uint256;
string private constant _name = "Timmy Inu";//////////////////////////
string private constant _symbol = "TIMMY";//////////////////////////////////////////////////////////////////////////
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 100_000_000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
//Buy Fee
uint256 private _redisFeeOnBuy = 0;////////////////////////////////////////////////////////////////////
uint256 private _taxFeeOnBuy = 3;//////////////////////////////////////////////////////////////////////
//Sell Fee
uint256 private _redisFeeOnSell = 0;/////////////////////////////////////////////////////////////////////
uint256 private _taxFeeOnSell = 7;/////////////////////////////////////////////////////////////////////
//Original Fee
uint256 private _redisFee = _redisFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
mapping(address => bool) public bots;
mapping(address => uint256) private cooldown;
address payable private _developmentAddress = payable(0xa11Ec68a705aAdb12Abe7a4820F207b016Ee80A3);/////////////////////////////////////////////////
address payable private _marketingAddress = payable(0xa11Ec68a705aAdb12Abe7a4820F207b016Ee80A3);///////////////////////////////////////////////////
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen = true;
bool private inSwap = false;
bool private swapEnabled = true;
uint256 public _maxTxAmount = 2000000 * 10**9; //2%
uint256 public _maxWalletSize = 2000000 * 10**9; //2%
uint256 public _swapTokensAtAmount = 200000 * 10**9; //0.2%
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function manualswap() external {
}
function manualsend() external {
}
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 _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 redisFee,
uint256 taxFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
_redisFeeOnBuy = redisFeeOnBuy;
_redisFeeOnSell = redisFeeOnSell;
_taxFeeOnBuy = taxFeeOnBuy;
_taxFeeOnSell = taxFeeOnSell;
require(<FILL_ME>)
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set minimum tokens required to swap.
function toggleSwap(bool _swapEnabled) public onlyOwner {
}
//Set MAx transaction
function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner {
}
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
}
| _redisFeeOnBuy+_redisFeeOnSell+_taxFeeOnBuy+_taxFeeOnSell<=15,"Tax less than 15%" | 504,076 | _redisFeeOnBuy+_redisFeeOnSell+_taxFeeOnBuy+_taxFeeOnSell<=15 |
"Taxes have already been removed." | // SPDX-License-Identifier: MIT
//Set taxes on deploy. Can only be removed.
pragma solidity ^0.8.0;
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 BOTBOT is IERC20 {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 private _totalSupply;
uint256 public buyTaxPercent;
uint256 public sellTaxPercent;
bool public taxesRemoved = false;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
constructor(
string memory _name,
string memory _symbol,
uint256 _premint,
uint256 _buyTax,
uint256 _sellTax
) {
}
function permanentlyRemoveTaxes() external {
require(<FILL_ME>)
buyTaxPercent = 0;
sellTaxPercent = 0;
taxesRemoved = true;
}
function _applyTax(uint256 amount, uint256 taxPercent) internal pure returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
}
| !taxesRemoved,"Taxes have already been removed." | 504,079 | !taxesRemoved |
TOKEN_ADMIN_ERROR | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
abstract contract IERC20Extented is IERC20 {
function decimals() public view virtual returns (uint8);
}
/**
* @title GetPayment Contract
* @notice This contract receives payment for orders
*/
contract GetPayment is AccessControl {
// error constants
string constant DEFAULT_ADMIN_ERROR = "need DEFAULT_ADMIN_ROLE";
string constant TOKEN_ADMIN_ERROR = "need TOKEN_ADMIN_ROLE";
string constant ORDER_ADMIN_ERROR = "need ORDER_ADMIN_ROLE";
string constant ORACLE_ADRESS_ERROR = "INVALID_ORACLE_ADDRESS";
string constant TOKEN_ADRESS_ERROR = "INVALID_TOKEN_ADDRESS";
string constant TOKEN_ADDED_ERROR = "TOKEN_ALREADY_ADDED";
string constant TOKEN_NOT_ADDED_ERROR = "TOKEN_NOT_ADDED";
string constant BAD_TOKEN_ERROR = "BAD_TOKEN_FOR_PRICE_CALCULATIONS";
string constant ZERO_DECIMALS_ERROR = "INVALID_DECIMALS";
string constant TIME_ERROR = "BAD_EXPIRATION_TIME";
string constant AMOUNT_ERROR = "INVALID_AMOUNT";
string constant BALANCE_ERROR = "BALANCE_IS_NOT_ENOUGH";
string constant SEND_ERROR = "FAILED_TO_SEND";
string constant NOT_OWNER_ERROR = "msg.sender_NOT_OWNER";
string constant ORDER_EXISTS_ERROR = "ORDER_ALREADY_EXIST";
string constant ORDER_FULFILL_ERROR = "ORDER_FULFILLED";
string constant ORDER_NOT_EXISTS_ERROR = "ORDER_NOT_EXIST";
string constant ORDER_EXPIRED_ERROR = "ORDER_EXPIRED";
string constant NATIVE_TOKEN_ERROR = "NATIVE_NOT_VALID_METHOD";
string constant NATIVE_ADDRESS_ERROR = "NATIVE_ORACLE_ADDRESS_NOT_SET";
string constant NATIVE_DECIMALS_ERROR = "NATIVE_DECIMALS_NOT_SET";
string constant PAYMENT_NATIVE_ERROR = "PAYMENT_IS_NATIVE";
string constant PAYMENT_NOT_NATIVE_ERROR = "PAYMENT_IS_NOT_NATIVE";
address public nativePriceOracleAddress;
uint256 nativeTokenDecimals;
// when native payment method available, user can place an order that pays for native tokens
bool public isNativeTokenValidPaymentMethod;
// mapping of ERC20 tokens available for payment
mapping(address => address) public paymentTokenPriceOracleAddress;
// order expiration time
uint256 public expirationTimeSeconds;
enum OrderStatus {
NOT_EXISTS,
EXISTS,
FULFILLED
}
struct Order {
address owner;
uint256 amountUSD;
address paymentToken;
uint256 amountToken;
uint256 initializedAt;
uint256 expiresAt;
bool isPaymentNative;
OrderStatus status;
}
mapping(bytes32 => Order) orders;
bytes32 public constant TOKEN_ADMIN_ROLE = keccak256("TOKEN_ADMIN_ROLE");
bytes32 public constant ORDER_ADMIN_ROLE = keccak256("ORDER_ADMIN_ROLE");
event OrderFulfilledERC20(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
address paymentTokenAddress,
uint256 amountToken
);
event OrderFulfilledNative(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
uint256 amountNative
);
/**
* @dev common parameters are given through constructor.
* @param _expirationTimeSeconds order expiration time in seconds
**/
constructor(uint256 _expirationTimeSeconds) {
}
/**
* @dev calculate the price in ERC20 token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
* @param tokenAddress address of ERC20 token
*/
function calculatePriceERC20(uint256 amountUSD, address tokenAddress) public view returns (uint256) {
}
/**
* @dev calculate the price in native token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function calculatePriceNative(uint256 amountUSD) public view returns (uint256) {
}
/**
* @dev set Chainlink price oracle address. Called only by TOKEN_ADMIN
* @param oracleAddress Chainlink price oracle address of NativeToken/USD pair
*/
function setNativePriceOracleAddress(address oracleAddress) external {
require(<FILL_ME>)
require(oracleAddress != address(0), ORACLE_ADRESS_ERROR);
nativePriceOracleAddress = oracleAddress;
}
/**
* @dev set decimals of native token. Called only by TOKEN_ADMIN
* @param nativeDecimals decimals of native token
*/
function setNativeTokenDecimals(uint8 nativeDecimals) external {
}
/**
* @dev set order expiration time. Called only by DEFAULT_ADMIN
* @param _expirationTimeSeconds order expiration time in seconds
*/
function setExpirationTimeSeconds(uint256 _expirationTimeSeconds) external {
}
/**
* @dev enable or disable the ability to pay for an order using native tokens. Called only by DEFAULT_ADMIN
* @param isNativeValid boolean whether payment for the order with a native token is available
*/
function setIsNativeTokenValidPaymentMethod(bool isNativeValid) external {
}
/**
* @dev add a new payment ERC20 token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function addPaymentToken(address tokenAddress, address oracleAddress) external {
}
/**
* @dev change the oracle address of the payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function setPaymentTokenOracleAddress(address tokenAddress, address oracleAddress) external {
}
/**
* @dev remove payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
*/
function removePaymentToken(address tokenAddress) external {
}
/**
* @dev withdraw ERC20 token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param tokenAddress address of ERC20 token
* @param amount amount of tokens to withdraw
*/
function withdrawERC20Tokens(address tokenAddress, uint256 amount) external {
}
/**
* @dev withdraw native token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param amount amount of tokens to withdraw
*/
function withdrawNative(uint256 amount) external {
}
/**
* @dev place an order that pays for ERC20 tokens
* @param orderId id of order
* @param paymentToken the token that will be used to pay for the order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderERC20(bytes32 orderId, address paymentToken, uint256 amountUSD) external {
}
/**
* @dev place an order that pays for native tokens
* @param orderId id of order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderNative(bytes32 orderId, uint256 amountUSD) external {
}
/**
* @dev performs the execution of an order that is paid for by a ERC20 token
* @param orderId id of order
*/
function fulfillOrderERC20(bytes32 orderId) external {
}
/**
* @dev performs the execution of an order that is paid for by a native token
* @param orderId id of order
*/
function fulfillOrderNative(bytes32 orderId) external payable {
}
/**
* @dev gets a boolean value that is true if the order exists or has been fulfilled
* @param orderId id of order
*/
function isOrderPresented(bytes32 orderId) public view returns (bool) {
}
/**
* @dev gets a boolean value whether this token is available for order payment
* @param paymentToken address of ERC20 token
*/
function paymentTokenAvailable(address paymentToken) public view returns (bool) {
}
/**
* @dev cancel not fulfilled order. Called only by ORDER_ADMIN
* @param orderId id of order
*/
function cancelOrder(bytes32 orderId) external {
}
/**
* @dev get parameters of order
* @param orderId id of order
* @return owner the user who placed the order
* @return amountUSD order price in usd
* @return paymentToken the token that will be used to pay for the order
* @return amountToken order price in payment token, this amount will be debited upon fulfill of the order
* @return initializedAt the time the order was placed
* @return expiresAt the time the order will expire
* @return isPaymentNative payment will be in native tokens
* @return status status of order
*/
function getOrder(
bytes32 orderId
)
public
view
returns (
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
uint256 initializedAt,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
)
{
}
// Returns block.timestamp, overridable for test purposes.
function _now() internal view virtual returns (uint256) {
}
}
| hasRole(TOKEN_ADMIN_ROLE,_msgSender()),TOKEN_ADMIN_ERROR | 504,091 | hasRole(TOKEN_ADMIN_ROLE,_msgSender()) |
TOKEN_ADDED_ERROR | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
abstract contract IERC20Extented is IERC20 {
function decimals() public view virtual returns (uint8);
}
/**
* @title GetPayment Contract
* @notice This contract receives payment for orders
*/
contract GetPayment is AccessControl {
// error constants
string constant DEFAULT_ADMIN_ERROR = "need DEFAULT_ADMIN_ROLE";
string constant TOKEN_ADMIN_ERROR = "need TOKEN_ADMIN_ROLE";
string constant ORDER_ADMIN_ERROR = "need ORDER_ADMIN_ROLE";
string constant ORACLE_ADRESS_ERROR = "INVALID_ORACLE_ADDRESS";
string constant TOKEN_ADRESS_ERROR = "INVALID_TOKEN_ADDRESS";
string constant TOKEN_ADDED_ERROR = "TOKEN_ALREADY_ADDED";
string constant TOKEN_NOT_ADDED_ERROR = "TOKEN_NOT_ADDED";
string constant BAD_TOKEN_ERROR = "BAD_TOKEN_FOR_PRICE_CALCULATIONS";
string constant ZERO_DECIMALS_ERROR = "INVALID_DECIMALS";
string constant TIME_ERROR = "BAD_EXPIRATION_TIME";
string constant AMOUNT_ERROR = "INVALID_AMOUNT";
string constant BALANCE_ERROR = "BALANCE_IS_NOT_ENOUGH";
string constant SEND_ERROR = "FAILED_TO_SEND";
string constant NOT_OWNER_ERROR = "msg.sender_NOT_OWNER";
string constant ORDER_EXISTS_ERROR = "ORDER_ALREADY_EXIST";
string constant ORDER_FULFILL_ERROR = "ORDER_FULFILLED";
string constant ORDER_NOT_EXISTS_ERROR = "ORDER_NOT_EXIST";
string constant ORDER_EXPIRED_ERROR = "ORDER_EXPIRED";
string constant NATIVE_TOKEN_ERROR = "NATIVE_NOT_VALID_METHOD";
string constant NATIVE_ADDRESS_ERROR = "NATIVE_ORACLE_ADDRESS_NOT_SET";
string constant NATIVE_DECIMALS_ERROR = "NATIVE_DECIMALS_NOT_SET";
string constant PAYMENT_NATIVE_ERROR = "PAYMENT_IS_NATIVE";
string constant PAYMENT_NOT_NATIVE_ERROR = "PAYMENT_IS_NOT_NATIVE";
address public nativePriceOracleAddress;
uint256 nativeTokenDecimals;
// when native payment method available, user can place an order that pays for native tokens
bool public isNativeTokenValidPaymentMethod;
// mapping of ERC20 tokens available for payment
mapping(address => address) public paymentTokenPriceOracleAddress;
// order expiration time
uint256 public expirationTimeSeconds;
enum OrderStatus {
NOT_EXISTS,
EXISTS,
FULFILLED
}
struct Order {
address owner;
uint256 amountUSD;
address paymentToken;
uint256 amountToken;
uint256 initializedAt;
uint256 expiresAt;
bool isPaymentNative;
OrderStatus status;
}
mapping(bytes32 => Order) orders;
bytes32 public constant TOKEN_ADMIN_ROLE = keccak256("TOKEN_ADMIN_ROLE");
bytes32 public constant ORDER_ADMIN_ROLE = keccak256("ORDER_ADMIN_ROLE");
event OrderFulfilledERC20(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
address paymentTokenAddress,
uint256 amountToken
);
event OrderFulfilledNative(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
uint256 amountNative
);
/**
* @dev common parameters are given through constructor.
* @param _expirationTimeSeconds order expiration time in seconds
**/
constructor(uint256 _expirationTimeSeconds) {
}
/**
* @dev calculate the price in ERC20 token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
* @param tokenAddress address of ERC20 token
*/
function calculatePriceERC20(uint256 amountUSD, address tokenAddress) public view returns (uint256) {
}
/**
* @dev calculate the price in native token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function calculatePriceNative(uint256 amountUSD) public view returns (uint256) {
}
/**
* @dev set Chainlink price oracle address. Called only by TOKEN_ADMIN
* @param oracleAddress Chainlink price oracle address of NativeToken/USD pair
*/
function setNativePriceOracleAddress(address oracleAddress) external {
}
/**
* @dev set decimals of native token. Called only by TOKEN_ADMIN
* @param nativeDecimals decimals of native token
*/
function setNativeTokenDecimals(uint8 nativeDecimals) external {
}
/**
* @dev set order expiration time. Called only by DEFAULT_ADMIN
* @param _expirationTimeSeconds order expiration time in seconds
*/
function setExpirationTimeSeconds(uint256 _expirationTimeSeconds) external {
}
/**
* @dev enable or disable the ability to pay for an order using native tokens. Called only by DEFAULT_ADMIN
* @param isNativeValid boolean whether payment for the order with a native token is available
*/
function setIsNativeTokenValidPaymentMethod(bool isNativeValid) external {
}
/**
* @dev add a new payment ERC20 token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function addPaymentToken(address tokenAddress, address oracleAddress) external {
require(hasRole(TOKEN_ADMIN_ROLE, _msgSender()), TOKEN_ADMIN_ERROR);
require(tokenAddress != address(0), TOKEN_ADRESS_ERROR);
require(oracleAddress != address(0), ORACLE_ADRESS_ERROR);
require(<FILL_ME>)
paymentTokenPriceOracleAddress[tokenAddress] = oracleAddress;
}
/**
* @dev change the oracle address of the payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function setPaymentTokenOracleAddress(address tokenAddress, address oracleAddress) external {
}
/**
* @dev remove payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
*/
function removePaymentToken(address tokenAddress) external {
}
/**
* @dev withdraw ERC20 token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param tokenAddress address of ERC20 token
* @param amount amount of tokens to withdraw
*/
function withdrawERC20Tokens(address tokenAddress, uint256 amount) external {
}
/**
* @dev withdraw native token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param amount amount of tokens to withdraw
*/
function withdrawNative(uint256 amount) external {
}
/**
* @dev place an order that pays for ERC20 tokens
* @param orderId id of order
* @param paymentToken the token that will be used to pay for the order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderERC20(bytes32 orderId, address paymentToken, uint256 amountUSD) external {
}
/**
* @dev place an order that pays for native tokens
* @param orderId id of order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderNative(bytes32 orderId, uint256 amountUSD) external {
}
/**
* @dev performs the execution of an order that is paid for by a ERC20 token
* @param orderId id of order
*/
function fulfillOrderERC20(bytes32 orderId) external {
}
/**
* @dev performs the execution of an order that is paid for by a native token
* @param orderId id of order
*/
function fulfillOrderNative(bytes32 orderId) external payable {
}
/**
* @dev gets a boolean value that is true if the order exists or has been fulfilled
* @param orderId id of order
*/
function isOrderPresented(bytes32 orderId) public view returns (bool) {
}
/**
* @dev gets a boolean value whether this token is available for order payment
* @param paymentToken address of ERC20 token
*/
function paymentTokenAvailable(address paymentToken) public view returns (bool) {
}
/**
* @dev cancel not fulfilled order. Called only by ORDER_ADMIN
* @param orderId id of order
*/
function cancelOrder(bytes32 orderId) external {
}
/**
* @dev get parameters of order
* @param orderId id of order
* @return owner the user who placed the order
* @return amountUSD order price in usd
* @return paymentToken the token that will be used to pay for the order
* @return amountToken order price in payment token, this amount will be debited upon fulfill of the order
* @return initializedAt the time the order was placed
* @return expiresAt the time the order will expire
* @return isPaymentNative payment will be in native tokens
* @return status status of order
*/
function getOrder(
bytes32 orderId
)
public
view
returns (
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
uint256 initializedAt,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
)
{
}
// Returns block.timestamp, overridable for test purposes.
function _now() internal view virtual returns (uint256) {
}
}
| paymentTokenPriceOracleAddress[tokenAddress]==address(0),TOKEN_ADDED_ERROR | 504,091 | paymentTokenPriceOracleAddress[tokenAddress]==address(0) |
TOKEN_NOT_ADDED_ERROR | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
abstract contract IERC20Extented is IERC20 {
function decimals() public view virtual returns (uint8);
}
/**
* @title GetPayment Contract
* @notice This contract receives payment for orders
*/
contract GetPayment is AccessControl {
// error constants
string constant DEFAULT_ADMIN_ERROR = "need DEFAULT_ADMIN_ROLE";
string constant TOKEN_ADMIN_ERROR = "need TOKEN_ADMIN_ROLE";
string constant ORDER_ADMIN_ERROR = "need ORDER_ADMIN_ROLE";
string constant ORACLE_ADRESS_ERROR = "INVALID_ORACLE_ADDRESS";
string constant TOKEN_ADRESS_ERROR = "INVALID_TOKEN_ADDRESS";
string constant TOKEN_ADDED_ERROR = "TOKEN_ALREADY_ADDED";
string constant TOKEN_NOT_ADDED_ERROR = "TOKEN_NOT_ADDED";
string constant BAD_TOKEN_ERROR = "BAD_TOKEN_FOR_PRICE_CALCULATIONS";
string constant ZERO_DECIMALS_ERROR = "INVALID_DECIMALS";
string constant TIME_ERROR = "BAD_EXPIRATION_TIME";
string constant AMOUNT_ERROR = "INVALID_AMOUNT";
string constant BALANCE_ERROR = "BALANCE_IS_NOT_ENOUGH";
string constant SEND_ERROR = "FAILED_TO_SEND";
string constant NOT_OWNER_ERROR = "msg.sender_NOT_OWNER";
string constant ORDER_EXISTS_ERROR = "ORDER_ALREADY_EXIST";
string constant ORDER_FULFILL_ERROR = "ORDER_FULFILLED";
string constant ORDER_NOT_EXISTS_ERROR = "ORDER_NOT_EXIST";
string constant ORDER_EXPIRED_ERROR = "ORDER_EXPIRED";
string constant NATIVE_TOKEN_ERROR = "NATIVE_NOT_VALID_METHOD";
string constant NATIVE_ADDRESS_ERROR = "NATIVE_ORACLE_ADDRESS_NOT_SET";
string constant NATIVE_DECIMALS_ERROR = "NATIVE_DECIMALS_NOT_SET";
string constant PAYMENT_NATIVE_ERROR = "PAYMENT_IS_NATIVE";
string constant PAYMENT_NOT_NATIVE_ERROR = "PAYMENT_IS_NOT_NATIVE";
address public nativePriceOracleAddress;
uint256 nativeTokenDecimals;
// when native payment method available, user can place an order that pays for native tokens
bool public isNativeTokenValidPaymentMethod;
// mapping of ERC20 tokens available for payment
mapping(address => address) public paymentTokenPriceOracleAddress;
// order expiration time
uint256 public expirationTimeSeconds;
enum OrderStatus {
NOT_EXISTS,
EXISTS,
FULFILLED
}
struct Order {
address owner;
uint256 amountUSD;
address paymentToken;
uint256 amountToken;
uint256 initializedAt;
uint256 expiresAt;
bool isPaymentNative;
OrderStatus status;
}
mapping(bytes32 => Order) orders;
bytes32 public constant TOKEN_ADMIN_ROLE = keccak256("TOKEN_ADMIN_ROLE");
bytes32 public constant ORDER_ADMIN_ROLE = keccak256("ORDER_ADMIN_ROLE");
event OrderFulfilledERC20(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
address paymentTokenAddress,
uint256 amountToken
);
event OrderFulfilledNative(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
uint256 amountNative
);
/**
* @dev common parameters are given through constructor.
* @param _expirationTimeSeconds order expiration time in seconds
**/
constructor(uint256 _expirationTimeSeconds) {
}
/**
* @dev calculate the price in ERC20 token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
* @param tokenAddress address of ERC20 token
*/
function calculatePriceERC20(uint256 amountUSD, address tokenAddress) public view returns (uint256) {
}
/**
* @dev calculate the price in native token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function calculatePriceNative(uint256 amountUSD) public view returns (uint256) {
}
/**
* @dev set Chainlink price oracle address. Called only by TOKEN_ADMIN
* @param oracleAddress Chainlink price oracle address of NativeToken/USD pair
*/
function setNativePriceOracleAddress(address oracleAddress) external {
}
/**
* @dev set decimals of native token. Called only by TOKEN_ADMIN
* @param nativeDecimals decimals of native token
*/
function setNativeTokenDecimals(uint8 nativeDecimals) external {
}
/**
* @dev set order expiration time. Called only by DEFAULT_ADMIN
* @param _expirationTimeSeconds order expiration time in seconds
*/
function setExpirationTimeSeconds(uint256 _expirationTimeSeconds) external {
}
/**
* @dev enable or disable the ability to pay for an order using native tokens. Called only by DEFAULT_ADMIN
* @param isNativeValid boolean whether payment for the order with a native token is available
*/
function setIsNativeTokenValidPaymentMethod(bool isNativeValid) external {
}
/**
* @dev add a new payment ERC20 token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function addPaymentToken(address tokenAddress, address oracleAddress) external {
}
/**
* @dev change the oracle address of the payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function setPaymentTokenOracleAddress(address tokenAddress, address oracleAddress) external {
require(hasRole(TOKEN_ADMIN_ROLE, _msgSender()), TOKEN_ADMIN_ERROR);
require(tokenAddress != address(0), TOKEN_ADRESS_ERROR);
require(oracleAddress != address(0), ORACLE_ADRESS_ERROR);
require(<FILL_ME>)
paymentTokenPriceOracleAddress[tokenAddress] = oracleAddress;
}
/**
* @dev remove payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
*/
function removePaymentToken(address tokenAddress) external {
}
/**
* @dev withdraw ERC20 token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param tokenAddress address of ERC20 token
* @param amount amount of tokens to withdraw
*/
function withdrawERC20Tokens(address tokenAddress, uint256 amount) external {
}
/**
* @dev withdraw native token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param amount amount of tokens to withdraw
*/
function withdrawNative(uint256 amount) external {
}
/**
* @dev place an order that pays for ERC20 tokens
* @param orderId id of order
* @param paymentToken the token that will be used to pay for the order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderERC20(bytes32 orderId, address paymentToken, uint256 amountUSD) external {
}
/**
* @dev place an order that pays for native tokens
* @param orderId id of order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderNative(bytes32 orderId, uint256 amountUSD) external {
}
/**
* @dev performs the execution of an order that is paid for by a ERC20 token
* @param orderId id of order
*/
function fulfillOrderERC20(bytes32 orderId) external {
}
/**
* @dev performs the execution of an order that is paid for by a native token
* @param orderId id of order
*/
function fulfillOrderNative(bytes32 orderId) external payable {
}
/**
* @dev gets a boolean value that is true if the order exists or has been fulfilled
* @param orderId id of order
*/
function isOrderPresented(bytes32 orderId) public view returns (bool) {
}
/**
* @dev gets a boolean value whether this token is available for order payment
* @param paymentToken address of ERC20 token
*/
function paymentTokenAvailable(address paymentToken) public view returns (bool) {
}
/**
* @dev cancel not fulfilled order. Called only by ORDER_ADMIN
* @param orderId id of order
*/
function cancelOrder(bytes32 orderId) external {
}
/**
* @dev get parameters of order
* @param orderId id of order
* @return owner the user who placed the order
* @return amountUSD order price in usd
* @return paymentToken the token that will be used to pay for the order
* @return amountToken order price in payment token, this amount will be debited upon fulfill of the order
* @return initializedAt the time the order was placed
* @return expiresAt the time the order will expire
* @return isPaymentNative payment will be in native tokens
* @return status status of order
*/
function getOrder(
bytes32 orderId
)
public
view
returns (
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
uint256 initializedAt,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
)
{
}
// Returns block.timestamp, overridable for test purposes.
function _now() internal view virtual returns (uint256) {
}
}
| paymentTokenPriceOracleAddress[tokenAddress]!=address(0),TOKEN_NOT_ADDED_ERROR | 504,091 | paymentTokenPriceOracleAddress[tokenAddress]!=address(0) |
ORDER_EXISTS_ERROR | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
abstract contract IERC20Extented is IERC20 {
function decimals() public view virtual returns (uint8);
}
/**
* @title GetPayment Contract
* @notice This contract receives payment for orders
*/
contract GetPayment is AccessControl {
// error constants
string constant DEFAULT_ADMIN_ERROR = "need DEFAULT_ADMIN_ROLE";
string constant TOKEN_ADMIN_ERROR = "need TOKEN_ADMIN_ROLE";
string constant ORDER_ADMIN_ERROR = "need ORDER_ADMIN_ROLE";
string constant ORACLE_ADRESS_ERROR = "INVALID_ORACLE_ADDRESS";
string constant TOKEN_ADRESS_ERROR = "INVALID_TOKEN_ADDRESS";
string constant TOKEN_ADDED_ERROR = "TOKEN_ALREADY_ADDED";
string constant TOKEN_NOT_ADDED_ERROR = "TOKEN_NOT_ADDED";
string constant BAD_TOKEN_ERROR = "BAD_TOKEN_FOR_PRICE_CALCULATIONS";
string constant ZERO_DECIMALS_ERROR = "INVALID_DECIMALS";
string constant TIME_ERROR = "BAD_EXPIRATION_TIME";
string constant AMOUNT_ERROR = "INVALID_AMOUNT";
string constant BALANCE_ERROR = "BALANCE_IS_NOT_ENOUGH";
string constant SEND_ERROR = "FAILED_TO_SEND";
string constant NOT_OWNER_ERROR = "msg.sender_NOT_OWNER";
string constant ORDER_EXISTS_ERROR = "ORDER_ALREADY_EXIST";
string constant ORDER_FULFILL_ERROR = "ORDER_FULFILLED";
string constant ORDER_NOT_EXISTS_ERROR = "ORDER_NOT_EXIST";
string constant ORDER_EXPIRED_ERROR = "ORDER_EXPIRED";
string constant NATIVE_TOKEN_ERROR = "NATIVE_NOT_VALID_METHOD";
string constant NATIVE_ADDRESS_ERROR = "NATIVE_ORACLE_ADDRESS_NOT_SET";
string constant NATIVE_DECIMALS_ERROR = "NATIVE_DECIMALS_NOT_SET";
string constant PAYMENT_NATIVE_ERROR = "PAYMENT_IS_NATIVE";
string constant PAYMENT_NOT_NATIVE_ERROR = "PAYMENT_IS_NOT_NATIVE";
address public nativePriceOracleAddress;
uint256 nativeTokenDecimals;
// when native payment method available, user can place an order that pays for native tokens
bool public isNativeTokenValidPaymentMethod;
// mapping of ERC20 tokens available for payment
mapping(address => address) public paymentTokenPriceOracleAddress;
// order expiration time
uint256 public expirationTimeSeconds;
enum OrderStatus {
NOT_EXISTS,
EXISTS,
FULFILLED
}
struct Order {
address owner;
uint256 amountUSD;
address paymentToken;
uint256 amountToken;
uint256 initializedAt;
uint256 expiresAt;
bool isPaymentNative;
OrderStatus status;
}
mapping(bytes32 => Order) orders;
bytes32 public constant TOKEN_ADMIN_ROLE = keccak256("TOKEN_ADMIN_ROLE");
bytes32 public constant ORDER_ADMIN_ROLE = keccak256("ORDER_ADMIN_ROLE");
event OrderFulfilledERC20(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
address paymentTokenAddress,
uint256 amountToken
);
event OrderFulfilledNative(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
uint256 amountNative
);
/**
* @dev common parameters are given through constructor.
* @param _expirationTimeSeconds order expiration time in seconds
**/
constructor(uint256 _expirationTimeSeconds) {
}
/**
* @dev calculate the price in ERC20 token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
* @param tokenAddress address of ERC20 token
*/
function calculatePriceERC20(uint256 amountUSD, address tokenAddress) public view returns (uint256) {
}
/**
* @dev calculate the price in native token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function calculatePriceNative(uint256 amountUSD) public view returns (uint256) {
}
/**
* @dev set Chainlink price oracle address. Called only by TOKEN_ADMIN
* @param oracleAddress Chainlink price oracle address of NativeToken/USD pair
*/
function setNativePriceOracleAddress(address oracleAddress) external {
}
/**
* @dev set decimals of native token. Called only by TOKEN_ADMIN
* @param nativeDecimals decimals of native token
*/
function setNativeTokenDecimals(uint8 nativeDecimals) external {
}
/**
* @dev set order expiration time. Called only by DEFAULT_ADMIN
* @param _expirationTimeSeconds order expiration time in seconds
*/
function setExpirationTimeSeconds(uint256 _expirationTimeSeconds) external {
}
/**
* @dev enable or disable the ability to pay for an order using native tokens. Called only by DEFAULT_ADMIN
* @param isNativeValid boolean whether payment for the order with a native token is available
*/
function setIsNativeTokenValidPaymentMethod(bool isNativeValid) external {
}
/**
* @dev add a new payment ERC20 token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function addPaymentToken(address tokenAddress, address oracleAddress) external {
}
/**
* @dev change the oracle address of the payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function setPaymentTokenOracleAddress(address tokenAddress, address oracleAddress) external {
}
/**
* @dev remove payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
*/
function removePaymentToken(address tokenAddress) external {
}
/**
* @dev withdraw ERC20 token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param tokenAddress address of ERC20 token
* @param amount amount of tokens to withdraw
*/
function withdrawERC20Tokens(address tokenAddress, uint256 amount) external {
}
/**
* @dev withdraw native token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param amount amount of tokens to withdraw
*/
function withdrawNative(uint256 amount) external {
}
/**
* @dev place an order that pays for ERC20 tokens
* @param orderId id of order
* @param paymentToken the token that will be used to pay for the order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderERC20(bytes32 orderId, address paymentToken, uint256 amountUSD) external {
require(<FILL_ME>)
require(paymentTokenPriceOracleAddress[paymentToken] != address(0), TOKEN_ADRESS_ERROR);
require(amountUSD > 0, AMOUNT_ERROR);
uint256 timestamp = _now();
orders[orderId] = Order(
_msgSender(),
amountUSD,
paymentToken,
calculatePriceERC20(amountUSD, paymentToken),
timestamp,
timestamp + expirationTimeSeconds,
false,
OrderStatus.EXISTS
);
}
/**
* @dev place an order that pays for native tokens
* @param orderId id of order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderNative(bytes32 orderId, uint256 amountUSD) external {
}
/**
* @dev performs the execution of an order that is paid for by a ERC20 token
* @param orderId id of order
*/
function fulfillOrderERC20(bytes32 orderId) external {
}
/**
* @dev performs the execution of an order that is paid for by a native token
* @param orderId id of order
*/
function fulfillOrderNative(bytes32 orderId) external payable {
}
/**
* @dev gets a boolean value that is true if the order exists or has been fulfilled
* @param orderId id of order
*/
function isOrderPresented(bytes32 orderId) public view returns (bool) {
}
/**
* @dev gets a boolean value whether this token is available for order payment
* @param paymentToken address of ERC20 token
*/
function paymentTokenAvailable(address paymentToken) public view returns (bool) {
}
/**
* @dev cancel not fulfilled order. Called only by ORDER_ADMIN
* @param orderId id of order
*/
function cancelOrder(bytes32 orderId) external {
}
/**
* @dev get parameters of order
* @param orderId id of order
* @return owner the user who placed the order
* @return amountUSD order price in usd
* @return paymentToken the token that will be used to pay for the order
* @return amountToken order price in payment token, this amount will be debited upon fulfill of the order
* @return initializedAt the time the order was placed
* @return expiresAt the time the order will expire
* @return isPaymentNative payment will be in native tokens
* @return status status of order
*/
function getOrder(
bytes32 orderId
)
public
view
returns (
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
uint256 initializedAt,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
)
{
}
// Returns block.timestamp, overridable for test purposes.
function _now() internal view virtual returns (uint256) {
}
}
| !(isOrderPresented(orderId)),ORDER_EXISTS_ERROR | 504,091 | !(isOrderPresented(orderId)) |
TOKEN_ADRESS_ERROR | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
abstract contract IERC20Extented is IERC20 {
function decimals() public view virtual returns (uint8);
}
/**
* @title GetPayment Contract
* @notice This contract receives payment for orders
*/
contract GetPayment is AccessControl {
// error constants
string constant DEFAULT_ADMIN_ERROR = "need DEFAULT_ADMIN_ROLE";
string constant TOKEN_ADMIN_ERROR = "need TOKEN_ADMIN_ROLE";
string constant ORDER_ADMIN_ERROR = "need ORDER_ADMIN_ROLE";
string constant ORACLE_ADRESS_ERROR = "INVALID_ORACLE_ADDRESS";
string constant TOKEN_ADRESS_ERROR = "INVALID_TOKEN_ADDRESS";
string constant TOKEN_ADDED_ERROR = "TOKEN_ALREADY_ADDED";
string constant TOKEN_NOT_ADDED_ERROR = "TOKEN_NOT_ADDED";
string constant BAD_TOKEN_ERROR = "BAD_TOKEN_FOR_PRICE_CALCULATIONS";
string constant ZERO_DECIMALS_ERROR = "INVALID_DECIMALS";
string constant TIME_ERROR = "BAD_EXPIRATION_TIME";
string constant AMOUNT_ERROR = "INVALID_AMOUNT";
string constant BALANCE_ERROR = "BALANCE_IS_NOT_ENOUGH";
string constant SEND_ERROR = "FAILED_TO_SEND";
string constant NOT_OWNER_ERROR = "msg.sender_NOT_OWNER";
string constant ORDER_EXISTS_ERROR = "ORDER_ALREADY_EXIST";
string constant ORDER_FULFILL_ERROR = "ORDER_FULFILLED";
string constant ORDER_NOT_EXISTS_ERROR = "ORDER_NOT_EXIST";
string constant ORDER_EXPIRED_ERROR = "ORDER_EXPIRED";
string constant NATIVE_TOKEN_ERROR = "NATIVE_NOT_VALID_METHOD";
string constant NATIVE_ADDRESS_ERROR = "NATIVE_ORACLE_ADDRESS_NOT_SET";
string constant NATIVE_DECIMALS_ERROR = "NATIVE_DECIMALS_NOT_SET";
string constant PAYMENT_NATIVE_ERROR = "PAYMENT_IS_NATIVE";
string constant PAYMENT_NOT_NATIVE_ERROR = "PAYMENT_IS_NOT_NATIVE";
address public nativePriceOracleAddress;
uint256 nativeTokenDecimals;
// when native payment method available, user can place an order that pays for native tokens
bool public isNativeTokenValidPaymentMethod;
// mapping of ERC20 tokens available for payment
mapping(address => address) public paymentTokenPriceOracleAddress;
// order expiration time
uint256 public expirationTimeSeconds;
enum OrderStatus {
NOT_EXISTS,
EXISTS,
FULFILLED
}
struct Order {
address owner;
uint256 amountUSD;
address paymentToken;
uint256 amountToken;
uint256 initializedAt;
uint256 expiresAt;
bool isPaymentNative;
OrderStatus status;
}
mapping(bytes32 => Order) orders;
bytes32 public constant TOKEN_ADMIN_ROLE = keccak256("TOKEN_ADMIN_ROLE");
bytes32 public constant ORDER_ADMIN_ROLE = keccak256("ORDER_ADMIN_ROLE");
event OrderFulfilledERC20(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
address paymentTokenAddress,
uint256 amountToken
);
event OrderFulfilledNative(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
uint256 amountNative
);
/**
* @dev common parameters are given through constructor.
* @param _expirationTimeSeconds order expiration time in seconds
**/
constructor(uint256 _expirationTimeSeconds) {
}
/**
* @dev calculate the price in ERC20 token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
* @param tokenAddress address of ERC20 token
*/
function calculatePriceERC20(uint256 amountUSD, address tokenAddress) public view returns (uint256) {
}
/**
* @dev calculate the price in native token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function calculatePriceNative(uint256 amountUSD) public view returns (uint256) {
}
/**
* @dev set Chainlink price oracle address. Called only by TOKEN_ADMIN
* @param oracleAddress Chainlink price oracle address of NativeToken/USD pair
*/
function setNativePriceOracleAddress(address oracleAddress) external {
}
/**
* @dev set decimals of native token. Called only by TOKEN_ADMIN
* @param nativeDecimals decimals of native token
*/
function setNativeTokenDecimals(uint8 nativeDecimals) external {
}
/**
* @dev set order expiration time. Called only by DEFAULT_ADMIN
* @param _expirationTimeSeconds order expiration time in seconds
*/
function setExpirationTimeSeconds(uint256 _expirationTimeSeconds) external {
}
/**
* @dev enable or disable the ability to pay for an order using native tokens. Called only by DEFAULT_ADMIN
* @param isNativeValid boolean whether payment for the order with a native token is available
*/
function setIsNativeTokenValidPaymentMethod(bool isNativeValid) external {
}
/**
* @dev add a new payment ERC20 token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function addPaymentToken(address tokenAddress, address oracleAddress) external {
}
/**
* @dev change the oracle address of the payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function setPaymentTokenOracleAddress(address tokenAddress, address oracleAddress) external {
}
/**
* @dev remove payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
*/
function removePaymentToken(address tokenAddress) external {
}
/**
* @dev withdraw ERC20 token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param tokenAddress address of ERC20 token
* @param amount amount of tokens to withdraw
*/
function withdrawERC20Tokens(address tokenAddress, uint256 amount) external {
}
/**
* @dev withdraw native token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param amount amount of tokens to withdraw
*/
function withdrawNative(uint256 amount) external {
}
/**
* @dev place an order that pays for ERC20 tokens
* @param orderId id of order
* @param paymentToken the token that will be used to pay for the order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderERC20(bytes32 orderId, address paymentToken, uint256 amountUSD) external {
require(!(isOrderPresented(orderId)), ORDER_EXISTS_ERROR);
require(<FILL_ME>)
require(amountUSD > 0, AMOUNT_ERROR);
uint256 timestamp = _now();
orders[orderId] = Order(
_msgSender(),
amountUSD,
paymentToken,
calculatePriceERC20(amountUSD, paymentToken),
timestamp,
timestamp + expirationTimeSeconds,
false,
OrderStatus.EXISTS
);
}
/**
* @dev place an order that pays for native tokens
* @param orderId id of order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderNative(bytes32 orderId, uint256 amountUSD) external {
}
/**
* @dev performs the execution of an order that is paid for by a ERC20 token
* @param orderId id of order
*/
function fulfillOrderERC20(bytes32 orderId) external {
}
/**
* @dev performs the execution of an order that is paid for by a native token
* @param orderId id of order
*/
function fulfillOrderNative(bytes32 orderId) external payable {
}
/**
* @dev gets a boolean value that is true if the order exists or has been fulfilled
* @param orderId id of order
*/
function isOrderPresented(bytes32 orderId) public view returns (bool) {
}
/**
* @dev gets a boolean value whether this token is available for order payment
* @param paymentToken address of ERC20 token
*/
function paymentTokenAvailable(address paymentToken) public view returns (bool) {
}
/**
* @dev cancel not fulfilled order. Called only by ORDER_ADMIN
* @param orderId id of order
*/
function cancelOrder(bytes32 orderId) external {
}
/**
* @dev get parameters of order
* @param orderId id of order
* @return owner the user who placed the order
* @return amountUSD order price in usd
* @return paymentToken the token that will be used to pay for the order
* @return amountToken order price in payment token, this amount will be debited upon fulfill of the order
* @return initializedAt the time the order was placed
* @return expiresAt the time the order will expire
* @return isPaymentNative payment will be in native tokens
* @return status status of order
*/
function getOrder(
bytes32 orderId
)
public
view
returns (
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
uint256 initializedAt,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
)
{
}
// Returns block.timestamp, overridable for test purposes.
function _now() internal view virtual returns (uint256) {
}
}
| paymentTokenPriceOracleAddress[paymentToken]!=address(0),TOKEN_ADRESS_ERROR | 504,091 | paymentTokenPriceOracleAddress[paymentToken]!=address(0) |
ORDER_NOT_EXISTS_ERROR | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
abstract contract IERC20Extented is IERC20 {
function decimals() public view virtual returns (uint8);
}
/**
* @title GetPayment Contract
* @notice This contract receives payment for orders
*/
contract GetPayment is AccessControl {
// error constants
string constant DEFAULT_ADMIN_ERROR = "need DEFAULT_ADMIN_ROLE";
string constant TOKEN_ADMIN_ERROR = "need TOKEN_ADMIN_ROLE";
string constant ORDER_ADMIN_ERROR = "need ORDER_ADMIN_ROLE";
string constant ORACLE_ADRESS_ERROR = "INVALID_ORACLE_ADDRESS";
string constant TOKEN_ADRESS_ERROR = "INVALID_TOKEN_ADDRESS";
string constant TOKEN_ADDED_ERROR = "TOKEN_ALREADY_ADDED";
string constant TOKEN_NOT_ADDED_ERROR = "TOKEN_NOT_ADDED";
string constant BAD_TOKEN_ERROR = "BAD_TOKEN_FOR_PRICE_CALCULATIONS";
string constant ZERO_DECIMALS_ERROR = "INVALID_DECIMALS";
string constant TIME_ERROR = "BAD_EXPIRATION_TIME";
string constant AMOUNT_ERROR = "INVALID_AMOUNT";
string constant BALANCE_ERROR = "BALANCE_IS_NOT_ENOUGH";
string constant SEND_ERROR = "FAILED_TO_SEND";
string constant NOT_OWNER_ERROR = "msg.sender_NOT_OWNER";
string constant ORDER_EXISTS_ERROR = "ORDER_ALREADY_EXIST";
string constant ORDER_FULFILL_ERROR = "ORDER_FULFILLED";
string constant ORDER_NOT_EXISTS_ERROR = "ORDER_NOT_EXIST";
string constant ORDER_EXPIRED_ERROR = "ORDER_EXPIRED";
string constant NATIVE_TOKEN_ERROR = "NATIVE_NOT_VALID_METHOD";
string constant NATIVE_ADDRESS_ERROR = "NATIVE_ORACLE_ADDRESS_NOT_SET";
string constant NATIVE_DECIMALS_ERROR = "NATIVE_DECIMALS_NOT_SET";
string constant PAYMENT_NATIVE_ERROR = "PAYMENT_IS_NATIVE";
string constant PAYMENT_NOT_NATIVE_ERROR = "PAYMENT_IS_NOT_NATIVE";
address public nativePriceOracleAddress;
uint256 nativeTokenDecimals;
// when native payment method available, user can place an order that pays for native tokens
bool public isNativeTokenValidPaymentMethod;
// mapping of ERC20 tokens available for payment
mapping(address => address) public paymentTokenPriceOracleAddress;
// order expiration time
uint256 public expirationTimeSeconds;
enum OrderStatus {
NOT_EXISTS,
EXISTS,
FULFILLED
}
struct Order {
address owner;
uint256 amountUSD;
address paymentToken;
uint256 amountToken;
uint256 initializedAt;
uint256 expiresAt;
bool isPaymentNative;
OrderStatus status;
}
mapping(bytes32 => Order) orders;
bytes32 public constant TOKEN_ADMIN_ROLE = keccak256("TOKEN_ADMIN_ROLE");
bytes32 public constant ORDER_ADMIN_ROLE = keccak256("ORDER_ADMIN_ROLE");
event OrderFulfilledERC20(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
address paymentTokenAddress,
uint256 amountToken
);
event OrderFulfilledNative(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
uint256 amountNative
);
/**
* @dev common parameters are given through constructor.
* @param _expirationTimeSeconds order expiration time in seconds
**/
constructor(uint256 _expirationTimeSeconds) {
}
/**
* @dev calculate the price in ERC20 token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
* @param tokenAddress address of ERC20 token
*/
function calculatePriceERC20(uint256 amountUSD, address tokenAddress) public view returns (uint256) {
}
/**
* @dev calculate the price in native token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function calculatePriceNative(uint256 amountUSD) public view returns (uint256) {
}
/**
* @dev set Chainlink price oracle address. Called only by TOKEN_ADMIN
* @param oracleAddress Chainlink price oracle address of NativeToken/USD pair
*/
function setNativePriceOracleAddress(address oracleAddress) external {
}
/**
* @dev set decimals of native token. Called only by TOKEN_ADMIN
* @param nativeDecimals decimals of native token
*/
function setNativeTokenDecimals(uint8 nativeDecimals) external {
}
/**
* @dev set order expiration time. Called only by DEFAULT_ADMIN
* @param _expirationTimeSeconds order expiration time in seconds
*/
function setExpirationTimeSeconds(uint256 _expirationTimeSeconds) external {
}
/**
* @dev enable or disable the ability to pay for an order using native tokens. Called only by DEFAULT_ADMIN
* @param isNativeValid boolean whether payment for the order with a native token is available
*/
function setIsNativeTokenValidPaymentMethod(bool isNativeValid) external {
}
/**
* @dev add a new payment ERC20 token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function addPaymentToken(address tokenAddress, address oracleAddress) external {
}
/**
* @dev change the oracle address of the payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function setPaymentTokenOracleAddress(address tokenAddress, address oracleAddress) external {
}
/**
* @dev remove payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
*/
function removePaymentToken(address tokenAddress) external {
}
/**
* @dev withdraw ERC20 token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param tokenAddress address of ERC20 token
* @param amount amount of tokens to withdraw
*/
function withdrawERC20Tokens(address tokenAddress, uint256 amount) external {
}
/**
* @dev withdraw native token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param amount amount of tokens to withdraw
*/
function withdrawNative(uint256 amount) external {
}
/**
* @dev place an order that pays for ERC20 tokens
* @param orderId id of order
* @param paymentToken the token that will be used to pay for the order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderERC20(bytes32 orderId, address paymentToken, uint256 amountUSD) external {
}
/**
* @dev place an order that pays for native tokens
* @param orderId id of order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderNative(bytes32 orderId, uint256 amountUSD) external {
}
/**
* @dev performs the execution of an order that is paid for by a ERC20 token
* @param orderId id of order
*/
function fulfillOrderERC20(bytes32 orderId) external {
require(<FILL_ME>)
(
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
) = getOrder(orderId);
require(owner == _msgSender(), NOT_OWNER_ERROR);
uint256 timestamp = _now();
require(timestamp < expiresAt, ORDER_EXPIRED_ERROR);
require(status == OrderStatus.EXISTS, ORDER_FULFILL_ERROR);
require(!isPaymentNative, PAYMENT_NATIVE_ERROR);
orders[orderId].status = OrderStatus.FULFILLED;
IERC20Extented(paymentToken).transferFrom(owner, address(this), amountToken);
emit OrderFulfilledERC20(owner, orderId, timestamp, amountUSD, paymentToken, amountToken);
}
/**
* @dev performs the execution of an order that is paid for by a native token
* @param orderId id of order
*/
function fulfillOrderNative(bytes32 orderId) external payable {
}
/**
* @dev gets a boolean value that is true if the order exists or has been fulfilled
* @param orderId id of order
*/
function isOrderPresented(bytes32 orderId) public view returns (bool) {
}
/**
* @dev gets a boolean value whether this token is available for order payment
* @param paymentToken address of ERC20 token
*/
function paymentTokenAvailable(address paymentToken) public view returns (bool) {
}
/**
* @dev cancel not fulfilled order. Called only by ORDER_ADMIN
* @param orderId id of order
*/
function cancelOrder(bytes32 orderId) external {
}
/**
* @dev get parameters of order
* @param orderId id of order
* @return owner the user who placed the order
* @return amountUSD order price in usd
* @return paymentToken the token that will be used to pay for the order
* @return amountToken order price in payment token, this amount will be debited upon fulfill of the order
* @return initializedAt the time the order was placed
* @return expiresAt the time the order will expire
* @return isPaymentNative payment will be in native tokens
* @return status status of order
*/
function getOrder(
bytes32 orderId
)
public
view
returns (
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
uint256 initializedAt,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
)
{
}
// Returns block.timestamp, overridable for test purposes.
function _now() internal view virtual returns (uint256) {
}
}
| isOrderPresented(orderId),ORDER_NOT_EXISTS_ERROR | 504,091 | isOrderPresented(orderId) |
PAYMENT_NATIVE_ERROR | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
abstract contract IERC20Extented is IERC20 {
function decimals() public view virtual returns (uint8);
}
/**
* @title GetPayment Contract
* @notice This contract receives payment for orders
*/
contract GetPayment is AccessControl {
// error constants
string constant DEFAULT_ADMIN_ERROR = "need DEFAULT_ADMIN_ROLE";
string constant TOKEN_ADMIN_ERROR = "need TOKEN_ADMIN_ROLE";
string constant ORDER_ADMIN_ERROR = "need ORDER_ADMIN_ROLE";
string constant ORACLE_ADRESS_ERROR = "INVALID_ORACLE_ADDRESS";
string constant TOKEN_ADRESS_ERROR = "INVALID_TOKEN_ADDRESS";
string constant TOKEN_ADDED_ERROR = "TOKEN_ALREADY_ADDED";
string constant TOKEN_NOT_ADDED_ERROR = "TOKEN_NOT_ADDED";
string constant BAD_TOKEN_ERROR = "BAD_TOKEN_FOR_PRICE_CALCULATIONS";
string constant ZERO_DECIMALS_ERROR = "INVALID_DECIMALS";
string constant TIME_ERROR = "BAD_EXPIRATION_TIME";
string constant AMOUNT_ERROR = "INVALID_AMOUNT";
string constant BALANCE_ERROR = "BALANCE_IS_NOT_ENOUGH";
string constant SEND_ERROR = "FAILED_TO_SEND";
string constant NOT_OWNER_ERROR = "msg.sender_NOT_OWNER";
string constant ORDER_EXISTS_ERROR = "ORDER_ALREADY_EXIST";
string constant ORDER_FULFILL_ERROR = "ORDER_FULFILLED";
string constant ORDER_NOT_EXISTS_ERROR = "ORDER_NOT_EXIST";
string constant ORDER_EXPIRED_ERROR = "ORDER_EXPIRED";
string constant NATIVE_TOKEN_ERROR = "NATIVE_NOT_VALID_METHOD";
string constant NATIVE_ADDRESS_ERROR = "NATIVE_ORACLE_ADDRESS_NOT_SET";
string constant NATIVE_DECIMALS_ERROR = "NATIVE_DECIMALS_NOT_SET";
string constant PAYMENT_NATIVE_ERROR = "PAYMENT_IS_NATIVE";
string constant PAYMENT_NOT_NATIVE_ERROR = "PAYMENT_IS_NOT_NATIVE";
address public nativePriceOracleAddress;
uint256 nativeTokenDecimals;
// when native payment method available, user can place an order that pays for native tokens
bool public isNativeTokenValidPaymentMethod;
// mapping of ERC20 tokens available for payment
mapping(address => address) public paymentTokenPriceOracleAddress;
// order expiration time
uint256 public expirationTimeSeconds;
enum OrderStatus {
NOT_EXISTS,
EXISTS,
FULFILLED
}
struct Order {
address owner;
uint256 amountUSD;
address paymentToken;
uint256 amountToken;
uint256 initializedAt;
uint256 expiresAt;
bool isPaymentNative;
OrderStatus status;
}
mapping(bytes32 => Order) orders;
bytes32 public constant TOKEN_ADMIN_ROLE = keccak256("TOKEN_ADMIN_ROLE");
bytes32 public constant ORDER_ADMIN_ROLE = keccak256("ORDER_ADMIN_ROLE");
event OrderFulfilledERC20(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
address paymentTokenAddress,
uint256 amountToken
);
event OrderFulfilledNative(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
uint256 amountNative
);
/**
* @dev common parameters are given through constructor.
* @param _expirationTimeSeconds order expiration time in seconds
**/
constructor(uint256 _expirationTimeSeconds) {
}
/**
* @dev calculate the price in ERC20 token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
* @param tokenAddress address of ERC20 token
*/
function calculatePriceERC20(uint256 amountUSD, address tokenAddress) public view returns (uint256) {
}
/**
* @dev calculate the price in native token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function calculatePriceNative(uint256 amountUSD) public view returns (uint256) {
}
/**
* @dev set Chainlink price oracle address. Called only by TOKEN_ADMIN
* @param oracleAddress Chainlink price oracle address of NativeToken/USD pair
*/
function setNativePriceOracleAddress(address oracleAddress) external {
}
/**
* @dev set decimals of native token. Called only by TOKEN_ADMIN
* @param nativeDecimals decimals of native token
*/
function setNativeTokenDecimals(uint8 nativeDecimals) external {
}
/**
* @dev set order expiration time. Called only by DEFAULT_ADMIN
* @param _expirationTimeSeconds order expiration time in seconds
*/
function setExpirationTimeSeconds(uint256 _expirationTimeSeconds) external {
}
/**
* @dev enable or disable the ability to pay for an order using native tokens. Called only by DEFAULT_ADMIN
* @param isNativeValid boolean whether payment for the order with a native token is available
*/
function setIsNativeTokenValidPaymentMethod(bool isNativeValid) external {
}
/**
* @dev add a new payment ERC20 token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function addPaymentToken(address tokenAddress, address oracleAddress) external {
}
/**
* @dev change the oracle address of the payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function setPaymentTokenOracleAddress(address tokenAddress, address oracleAddress) external {
}
/**
* @dev remove payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
*/
function removePaymentToken(address tokenAddress) external {
}
/**
* @dev withdraw ERC20 token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param tokenAddress address of ERC20 token
* @param amount amount of tokens to withdraw
*/
function withdrawERC20Tokens(address tokenAddress, uint256 amount) external {
}
/**
* @dev withdraw native token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param amount amount of tokens to withdraw
*/
function withdrawNative(uint256 amount) external {
}
/**
* @dev place an order that pays for ERC20 tokens
* @param orderId id of order
* @param paymentToken the token that will be used to pay for the order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderERC20(bytes32 orderId, address paymentToken, uint256 amountUSD) external {
}
/**
* @dev place an order that pays for native tokens
* @param orderId id of order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderNative(bytes32 orderId, uint256 amountUSD) external {
}
/**
* @dev performs the execution of an order that is paid for by a ERC20 token
* @param orderId id of order
*/
function fulfillOrderERC20(bytes32 orderId) external {
require(isOrderPresented(orderId), ORDER_NOT_EXISTS_ERROR);
(
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
) = getOrder(orderId);
require(owner == _msgSender(), NOT_OWNER_ERROR);
uint256 timestamp = _now();
require(timestamp < expiresAt, ORDER_EXPIRED_ERROR);
require(status == OrderStatus.EXISTS, ORDER_FULFILL_ERROR);
require(<FILL_ME>)
orders[orderId].status = OrderStatus.FULFILLED;
IERC20Extented(paymentToken).transferFrom(owner, address(this), amountToken);
emit OrderFulfilledERC20(owner, orderId, timestamp, amountUSD, paymentToken, amountToken);
}
/**
* @dev performs the execution of an order that is paid for by a native token
* @param orderId id of order
*/
function fulfillOrderNative(bytes32 orderId) external payable {
}
/**
* @dev gets a boolean value that is true if the order exists or has been fulfilled
* @param orderId id of order
*/
function isOrderPresented(bytes32 orderId) public view returns (bool) {
}
/**
* @dev gets a boolean value whether this token is available for order payment
* @param paymentToken address of ERC20 token
*/
function paymentTokenAvailable(address paymentToken) public view returns (bool) {
}
/**
* @dev cancel not fulfilled order. Called only by ORDER_ADMIN
* @param orderId id of order
*/
function cancelOrder(bytes32 orderId) external {
}
/**
* @dev get parameters of order
* @param orderId id of order
* @return owner the user who placed the order
* @return amountUSD order price in usd
* @return paymentToken the token that will be used to pay for the order
* @return amountToken order price in payment token, this amount will be debited upon fulfill of the order
* @return initializedAt the time the order was placed
* @return expiresAt the time the order will expire
* @return isPaymentNative payment will be in native tokens
* @return status status of order
*/
function getOrder(
bytes32 orderId
)
public
view
returns (
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
uint256 initializedAt,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
)
{
}
// Returns block.timestamp, overridable for test purposes.
function _now() internal view virtual returns (uint256) {
}
}
| !isPaymentNative,PAYMENT_NATIVE_ERROR | 504,091 | !isPaymentNative |
ORDER_ADMIN_ERROR | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
abstract contract IERC20Extented is IERC20 {
function decimals() public view virtual returns (uint8);
}
/**
* @title GetPayment Contract
* @notice This contract receives payment for orders
*/
contract GetPayment is AccessControl {
// error constants
string constant DEFAULT_ADMIN_ERROR = "need DEFAULT_ADMIN_ROLE";
string constant TOKEN_ADMIN_ERROR = "need TOKEN_ADMIN_ROLE";
string constant ORDER_ADMIN_ERROR = "need ORDER_ADMIN_ROLE";
string constant ORACLE_ADRESS_ERROR = "INVALID_ORACLE_ADDRESS";
string constant TOKEN_ADRESS_ERROR = "INVALID_TOKEN_ADDRESS";
string constant TOKEN_ADDED_ERROR = "TOKEN_ALREADY_ADDED";
string constant TOKEN_NOT_ADDED_ERROR = "TOKEN_NOT_ADDED";
string constant BAD_TOKEN_ERROR = "BAD_TOKEN_FOR_PRICE_CALCULATIONS";
string constant ZERO_DECIMALS_ERROR = "INVALID_DECIMALS";
string constant TIME_ERROR = "BAD_EXPIRATION_TIME";
string constant AMOUNT_ERROR = "INVALID_AMOUNT";
string constant BALANCE_ERROR = "BALANCE_IS_NOT_ENOUGH";
string constant SEND_ERROR = "FAILED_TO_SEND";
string constant NOT_OWNER_ERROR = "msg.sender_NOT_OWNER";
string constant ORDER_EXISTS_ERROR = "ORDER_ALREADY_EXIST";
string constant ORDER_FULFILL_ERROR = "ORDER_FULFILLED";
string constant ORDER_NOT_EXISTS_ERROR = "ORDER_NOT_EXIST";
string constant ORDER_EXPIRED_ERROR = "ORDER_EXPIRED";
string constant NATIVE_TOKEN_ERROR = "NATIVE_NOT_VALID_METHOD";
string constant NATIVE_ADDRESS_ERROR = "NATIVE_ORACLE_ADDRESS_NOT_SET";
string constant NATIVE_DECIMALS_ERROR = "NATIVE_DECIMALS_NOT_SET";
string constant PAYMENT_NATIVE_ERROR = "PAYMENT_IS_NATIVE";
string constant PAYMENT_NOT_NATIVE_ERROR = "PAYMENT_IS_NOT_NATIVE";
address public nativePriceOracleAddress;
uint256 nativeTokenDecimals;
// when native payment method available, user can place an order that pays for native tokens
bool public isNativeTokenValidPaymentMethod;
// mapping of ERC20 tokens available for payment
mapping(address => address) public paymentTokenPriceOracleAddress;
// order expiration time
uint256 public expirationTimeSeconds;
enum OrderStatus {
NOT_EXISTS,
EXISTS,
FULFILLED
}
struct Order {
address owner;
uint256 amountUSD;
address paymentToken;
uint256 amountToken;
uint256 initializedAt;
uint256 expiresAt;
bool isPaymentNative;
OrderStatus status;
}
mapping(bytes32 => Order) orders;
bytes32 public constant TOKEN_ADMIN_ROLE = keccak256("TOKEN_ADMIN_ROLE");
bytes32 public constant ORDER_ADMIN_ROLE = keccak256("ORDER_ADMIN_ROLE");
event OrderFulfilledERC20(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
address paymentTokenAddress,
uint256 amountToken
);
event OrderFulfilledNative(
address indexed purchaser,
bytes32 indexed orderId,
uint256 indexed timestamp,
uint256 amountUSD,
uint256 amountNative
);
/**
* @dev common parameters are given through constructor.
* @param _expirationTimeSeconds order expiration time in seconds
**/
constructor(uint256 _expirationTimeSeconds) {
}
/**
* @dev calculate the price in ERC20 token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
* @param tokenAddress address of ERC20 token
*/
function calculatePriceERC20(uint256 amountUSD, address tokenAddress) public view returns (uint256) {
}
/**
* @dev calculate the price in native token for a given amount of usd
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function calculatePriceNative(uint256 amountUSD) public view returns (uint256) {
}
/**
* @dev set Chainlink price oracle address. Called only by TOKEN_ADMIN
* @param oracleAddress Chainlink price oracle address of NativeToken/USD pair
*/
function setNativePriceOracleAddress(address oracleAddress) external {
}
/**
* @dev set decimals of native token. Called only by TOKEN_ADMIN
* @param nativeDecimals decimals of native token
*/
function setNativeTokenDecimals(uint8 nativeDecimals) external {
}
/**
* @dev set order expiration time. Called only by DEFAULT_ADMIN
* @param _expirationTimeSeconds order expiration time in seconds
*/
function setExpirationTimeSeconds(uint256 _expirationTimeSeconds) external {
}
/**
* @dev enable or disable the ability to pay for an order using native tokens. Called only by DEFAULT_ADMIN
* @param isNativeValid boolean whether payment for the order with a native token is available
*/
function setIsNativeTokenValidPaymentMethod(bool isNativeValid) external {
}
/**
* @dev add a new payment ERC20 token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function addPaymentToken(address tokenAddress, address oracleAddress) external {
}
/**
* @dev change the oracle address of the payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
* @param oracleAddress Chainlink price oracle address of Token/USD pair
*/
function setPaymentTokenOracleAddress(address tokenAddress, address oracleAddress) external {
}
/**
* @dev remove payment token. Called only by TOKEN_ADMIN
* @param tokenAddress address of ERC20 token
*/
function removePaymentToken(address tokenAddress) external {
}
/**
* @dev withdraw ERC20 token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param tokenAddress address of ERC20 token
* @param amount amount of tokens to withdraw
*/
function withdrawERC20Tokens(address tokenAddress, uint256 amount) external {
}
/**
* @dev withdraw native token from the contract address to msgSender address. Called only by DEFAULT_ADMIN
* @param amount amount of tokens to withdraw
*/
function withdrawNative(uint256 amount) external {
}
/**
* @dev place an order that pays for ERC20 tokens
* @param orderId id of order
* @param paymentToken the token that will be used to pay for the order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderERC20(bytes32 orderId, address paymentToken, uint256 amountUSD) external {
}
/**
* @dev place an order that pays for native tokens
* @param orderId id of order
* @param amountUSD price in usd. amountUSD must be an integer, 1 amountUSD = 1 USD
*/
function placeOrderNative(bytes32 orderId, uint256 amountUSD) external {
}
/**
* @dev performs the execution of an order that is paid for by a ERC20 token
* @param orderId id of order
*/
function fulfillOrderERC20(bytes32 orderId) external {
}
/**
* @dev performs the execution of an order that is paid for by a native token
* @param orderId id of order
*/
function fulfillOrderNative(bytes32 orderId) external payable {
}
/**
* @dev gets a boolean value that is true if the order exists or has been fulfilled
* @param orderId id of order
*/
function isOrderPresented(bytes32 orderId) public view returns (bool) {
}
/**
* @dev gets a boolean value whether this token is available for order payment
* @param paymentToken address of ERC20 token
*/
function paymentTokenAvailable(address paymentToken) public view returns (bool) {
}
/**
* @dev cancel not fulfilled order. Called only by ORDER_ADMIN
* @param orderId id of order
*/
function cancelOrder(bytes32 orderId) external {
require(<FILL_ME>)
require(isOrderPresented(orderId), ORDER_NOT_EXISTS_ERROR);
(, , , , , , , OrderStatus status) = getOrder(orderId);
require(status != OrderStatus.FULFILLED, ORDER_FULFILL_ERROR);
orders[orderId] = Order(address(0), 0, address(0), 0, 0, 0, false, OrderStatus.NOT_EXISTS);
}
/**
* @dev get parameters of order
* @param orderId id of order
* @return owner the user who placed the order
* @return amountUSD order price in usd
* @return paymentToken the token that will be used to pay for the order
* @return amountToken order price in payment token, this amount will be debited upon fulfill of the order
* @return initializedAt the time the order was placed
* @return expiresAt the time the order will expire
* @return isPaymentNative payment will be in native tokens
* @return status status of order
*/
function getOrder(
bytes32 orderId
)
public
view
returns (
address owner,
uint256 amountUSD,
address paymentToken,
uint256 amountToken,
uint256 initializedAt,
uint256 expiresAt,
bool isPaymentNative,
OrderStatus status
)
{
}
// Returns block.timestamp, overridable for test purposes.
function _now() internal view virtual returns (uint256) {
}
}
| hasRole(ORDER_ADMIN_ROLE,_msgSender()),ORDER_ADMIN_ERROR | 504,091 | hasRole(ORDER_ADMIN_ROLE,_msgSender()) |
"You have already minted." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/access/Ownable.sol';
import 'erc721a/contracts/ERC721A.sol';
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract ThugCity is ERC721A, Ownable {
uint public constant MINT_THREE_PRICE = 0.02 ether;
uint public constant MINT_FIVE_PRICE = 0.035 ether;
uint public maxSupply = 5000;
bool public isPublicSale = false;
bool public isWhitelistSale = false;
bool public isMetadataFinal;
string private _baseURL;
bytes32 public merkleRoot;
mapping(address => uint) private _walletMintedCount;
constructor() ERC721A('Thug City', 'XXX') {}
function _baseURI() internal view override returns (string memory) {
}
function allCaptured(string memory url) external onlyOwner {
}
function mintedCount(address owner) external view returns (uint) {
}
function releaseAllPrisoners(bool value) external onlyOwner {
}
function releasePrisoners(bool value) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function callForHelp(address to, uint count) external onlyOwner {
}
function reduceSupply(uint newMaxSupply) external onlyOwner {
}
function tokenURI(uint tokenId)
public
view
override
returns (string memory)
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner{
}
function prisonEscapeLive(uint256 quantity, bytes32[] memory _merkleProof) external payable {
require(isWhitelistSale, "WL sale is not open");
require(quantity > 0, "Quantity of tokens must be bigger than 0");
require(totalSupply() + quantity <= maxSupply, "Quantity exceeds max supply of tokens");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Incorrect proof");
if (quantity == 1)
{
require(msg.value >= 0, "Insufficient ether value");
}
else if (quantity == 3)
{
require(msg.value >= MINT_THREE_PRICE, "Insufficient ether value");
}
else if (quantity == 5)
{
require(msg.value >= MINT_FIVE_PRICE, "Insufficient ether value");
}
else{
require(false, "You can only make 1, 3, or 5.");
}
_walletMintedCount[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function arrested(uint256 tokenId) public onlyOwner {
}
function remainingPrisoners(uint256 quantity) external payable {
}
}
| _walletMintedCount[msg.sender]==0,"You have already minted." | 504,302 | _walletMintedCount[msg.sender]==0 |
"moonbirdPUNKS: Mint exceeds supply" | pragma solidity ^0.8.9;
contract multichainmoonbirdPUNKS is ERC721, NonblockingReceiver {
string public baseURI = "ipfs://QmaJebT6ZGgKWQj5TzJnNg2yUHBTnCEZi6ffuBdLhcJzqs/";
string public contractURI = "ipfs://Qmbht14SgQMmySpm8BHL6CwB47ErhTaHYLYLcE8mYEniZw";
string public constant baseExtension = ".json";
uint256 nextTokenId;
uint256 MAX_MINT;
uint256 gasForDestinationLzReceive = 350000;
uint256 public constant MAX_PER_TX = 2;
uint256 public constant MAX_PER_WALLET = 30;
mapping(address => uint256) public minted;
bool public paused = false;
constructor(
address _endpoint,
uint256 startId,
uint256 _max
) ERC721("moonbirdPUNKS", "mbPUNKS") {
}
function mint(uint256 _amount) external payable {
address _caller = _msgSender();
require(!paused, "moonbirdPUNKS: Paused");
require(<FILL_ME>)
require(MAX_PER_TX >= _amount , "moonbirdPUNKS: Excess max per tx");
require(MAX_PER_WALLET >= minted[_caller] + _amount, "moonbirdPUNKS: Excess max per wallet");
minted[_caller] += _amount;
for(uint256 i = 0; i < _amount; i++) {
_safeMint(_caller, ++nextTokenId);
}
}
// This function transfers the nft from your address on the
// source chain to the same address on the destination chain
function traverseChains(uint16 _chainId, uint256 tokenId) public payable {
}
function getEstimatedFees(uint16 _chainId, uint256 tokenId) public view returns (uint) {
}
function pause(bool _state) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setContractURI(string memory _contractURI) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function setGasForDestinationLzReceive(uint256 _gasForDestinationLzReceive) external onlyOwner {
}
function withdraw() external onlyOwner {
}
// ------------------
// Internal Functions
// ------------------
function _LzReceive(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes memory _payload
) internal override {
}
}
| nextTokenId+_amount<=MAX_MINT,"moonbirdPUNKS: Mint exceeds supply" | 504,370 | nextTokenId+_amount<=MAX_MINT |